omega-mcp
aien-dev/omega-mcp
Brought by drakestapleton
omega-mcp / data / reference.json
| 1 | { |
| 2 | "pin": { |
| 3 | "omega_mv": "6c562dd1f7ab01fd9a2638e74a7330ec4c941ad8", |
| 4 | "omc_sha256": "34d611ca0415eab1728d3234911d90e74af17ba9ab0c581d559f48274d7ca6d3" |
| 5 | }, |
| 6 | "tools": [ |
| 7 | { |
| 8 | "name": "compile", |
| 9 | "title": "Compile Omega source", |
| 10 | "description": "Compile Omega (.om) source with the pinned seeded compiler omc (omega-mv@6c562dd1). Returns ok, the binary's size and sha256, or the compile error {line, code, meaning, fix}.", |
| 11 | "inputSchema": { |
| 12 | "type": "object", |
| 13 | "properties": { |
| 14 | "source": { |
| 15 | "type": "string", |
| 16 | "description": "Omega (.om) source text of one unit" |
| 17 | } |
| 18 | }, |
| 19 | "required": [ |
| 20 | "source" |
| 21 | ], |
| 22 | "additionalProperties": false |
| 23 | } |
| 24 | }, |
| 25 | { |
| 26 | "name": "run", |
| 27 | "title": "Compile and run Omega source", |
| 28 | "description": "Compile Omega source and run the program in an isolated sandbox (no network, no host filesystem, empty environment, CPU/memory/file/process limits). Returns the compile result, capped stdout/stderr and the interpreted exit status (normal, trap N with its meaning, or the limit that stopped it).", |
| 29 | "inputSchema": { |
| 30 | "type": "object", |
| 31 | "properties": { |
| 32 | "source": { |
| 33 | "type": "string", |
| 34 | "description": "Omega (.om) source text of one unit" |
| 35 | }, |
| 36 | "stdin": { |
| 37 | "type": "string", |
| 38 | "description": "bytes given to the program on stdin (default empty)" |
| 39 | }, |
| 40 | "timeout_ms": { |
| 41 | "type": "integer", |
| 42 | "minimum": 1, |
| 43 | "maximum": 30000, |
| 44 | "description": "wall-clock limit in milliseconds (default 5000)" |
| 45 | } |
| 46 | }, |
| 47 | "required": [ |
| 48 | "source" |
| 49 | ], |
| 50 | "additionalProperties": false |
| 51 | } |
| 52 | }, |
| 53 | { |
| 54 | "name": "explain_error", |
| 55 | "title": "Explain an Omega error or trap", |
| 56 | "description": "Explain a compile error code 1..30, an `omc: line N: error K` line, `trap T`, or a program exit status 101..114 (trap). Returns meaning, cause, fix, a minimal example and source citations.", |
| 57 | "inputSchema": { |
| 58 | "type": "object", |
| 59 | "properties": { |
| 60 | "query": { |
| 61 | "type": [ |
| 62 | "string", |
| 63 | "integer" |
| 64 | ], |
| 65 | "description": "an error code 1..30, an `omc: line N: error K` line, `trap T` (1..14) or an exit status 101..114; a string of 1..200 bytes or a nonnegative integer" |
| 66 | } |
| 67 | }, |
| 68 | "required": [ |
| 69 | "query" |
| 70 | ], |
| 71 | "additionalProperties": false |
| 72 | } |
| 73 | }, |
| 74 | { |
| 75 | "name": "lookup", |
| 76 | "title": "Look up an Omega word or topic", |
| 77 | "description": "Look up any Omega keyword (all 201 entries of the compiler's keyword table) or a topic (requires, ensures, invariant, result, om2, exit_status, packed_list, paths, host_words, compile_errors, traps, loops, contracts): form, arity, types, result, example and citations. A query that is not an exact keyword or topic searches names and summaries (at most 20 results).", |
| 78 | "inputSchema": { |
| 79 | "type": "object", |
| 80 | "properties": { |
| 81 | "query": { |
| 82 | "type": "string", |
| 83 | "minLength": 1, |
| 84 | "maxLength": 64, |
| 85 | "description": "exact keyword or topic, or a case-insensitive substring to search for" |
| 86 | } |
| 87 | }, |
| 88 | "required": [ |
| 89 | "query" |
| 90 | ], |
| 91 | "additionalProperties": false |
| 92 | } |
| 93 | } |
| 94 | ], |
| 95 | "errors": { |
| 96 | "1": { |
| 97 | "meaning": "stdin read failed", |
| 98 | "cause": "The compiler could not read its input (stdin is not readable, e.g. a directory).", |
| 99 | "fix": "Give omc a readable source file on stdin.", |
| 100 | "citations": [ |
| 101 | { |
| 102 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1409", |
| 103 | "quote": "fail 1" |
| 104 | }, |
| 105 | { |
| 106 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 107 | "quote": "fn fail code ulong to void" |
| 108 | }, |
| 109 | { |
| 110 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 111 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 112 | } |
| 113 | ], |
| 114 | "example": null, |
| 115 | "reproduce": "omc < / (stdin is a directory: the read fails, exit 1, stderr 'omc: line 1: error 1')" |
| 116 | }, |
| 117 | "2": { |
| 118 | "meaning": "stdout write failed", |
| 119 | "cause": "The compiler could not write the binary (stdout is full or closed).", |
| 120 | "fix": "Write omc's stdout to a regular file with space.", |
| 121 | "citations": [ |
| 122 | { |
| 123 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1909", |
| 124 | "quote": "fail 2" |
| 125 | }, |
| 126 | { |
| 127 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 128 | "quote": "fn fail code ulong to void" |
| 129 | }, |
| 130 | { |
| 131 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 132 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 133 | } |
| 134 | ], |
| 135 | "example": null, |
| 136 | "reproduce": "omc < ok.om > /dev/full (the write fails with ENOSPC, exit 2)" |
| 137 | }, |
| 138 | "3": { |
| 139 | "meaning": "unknown name or field", |
| 140 | "cause": "A word is used as a name but nothing of that name is in scope (or a struct has no such field).", |
| 141 | "fix": "Declare the name first, or fix its spelling.", |
| 142 | "citations": [ |
| 143 | { |
| 144 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:4138", |
| 145 | "quote": "fail 3" |
| 146 | }, |
| 147 | { |
| 148 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 149 | "quote": "fn fail code ulong to void" |
| 150 | }, |
| 151 | { |
| 152 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:678", |
| 153 | "quote": "An unknown field is error 3." |
| 154 | }, |
| 155 | { |
| 156 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 157 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 158 | } |
| 159 | ], |
| 160 | "example": "e03" |
| 161 | }, |
| 162 | "4": { |
| 163 | "meaning": "line ends early", |
| 164 | "cause": "The line stops before a required operand or word.", |
| 165 | "fix": "Supply the missing operand (see the word's form).", |
| 166 | "citations": [ |
| 167 | { |
| 168 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:5553", |
| 169 | "quote": "fail 4" |
| 170 | }, |
| 171 | { |
| 172 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 173 | "quote": "fn fail code ulong to void" |
| 174 | }, |
| 175 | { |
| 176 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:667", |
| 177 | "quote": "error 4 if the line ends before `end`" |
| 178 | }, |
| 179 | { |
| 180 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 181 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 182 | } |
| 183 | ], |
| 184 | "example": "e04" |
| 185 | }, |
| 186 | "5": { |
| 187 | "meaning": "extra words", |
| 188 | "cause": "Words remain on the line after a complete statement.", |
| 189 | "fix": "Remove the extra words or split the line.", |
| 190 | "citations": [ |
| 191 | { |
| 192 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:5612", |
| 193 | "quote": "fail 5" |
| 194 | }, |
| 195 | { |
| 196 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 197 | "quote": "fn fail code ulong to void" |
| 198 | }, |
| 199 | { |
| 200 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1511", |
| 201 | "quote": "trailing words (error 5)" |
| 202 | }, |
| 203 | { |
| 204 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 205 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 206 | } |
| 207 | ], |
| 208 | "example": "e05" |
| 209 | }, |
| 210 | "6": { |
| 211 | "meaning": "malformed number", |
| 212 | "cause": "A number has a non-digit character, more than 20 digits or a bad hex form.", |
| 213 | "fix": "Write a plain decimal (or OM-2 lowercase 0x hex) number.", |
| 214 | "citations": [ |
| 215 | { |
| 216 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3430", |
| 217 | "quote": "fail 6" |
| 218 | }, |
| 219 | { |
| 220 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 221 | "quote": "fn fail code ulong to void" |
| 222 | }, |
| 223 | { |
| 224 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:517", |
| 225 | "quote": "more than 20 digits, or a character that is not a digit, is error 6" |
| 226 | }, |
| 227 | { |
| 228 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 229 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 230 | } |
| 231 | ], |
| 232 | "example": "e06" |
| 233 | }, |
| 234 | "7": { |
| 235 | "meaning": "type mismatch", |
| 236 | "cause": "Two values of an operation, an assignment or a call argument have different types; there are no implicit conversions.", |
| 237 | "fix": "Convert explicitly with a type word, e.g. `add int a int b`.", |
| 238 | "citations": [ |
| 239 | { |
| 240 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:4099", |
| 241 | "quote": "fail 7" |
| 242 | }, |
| 243 | { |
| 244 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 245 | "quote": "fn fail code ulong to void" |
| 246 | }, |
| 247 | { |
| 248 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:513", |
| 249 | "quote": "or the line is refused (error 7)." |
| 250 | }, |
| 251 | { |
| 252 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 253 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 254 | } |
| 255 | ], |
| 256 | "example": "e07" |
| 257 | }, |
| 258 | "8": { |
| 259 | "meaning": "out of range", |
| 260 | "cause": "A literal is outside its type, or a count/bound/trap code is out of its range.", |
| 261 | "fix": "Use a value inside the type's range or a wider type.", |
| 262 | "citations": [ |
| 263 | { |
| 264 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3767", |
| 265 | "quote": "fail 8" |
| 266 | }, |
| 267 | { |
| 268 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 269 | "quote": "fn fail code ulong to void" |
| 270 | }, |
| 271 | { |
| 272 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:515", |
| 273 | "quote": "it must be a" |
| 274 | }, |
| 275 | { |
| 276 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 277 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 278 | } |
| 279 | ], |
| 280 | "example": "e08" |
| 281 | }, |
| 282 | "9": { |
| 283 | "meaning": "word not allowed here", |
| 284 | "cause": "The word is not permitted in this position: break/continue outside a loop, new outside the outermost block, free/own/global/text as a statement, a seventh parameter slot, recursion in function mode.", |
| 285 | "fix": "Move the statement to a valid position or use the documented alternative.", |
| 286 | "citations": [ |
| 287 | { |
| 288 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:5480", |
| 289 | "quote": "fail 9" |
| 290 | }, |
| 291 | { |
| 292 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 293 | "quote": "fn fail code ulong to void" |
| 294 | }, |
| 295 | { |
| 296 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:70", |
| 297 | "quote": "outside a loop: error 9." |
| 298 | }, |
| 299 | { |
| 300 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 301 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 302 | } |
| 303 | ], |
| 304 | "example": "e09" |
| 305 | }, |
| 306 | "10": { |
| 307 | "meaning": "duplicate name", |
| 308 | "cause": "A name already in scope, a function or a struct is declared again.", |
| 309 | "fix": "Choose a new name.", |
| 310 | "citations": [ |
| 311 | { |
| 312 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:4987", |
| 313 | "quote": "fail 10" |
| 314 | }, |
| 315 | { |
| 316 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 317 | "quote": "fn fail code ulong to void" |
| 318 | }, |
| 319 | { |
| 320 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:492", |
| 321 | "quote": "A new name" |
| 322 | }, |
| 323 | { |
| 324 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 325 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 326 | } |
| 327 | ], |
| 328 | "example": "e10" |
| 329 | }, |
| 330 | "11": { |
| 331 | "meaning": "ambiguous bare number", |
| 332 | "cause": "A number appears where no context gives it a type.", |
| 333 | "fix": "Prefix it with a type word, e.g. `x = int 5`.", |
| 334 | "citations": [ |
| 335 | { |
| 336 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:5336", |
| 337 | "quote": "fail 11" |
| 338 | }, |
| 339 | { |
| 340 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 341 | "quote": "fn fail code ulong to void" |
| 342 | }, |
| 343 | { |
| 344 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:514", |
| 345 | "quote": "A bare number takes the type the place needs." |
| 346 | }, |
| 347 | { |
| 348 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 349 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 350 | } |
| 351 | ], |
| 352 | "example": "e11" |
| 353 | }, |
| 354 | "12": { |
| 355 | "meaning": "register pool exhausted", |
| 356 | "cause": "More than 16 values are live at once in a function.", |
| 357 | "fix": "Split the function or reuse names so fewer values are live.", |
| 358 | "citations": [ |
| 359 | { |
| 360 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:5053", |
| 361 | "quote": "fail 12" |
| 362 | }, |
| 363 | { |
| 364 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 365 | "quote": "fn fail code ulong to void" |
| 366 | }, |
| 367 | { |
| 368 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:632", |
| 369 | "quote": "A function that needs more than the 16 registers it hands out is error 12 (no spilling)." |
| 370 | }, |
| 371 | { |
| 372 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 373 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 374 | } |
| 375 | ], |
| 376 | "example": "e12" |
| 377 | }, |
| 378 | "13": { |
| 379 | "meaning": "name too long", |
| 380 | "cause": "A name has more than 63 characters, or an abstract, layout or layout-field name (or any name in IR mode) has more than 8.", |
| 381 | "fix": "Shorten the name: at most 63 characters, 8 for abstract, layout and layout-field names and in IR mode.", |
| 382 | "citations": [ |
| 383 | { |
| 384 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:4115", |
| 385 | "quote": "fail 13" |
| 386 | }, |
| 387 | { |
| 388 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 389 | "quote": "fn fail code ulong to void" |
| 390 | }, |
| 391 | { |
| 392 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:485-486", |
| 393 | "quote": "A name may have up to 63 characters (error 13 beyond): functions, locals, parameters, `for` counters, globals, texts, constants, structs and struct fields." |
| 394 | }, |
| 395 | { |
| 396 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 397 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 398 | } |
| 399 | ], |
| 400 | "example": "e13" |
| 401 | }, |
| 402 | "14": { |
| 403 | "meaning": "capacity exceeded", |
| 404 | "cause": "The unit needs more than a capacity omc still has. Every table that grows with the unit (input, output, names, functions, calls, trap sites, blocks, breaks) lives in one arena that has no size of its own: it grows while the host gives it memory, and the unit is refused only when the host refuses that growth (for example under an address-space limit) or the caller's memory ceiling OMC_MEMORY_MAX is reached; stderr then carries an `omc-use` record with full=1 after the error line. The other bounds are values nested deeper than 32768 levels, AArch64 output past 128 MiB, and the fixed tables OMEGESE 9.6 lists (for example 16 fields a struct, as in the example, 32 `export fn`, 64 unrolled copies and 4 inline levels).", |
| 405 | "fix": "Bring the construct under the bound OMEGESE 9.6 names, split the unit, or give the compiler more memory. A unit whose first line is `usage` compiles as usual and prints its `omc-use` record (what each arena group holds) instead of the binary.", |
| 406 | "citations": [ |
| 407 | { |
| 408 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1248", |
| 409 | "quote": "fail 14" |
| 410 | }, |
| 411 | { |
| 412 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 413 | "quote": "fn fail code ulong to void" |
| 414 | }, |
| 415 | { |
| 416 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:567", |
| 417 | "quote": "input past a real capacity is refused with error 14, never overrun" |
| 418 | }, |
| 419 | { |
| 420 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:596", |
| 421 | "quote": "It grows while the host gives it memory; the host's refusal is error 14" |
| 422 | }, |
| 423 | { |
| 424 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:635-636", |
| 425 | "quote": "16 structs, 16 fields and 64 cells a struct" |
| 426 | }, |
| 427 | { |
| 428 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 429 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 430 | } |
| 431 | ], |
| 432 | "example": "e14" |
| 433 | }, |
| 434 | "15": { |
| 435 | "meaning": "missing end", |
| 436 | "cause": "The input ends inside an open block.", |
| 437 | "fix": "Add the missing `end`.", |
| 438 | "citations": [ |
| 439 | { |
| 440 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:12802", |
| 441 | "quote": "fail 15" |
| 442 | }, |
| 443 | { |
| 444 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 445 | "quote": "fn fail code ulong to void" |
| 446 | }, |
| 447 | { |
| 448 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1517", |
| 449 | "quote": "Missing function `end` is error 15." |
| 450 | }, |
| 451 | { |
| 452 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 453 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 454 | } |
| 455 | ], |
| 456 | "example": "e15" |
| 457 | }, |
| 458 | "16": { |
| 459 | "meaning": "syntax error or unknown word", |
| 460 | "cause": "A line does not start with a known statement form, or a type/length position holds something else.", |
| 461 | "fix": "Check the word's spelling and form with lookup.", |
| 462 | "citations": [ |
| 463 | { |
| 464 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2498", |
| 465 | "quote": "fail 16" |
| 466 | }, |
| 467 | { |
| 468 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 469 | "quote": "fn fail code ulong to void" |
| 470 | }, |
| 471 | { |
| 472 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:525", |
| 473 | "quote": "a pool written without its length is refused (error 16)" |
| 474 | }, |
| 475 | { |
| 476 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 477 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 478 | } |
| 479 | ], |
| 480 | "example": "e16" |
| 481 | }, |
| 482 | "17": { |
| 483 | "meaning": "line after a path end", |
| 484 | "cause": "A line follows ret, break, continue, trap or exit in the same block and can never run.", |
| 485 | "fix": "Delete the unreachable line or move it before the path end.", |
| 486 | "citations": [ |
| 487 | { |
| 488 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:15238", |
| 489 | "quote": "fail 17" |
| 490 | }, |
| 491 | { |
| 492 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 493 | "quote": "fn fail code ulong to void" |
| 494 | }, |
| 495 | { |
| 496 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:70-71", |
| 497 | "quote": "(a later line in the same block is error 17)" |
| 498 | }, |
| 499 | { |
| 500 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 501 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 502 | } |
| 503 | ], |
| 504 | "example": "e17" |
| 505 | }, |
| 506 | "18": { |
| 507 | "meaning": "missing ret", |
| 508 | "cause": "A function with a result type can reach its end without a ret.", |
| 509 | "fix": "Add a ret on every path (or make the function void).", |
| 510 | "citations": [ |
| 511 | { |
| 512 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:14093", |
| 513 | "quote": "fail 18" |
| 514 | }, |
| 515 | { |
| 516 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 517 | "quote": "fn fail code ulong to void" |
| 518 | }, |
| 519 | { |
| 520 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:483", |
| 521 | "quote": "A function with a return type whose `end` can be reached is error 18." |
| 522 | }, |
| 523 | { |
| 524 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 525 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 526 | } |
| 527 | ], |
| 528 | "example": "e18" |
| 529 | }, |
| 530 | "19": { |
| 531 | "meaning": "global passed or same array twice", |
| 532 | "cause": "A global is passed as an argument, or one array is passed twice in a call.", |
| 533 | "fix": "Copy the global into a local array (new) or pass distinct arrays.", |
| 534 | "citations": [ |
| 535 | { |
| 536 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:7541", |
| 537 | "quote": "fail 19" |
| 538 | }, |
| 539 | { |
| 540 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 541 | "quote": "fn fail code ulong to void" |
| 542 | }, |
| 543 | { |
| 544 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:542", |
| 545 | "quote": "A global is" |
| 546 | }, |
| 547 | { |
| 548 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 549 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 550 | } |
| 551 | ], |
| 552 | "example": "e19" |
| 553 | }, |
| 554 | "20": { |
| 555 | "meaning": "write to a read-only array", |
| 556 | "cause": "put, read or an edit argument targets a view or a text.", |
| 557 | "fix": "Write into a local, global or edit array instead.", |
| 558 | "citations": [ |
| 559 | { |
| 560 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:7558", |
| 561 | "quote": "fail 20" |
| 562 | }, |
| 563 | { |
| 564 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 565 | "quote": "fn fail code ulong to void" |
| 566 | }, |
| 567 | { |
| 568 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:540", |
| 569 | "quote": "A view is read-only; `put`, `read` into it, or passing it as edit is error 20." |
| 570 | }, |
| 571 | { |
| 572 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 573 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 574 | } |
| 575 | ], |
| 576 | "example": "e20" |
| 577 | }, |
| 578 | "21": { |
| 579 | "meaning": "constant index out of range", |
| 580 | "cause": "A literal index is outside the array or field.", |
| 581 | "fix": "Use an index below the length.", |
| 582 | "citations": [ |
| 583 | { |
| 584 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:7418", |
| 585 | "quote": "fail 21" |
| 586 | }, |
| 587 | { |
| 588 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 589 | "quote": "fn fail code ulong to void" |
| 590 | }, |
| 591 | { |
| 592 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:547", |
| 593 | "quote": "A number index must be inside A when om4 reads it (error 21)" |
| 594 | }, |
| 595 | { |
| 596 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 597 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 598 | } |
| 599 | ], |
| 600 | "example": "e21" |
| 601 | }, |
| 602 | "22": { |
| 603 | "meaning": "bad text literal", |
| 604 | "cause": "A text literal has an unknown escape or no closing quote.", |
| 605 | "fix": "Use only \\n \\t \\\\ \\\" escapes and close the quote.", |
| 606 | "citations": [ |
| 607 | { |
| 608 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2360", |
| 609 | "quote": "fail 22" |
| 610 | }, |
| 611 | { |
| 612 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 613 | "quote": "fn fail code ulong to void" |
| 614 | }, |
| 615 | { |
| 616 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:531", |
| 617 | "quote": "any other escape, or a quote missing its end," |
| 618 | }, |
| 619 | { |
| 620 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 621 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 622 | } |
| 623 | ], |
| 624 | "example": "e22" |
| 625 | }, |
| 626 | "23": { |
| 627 | "meaning": "size capacity", |
| 628 | "cause": "An array is over 16777216 elements, globals over 1 GiB or local arrays over 4 MiB.", |
| 629 | "fix": "Use a smaller array.", |
| 630 | "citations": [ |
| 631 | { |
| 632 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:5494", |
| 633 | "quote": "fail 23" |
| 634 | }, |
| 635 | { |
| 636 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 637 | "quote": "fn fail code ulong to void" |
| 638 | }, |
| 639 | { |
| 640 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:536", |
| 641 | "quote": "at most 4 MiB of local arrays (error 23)" |
| 642 | }, |
| 643 | { |
| 644 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 645 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 646 | } |
| 647 | ], |
| 648 | "example": "e23" |
| 649 | }, |
| 650 | "24": { |
| 651 | "meaning": "branch displacement out of range", |
| 652 | "cause": "A branch target is misaligned or out of reach: B.cond, CBZ and CBNZ reach 2^18 words, B and BL 2^25.", |
| 653 | "fix": "Split very large functions or programs; this is reached only by programs with about 1 MiB of code between a conditional branch and its target.", |
| 654 | "citations": [ |
| 655 | { |
| 656 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:5122", |
| 657 | "quote": "fail 24" |
| 658 | }, |
| 659 | { |
| 660 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 661 | "quote": "fn fail code ulong to void" |
| 662 | }, |
| 663 | { |
| 664 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:435", |
| 665 | "quote": "refused with error 24 before any output is accepted" |
| 666 | }, |
| 667 | { |
| 668 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 669 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 670 | } |
| 671 | ], |
| 672 | "example": null, |
| 673 | "example_note": "No minimal example: it needs about 1 MiB of machine code between a branch and its target." |
| 674 | }, |
| 675 | "25": { |
| 676 | "meaning": "not available on this target", |
| 677 | "cause": "Under `target x86linux` or `target x86efi` a construct that target cannot emit: raw AArch64 `emit`, an AArch64-only word (dit, scrub, execpure), a bare unit or a Linux host word under x86efi, or an efi OP outside 0..14.", |
| 678 | "fix": "Use the default AArch64 target for that construct, or write it with words the target supports.", |
| 679 | "citations": [ |
| 680 | { |
| 681 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2212", |
| 682 | "quote": "fail 25" |
| 683 | }, |
| 684 | { |
| 685 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 686 | "quote": "fn fail code ulong to void" |
| 687 | }, |
| 688 | { |
| 689 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:454-455", |
| 690 | "quote": "a bare unit is refused at line 1 with error 25" |
| 691 | }, |
| 692 | { |
| 693 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 694 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 695 | } |
| 696 | ], |
| 697 | "example": "e25" |
| 698 | }, |
| 699 | "26": { |
| 700 | "meaning": "bad memory ceiling", |
| 701 | "cause": "The compiler's environment entry OMC_MEMORY_MAX is not empty, 0, or 1 to 19 decimal digits below 2^63, or an environment entry is too long to read whole. It is refused before any input is read, so the line is 0.", |
| 702 | "fix": "Unset OMC_MEMORY_MAX, or set it to the ceiling in decimal bytes (0 or empty: none).", |
| 703 | "citations": [ |
| 704 | { |
| 705 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:977", |
| 706 | "quote": "fail 26" |
| 707 | }, |
| 708 | { |
| 709 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 710 | "quote": "fn fail code ulong to void" |
| 711 | }, |
| 712 | { |
| 713 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1100", |
| 714 | "quote": "| omc 26 | the compiler's environment entry OMC_MEMORY_MAX is not empty" |
| 715 | }, |
| 716 | { |
| 717 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 718 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 719 | } |
| 720 | ], |
| 721 | "example": null, |
| 722 | "reproduce": "OMC_MEMORY_MAX=12x omc < ok.om (refused before the input is read, exit 26, stderr 'omc: line 0: error 26')" |
| 723 | }, |
| 724 | "27": { |
| 725 | "meaning": "fresh element read before write (OM-2 init)", |
| 726 | "cause": "A fresh parameter element is read before it is definitely written, or the array is passed on.", |
| 727 | "fix": "Write every element before reading it (put with a number index).", |
| 728 | "citations": [ |
| 729 | { |
| 730 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:16617", |
| 731 | "quote": "fail 27" |
| 732 | }, |
| 733 | { |
| 734 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 735 | "quote": "fn fail code ulong to void" |
| 736 | }, |
| 737 | { |
| 738 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:905", |
| 739 | "quote": "else error 27, `obligation=init`, on the get line" |
| 740 | }, |
| 741 | { |
| 742 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 743 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 744 | } |
| 745 | ], |
| 746 | "example": "e27" |
| 747 | }, |
| 748 | "28": { |
| 749 | "meaning": "abstract constructor violation (OM-2 ctor)", |
| 750 | "cause": "seal outside the NAMEmk constructor, or a bad holds predicate.", |
| 751 | "fix": "Seal only inside the function named NAME followed by mk.", |
| 752 | "citations": [ |
| 753 | { |
| 754 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:16240", |
| 755 | "quote": "fail 28" |
| 756 | }, |
| 757 | { |
| 758 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 759 | "quote": "fn fail code ulong to void" |
| 760 | }, |
| 761 | { |
| 762 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:914", |
| 763 | "quote": "a `seal` anywhere else is" |
| 764 | }, |
| 765 | { |
| 766 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 767 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 768 | } |
| 769 | ], |
| 770 | "example": "e28" |
| 771 | }, |
| 772 | "29": { |
| 773 | "meaning": "layout violation (OM-2 layout)", |
| 774 | "cause": "A `layout` line after the first `fn`; SIZE outside 1..4096; a field COUNT outside 1..4096 (a written 0 included); a field that starts or ends past SIZE; or two fields sharing a byte. A SIZE, COUNT or OFF written as 2^64 or more is error 8 instead.", |
| 775 | "fix": "Put every layout above the first fn, keep SIZE and COUNT in 1..4096 (leave COUNT out for one element), and keep every field inside SIZE and apart from the others.", |
| 776 | "citations": [ |
| 777 | { |
| 778 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:16815", |
| 779 | "quote": "fail 29" |
| 780 | }, |
| 781 | { |
| 782 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 783 | "quote": "fn fail code ulong to void" |
| 784 | }, |
| 785 | { |
| 786 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:891", |
| 787 | "quote": "SIZE outside 1..4096 or a `layout` after the first `fn` is error 29" |
| 788 | }, |
| 789 | { |
| 790 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 791 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 792 | } |
| 793 | ], |
| 794 | "example": "e29" |
| 795 | }, |
| 796 | "30": { |
| 797 | "meaning": "contract syntax (OM-2)", |
| 798 | "cause": "Misplaced requires/ensures/invariant, result outside a value postcondition, or a forbidden predicate operation.", |
| 799 | "fix": "Put contracts first in the function or loop body and use only pure integer/bool operations.", |
| 800 | "citations": [ |
| 801 | { |
| 802 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:7730", |
| 803 | "quote": "fail 30" |
| 804 | }, |
| 805 | { |
| 806 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 807 | "quote": "fn fail code ulong to void" |
| 808 | }, |
| 809 | { |
| 810 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1834", |
| 811 | "quote": "Compiler error **30** means misplaced" |
| 812 | }, |
| 813 | { |
| 814 | "ref": "omega-mv@6c562dd1 seed/omc/gate15.sh:160", |
| 815 | "quote": "refusal cases (codes 1..30; 24 with its accept side)" |
| 816 | } |
| 817 | ], |
| 818 | "example": "e30" |
| 819 | } |
| 820 | }, |
| 821 | "traps": { |
| 822 | "1": { |
| 823 | "name": "OVERFLOW", |
| 824 | "meaning": "checked signed arithmetic out of range", |
| 825 | "cause": "Signed add/sub/mul/neg/div/shl produced a value outside the type.", |
| 826 | "fix": "Use a wider type, check the range first, or use an unsigned type if wrapping is intended.", |
| 827 | "citations": [ |
| 828 | { |
| 829 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 830 | "quote": "Signed add, sub, mul, neg, div and shl trap 1" |
| 831 | }, |
| 832 | { |
| 833 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 834 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 835 | } |
| 836 | ], |
| 837 | "example": "t01" |
| 838 | }, |
| 839 | "2": { |
| 840 | "name": "DIV0", |
| 841 | "meaning": "division by zero", |
| 842 | "cause": "div or rem with a divisor of 0.", |
| 843 | "fix": "Check the divisor before dividing.", |
| 844 | "citations": [ |
| 845 | { |
| 846 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:507", |
| 847 | "quote": "div and rem trap 2 when the divisor is 0." |
| 848 | }, |
| 849 | { |
| 850 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 851 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 852 | } |
| 853 | ], |
| 854 | "example": "t02" |
| 855 | }, |
| 856 | "3": { |
| 857 | "name": "BOUNDS", |
| 858 | "meaning": "index or slice out of bounds", |
| 859 | "cause": "A run-time index is not below the length, or a host/read/write slice is outside its array.", |
| 860 | "fix": "Check the index against len A, or fix off/n.", |
| 861 | "citations": [ |
| 862 | { |
| 863 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:548", |
| 864 | "quote": "traps 3 when it is not below the length" |
| 865 | }, |
| 866 | { |
| 867 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 868 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 869 | } |
| 870 | ], |
| 871 | "example": "t03" |
| 872 | }, |
| 873 | "4": { |
| 874 | "name": "LOOP_BOUND", |
| 875 | "meaning": "loop exceeded its bound", |
| 876 | "cause": "A while or for ran past its bound N; with no bound a while, and a for whose count is not a number, stop at 1000000 passes.", |
| 877 | "fix": "Fix the loop condition or give the loop a larger `bound N` (up to 9223372036854775807).", |
| 878 | "citations": [ |
| 879 | { |
| 880 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:64", |
| 881 | "quote": "past N iterations: trap 4" |
| 882 | }, |
| 883 | { |
| 884 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:66-68", |
| 885 | "quote": "With no bound a number count is not guarded and any other count traps 4 after 1000000 passes" |
| 886 | }, |
| 887 | { |
| 888 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 889 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 890 | } |
| 891 | ], |
| 892 | "example": "t04" |
| 893 | }, |
| 894 | "5": { |
| 895 | "name": "CAST", |
| 896 | "meaning": "checked conversion out of range", |
| 897 | "cause": "A conversion `T v` got a value outside T.", |
| 898 | "fix": "Check the range before converting, or convert to a wider type.", |
| 899 | "citations": [ |
| 900 | { |
| 901 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 902 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 903 | }, |
| 904 | { |
| 905 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 906 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 907 | } |
| 908 | ], |
| 909 | "example": "t05" |
| 910 | }, |
| 911 | "6": { |
| 912 | "name": "OOM", |
| 913 | "meaning": "stack pool exhausted", |
| 914 | "cause": "A call or local array would go below the fixed 8 MiB stack (deep recursion).", |
| 915 | "fix": "Bound the recursion or use a loop / smaller local arrays.", |
| 916 | "citations": [ |
| 917 | { |
| 918 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:494", |
| 919 | "quote": "a call or a local array that would go below it traps" |
| 920 | }, |
| 921 | { |
| 922 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 923 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 924 | } |
| 925 | ], |
| 926 | "example": "t06" |
| 927 | }, |
| 928 | "7": { |
| 929 | "name": "SHIFT", |
| 930 | "meaning": "shift or rotate amount out of range", |
| 931 | "cause": "A shift or rotate amount is outside 0..width-1.", |
| 932 | "fix": "Check the amount against the width.", |
| 933 | "citations": [ |
| 934 | { |
| 935 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:509", |
| 936 | "quote": "A shift amount outside 0 .. width - 1 traps 7" |
| 937 | }, |
| 938 | { |
| 939 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 940 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 941 | } |
| 942 | ], |
| 943 | "example": "t07" |
| 944 | }, |
| 945 | "8": { |
| 946 | "name": "RUNTIME", |
| 947 | "meaning": "runtime invariant broken", |
| 948 | "cause": "A runtime invariant (double release, bad handle) failed; checked native code raises it only through `trap 8`.", |
| 949 | "fix": "Find the explicit trap 8 in the program.", |
| 950 | "citations": [ |
| 951 | { |
| 952 | "ref": "omega-mv@6c562dd1 src/compiler/osc_ir.h:176", |
| 953 | "quote": "OSC_TRAP_RUNTIME = 8" |
| 954 | }, |
| 955 | { |
| 956 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 957 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 958 | } |
| 959 | ], |
| 960 | "example": "t08" |
| 961 | }, |
| 962 | "9": { |
| 963 | "name": "REQUIRES", |
| 964 | "meaning": "precondition failed", |
| 965 | "cause": "A requires clause was false on entry.", |
| 966 | "fix": "Call the function only with arguments that satisfy its requires clauses.", |
| 967 | "citations": [ |
| 968 | { |
| 969 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1830", |
| 970 | "quote": "False `requires` uses existing trap **9** (program exit **109**)" |
| 971 | }, |
| 972 | { |
| 973 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 974 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 975 | } |
| 976 | ], |
| 977 | "example": "contract_fail" |
| 978 | }, |
| 979 | "10": { |
| 980 | "name": "ENSURES", |
| 981 | "meaning": "postcondition or invariant failed", |
| 982 | "cause": "An ensures, invariant or holds check was false.", |
| 983 | "fix": "Fix the function body or loop so the stated property holds.", |
| 984 | "citations": [ |
| 985 | { |
| 986 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1831", |
| 987 | "quote": "`ensures` or `invariant` uses existing trap **10** (exit **110**)." |
| 988 | }, |
| 989 | { |
| 990 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 991 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 992 | } |
| 993 | ], |
| 994 | "example": "t10" |
| 995 | }, |
| 996 | "11": { |
| 997 | "name": "ARENA_FULL", |
| 998 | "meaning": "arena allocation over capacity", |
| 999 | "cause": "An OSC arena allocation exceeded the arena's capacity; native program mode raises it only through `trap 11`.", |
| 1000 | "fix": "Find the explicit trap 11 in the program.", |
| 1001 | "citations": [ |
| 1002 | { |
| 1003 | "ref": "omega-mv@6c562dd1 src/compiler/osc_ir.h:183", |
| 1004 | "quote": "OSC_TRAP_ARENA_FULL = 11" |
| 1005 | }, |
| 1006 | { |
| 1007 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 1008 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 1009 | } |
| 1010 | ], |
| 1011 | "example": "t11" |
| 1012 | }, |
| 1013 | "12": { |
| 1014 | "name": "STALE", |
| 1015 | "meaning": "stale versioned handle", |
| 1016 | "cause": "A handle whose generation no longer matches its slot; native program mode raises it only through `trap 12`.", |
| 1017 | "fix": "Find the explicit trap 12 in the program.", |
| 1018 | "citations": [ |
| 1019 | { |
| 1020 | "ref": "omega-mv@6c562dd1 src/compiler/osc_ir.h:185", |
| 1021 | "quote": "OSC_TRAP_STALE = 12" |
| 1022 | }, |
| 1023 | { |
| 1024 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 1025 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 1026 | } |
| 1027 | ], |
| 1028 | "example": "t12" |
| 1029 | }, |
| 1030 | "13": { |
| 1031 | "name": "POOL_FULL", |
| 1032 | "meaning": "pool allocation with every slot live", |
| 1033 | "cause": "An OSC pool allocation found no free slot; native program mode raises it only through `trap 13`.", |
| 1034 | "fix": "Find the explicit trap 13 in the program.", |
| 1035 | "citations": [ |
| 1036 | { |
| 1037 | "ref": "omega-mv@6c562dd1 src/compiler/osc_ir.h:186", |
| 1038 | "quote": "OSC_TRAP_POOL_FULL = 13" |
| 1039 | }, |
| 1040 | { |
| 1041 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 1042 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 1043 | } |
| 1044 | ], |
| 1045 | "example": "t13" |
| 1046 | }, |
| 1047 | "14": { |
| 1048 | "name": "RETIRED", |
| 1049 | "meaning": "pool slot retired at the maximum generation", |
| 1050 | "cause": "An OSC pool allocation found only retired slots; native program mode raises it only through `trap 14`.", |
| 1051 | "fix": "Find the explicit trap 14 in the program.", |
| 1052 | "citations": [ |
| 1053 | { |
| 1054 | "ref": "omega-mv@6c562dd1 src/compiler/osc_ir.h:187", |
| 1055 | "quote": "OSC_TRAP_RETIRED = 14" |
| 1056 | }, |
| 1057 | { |
| 1058 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 1059 | "quote": "A trap in program mode ends the program with exit status 100 + the trap code" |
| 1060 | } |
| 1061 | ], |
| 1062 | "example": "t14" |
| 1063 | } |
| 1064 | }, |
| 1065 | "words": { |
| 1066 | "fopen": { |
| 1067 | "table": "kw", |
| 1068 | "id": 110, |
| 1069 | "category": "host-file", |
| 1070 | "profile": "OM-1", |
| 1071 | "form": "fopen A off n flags mode", |
| 1072 | "arity": 5, |
| 1073 | "types": [ |
| 1074 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1075 | "off: ulong", |
| 1076 | "n: ulong", |
| 1077 | "flags: int", |
| 1078 | "mode: int" |
| 1079 | ], |
| 1080 | "result": "long", |
| 1081 | "summary": "Open a length-delimited path relative to the current directory; return the descriptor. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 1082 | "citations": [ |
| 1083 | { |
| 1084 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3041-3042", |
| 1085 | "quote": "ret 110" |
| 1086 | }, |
| 1087 | { |
| 1088 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1148", |
| 1089 | "quote": "`fopen A off n flags mode`" |
| 1090 | }, |
| 1091 | { |
| 1092 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1093 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1094 | }, |
| 1095 | { |
| 1096 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 1097 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 1098 | } |
| 1099 | ], |
| 1100 | "example": "files" |
| 1101 | }, |
| 1102 | "fclose": { |
| 1103 | "table": "kw", |
| 1104 | "id": 100, |
| 1105 | "category": "host-file", |
| 1106 | "profile": "OM-1", |
| 1107 | "form": "fclose fd", |
| 1108 | "arity": 1, |
| 1109 | "types": [ |
| 1110 | "fd: int" |
| 1111 | ], |
| 1112 | "result": "long", |
| 1113 | "summary": "Close a descriptor. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 1114 | "citations": [ |
| 1115 | { |
| 1116 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3011-3012", |
| 1117 | "quote": "ret 100" |
| 1118 | }, |
| 1119 | { |
| 1120 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1149", |
| 1121 | "quote": "`fclose fd`" |
| 1122 | }, |
| 1123 | { |
| 1124 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1125 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1126 | }, |
| 1127 | { |
| 1128 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 1129 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 1130 | } |
| 1131 | ], |
| 1132 | "example": "files" |
| 1133 | }, |
| 1134 | "fsync": { |
| 1135 | "table": "kw", |
| 1136 | "id": 101, |
| 1137 | "category": "host-file", |
| 1138 | "profile": "OM-1", |
| 1139 | "form": "fsync fd", |
| 1140 | "arity": 1, |
| 1141 | "types": [ |
| 1142 | "fd: int" |
| 1143 | ], |
| 1144 | "result": "long", |
| 1145 | "summary": "Sync file data and metadata. Program mode only; failure is minus the Linux errno.", |
| 1146 | "citations": [ |
| 1147 | { |
| 1148 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3014-3015", |
| 1149 | "quote": "ret 101" |
| 1150 | }, |
| 1151 | { |
| 1152 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1150", |
| 1153 | "quote": "`fsync fd`" |
| 1154 | }, |
| 1155 | { |
| 1156 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1157 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1158 | } |
| 1159 | ], |
| 1160 | "example": "files" |
| 1161 | }, |
| 1162 | "fdsync": { |
| 1163 | "table": "kw", |
| 1164 | "id": 156, |
| 1165 | "category": "host-file", |
| 1166 | "profile": "OM-1", |
| 1167 | "form": "fdsync fd", |
| 1168 | "arity": 1, |
| 1169 | "types": [ |
| 1170 | "fd: int" |
| 1171 | ], |
| 1172 | "result": "long", |
| 1173 | "summary": "Sync file data only (fdatasync). Program mode only; failure is minus the Linux errno.", |
| 1174 | "citations": [ |
| 1175 | { |
| 1176 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2645-2646", |
| 1177 | "quote": "ret 156" |
| 1178 | }, |
| 1179 | { |
| 1180 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1151", |
| 1181 | "quote": "`fdsync fd`" |
| 1182 | }, |
| 1183 | { |
| 1184 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1185 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1186 | } |
| 1187 | ], |
| 1188 | "example": "files" |
| 1189 | }, |
| 1190 | "memfd": { |
| 1191 | "table": "kw", |
| 1192 | "id": 157, |
| 1193 | "category": "host-file", |
| 1194 | "profile": "OM-1", |
| 1195 | "form": "memfd A off n flags", |
| 1196 | "arity": 4, |
| 1197 | "types": [ |
| 1198 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1199 | "off: ulong", |
| 1200 | "n: ulong", |
| 1201 | "flags: int" |
| 1202 | ], |
| 1203 | "result": "long", |
| 1204 | "summary": "Create an anonymous in-memory file (memfd_create); return its descriptor. Program mode only; failure is minus the Linux errno.", |
| 1205 | "citations": [ |
| 1206 | { |
| 1207 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2648-2649", |
| 1208 | "quote": "ret 157" |
| 1209 | }, |
| 1210 | { |
| 1211 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1152", |
| 1212 | "quote": "`memfd A off n flags`" |
| 1213 | }, |
| 1214 | { |
| 1215 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1216 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1217 | } |
| 1218 | ], |
| 1219 | "example": "files" |
| 1220 | }, |
| 1221 | "fchmod": { |
| 1222 | "table": "kw", |
| 1223 | "id": 102, |
| 1224 | "category": "host-file", |
| 1225 | "profile": "OM-1", |
| 1226 | "form": "fchmod fd mode", |
| 1227 | "arity": 2, |
| 1228 | "types": [ |
| 1229 | "fd: int", |
| 1230 | "mode: int" |
| 1231 | ], |
| 1232 | "result": "long", |
| 1233 | "summary": "Set permissions on an open descriptor. Program mode only; failure is minus the Linux errno.", |
| 1234 | "citations": [ |
| 1235 | { |
| 1236 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3017-3018", |
| 1237 | "quote": "ret 102" |
| 1238 | }, |
| 1239 | { |
| 1240 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1153", |
| 1241 | "quote": "`fchmod fd mode`" |
| 1242 | }, |
| 1243 | { |
| 1244 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1245 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1246 | } |
| 1247 | ], |
| 1248 | "example": "files" |
| 1249 | }, |
| 1250 | "chmod": { |
| 1251 | "table": "kw", |
| 1252 | "id": 143, |
| 1253 | "category": "host-file", |
| 1254 | "profile": "OM-1", |
| 1255 | "form": "chmod A off n mode", |
| 1256 | "arity": 4, |
| 1257 | "types": [ |
| 1258 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1259 | "off: ulong", |
| 1260 | "n: ulong", |
| 1261 | "mode: int" |
| 1262 | ], |
| 1263 | "result": "long", |
| 1264 | "summary": "Set permissions on a checked path (fchmodat, flags 0). Program mode only; failure is minus the Linux errno.", |
| 1265 | "citations": [ |
| 1266 | { |
| 1267 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2606-2607", |
| 1268 | "quote": "ret 143" |
| 1269 | }, |
| 1270 | { |
| 1271 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1154", |
| 1272 | "quote": "`chmod A off n mode`" |
| 1273 | }, |
| 1274 | { |
| 1275 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1276 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1277 | } |
| 1278 | ], |
| 1279 | "example": "files" |
| 1280 | }, |
| 1281 | "chown": { |
| 1282 | "table": "kw", |
| 1283 | "id": 151, |
| 1284 | "category": "host-dir", |
| 1285 | "profile": "OM-1", |
| 1286 | "form": "chown A off n uid gid", |
| 1287 | "arity": 5, |
| 1288 | "types": [ |
| 1289 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1290 | "off: ulong", |
| 1291 | "n: ulong", |
| 1292 | "uid: int", |
| 1293 | "gid: int" |
| 1294 | ], |
| 1295 | "result": "long", |
| 1296 | "summary": "Set ownership on a checked path (fchownat, flags 0). Program mode only; failure is minus the Linux errno.", |
| 1297 | "citations": [ |
| 1298 | { |
| 1299 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2630-2631", |
| 1300 | "quote": "ret 151" |
| 1301 | }, |
| 1302 | { |
| 1303 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1155", |
| 1304 | "quote": "`chown A off n uid gid`" |
| 1305 | }, |
| 1306 | { |
| 1307 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1308 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1309 | } |
| 1310 | ], |
| 1311 | "example": "dirs" |
| 1312 | }, |
| 1313 | "faccess": { |
| 1314 | "table": "kw", |
| 1315 | "id": 144, |
| 1316 | "category": "host-file", |
| 1317 | "profile": "OM-1", |
| 1318 | "form": "faccess A off n mode", |
| 1319 | "arity": 4, |
| 1320 | "types": [ |
| 1321 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1322 | "off: ulong", |
| 1323 | "n: ulong", |
| 1324 | "mode: int" |
| 1325 | ], |
| 1326 | "result": "long", |
| 1327 | "summary": "Check access to a checked path (faccessat): mode 0/1/2/4. Program mode only; failure is minus the Linux errno.", |
| 1328 | "citations": [ |
| 1329 | { |
| 1330 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2609-2610", |
| 1331 | "quote": "ret 144" |
| 1332 | }, |
| 1333 | { |
| 1334 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1156", |
| 1335 | "quote": "`faccess A off n mode`" |
| 1336 | }, |
| 1337 | { |
| 1338 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1339 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1340 | } |
| 1341 | ], |
| 1342 | "example": "files" |
| 1343 | }, |
| 1344 | "getuid": { |
| 1345 | "table": "kw", |
| 1346 | "id": 145, |
| 1347 | "category": "host-process", |
| 1348 | "profile": "OM-1", |
| 1349 | "form": "getuid", |
| 1350 | "arity": 0, |
| 1351 | "types": [], |
| 1352 | "result": "long", |
| 1353 | "summary": "Real user id of the process. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 1354 | "citations": [ |
| 1355 | { |
| 1356 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2612-2613", |
| 1357 | "quote": "ret 145" |
| 1358 | }, |
| 1359 | { |
| 1360 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1157", |
| 1361 | "quote": "`getuid`" |
| 1362 | }, |
| 1363 | { |
| 1364 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1365 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1366 | }, |
| 1367 | { |
| 1368 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 1369 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 1370 | } |
| 1371 | ], |
| 1372 | "example": "dirs" |
| 1373 | }, |
| 1374 | "geteuid": { |
| 1375 | "table": "kw", |
| 1376 | "id": 146, |
| 1377 | "category": "host-process", |
| 1378 | "profile": "OM-1", |
| 1379 | "form": "geteuid", |
| 1380 | "arity": 0, |
| 1381 | "types": [], |
| 1382 | "result": "long", |
| 1383 | "summary": "Effective user id of the process. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 1384 | "citations": [ |
| 1385 | { |
| 1386 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2615-2616", |
| 1387 | "quote": "ret 146" |
| 1388 | }, |
| 1389 | { |
| 1390 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1157", |
| 1391 | "quote": "`geteuid`" |
| 1392 | }, |
| 1393 | { |
| 1394 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1395 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1396 | }, |
| 1397 | { |
| 1398 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 1399 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 1400 | } |
| 1401 | ], |
| 1402 | "example": "dirs" |
| 1403 | }, |
| 1404 | "getgid": { |
| 1405 | "table": "kw", |
| 1406 | "id": 147, |
| 1407 | "category": "host-process", |
| 1408 | "profile": "OM-1", |
| 1409 | "form": "getgid", |
| 1410 | "arity": 0, |
| 1411 | "types": [], |
| 1412 | "result": "long", |
| 1413 | "summary": "Real group id of the process. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 1414 | "citations": [ |
| 1415 | { |
| 1416 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2618-2619", |
| 1417 | "quote": "ret 147" |
| 1418 | }, |
| 1419 | { |
| 1420 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1157", |
| 1421 | "quote": "`getgid`" |
| 1422 | }, |
| 1423 | { |
| 1424 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1425 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1426 | }, |
| 1427 | { |
| 1428 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 1429 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 1430 | } |
| 1431 | ], |
| 1432 | "example": "dirs" |
| 1433 | }, |
| 1434 | "getegid": { |
| 1435 | "table": "kw", |
| 1436 | "id": 148, |
| 1437 | "category": "host-process", |
| 1438 | "profile": "OM-1", |
| 1439 | "form": "getegid", |
| 1440 | "arity": 0, |
| 1441 | "types": [], |
| 1442 | "result": "long", |
| 1443 | "summary": "Effective group id of the process. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 1444 | "citations": [ |
| 1445 | { |
| 1446 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2621-2622", |
| 1447 | "quote": "ret 148" |
| 1448 | }, |
| 1449 | { |
| 1450 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1157", |
| 1451 | "quote": "`getegid`" |
| 1452 | }, |
| 1453 | { |
| 1454 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1455 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1456 | }, |
| 1457 | { |
| 1458 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 1459 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 1460 | } |
| 1461 | ], |
| 1462 | "example": "dirs" |
| 1463 | }, |
| 1464 | "fchdir": { |
| 1465 | "table": "kw", |
| 1466 | "id": 153, |
| 1467 | "category": "host-dir", |
| 1468 | "profile": "OM-1", |
| 1469 | "form": "fchdir fd", |
| 1470 | "arity": 1, |
| 1471 | "types": [ |
| 1472 | "fd: int" |
| 1473 | ], |
| 1474 | "result": "long", |
| 1475 | "summary": "Change the working directory to an open directory descriptor. Program mode only; failure is minus the Linux errno.", |
| 1476 | "citations": [ |
| 1477 | { |
| 1478 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2636-2637", |
| 1479 | "quote": "ret 153" |
| 1480 | }, |
| 1481 | { |
| 1482 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1158", |
| 1483 | "quote": "`fchdir fd`" |
| 1484 | }, |
| 1485 | { |
| 1486 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1487 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1488 | } |
| 1489 | ], |
| 1490 | "example": "dirs" |
| 1491 | }, |
| 1492 | "getppid": { |
| 1493 | "table": "kw", |
| 1494 | "id": 154, |
| 1495 | "category": "host-process", |
| 1496 | "profile": "OM-1", |
| 1497 | "form": "getppid", |
| 1498 | "arity": 0, |
| 1499 | "types": [], |
| 1500 | "result": "long", |
| 1501 | "summary": "Parent process id. Program mode only; failure is minus the Linux errno.", |
| 1502 | "citations": [ |
| 1503 | { |
| 1504 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2639-2640", |
| 1505 | "quote": "ret 154" |
| 1506 | }, |
| 1507 | { |
| 1508 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1159", |
| 1509 | "quote": "`getppid`" |
| 1510 | }, |
| 1511 | { |
| 1512 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1513 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1514 | } |
| 1515 | ], |
| 1516 | "example": "procs" |
| 1517 | }, |
| 1518 | "setsid": { |
| 1519 | "table": "kw", |
| 1520 | "id": 158, |
| 1521 | "category": "host-process", |
| 1522 | "profile": "OM-1", |
| 1523 | "form": "setsid", |
| 1524 | "arity": 0, |
| 1525 | "types": [], |
| 1526 | "result": "long", |
| 1527 | "summary": "Create a session and become its leader. Program mode only; failure is minus the Linux errno.", |
| 1528 | "citations": [ |
| 1529 | { |
| 1530 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2651-2652", |
| 1531 | "quote": "ret 158" |
| 1532 | }, |
| 1533 | { |
| 1534 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1160", |
| 1535 | "quote": "`setsid`" |
| 1536 | }, |
| 1537 | { |
| 1538 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1539 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1540 | } |
| 1541 | ], |
| 1542 | "example": "procs" |
| 1543 | }, |
| 1544 | "getpgid": { |
| 1545 | "table": "kw", |
| 1546 | "id": 159, |
| 1547 | "category": "host-process", |
| 1548 | "profile": "OM-1", |
| 1549 | "form": "getpgid pid", |
| 1550 | "arity": 1, |
| 1551 | "types": [ |
| 1552 | "pid: int" |
| 1553 | ], |
| 1554 | "result": "long", |
| 1555 | "summary": "Process group id of pid (0 = self). Program mode only; failure is minus the Linux errno.", |
| 1556 | "citations": [ |
| 1557 | { |
| 1558 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2654-2655", |
| 1559 | "quote": "ret 159" |
| 1560 | }, |
| 1561 | { |
| 1562 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1161", |
| 1563 | "quote": "`getpgid pid`" |
| 1564 | }, |
| 1565 | { |
| 1566 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1567 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1568 | } |
| 1569 | ], |
| 1570 | "example": "procs" |
| 1571 | }, |
| 1572 | "getsid": { |
| 1573 | "table": "kw", |
| 1574 | "id": 163, |
| 1575 | "category": "host-process", |
| 1576 | "profile": "OM-1", |
| 1577 | "form": "getsid pid", |
| 1578 | "arity": 1, |
| 1579 | "types": [ |
| 1580 | "pid: int" |
| 1581 | ], |
| 1582 | "result": "long", |
| 1583 | "summary": "Session id of pid (0 = self). Program mode only; failure is minus the Linux errno.", |
| 1584 | "citations": [ |
| 1585 | { |
| 1586 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2666-2667", |
| 1587 | "quote": "ret 163" |
| 1588 | }, |
| 1589 | { |
| 1590 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1162", |
| 1591 | "quote": "`getsid pid`" |
| 1592 | }, |
| 1593 | { |
| 1594 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1595 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1596 | } |
| 1597 | ], |
| 1598 | "example": "procs" |
| 1599 | }, |
| 1600 | "syncfs": { |
| 1601 | "table": "kw", |
| 1602 | "id": 164, |
| 1603 | "category": "host-file", |
| 1604 | "profile": "OM-1", |
| 1605 | "form": "syncfs fd", |
| 1606 | "arity": 1, |
| 1607 | "types": [ |
| 1608 | "fd: int" |
| 1609 | ], |
| 1610 | "result": "long", |
| 1611 | "summary": "Sync the filesystem containing an open descriptor. Program mode only; failure is minus the Linux errno.", |
| 1612 | "citations": [ |
| 1613 | { |
| 1614 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2669-2670", |
| 1615 | "quote": "ret 164" |
| 1616 | }, |
| 1617 | { |
| 1618 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1163", |
| 1619 | "quote": "`syncfs fd`" |
| 1620 | }, |
| 1621 | { |
| 1622 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1623 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1624 | } |
| 1625 | ], |
| 1626 | "example": "files" |
| 1627 | }, |
| 1628 | "shutdown": { |
| 1629 | "table": "kw", |
| 1630 | "id": 165, |
| 1631 | "category": "host-net", |
| 1632 | "profile": "OM-1", |
| 1633 | "form": "shutdown fd how", |
| 1634 | "arity": 2, |
| 1635 | "types": [ |
| 1636 | "fd: int", |
| 1637 | "how: int" |
| 1638 | ], |
| 1639 | "result": "long", |
| 1640 | "summary": "Shut down part of a connected socket (how 0 read, 1 write, 2 both). Program mode only; failure is minus the Linux errno.", |
| 1641 | "citations": [ |
| 1642 | { |
| 1643 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2672-2673", |
| 1644 | "quote": "ret 165" |
| 1645 | }, |
| 1646 | { |
| 1647 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1164", |
| 1648 | "quote": "`shutdown fd how`" |
| 1649 | }, |
| 1650 | { |
| 1651 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1652 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1653 | } |
| 1654 | ], |
| 1655 | "example": "sockets" |
| 1656 | }, |
| 1657 | "flock": { |
| 1658 | "table": "kw", |
| 1659 | "id": 197, |
| 1660 | "category": "host-file", |
| 1661 | "profile": "OM-1", |
| 1662 | "form": "flock fd op", |
| 1663 | "arity": 2, |
| 1664 | "types": [ |
| 1665 | "fd: int", |
| 1666 | "op: int" |
| 1667 | ], |
| 1668 | "result": "long", |
| 1669 | "summary": "Advisory whole-file lock (Linux flock); op 1 shared, 2 exclusive, 8 unlock, |4 nonblocking. Program mode only; failure is minus the Linux errno.", |
| 1670 | "citations": [ |
| 1671 | { |
| 1672 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2753-2754", |
| 1673 | "quote": "ret 197" |
| 1674 | }, |
| 1675 | { |
| 1676 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1165", |
| 1677 | "quote": "`flock fd op`" |
| 1678 | }, |
| 1679 | { |
| 1680 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1681 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1682 | } |
| 1683 | ], |
| 1684 | "example": "files" |
| 1685 | }, |
| 1686 | "setpgid": { |
| 1687 | "table": "kw", |
| 1688 | "id": 160, |
| 1689 | "category": "host-process", |
| 1690 | "profile": "OM-1", |
| 1691 | "form": "setpgid pid pgid", |
| 1692 | "arity": 2, |
| 1693 | "types": [ |
| 1694 | "pid: int", |
| 1695 | "pgid: int" |
| 1696 | ], |
| 1697 | "result": "long", |
| 1698 | "summary": "Set a process's group (0 = self/own pid). Program mode only; failure is minus the Linux errno.", |
| 1699 | "citations": [ |
| 1700 | { |
| 1701 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2657-2658", |
| 1702 | "quote": "ret 160" |
| 1703 | }, |
| 1704 | { |
| 1705 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1166", |
| 1706 | "quote": "`setpgid pid pgid`" |
| 1707 | }, |
| 1708 | { |
| 1709 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1710 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1711 | } |
| 1712 | ], |
| 1713 | "example": "procs" |
| 1714 | }, |
| 1715 | "umask": { |
| 1716 | "table": "kw", |
| 1717 | "id": 155, |
| 1718 | "category": "host-file", |
| 1719 | "profile": "OM-1", |
| 1720 | "form": "umask mask", |
| 1721 | "arity": 1, |
| 1722 | "types": [ |
| 1723 | "mask: int" |
| 1724 | ], |
| 1725 | "result": "long", |
| 1726 | "summary": "Set the file-mode mask; return the previous mask. Program mode only; failure is minus the Linux errno.", |
| 1727 | "citations": [ |
| 1728 | { |
| 1729 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2642-2643", |
| 1730 | "quote": "ret 155" |
| 1731 | }, |
| 1732 | { |
| 1733 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1167", |
| 1734 | "quote": "`umask mask`" |
| 1735 | }, |
| 1736 | { |
| 1737 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1738 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1739 | } |
| 1740 | ], |
| 1741 | "example": "files" |
| 1742 | }, |
| 1743 | "fseek": { |
| 1744 | "table": "kw", |
| 1745 | "id": 103, |
| 1746 | "category": "host-file", |
| 1747 | "profile": "OM-1", |
| 1748 | "form": "fseek fd offset whence", |
| 1749 | "arity": 3, |
| 1750 | "types": [ |
| 1751 | "fd: int", |
| 1752 | "offset: long", |
| 1753 | "whence: int" |
| 1754 | ], |
| 1755 | "result": "long", |
| 1756 | "summary": "Seek; return the resulting file offset. Program mode only; failure is minus the Linux errno.", |
| 1757 | "citations": [ |
| 1758 | { |
| 1759 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3020-3021", |
| 1760 | "quote": "ret 103" |
| 1761 | }, |
| 1762 | { |
| 1763 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1168", |
| 1764 | "quote": "`fseek fd offset whence`" |
| 1765 | }, |
| 1766 | { |
| 1767 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1768 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1769 | } |
| 1770 | ], |
| 1771 | "example": "files" |
| 1772 | }, |
| 1773 | "ftrunc": { |
| 1774 | "table": "kw", |
| 1775 | "id": 139, |
| 1776 | "category": "host-file", |
| 1777 | "profile": "OM-1", |
| 1778 | "form": "ftrunc fd length", |
| 1779 | "arity": 2, |
| 1780 | "types": [ |
| 1781 | "fd: int", |
| 1782 | "length: long" |
| 1783 | ], |
| 1784 | "result": "long", |
| 1785 | "summary": "Set an open descriptor's length (ftruncate). Program mode only; failure is minus the Linux errno.", |
| 1786 | "citations": [ |
| 1787 | { |
| 1788 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2594-2595", |
| 1789 | "quote": "ret 139" |
| 1790 | }, |
| 1791 | { |
| 1792 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1169", |
| 1793 | "quote": "`ftrunc fd length`" |
| 1794 | }, |
| 1795 | { |
| 1796 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1797 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1798 | } |
| 1799 | ], |
| 1800 | "example": "files" |
| 1801 | }, |
| 1802 | "truncate": { |
| 1803 | "table": "kw", |
| 1804 | "id": 150, |
| 1805 | "category": "host-file", |
| 1806 | "profile": "OM-1", |
| 1807 | "form": "truncate A off n length", |
| 1808 | "arity": 4, |
| 1809 | "types": [ |
| 1810 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1811 | "off: ulong", |
| 1812 | "n: ulong", |
| 1813 | "length: long" |
| 1814 | ], |
| 1815 | "result": "long", |
| 1816 | "summary": "Set a checked path's length (truncate). Program mode only; failure is minus the Linux errno.", |
| 1817 | "citations": [ |
| 1818 | { |
| 1819 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2627-2628", |
| 1820 | "quote": "ret 150" |
| 1821 | }, |
| 1822 | { |
| 1823 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1170", |
| 1824 | "quote": "`truncate A off n length`" |
| 1825 | }, |
| 1826 | { |
| 1827 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1828 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1829 | } |
| 1830 | ], |
| 1831 | "example": "files" |
| 1832 | }, |
| 1833 | "unlink": { |
| 1834 | "table": "kw", |
| 1835 | "id": 111, |
| 1836 | "category": "host-file", |
| 1837 | "profile": "OM-1", |
| 1838 | "form": "unlink A off n", |
| 1839 | "arity": 3, |
| 1840 | "types": [ |
| 1841 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1842 | "off: ulong", |
| 1843 | "n: ulong" |
| 1844 | ], |
| 1845 | "result": "long", |
| 1846 | "summary": "Remove the named file. Program mode only; failure is minus the Linux errno.", |
| 1847 | "citations": [ |
| 1848 | { |
| 1849 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3044-3045", |
| 1850 | "quote": "ret 111" |
| 1851 | }, |
| 1852 | { |
| 1853 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1171", |
| 1854 | "quote": "`unlink A off n`" |
| 1855 | }, |
| 1856 | { |
| 1857 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1858 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1859 | } |
| 1860 | ], |
| 1861 | "example": "files" |
| 1862 | }, |
| 1863 | "makedir": { |
| 1864 | "table": "kw", |
| 1865 | "id": 112, |
| 1866 | "category": "host-dir", |
| 1867 | "profile": "OM-1", |
| 1868 | "form": "makedir A off n mode", |
| 1869 | "arity": 4, |
| 1870 | "types": [ |
| 1871 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1872 | "off: ulong", |
| 1873 | "n: ulong", |
| 1874 | "mode: int" |
| 1875 | ], |
| 1876 | "result": "long", |
| 1877 | "summary": "Create a directory. Program mode only; failure is minus the Linux errno.", |
| 1878 | "citations": [ |
| 1879 | { |
| 1880 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3047-3048", |
| 1881 | "quote": "ret 112" |
| 1882 | }, |
| 1883 | { |
| 1884 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1172", |
| 1885 | "quote": "`makedir A off n mode`" |
| 1886 | }, |
| 1887 | { |
| 1888 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1889 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1890 | } |
| 1891 | ], |
| 1892 | "example": "dirs" |
| 1893 | }, |
| 1894 | "rmdir": { |
| 1895 | "table": "kw", |
| 1896 | "id": 126, |
| 1897 | "category": "host-dir", |
| 1898 | "profile": "OM-1", |
| 1899 | "form": "rmdir A off n", |
| 1900 | "arity": 3, |
| 1901 | "types": [ |
| 1902 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1903 | "off: ulong", |
| 1904 | "n: ulong" |
| 1905 | ], |
| 1906 | "result": "long", |
| 1907 | "summary": "Remove an empty directory. Program mode only; failure is minus the Linux errno.", |
| 1908 | "citations": [ |
| 1909 | { |
| 1910 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2966-2967", |
| 1911 | "quote": "ret 126" |
| 1912 | }, |
| 1913 | { |
| 1914 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1173", |
| 1915 | "quote": "`rmdir A off n`" |
| 1916 | }, |
| 1917 | { |
| 1918 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1919 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1920 | } |
| 1921 | ], |
| 1922 | "example": "dirs" |
| 1923 | }, |
| 1924 | "cwd": { |
| 1925 | "table": "kw", |
| 1926 | "id": 132, |
| 1927 | "category": "host-dir", |
| 1928 | "profile": "OM-1", |
| 1929 | "form": "cwd A off capacity", |
| 1930 | "arity": 3, |
| 1931 | "types": [ |
| 1932 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1933 | "off: ulong", |
| 1934 | "capacity: ulong" |
| 1935 | ], |
| 1936 | "result": "long", |
| 1937 | "summary": "Write the current directory into writable bytes; the count includes the trailing zero. Program mode only; failure is minus the Linux errno.", |
| 1938 | "citations": [ |
| 1939 | { |
| 1940 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2561-2562", |
| 1941 | "quote": "ret 132" |
| 1942 | }, |
| 1943 | { |
| 1944 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1174", |
| 1945 | "quote": "`cwd A off capacity`" |
| 1946 | }, |
| 1947 | { |
| 1948 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1949 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1950 | } |
| 1951 | ], |
| 1952 | "example": "dirs" |
| 1953 | }, |
| 1954 | "chdir": { |
| 1955 | "table": "kw", |
| 1956 | "id": 138, |
| 1957 | "category": "host-dir", |
| 1958 | "profile": "OM-1", |
| 1959 | "form": "chdir A off n", |
| 1960 | "arity": 3, |
| 1961 | "types": [ |
| 1962 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 1963 | "off: ulong", |
| 1964 | "n: ulong" |
| 1965 | ], |
| 1966 | "result": "long", |
| 1967 | "summary": "Change the working directory to a checked, nonempty path. Program mode only; failure is minus the Linux errno.", |
| 1968 | "citations": [ |
| 1969 | { |
| 1970 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2591-2592", |
| 1971 | "quote": "ret 138" |
| 1972 | }, |
| 1973 | { |
| 1974 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1175", |
| 1975 | "quote": "`chdir A off n`" |
| 1976 | }, |
| 1977 | { |
| 1978 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 1979 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 1980 | } |
| 1981 | ], |
| 1982 | "example": "dirs" |
| 1983 | }, |
| 1984 | "readlnk": { |
| 1985 | "table": "kw", |
| 1986 | "id": 133, |
| 1987 | "category": "host-dir", |
| 1988 | "profile": "OM-1", |
| 1989 | "form": "readlnk PATH off n OUT off capacity", |
| 1990 | "arity": 6, |
| 1991 | "types": [ |
| 1992 | "PATH: uchar array (sized, unsized view/edit, or text when only read)", |
| 1993 | "off: ulong", |
| 1994 | "n: ulong", |
| 1995 | "OUT: uchar array (sized, unsized view/edit, or text when only read)", |
| 1996 | "off: ulong", |
| 1997 | "capacity: ulong" |
| 1998 | ], |
| 1999 | "result": "long", |
| 2000 | "summary": "Read a symbolic link into writable output bytes; no zero byte is appended. Program mode only; failure is minus the Linux errno.", |
| 2001 | "citations": [ |
| 2002 | { |
| 2003 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2570-2571", |
| 2004 | "quote": "ret 133" |
| 2005 | }, |
| 2006 | { |
| 2007 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1176", |
| 2008 | "quote": "`readlnk PATH off n OUT off capacity`" |
| 2009 | }, |
| 2010 | { |
| 2011 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2012 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2013 | } |
| 2014 | ], |
| 2015 | "example": "dirs" |
| 2016 | }, |
| 2017 | "getdnts": { |
| 2018 | "table": "kw", |
| 2019 | "id": 113, |
| 2020 | "category": "host-dir", |
| 2021 | "profile": "OM-1", |
| 2022 | "form": "getdnts fd A off n", |
| 2023 | "arity": 4, |
| 2024 | "types": [ |
| 2025 | "fd: int", |
| 2026 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2027 | "off: ulong", |
| 2028 | "n: ulong" |
| 2029 | ], |
| 2030 | "result": "long", |
| 2031 | "summary": "Write raw Linux getdents64 records; return bytes written. Program mode only; failure is minus the Linux errno.", |
| 2032 | "citations": [ |
| 2033 | { |
| 2034 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2981-2982", |
| 2035 | "quote": "ret 113" |
| 2036 | }, |
| 2037 | { |
| 2038 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1177", |
| 2039 | "quote": "`getdnts fd A off n`" |
| 2040 | }, |
| 2041 | { |
| 2042 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2043 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2044 | } |
| 2045 | ], |
| 2046 | "example": "dirs" |
| 2047 | }, |
| 2048 | "fstat": { |
| 2049 | "table": "kw", |
| 2050 | "id": 117, |
| 2051 | "category": "host-file", |
| 2052 | "profile": "OM-1", |
| 2053 | "form": "fstat fd A off n", |
| 2054 | "arity": 4, |
| 2055 | "types": [ |
| 2056 | "fd: int", |
| 2057 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2058 | "off: ulong", |
| 2059 | "n: ulong" |
| 2060 | ], |
| 2061 | "result": "long", |
| 2062 | "summary": "Write the 128-byte Linux ARM64 stat structure of an open descriptor. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 2063 | "citations": [ |
| 2064 | { |
| 2065 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2993-2994", |
| 2066 | "quote": "ret 117" |
| 2067 | }, |
| 2068 | { |
| 2069 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1178", |
| 2070 | "quote": "`fstat fd A off n`" |
| 2071 | }, |
| 2072 | { |
| 2073 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2074 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2075 | }, |
| 2076 | { |
| 2077 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 2078 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 2079 | } |
| 2080 | ], |
| 2081 | "example": "files" |
| 2082 | }, |
| 2083 | "stat": { |
| 2084 | "table": "kw", |
| 2085 | "id": 140, |
| 2086 | "category": "host-file", |
| 2087 | "profile": "OM-1", |
| 2088 | "form": "stat A off n B off capacity", |
| 2089 | "arity": 6, |
| 2090 | "types": [ |
| 2091 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2092 | "off: ulong", |
| 2093 | "n: ulong", |
| 2094 | "B: uchar array (sized, unsized view/edit, or text when only read)", |
| 2095 | "off: ulong", |
| 2096 | "capacity: ulong" |
| 2097 | ], |
| 2098 | "result": "long", |
| 2099 | "summary": "Metadata for a checked path (newfstatat) into a 128-byte ARM64 stat structure. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 2100 | "citations": [ |
| 2101 | { |
| 2102 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2597-2598", |
| 2103 | "quote": "ret 140" |
| 2104 | }, |
| 2105 | { |
| 2106 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1179", |
| 2107 | "quote": "`stat A off n B off capacity`" |
| 2108 | }, |
| 2109 | { |
| 2110 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2111 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2112 | }, |
| 2113 | { |
| 2114 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 2115 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 2116 | } |
| 2117 | ], |
| 2118 | "example": "files" |
| 2119 | }, |
| 2120 | "lstat": { |
| 2121 | "table": "kw", |
| 2122 | "id": 149, |
| 2123 | "category": "host-file", |
| 2124 | "profile": "OM-1", |
| 2125 | "form": "lstat A off n B off capacity", |
| 2126 | "arity": 6, |
| 2127 | "types": [ |
| 2128 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2129 | "off: ulong", |
| 2130 | "n: ulong", |
| 2131 | "B: uchar array (sized, unsized view/edit, or text when only read)", |
| 2132 | "off: ulong", |
| 2133 | "capacity: ulong" |
| 2134 | ], |
| 2135 | "result": "long", |
| 2136 | "summary": "As stat, without following a final symbolic link. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 2137 | "citations": [ |
| 2138 | { |
| 2139 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2624-2625", |
| 2140 | "quote": "ret 149" |
| 2141 | }, |
| 2142 | { |
| 2143 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1180", |
| 2144 | "quote": "`lstat A off n B off capacity`" |
| 2145 | }, |
| 2146 | { |
| 2147 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2148 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2149 | }, |
| 2150 | { |
| 2151 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 2152 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 2153 | } |
| 2154 | ], |
| 2155 | "example": "files" |
| 2156 | }, |
| 2157 | "renames": { |
| 2158 | "table": "kw", |
| 2159 | "id": 125, |
| 2160 | "category": "host-dir", |
| 2161 | "profile": "OM-1", |
| 2162 | "form": "renames A off n flags", |
| 2163 | "arity": 4, |
| 2164 | "types": [ |
| 2165 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2166 | "off: ulong", |
| 2167 | "n: ulong", |
| 2168 | "flags: int" |
| 2169 | ], |
| 2170 | "result": "long", |
| 2171 | "summary": "Rename the two paths of a packed list (renameat2); flag 1 refuses replacement. Program mode only; failure is minus the Linux errno.", |
| 2172 | "citations": [ |
| 2173 | { |
| 2174 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2963-2964", |
| 2175 | "quote": "ret 125" |
| 2176 | }, |
| 2177 | { |
| 2178 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1181", |
| 2179 | "quote": "`renames A off n flags`" |
| 2180 | }, |
| 2181 | { |
| 2182 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2183 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2184 | } |
| 2185 | ], |
| 2186 | "example": "dirs" |
| 2187 | }, |
| 2188 | "link": { |
| 2189 | "table": "kw", |
| 2190 | "id": 141, |
| 2191 | "category": "host-dir", |
| 2192 | "profile": "OM-1", |
| 2193 | "form": "link A off n", |
| 2194 | "arity": 3, |
| 2195 | "types": [ |
| 2196 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2197 | "off: ulong", |
| 2198 | "n: ulong" |
| 2199 | ], |
| 2200 | "result": "long", |
| 2201 | "summary": "Create a hard link from a packed two-path list (old, new). Program mode only; failure is minus the Linux errno.", |
| 2202 | "citations": [ |
| 2203 | { |
| 2204 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2600-2601", |
| 2205 | "quote": "ret 141" |
| 2206 | }, |
| 2207 | { |
| 2208 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1182", |
| 2209 | "quote": "`link A off n`" |
| 2210 | }, |
| 2211 | { |
| 2212 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2213 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2214 | } |
| 2215 | ], |
| 2216 | "example": "dirs" |
| 2217 | }, |
| 2218 | "symlnk": { |
| 2219 | "table": "kw", |
| 2220 | "id": 142, |
| 2221 | "category": "host-dir", |
| 2222 | "profile": "OM-1", |
| 2223 | "form": "symlnk A off n", |
| 2224 | "arity": 3, |
| 2225 | "types": [ |
| 2226 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2227 | "off: ulong", |
| 2228 | "n: ulong" |
| 2229 | ], |
| 2230 | "result": "long", |
| 2231 | "summary": "Create a symbolic link from a packed two-path list (target text, link path). Program mode only; failure is minus the Linux errno.", |
| 2232 | "citations": [ |
| 2233 | { |
| 2234 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2603-2604", |
| 2235 | "quote": "ret 142" |
| 2236 | }, |
| 2237 | { |
| 2238 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1183", |
| 2239 | "quote": "`symlnk A off n`" |
| 2240 | }, |
| 2241 | { |
| 2242 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2243 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2244 | } |
| 2245 | ], |
| 2246 | "example": "dirs" |
| 2247 | }, |
| 2248 | "monons": { |
| 2249 | "table": "kw", |
| 2250 | "id": 109, |
| 2251 | "category": "host-time", |
| 2252 | "profile": "OM-1", |
| 2253 | "form": "monons", |
| 2254 | "arity": 0, |
| 2255 | "types": [], |
| 2256 | "result": "long", |
| 2257 | "summary": "Monotonic nanoseconds, for elapsed-time measurement. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 2258 | "citations": [ |
| 2259 | { |
| 2260 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3038-3039", |
| 2261 | "quote": "ret 109" |
| 2262 | }, |
| 2263 | { |
| 2264 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1184", |
| 2265 | "quote": "`monons`" |
| 2266 | }, |
| 2267 | { |
| 2268 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2269 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2270 | }, |
| 2271 | { |
| 2272 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 2273 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 2274 | } |
| 2275 | ], |
| 2276 | "example": "clock" |
| 2277 | }, |
| 2278 | "realns": { |
| 2279 | "table": "kw", |
| 2280 | "id": 130, |
| 2281 | "category": "host-time", |
| 2282 | "profile": "OM-1", |
| 2283 | "form": "realns", |
| 2284 | "arity": 0, |
| 2285 | "types": [], |
| 2286 | "result": "long", |
| 2287 | "summary": "Realtime nanoseconds since the Unix epoch. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 2288 | "citations": [ |
| 2289 | { |
| 2290 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2957-2958", |
| 2291 | "quote": "ret 130" |
| 2292 | }, |
| 2293 | { |
| 2294 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1185", |
| 2295 | "quote": "`realns`" |
| 2296 | }, |
| 2297 | { |
| 2298 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2299 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2300 | }, |
| 2301 | { |
| 2302 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 2303 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 2304 | } |
| 2305 | ], |
| 2306 | "example": "clock" |
| 2307 | }, |
| 2308 | "sleepns": { |
| 2309 | "table": "kw", |
| 2310 | "id": 120, |
| 2311 | "category": "host-time", |
| 2312 | "profile": "OM-1", |
| 2313 | "form": "sleepns interval", |
| 2314 | "arity": 1, |
| 2315 | "types": [ |
| 2316 | "interval: long" |
| 2317 | ], |
| 2318 | "result": "long", |
| 2319 | "summary": "Sleep for nonnegative nanoseconds; a negative interval traps 3. Program mode, and OM-2 function units on AArch64 (error 9 in other function units); failure is minus the Linux errno.", |
| 2320 | "citations": [ |
| 2321 | { |
| 2322 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3002-3003", |
| 2323 | "quote": "ret 120" |
| 2324 | }, |
| 2325 | { |
| 2326 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1186", |
| 2327 | "quote": "`sleepns interval`" |
| 2328 | }, |
| 2329 | { |
| 2330 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2331 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2332 | }, |
| 2333 | { |
| 2334 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 2335 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 2336 | } |
| 2337 | ], |
| 2338 | "example": "clock" |
| 2339 | }, |
| 2340 | "socknew": { |
| 2341 | "table": "kw", |
| 2342 | "id": 104, |
| 2343 | "category": "host-net", |
| 2344 | "profile": "OM-1", |
| 2345 | "form": "socknew domain kind protocol", |
| 2346 | "arity": 3, |
| 2347 | "types": [ |
| 2348 | "domain: int", |
| 2349 | "kind: int", |
| 2350 | "protocol: int" |
| 2351 | ], |
| 2352 | "result": "long", |
| 2353 | "summary": "Create a socket. Program mode only; failure is minus the Linux errno.", |
| 2354 | "citations": [ |
| 2355 | { |
| 2356 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3023-3024", |
| 2357 | "quote": "ret 104" |
| 2358 | }, |
| 2359 | { |
| 2360 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1187", |
| 2361 | "quote": "`socknew domain kind protocol`" |
| 2362 | }, |
| 2363 | { |
| 2364 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2365 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2366 | } |
| 2367 | ], |
| 2368 | "example": "sockets" |
| 2369 | }, |
| 2370 | "bind": { |
| 2371 | "table": "kw", |
| 2372 | "id": 115, |
| 2373 | "category": "host-net", |
| 2374 | "profile": "OM-1", |
| 2375 | "form": "bind fd A off n", |
| 2376 | "arity": 4, |
| 2377 | "types": [ |
| 2378 | "fd: int", |
| 2379 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2380 | "off: ulong", |
| 2381 | "n: ulong" |
| 2382 | ], |
| 2383 | "result": "long", |
| 2384 | "summary": "Bind a socket to the address bytes of the slice. Program mode only; failure is minus the Linux errno.", |
| 2385 | "citations": [ |
| 2386 | { |
| 2387 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2987-2988", |
| 2388 | "quote": "ret 115" |
| 2389 | }, |
| 2390 | { |
| 2391 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1188", |
| 2392 | "quote": "`bind fd A off n`" |
| 2393 | }, |
| 2394 | { |
| 2395 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2396 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2397 | } |
| 2398 | ], |
| 2399 | "example": "sockets" |
| 2400 | }, |
| 2401 | "connect": { |
| 2402 | "table": "kw", |
| 2403 | "id": 114, |
| 2404 | "category": "host-net", |
| 2405 | "profile": "OM-1", |
| 2406 | "form": "connect fd A off n", |
| 2407 | "arity": 4, |
| 2408 | "types": [ |
| 2409 | "fd: int", |
| 2410 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2411 | "off: ulong", |
| 2412 | "n: ulong" |
| 2413 | ], |
| 2414 | "result": "long", |
| 2415 | "summary": "Connect using the address bytes of the slice. Program mode only; failure is minus the Linux errno.", |
| 2416 | "citations": [ |
| 2417 | { |
| 2418 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2984-2985", |
| 2419 | "quote": "ret 114" |
| 2420 | }, |
| 2421 | { |
| 2422 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1189", |
| 2423 | "quote": "`connect fd A off n`" |
| 2424 | }, |
| 2425 | { |
| 2426 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2427 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2428 | } |
| 2429 | ], |
| 2430 | "example": "sockets" |
| 2431 | }, |
| 2432 | "listen": { |
| 2433 | "table": "kw", |
| 2434 | "id": 105, |
| 2435 | "category": "host-net", |
| 2436 | "profile": "OM-1", |
| 2437 | "form": "listen fd backlog", |
| 2438 | "arity": 2, |
| 2439 | "types": [ |
| 2440 | "fd: int", |
| 2441 | "backlog: int" |
| 2442 | ], |
| 2443 | "result": "long", |
| 2444 | "summary": "Listen for connections. Program mode only; failure is minus the Linux errno.", |
| 2445 | "citations": [ |
| 2446 | { |
| 2447 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3026-3027", |
| 2448 | "quote": "ret 105" |
| 2449 | }, |
| 2450 | { |
| 2451 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1190", |
| 2452 | "quote": "`listen fd backlog`" |
| 2453 | }, |
| 2454 | { |
| 2455 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2456 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2457 | } |
| 2458 | ], |
| 2459 | "example": "sockets" |
| 2460 | }, |
| 2461 | "accept": { |
| 2462 | "table": "kw", |
| 2463 | "id": 106, |
| 2464 | "category": "host-net", |
| 2465 | "profile": "OM-1", |
| 2466 | "form": "accept fd flags", |
| 2467 | "arity": 2, |
| 2468 | "types": [ |
| 2469 | "fd: int", |
| 2470 | "flags: int" |
| 2471 | ], |
| 2472 | "result": "long", |
| 2473 | "summary": "Accept a connection (accept4) without peer-address output; return the descriptor. Program mode only; failure is minus the Linux errno.", |
| 2474 | "citations": [ |
| 2475 | { |
| 2476 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3029-3030", |
| 2477 | "quote": "ret 106" |
| 2478 | }, |
| 2479 | { |
| 2480 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1191", |
| 2481 | "quote": "`accept fd flags`" |
| 2482 | }, |
| 2483 | { |
| 2484 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2485 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2486 | } |
| 2487 | ], |
| 2488 | "example": "sockets" |
| 2489 | }, |
| 2490 | "sockname": { |
| 2491 | "table": "kw", |
| 2492 | "id": 131, |
| 2493 | "category": "host-net", |
| 2494 | "profile": "OM-1", |
| 2495 | "form": "sockname fd A off n", |
| 2496 | "arity": 4, |
| 2497 | "types": [ |
| 2498 | "fd: int", |
| 2499 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2500 | "off: ulong", |
| 2501 | "n: ulong" |
| 2502 | ], |
| 2503 | "result": "long", |
| 2504 | "summary": "Write the socket's address bytes; return the full address length. Program mode only; failure is minus the Linux errno.", |
| 2505 | "citations": [ |
| 2506 | { |
| 2507 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2954-2955", |
| 2508 | "quote": "ret 131" |
| 2509 | }, |
| 2510 | { |
| 2511 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1192", |
| 2512 | "quote": "`sockname fd A off n`" |
| 2513 | }, |
| 2514 | { |
| 2515 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2516 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2517 | } |
| 2518 | ], |
| 2519 | "example": "sockets" |
| 2520 | }, |
| 2521 | "sockopt": { |
| 2522 | "table": "kw", |
| 2523 | "id": 134, |
| 2524 | "category": "host-net", |
| 2525 | "profile": "OM-1", |
| 2526 | "form": "sockopt fd level option A off n", |
| 2527 | "arity": 6, |
| 2528 | "types": [ |
| 2529 | "fd: int", |
| 2530 | "level: int", |
| 2531 | "option: int", |
| 2532 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2533 | "off: ulong", |
| 2534 | "n: ulong" |
| 2535 | ], |
| 2536 | "result": "long", |
| 2537 | "summary": "Set one allowlisted four-byte socket option. Program mode only; failure is minus the Linux errno.", |
| 2538 | "citations": [ |
| 2539 | { |
| 2540 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2579-2580", |
| 2541 | "quote": "ret 134" |
| 2542 | }, |
| 2543 | { |
| 2544 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1194", |
| 2545 | "quote": "`sockopt fd level option A off n`" |
| 2546 | }, |
| 2547 | { |
| 2548 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2549 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2550 | } |
| 2551 | ], |
| 2552 | "example": "sockets" |
| 2553 | }, |
| 2554 | "recv": { |
| 2555 | "table": "kw", |
| 2556 | "id": 118, |
| 2557 | "category": "host-net", |
| 2558 | "profile": "OM-1", |
| 2559 | "form": "recv fd A off n flags", |
| 2560 | "arity": 5, |
| 2561 | "types": [ |
| 2562 | "fd: int", |
| 2563 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2564 | "off: ulong", |
| 2565 | "n: ulong", |
| 2566 | "flags: int" |
| 2567 | ], |
| 2568 | "result": "long", |
| 2569 | "summary": "Receive into a writable slice. Program mode only; failure is minus the Linux errno.", |
| 2570 | "citations": [ |
| 2571 | { |
| 2572 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2996-2997", |
| 2573 | "quote": "ret 118" |
| 2574 | }, |
| 2575 | { |
| 2576 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1195", |
| 2577 | "quote": "`recv fd A off n flags`" |
| 2578 | }, |
| 2579 | { |
| 2580 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2581 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2582 | } |
| 2583 | ], |
| 2584 | "example": "sockets" |
| 2585 | }, |
| 2586 | "send": { |
| 2587 | "table": "kw", |
| 2588 | "id": 119, |
| 2589 | "category": "host-net", |
| 2590 | "profile": "OM-1", |
| 2591 | "form": "send fd A off n flags", |
| 2592 | "arity": 5, |
| 2593 | "types": [ |
| 2594 | "fd: int", |
| 2595 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2596 | "off: ulong", |
| 2597 | "n: ulong", |
| 2598 | "flags: int" |
| 2599 | ], |
| 2600 | "result": "long", |
| 2601 | "summary": "Send a slice; MSG_NOSIGNAL is added so a closed peer returns an error. Program mode only; failure is minus the Linux errno.", |
| 2602 | "citations": [ |
| 2603 | { |
| 2604 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2999-3000", |
| 2605 | "quote": "ret 119" |
| 2606 | }, |
| 2607 | { |
| 2608 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1196", |
| 2609 | "quote": "`send fd A off n flags`" |
| 2610 | }, |
| 2611 | { |
| 2612 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2613 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2614 | } |
| 2615 | ], |
| 2616 | "example": "sockets" |
| 2617 | }, |
| 2618 | "waitio": { |
| 2619 | "table": "kw", |
| 2620 | "id": 123, |
| 2621 | "category": "host-net", |
| 2622 | "profile": "OM-1", |
| 2623 | "form": "waitio fd events interval", |
| 2624 | "arity": 3, |
| 2625 | "types": [ |
| 2626 | "fd: int", |
| 2627 | "events: int", |
| 2628 | "interval: long" |
| 2629 | ], |
| 2630 | "result": "long", |
| 2631 | "summary": "Poll one descriptor: readiness bits, 0 on timeout, or negative errno. Program mode only; failure is minus the Linux errno.", |
| 2632 | "citations": [ |
| 2633 | { |
| 2634 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2978-2979", |
| 2635 | "quote": "ret 123" |
| 2636 | }, |
| 2637 | { |
| 2638 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1197", |
| 2639 | "quote": "`waitio fd events interval`" |
| 2640 | }, |
| 2641 | { |
| 2642 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2643 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2644 | } |
| 2645 | ], |
| 2646 | "example": "sockets" |
| 2647 | }, |
| 2648 | "peercred": { |
| 2649 | "table": "kw", |
| 2650 | "id": 220, |
| 2651 | "category": "host-net", |
| 2652 | "profile": "OM-1", |
| 2653 | "form": "peercred fd A off capacity", |
| 2654 | "arity": 4, |
| 2655 | "types": [ |
| 2656 | "fd: int", |
| 2657 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2658 | "off: ulong", |
| 2659 | "capacity: ulong" |
| 2660 | ], |
| 2661 | "result": "long", |
| 2662 | "summary": "Read SO_PEERCRED (pid, uid, gid as little-endian int32) into at least 12 writable bytes. Program mode only; failure is minus the Linux errno.", |
| 2663 | "citations": [ |
| 2664 | { |
| 2665 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3083-3084", |
| 2666 | "quote": "ret 220" |
| 2667 | }, |
| 2668 | { |
| 2669 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1198", |
| 2670 | "quote": "`peercred fd A off capacity`" |
| 2671 | }, |
| 2672 | { |
| 2673 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2674 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2675 | } |
| 2676 | ], |
| 2677 | "example": "sockets" |
| 2678 | }, |
| 2679 | "pollfds": { |
| 2680 | "table": "kw", |
| 2681 | "id": 221, |
| 2682 | "category": "host-net", |
| 2683 | "profile": "OM-1", |
| 2684 | "form": "pollfds A off n interval", |
| 2685 | "arity": 4, |
| 2686 | "types": [ |
| 2687 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2688 | "off: ulong", |
| 2689 | "n: ulong", |
| 2690 | "interval: long" |
| 2691 | ], |
| 2692 | "result": "long", |
| 2693 | "summary": "Poll packed eight-byte pollfd records in a writable slice. Program mode only; failure is minus the Linux errno.", |
| 2694 | "citations": [ |
| 2695 | { |
| 2696 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3086-3087", |
| 2697 | "quote": "ret 221" |
| 2698 | }, |
| 2699 | { |
| 2700 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1199", |
| 2701 | "quote": "`pollfds A off n interval`" |
| 2702 | }, |
| 2703 | { |
| 2704 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2705 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2706 | } |
| 2707 | ], |
| 2708 | "example": "sockets" |
| 2709 | }, |
| 2710 | "sendmsg": { |
| 2711 | "table": "kw", |
| 2712 | "id": 222, |
| 2713 | "category": "host-net", |
| 2714 | "profile": "OM-1", |
| 2715 | "form": "sendmsg fd A off n flags", |
| 2716 | "arity": 5, |
| 2717 | "types": [ |
| 2718 | "fd: int", |
| 2719 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2720 | "off: ulong", |
| 2721 | "n: ulong", |
| 2722 | "flags: int" |
| 2723 | ], |
| 2724 | "result": "long", |
| 2725 | "summary": "Send one checked payload through a private msghdr, no ancillary data. Program mode only; failure is minus the Linux errno.", |
| 2726 | "citations": [ |
| 2727 | { |
| 2728 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3089-3090", |
| 2729 | "quote": "ret 222" |
| 2730 | }, |
| 2731 | { |
| 2732 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1200", |
| 2733 | "quote": "`sendmsg fd A off n flags`" |
| 2734 | }, |
| 2735 | { |
| 2736 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2737 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2738 | } |
| 2739 | ], |
| 2740 | "example": "sockets" |
| 2741 | }, |
| 2742 | "fork": { |
| 2743 | "table": "kw", |
| 2744 | "id": 107, |
| 2745 | "category": "host-process", |
| 2746 | "profile": "OM-1", |
| 2747 | "form": "fork", |
| 2748 | "arity": 0, |
| 2749 | "types": [], |
| 2750 | "result": "long", |
| 2751 | "summary": "Copy the process: 0 in the child, the child pid in the parent. Program mode only; failure is minus the Linux errno.", |
| 2752 | "citations": [ |
| 2753 | { |
| 2754 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3032-3033", |
| 2755 | "quote": "ret 107" |
| 2756 | }, |
| 2757 | { |
| 2758 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1201", |
| 2759 | "quote": "`fork`" |
| 2760 | }, |
| 2761 | { |
| 2762 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2763 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2764 | } |
| 2765 | ], |
| 2766 | "example": "procs" |
| 2767 | }, |
| 2768 | "getpid": { |
| 2769 | "table": "kw", |
| 2770 | "id": 129, |
| 2771 | "category": "host-process", |
| 2772 | "profile": "OM-1", |
| 2773 | "form": "getpid", |
| 2774 | "arity": 0, |
| 2775 | "types": [], |
| 2776 | "result": "long", |
| 2777 | "summary": "The current process id. Program mode only; failure is minus the Linux errno.", |
| 2778 | "citations": [ |
| 2779 | { |
| 2780 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2975-2976", |
| 2781 | "quote": "ret 129" |
| 2782 | }, |
| 2783 | { |
| 2784 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1202", |
| 2785 | "quote": "`getpid`" |
| 2786 | }, |
| 2787 | { |
| 2788 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2789 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2790 | } |
| 2791 | ], |
| 2792 | "example": "procs" |
| 2793 | }, |
| 2794 | "killpid": { |
| 2795 | "table": "kw", |
| 2796 | "id": 127, |
| 2797 | "category": "host-process", |
| 2798 | "profile": "OM-1", |
| 2799 | "form": "killpid pid signal", |
| 2800 | "arity": 2, |
| 2801 | "types": [ |
| 2802 | "pid: int", |
| 2803 | "signal: int" |
| 2804 | ], |
| 2805 | "result": "long", |
| 2806 | "summary": "Send a signal; signal 0 checks existence and permission. Program mode only; failure is minus the Linux errno.", |
| 2807 | "citations": [ |
| 2808 | { |
| 2809 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2969-2970", |
| 2810 | "quote": "ret 127" |
| 2811 | }, |
| 2812 | { |
| 2813 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1203", |
| 2814 | "quote": "`killpid pid signal`" |
| 2815 | }, |
| 2816 | { |
| 2817 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2818 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2819 | } |
| 2820 | ], |
| 2821 | "example": "procs" |
| 2822 | }, |
| 2823 | "waitpid": { |
| 2824 | "table": "kw", |
| 2825 | "id": 116, |
| 2826 | "category": "host-process", |
| 2827 | "profile": "OM-1", |
| 2828 | "form": "waitpid pid A off n options", |
| 2829 | "arity": 5, |
| 2830 | "types": [ |
| 2831 | "pid: int", |
| 2832 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2833 | "off: ulong", |
| 2834 | "n: ulong", |
| 2835 | "options: int" |
| 2836 | ], |
| 2837 | "result": "long", |
| 2838 | "summary": "Wait with wait4; write a four-byte status; return the pid. Program mode only; failure is minus the Linux errno.", |
| 2839 | "citations": [ |
| 2840 | { |
| 2841 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2990-2991", |
| 2842 | "quote": "ret 116" |
| 2843 | }, |
| 2844 | { |
| 2845 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1204", |
| 2846 | "quote": "`waitpid pid A off n options`" |
| 2847 | }, |
| 2848 | { |
| 2849 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2850 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2851 | } |
| 2852 | ], |
| 2853 | "example": "procs" |
| 2854 | }, |
| 2855 | "pipefds": { |
| 2856 | "table": "kw", |
| 2857 | "id": 128, |
| 2858 | "category": "host-process", |
| 2859 | "profile": "OM-1", |
| 2860 | "form": "pipefds A off n flags", |
| 2861 | "arity": 4, |
| 2862 | "types": [ |
| 2863 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2864 | "off: ulong", |
| 2865 | "n: ulong", |
| 2866 | "flags: int" |
| 2867 | ], |
| 2868 | "result": "long", |
| 2869 | "summary": "Create a pipe (pipe2); write two little-endian 32-bit descriptors. Program mode only; failure is minus the Linux errno.", |
| 2870 | "citations": [ |
| 2871 | { |
| 2872 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2972-2973", |
| 2873 | "quote": "ret 128" |
| 2874 | }, |
| 2875 | { |
| 2876 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1205", |
| 2877 | "quote": "`pipefds A off n flags`" |
| 2878 | }, |
| 2879 | { |
| 2880 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2881 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2882 | } |
| 2883 | ], |
| 2884 | "example": "procs" |
| 2885 | }, |
| 2886 | "dupfd": { |
| 2887 | "table": "kw", |
| 2888 | "id": 108, |
| 2889 | "category": "host-process", |
| 2890 | "profile": "OM-1", |
| 2891 | "form": "dupfd fd target flags", |
| 2892 | "arity": 3, |
| 2893 | "types": [ |
| 2894 | "fd: int", |
| 2895 | "target: int", |
| 2896 | "flags: int" |
| 2897 | ], |
| 2898 | "result": "long", |
| 2899 | "summary": "Duplicate onto a chosen descriptor (dup3). Program mode only; failure is minus the Linux errno.", |
| 2900 | "citations": [ |
| 2901 | { |
| 2902 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3035-3036", |
| 2903 | "quote": "ret 108" |
| 2904 | }, |
| 2905 | { |
| 2906 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1206", |
| 2907 | "quote": "`dupfd fd target flags`" |
| 2908 | }, |
| 2909 | { |
| 2910 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2911 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2912 | } |
| 2913 | ], |
| 2914 | "example": "procs" |
| 2915 | }, |
| 2916 | "execprog": { |
| 2917 | "table": "kw", |
| 2918 | "id": 124, |
| 2919 | "category": "host-process", |
| 2920 | "profile": "OM-1", |
| 2921 | "form": "execprog A off n", |
| 2922 | "arity": 3, |
| 2923 | "types": [ |
| 2924 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2925 | "off: ulong", |
| 2926 | "n: ulong" |
| 2927 | ], |
| 2928 | "result": "long", |
| 2929 | "summary": "Replace the process using a packed argument list and an empty environment; returns only on failure. Program mode only; failure is minus the Linux errno.", |
| 2930 | "citations": [ |
| 2931 | { |
| 2932 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2960-2961", |
| 2933 | "quote": "ret 124" |
| 2934 | }, |
| 2935 | { |
| 2936 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1207", |
| 2937 | "quote": "`execprog A off n`" |
| 2938 | }, |
| 2939 | { |
| 2940 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2941 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2942 | } |
| 2943 | ], |
| 2944 | "example": "procs" |
| 2945 | }, |
| 2946 | "argcnt": { |
| 2947 | "table": "kw", |
| 2948 | "id": 121, |
| 2949 | "category": "host-process", |
| 2950 | "profile": "OM-1", |
| 2951 | "form": "argcnt", |
| 2952 | "arity": 0, |
| 2953 | "types": [], |
| 2954 | "result": "long", |
| 2955 | "summary": "Argument count, including the executable name. Program mode only; never fails.", |
| 2956 | "citations": [ |
| 2957 | { |
| 2958 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3005-3006", |
| 2959 | "quote": "ret 121" |
| 2960 | }, |
| 2961 | { |
| 2962 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1216", |
| 2963 | "quote": "`argcnt`" |
| 2964 | }, |
| 2965 | { |
| 2966 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2967 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2968 | } |
| 2969 | ], |
| 2970 | "example": "argsenv" |
| 2971 | }, |
| 2972 | "argread": { |
| 2973 | "table": "kw", |
| 2974 | "id": 122, |
| 2975 | "category": "host-process", |
| 2976 | "profile": "OM-1", |
| 2977 | "form": "argread index A off capacity", |
| 2978 | "arity": 4, |
| 2979 | "types": [ |
| 2980 | "index: ulong", |
| 2981 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 2982 | "off: ulong", |
| 2983 | "capacity: ulong" |
| 2984 | ], |
| 2985 | "result": "long", |
| 2986 | "summary": "Copy one argument's bytes without a terminator; return its length. Program mode only. An index at or past argcnt traps 3 (check argcnt first; the example shows the trap); insufficient capacity returns -105 without changing the slice.", |
| 2987 | "citations": [ |
| 2988 | { |
| 2989 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3008-3009", |
| 2990 | "quote": "ret 122" |
| 2991 | }, |
| 2992 | { |
| 2993 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1217", |
| 2994 | "quote": "`argread index A off capacity`" |
| 2995 | }, |
| 2996 | { |
| 2997 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 2998 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 2999 | } |
| 3000 | ], |
| 3001 | "example": "argtrap" |
| 3002 | }, |
| 3003 | "envcnt": { |
| 3004 | "table": "kw", |
| 3005 | "id": 136, |
| 3006 | "category": "host-process", |
| 3007 | "profile": "OM-1", |
| 3008 | "form": "envcnt", |
| 3009 | "arity": 0, |
| 3010 | "types": [], |
| 3011 | "result": "long", |
| 3012 | "summary": "Number of environment entries. Program mode only; never fails.", |
| 3013 | "citations": [ |
| 3014 | { |
| 3015 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2585-2586", |
| 3016 | "quote": "ret 136" |
| 3017 | }, |
| 3018 | { |
| 3019 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1218", |
| 3020 | "quote": "`envcnt`" |
| 3021 | }, |
| 3022 | { |
| 3023 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3024 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3025 | } |
| 3026 | ], |
| 3027 | "example": "argsenv" |
| 3028 | }, |
| 3029 | "envread": { |
| 3030 | "table": "kw", |
| 3031 | "id": 137, |
| 3032 | "category": "host-process", |
| 3033 | "profile": "OM-1", |
| 3034 | "form": "envread index A off capacity", |
| 3035 | "arity": 4, |
| 3036 | "types": [ |
| 3037 | "index: ulong", |
| 3038 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3039 | "off: ulong", |
| 3040 | "capacity: ulong" |
| 3041 | ], |
| 3042 | "result": "long", |
| 3043 | "summary": "Copy one environment entry without its terminator; return its length. Program mode only. An index at or past envcnt traps 3; insufficient capacity returns -105 without changing the slice.", |
| 3044 | "citations": [ |
| 3045 | { |
| 3046 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2588-2589", |
| 3047 | "quote": "ret 137" |
| 3048 | }, |
| 3049 | { |
| 3050 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1219", |
| 3051 | "quote": "`envread index A off capacity`" |
| 3052 | }, |
| 3053 | { |
| 3054 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3055 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3056 | } |
| 3057 | ], |
| 3058 | "example": "argsenv" |
| 3059 | }, |
| 3060 | "random": { |
| 3061 | "table": "kw", |
| 3062 | "id": 135, |
| 3063 | "category": "host-time", |
| 3064 | "profile": "OM-1", |
| 3065 | "form": "random A off n flags", |
| 3066 | "arity": 4, |
| 3067 | "types": [ |
| 3068 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3069 | "off: ulong", |
| 3070 | "n: ulong", |
| 3071 | "flags: int" |
| 3072 | ], |
| 3073 | "result": "long", |
| 3074 | "summary": "Fill a writable byte slice from getrandom; return the bytes written. Program mode only; failure is minus the Linux errno.", |
| 3075 | "citations": [ |
| 3076 | { |
| 3077 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2582-2583", |
| 3078 | "quote": "ret 135" |
| 3079 | }, |
| 3080 | { |
| 3081 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1220", |
| 3082 | "quote": "`random A off n flags`" |
| 3083 | }, |
| 3084 | { |
| 3085 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3086 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3087 | } |
| 3088 | ], |
| 3089 | "example": "clock" |
| 3090 | }, |
| 3091 | "peername": { |
| 3092 | "table": "kw", |
| 3093 | "id": 224, |
| 3094 | "category": "host-net", |
| 3095 | "profile": "OM-1", |
| 3096 | "form": "peername fd A off n", |
| 3097 | "arity": 4, |
| 3098 | "types": [ |
| 3099 | "fd: int", |
| 3100 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3101 | "off: ulong", |
| 3102 | "n: ulong" |
| 3103 | ], |
| 3104 | "result": "long", |
| 3105 | "summary": "Write the connected peer's address bytes (getpeername) into a writable slice; return the full address length (greater than n means truncated). Program mode only; failure is minus the Linux errno.", |
| 3106 | "citations": [ |
| 3107 | { |
| 3108 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3101-3102", |
| 3109 | "quote": "ret 224" |
| 3110 | }, |
| 3111 | { |
| 3112 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1193", |
| 3113 | "quote": "`peername fd A off n`" |
| 3114 | }, |
| 3115 | { |
| 3116 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3117 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3118 | } |
| 3119 | ], |
| 3120 | "example": "peername" |
| 3121 | }, |
| 3122 | "execenv": { |
| 3123 | "table": "kw", |
| 3124 | "id": 233, |
| 3125 | "category": "host-process", |
| 3126 | "profile": "OM-1", |
| 3127 | "form": "execenv A off n B off m", |
| 3128 | "arity": 6, |
| 3129 | "types": [ |
| 3130 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3131 | "off: ulong", |
| 3132 | "n: ulong", |
| 3133 | "B: uchar array (sized, unsized view/edit, or text when only read)", |
| 3134 | "off: ulong", |
| 3135 | "m: ulong" |
| 3136 | ], |
| 3137 | "result": "long", |
| 3138 | "summary": "As execprog, but the child's environment is exactly the packed list B (count 1..64, at most 4096 bytes) instead of an empty one; both packets are checked (trap 3) first; returns only on failure. AArch64 and x86linux. Program mode only; failure is minus the Linux errno.", |
| 3139 | "citations": [ |
| 3140 | { |
| 3141 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3107-3108", |
| 3142 | "quote": "ret 233" |
| 3143 | }, |
| 3144 | { |
| 3145 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1209", |
| 3146 | "quote": "`execenv A off n B off m`" |
| 3147 | }, |
| 3148 | { |
| 3149 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3150 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3151 | } |
| 3152 | ], |
| 3153 | "example": "limits" |
| 3154 | }, |
| 3155 | "prlimit": { |
| 3156 | "table": "kw", |
| 3157 | "id": 235, |
| 3158 | "category": "host-process", |
| 3159 | "profile": "OM-1", |
| 3160 | "form": "prlimit pid res A off n", |
| 3161 | "arity": 5, |
| 3162 | "types": [ |
| 3163 | "pid: int", |
| 3164 | "res: int", |
| 3165 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3166 | "off: ulong", |
| 3167 | "n: ulong" |
| 3168 | ], |
| 3169 | "result": "long", |
| 3170 | "summary": "Linux prlimit64 on pid (0 = this process): n 16 writes the old {rlim_cur, rlim_max} to A[off..off+16) as two little-endian u64; n 32 sets the pair read from A[off..off+16) and writes the old pair to A[off+16..off+32); any other n returns -22. Returns 0 or minus errno. Program mode only; failure is minus the Linux errno.", |
| 3171 | "citations": [ |
| 3172 | { |
| 3173 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2726-2727", |
| 3174 | "quote": "ret 235" |
| 3175 | }, |
| 3176 | { |
| 3177 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1210", |
| 3178 | "quote": "`prlimit pid res A off n`" |
| 3179 | }, |
| 3180 | { |
| 3181 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3182 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3183 | } |
| 3184 | ], |
| 3185 | "example": "limits" |
| 3186 | }, |
| 3187 | "cpuset": { |
| 3188 | "table": "kw", |
| 3189 | "id": 236, |
| 3190 | "category": "host-process", |
| 3191 | "profile": "OM-1", |
| 3192 | "form": "cpuset pid A off n", |
| 3193 | "arity": 4, |
| 3194 | "types": [ |
| 3195 | "pid: int", |
| 3196 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3197 | "off: ulong", |
| 3198 | "n: ulong" |
| 3199 | ], |
| 3200 | "result": "long", |
| 3201 | "summary": "sched_setaffinity from a byte mask slice (pid 0 = calling thread); 0 or minus errno; an empty permitted mask is -22. Program mode only; failure is minus the Linux errno.", |
| 3202 | "citations": [ |
| 3203 | { |
| 3204 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2729-2730", |
| 3205 | "quote": "ret 236" |
| 3206 | }, |
| 3207 | { |
| 3208 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1211", |
| 3209 | "quote": "`cpuset pid A off n`" |
| 3210 | }, |
| 3211 | { |
| 3212 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3213 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3214 | } |
| 3215 | ], |
| 3216 | "example": "sched" |
| 3217 | }, |
| 3218 | "cpuget": { |
| 3219 | "table": "kw", |
| 3220 | "id": 237, |
| 3221 | "category": "host-process", |
| 3222 | "profile": "OM-1", |
| 3223 | "form": "cpuget pid A off n", |
| 3224 | "arity": 4, |
| 3225 | "types": [ |
| 3226 | "pid: int", |
| 3227 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3228 | "off: ulong", |
| 3229 | "n: ulong" |
| 3230 | ], |
| 3231 | "result": "long", |
| 3232 | "summary": "sched_getaffinity into a writable byte mask slice; the count of bytes copied or minus errno. Program mode only; failure is minus the Linux errno.", |
| 3233 | "citations": [ |
| 3234 | { |
| 3235 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2732-2733", |
| 3236 | "quote": "ret 237" |
| 3237 | }, |
| 3238 | { |
| 3239 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1212", |
| 3240 | "quote": "`cpuget pid A off n`" |
| 3241 | }, |
| 3242 | { |
| 3243 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3244 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3245 | } |
| 3246 | ], |
| 3247 | "example": "sched" |
| 3248 | }, |
| 3249 | "cpunow": { |
| 3250 | "table": "kw", |
| 3251 | "id": 238, |
| 3252 | "category": "host-process", |
| 3253 | "profile": "OM-1", |
| 3254 | "form": "cpunow", |
| 3255 | "arity": 0, |
| 3256 | "types": [], |
| 3257 | "result": "long", |
| 3258 | "summary": "getcpu: a snapshot of the CPU number, or minus errno. Program mode only; failure is minus the Linux errno.", |
| 3259 | "citations": [ |
| 3260 | { |
| 3261 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2735-2736", |
| 3262 | "quote": "ret 238" |
| 3263 | }, |
| 3264 | { |
| 3265 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1213", |
| 3266 | "quote": "`cpunow`" |
| 3267 | }, |
| 3268 | { |
| 3269 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3270 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3271 | } |
| 3272 | ], |
| 3273 | "example": "sched" |
| 3274 | }, |
| 3275 | "setprio": { |
| 3276 | "table": "kw", |
| 3277 | "id": 239, |
| 3278 | "category": "host-process", |
| 3279 | "profile": "OM-1", |
| 3280 | "form": "setprio which who priority", |
| 3281 | "arity": 3, |
| 3282 | "types": [ |
| 3283 | "which: int", |
| 3284 | "who: int", |
| 3285 | "priority: int" |
| 3286 | ], |
| 3287 | "result": "long", |
| 3288 | "summary": "setpriority (which 0, who 0 = this thread); 0 or minus errno; Linux privilege checks remain. Program mode only; failure is minus the Linux errno.", |
| 3289 | "citations": [ |
| 3290 | { |
| 3291 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2738-2739", |
| 3292 | "quote": "ret 239" |
| 3293 | }, |
| 3294 | { |
| 3295 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1214", |
| 3296 | "quote": "`setprio which who priority`" |
| 3297 | }, |
| 3298 | { |
| 3299 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3300 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3301 | } |
| 3302 | ], |
| 3303 | "example": "sched" |
| 3304 | }, |
| 3305 | "getprio": { |
| 3306 | "table": "kw", |
| 3307 | "id": 240, |
| 3308 | "category": "host-process", |
| 3309 | "profile": "OM-1", |
| 3310 | "form": "getprio which who", |
| 3311 | "arity": 2, |
| 3312 | "types": [ |
| 3313 | "which: int", |
| 3314 | "who: int" |
| 3315 | ], |
| 3316 | "result": "long", |
| 3317 | "summary": "getpriority: the raw kernel result 20 minus nice, or minus errno. Program mode only; failure is minus the Linux errno.", |
| 3318 | "citations": [ |
| 3319 | { |
| 3320 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2741-2742", |
| 3321 | "quote": "ret 240" |
| 3322 | }, |
| 3323 | { |
| 3324 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1215", |
| 3325 | "quote": "`getprio which who`" |
| 3326 | }, |
| 3327 | { |
| 3328 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3329 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3330 | } |
| 3331 | ], |
| 3332 | "example": "sched" |
| 3333 | }, |
| 3334 | "execpure": { |
| 3335 | "table": "kw", |
| 3336 | "id": 198, |
| 3337 | "category": "host-process", |
| 3338 | "profile": "OM-1", |
| 3339 | "form": "execpure A off n", |
| 3340 | "arity": 3, |
| 3341 | "types": [ |
| 3342 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3343 | "off: ulong", |
| 3344 | "n: ulong" |
| 3345 | ], |
| 3346 | "result": "long", |
| 3347 | "summary": "As execprog, then run the executable through descriptor 3 under a fixed strict stdio profile (execveat AT_EMPTY_PATH); returns only on failure. AArch64 only (error 25 under target x86linux). Program mode only; failure is minus the Linux errno.", |
| 3348 | "citations": [ |
| 3349 | { |
| 3350 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2558-2559", |
| 3351 | "quote": "ret 198" |
| 3352 | }, |
| 3353 | { |
| 3354 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1208", |
| 3355 | "quote": "`execpure A off n`" |
| 3356 | }, |
| 3357 | { |
| 3358 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1140", |
| 3359 | "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" |
| 3360 | } |
| 3361 | ], |
| 3362 | "example": "procs" |
| 3363 | }, |
| 3364 | "pread": { |
| 3365 | "table": "kw", |
| 3366 | "id": 161, |
| 3367 | "category": "host-file", |
| 3368 | "profile": "OM-1", |
| 3369 | "form": "pread fd A off n pos", |
| 3370 | "arity": 5, |
| 3371 | "types": [ |
| 3372 | "fd: int", |
| 3373 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3374 | "off: ulong", |
| 3375 | "n: ulong", |
| 3376 | "pos: long" |
| 3377 | ], |
| 3378 | "result": "long", |
| 3379 | "summary": "Read n bytes at file position pos into A[off..] without moving the descriptor offset; bytes read or -errno.", |
| 3380 | "citations": [ |
| 3381 | { |
| 3382 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2660-2661", |
| 3383 | "quote": "ret 161" |
| 3384 | }, |
| 3385 | { |
| 3386 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:557", |
| 3387 | "quote": "`pread fd A off n pos` / `pwrite fd A off n pos` (pos long)" |
| 3388 | } |
| 3389 | ], |
| 3390 | "example": "files" |
| 3391 | }, |
| 3392 | "pwrite": { |
| 3393 | "table": "kw", |
| 3394 | "id": 162, |
| 3395 | "category": "host-file", |
| 3396 | "profile": "OM-1", |
| 3397 | "form": "pwrite fd A off n pos", |
| 3398 | "arity": 5, |
| 3399 | "types": [ |
| 3400 | "fd: int", |
| 3401 | "A: uchar array (sized, unsized view/edit, or text when only read)", |
| 3402 | "off: ulong", |
| 3403 | "n: ulong", |
| 3404 | "pos: long" |
| 3405 | ], |
| 3406 | "result": "long", |
| 3407 | "summary": "Write A[off..off+n-1] at file position pos without moving the descriptor offset; bytes written or -errno.", |
| 3408 | "citations": [ |
| 3409 | { |
| 3410 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2663-2664", |
| 3411 | "quote": "ret 162" |
| 3412 | }, |
| 3413 | { |
| 3414 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:557", |
| 3415 | "quote": "`pread fd A off n pos` / `pwrite fd A off n pos` (pos long)" |
| 3416 | } |
| 3417 | ], |
| 3418 | "example": "files" |
| 3419 | }, |
| 3420 | "devctl": { |
| 3421 | "table": "kw", |
| 3422 | "id": 166, |
| 3423 | "category": "device", |
| 3424 | "profile": "OM-1", |
| 3425 | "form": "devctl fd request A off n", |
| 3426 | "arity": 5, |
| 3427 | "types": [ |
| 3428 | "fd: int", |
| 3429 | "request: uint literal (FIONREAD 21531, an NVRM request, or one of the five aien-gpu ABI1 requests)", |
| 3430 | "A: writable uchar array", |
| 3431 | "off: ulong", |
| 3432 | "n: ulong" |
| 3433 | ], |
| 3434 | "result": "long", |
| 3435 | "summary": "Checked Linux ioctl on an allowlisted request with its exact encoded size. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3436 | "citations": [ |
| 3437 | { |
| 3438 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2675-2676", |
| 3439 | "quote": "ret 166" |
| 3440 | }, |
| 3441 | { |
| 3442 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:11", |
| 3443 | "quote": "`devctl fd request A off n`" |
| 3444 | }, |
| 3445 | { |
| 3446 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3447 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3448 | } |
| 3449 | ], |
| 3450 | "example": "mapping" |
| 3451 | }, |
| 3452 | "mapnew": { |
| 3453 | "table": "kw", |
| 3454 | "id": 167, |
| 3455 | "category": "device", |
| 3456 | "profile": "OM-1", |
| 3457 | "form": "mapnew fd offset bytes access mode", |
| 3458 | "arity": 5, |
| 3459 | "types": [ |
| 3460 | "fd: int (-1 for anonymous)", |
| 3461 | "offset: ulong", |
| 3462 | "bytes: ulong", |
| 3463 | "access: int literal 1 or 3", |
| 3464 | "mode: int literal 1, 2, 33 or 34" |
| 3465 | ], |
| 3466 | "result": "long (handle)", |
| 3467 | "summary": "Map a file or anonymous memory; a positive owned handle or negative errno. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3468 | "citations": [ |
| 3469 | { |
| 3470 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2678-2679", |
| 3471 | "quote": "ret 167" |
| 3472 | }, |
| 3473 | { |
| 3474 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:12", |
| 3475 | "quote": "`mapnew fd offset bytes access mode`" |
| 3476 | }, |
| 3477 | { |
| 3478 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3479 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3480 | } |
| 3481 | ], |
| 3482 | "example": "mapping" |
| 3483 | }, |
| 3484 | "mapdrop": { |
| 3485 | "table": "kw", |
| 3486 | "id": 168, |
| 3487 | "category": "device", |
| 3488 | "profile": "OM-1", |
| 3489 | "form": "mapdrop handle", |
| 3490 | "arity": 1, |
| 3491 | "types": [ |
| 3492 | "handle: long" |
| 3493 | ], |
| 3494 | "result": "long", |
| 3495 | "summary": "Unmap an owned mapping; 0 or negative errno. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3496 | "citations": [ |
| 3497 | { |
| 3498 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2681-2682", |
| 3499 | "quote": "ret 168" |
| 3500 | }, |
| 3501 | { |
| 3502 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:13", |
| 3503 | "quote": "`mapdrop handle`" |
| 3504 | }, |
| 3505 | { |
| 3506 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3507 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3508 | } |
| 3509 | ], |
| 3510 | "example": "mapping" |
| 3511 | }, |
| 3512 | "mapread": { |
| 3513 | "table": "kw", |
| 3514 | "id": 169, |
| 3515 | "category": "device", |
| 3516 | "profile": "OM-1", |
| 3517 | "form": "mapread handle offset A off n", |
| 3518 | "arity": 5, |
| 3519 | "types": [ |
| 3520 | "handle: long", |
| 3521 | "offset: ulong", |
| 3522 | "A: writable uchar array", |
| 3523 | "off: ulong", |
| 3524 | "n: ulong" |
| 3525 | ], |
| 3526 | "result": "long", |
| 3527 | "summary": "Copy n bytes from the mapping into A; return n. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3528 | "citations": [ |
| 3529 | { |
| 3530 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2684-2685", |
| 3531 | "quote": "ret 169" |
| 3532 | }, |
| 3533 | { |
| 3534 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:14", |
| 3535 | "quote": "`mapread handle offset A off n`" |
| 3536 | }, |
| 3537 | { |
| 3538 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3539 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3540 | } |
| 3541 | ], |
| 3542 | "example": "mapping" |
| 3543 | }, |
| 3544 | "mapwrite": { |
| 3545 | "table": "kw", |
| 3546 | "id": 170, |
| 3547 | "category": "device", |
| 3548 | "profile": "OM-1", |
| 3549 | "form": "mapwrite handle offset A off n", |
| 3550 | "arity": 5, |
| 3551 | "types": [ |
| 3552 | "handle: long", |
| 3553 | "offset: ulong", |
| 3554 | "A: uchar array (text and views accepted)", |
| 3555 | "off: ulong", |
| 3556 | "n: ulong" |
| 3557 | ], |
| 3558 | "result": "long", |
| 3559 | "summary": "Copy n bytes from A into a writable mapping; return n. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3560 | "citations": [ |
| 3561 | { |
| 3562 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2687-2688", |
| 3563 | "quote": "ret 170" |
| 3564 | }, |
| 3565 | { |
| 3566 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:15", |
| 3567 | "quote": "`mapwrite handle offset A off n`" |
| 3568 | }, |
| 3569 | { |
| 3570 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3571 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3572 | } |
| 3573 | ], |
| 3574 | "example": "mapping" |
| 3575 | }, |
| 3576 | "devcall": { |
| 3577 | "table": "kw", |
| 3578 | "id": 171, |
| 3579 | "category": "device", |
| 3580 | "profile": "OM-1", |
| 3581 | "form": "devcall fd request H hoff 32 P poff n", |
| 3582 | "arity": 8, |
| 3583 | "types": [ |
| 3584 | "fd: int", |
| 3585 | "request: uint literal (RM_ALLOC or RM_CONTROL)", |
| 3586 | "H: writable uchar array", |
| 3587 | "hoff: ulong", |
| 3588 | "32: header length", |
| 3589 | "P: writable uchar array", |
| 3590 | "poff: ulong", |
| 3591 | "n: ulong (at most 1048576; larger traps 3)" |
| 3592 | ], |
| 3593 | "result": "long", |
| 3594 | "summary": "Checked NVIDIA RM_ALLOC / RM_CONTROL call with a private header and a bounded parameter span. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3595 | "citations": [ |
| 3596 | { |
| 3597 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2690-2691", |
| 3598 | "quote": "ret 171" |
| 3599 | }, |
| 3600 | { |
| 3601 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:16", |
| 3602 | "quote": "`devcall fd request H hoff 32 P poff n`" |
| 3603 | }, |
| 3604 | { |
| 3605 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3606 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3607 | } |
| 3608 | ], |
| 3609 | "example": "mapping" |
| 3610 | }, |
| 3611 | "uvmctl": { |
| 3612 | "table": "kw", |
| 3613 | "id": 172, |
| 3614 | "category": "device", |
| 3615 | "profile": "OM-1", |
| 3616 | "form": "uvmctl fd command A off n", |
| 3617 | "arity": 5, |
| 3618 | "types": [ |
| 3619 | "fd: int", |
| 3620 | "command: uint literal from the UVM allowlist", |
| 3621 | "A: writable uchar array", |
| 3622 | "off: ulong", |
| 3623 | "n: ulong (the request's exact payload length)" |
| 3624 | ], |
| 3625 | "result": "long", |
| 3626 | "summary": "Allowlisted Linux UVM ioctl with its exact writable payload. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3627 | "citations": [ |
| 3628 | { |
| 3629 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2693-2694", |
| 3630 | "quote": "ret 172" |
| 3631 | }, |
| 3632 | { |
| 3633 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:17", |
| 3634 | "quote": "`uvmctl fd command A off n`" |
| 3635 | }, |
| 3636 | { |
| 3637 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3638 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3639 | } |
| 3640 | ], |
| 3641 | "example": "mapping" |
| 3642 | }, |
| 3643 | "mapaddr": { |
| 3644 | "table": "kw", |
| 3645 | "id": 173, |
| 3646 | "category": "device", |
| 3647 | "profile": "OM-1", |
| 3648 | "form": "mapaddr handle", |
| 3649 | "arity": 1, |
| 3650 | "types": [ |
| 3651 | "handle: long" |
| 3652 | ], |
| 3653 | "result": "ulong", |
| 3654 | "summary": "Base address of an owned live mapping or reservation (no access through it). Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3655 | "citations": [ |
| 3656 | { |
| 3657 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2696-2697", |
| 3658 | "quote": "ret 173" |
| 3659 | }, |
| 3660 | { |
| 3661 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:23", |
| 3662 | "quote": "`mapaddr handle`" |
| 3663 | }, |
| 3664 | { |
| 3665 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3666 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3667 | } |
| 3668 | ], |
| 3669 | "example": "mapping" |
| 3670 | }, |
| 3671 | "mapget": { |
| 3672 | "table": "kw", |
| 3673 | "id": 174, |
| 3674 | "category": "device", |
| 3675 | "profile": "OM-1", |
| 3676 | "form": "mapget handle offset width", |
| 3677 | "arity": 3, |
| 3678 | "types": [ |
| 3679 | "handle: long", |
| 3680 | "offset: ulong", |
| 3681 | "width: int literal 4 or 8" |
| 3682 | ], |
| 3683 | "result": "ulong", |
| 3684 | "summary": "One aligned 32- or 64-bit load from a readable mapping. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3685 | "citations": [ |
| 3686 | { |
| 3687 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2699-2700", |
| 3688 | "quote": "ret 174" |
| 3689 | }, |
| 3690 | { |
| 3691 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:24", |
| 3692 | "quote": "`mapget handle offset width`" |
| 3693 | }, |
| 3694 | { |
| 3695 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3696 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3697 | } |
| 3698 | ], |
| 3699 | "example": "mapping" |
| 3700 | }, |
| 3701 | "mapset": { |
| 3702 | "table": "kw", |
| 3703 | "id": 175, |
| 3704 | "category": "device", |
| 3705 | "profile": "OM-1", |
| 3706 | "form": "mapset handle offset width value", |
| 3707 | "arity": 4, |
| 3708 | "types": [ |
| 3709 | "handle: long", |
| 3710 | "offset: ulong", |
| 3711 | "width: int literal 4 or 8", |
| 3712 | "value: ulong" |
| 3713 | ], |
| 3714 | "result": "long", |
| 3715 | "summary": "One aligned 32- or 64-bit store into a writable mapping; returns 0. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3716 | "citations": [ |
| 3717 | { |
| 3718 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2702-2703", |
| 3719 | "quote": "ret 175" |
| 3720 | }, |
| 3721 | { |
| 3722 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:25", |
| 3723 | "quote": "`mapset handle offset width value`" |
| 3724 | }, |
| 3725 | { |
| 3726 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3727 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3728 | } |
| 3729 | ], |
| 3730 | "example": "mapping" |
| 3731 | }, |
| 3732 | "maphold": { |
| 3733 | "table": "kw", |
| 3734 | "id": 176, |
| 3735 | "category": "device", |
| 3736 | "profile": "OM-1", |
| 3737 | "form": "maphold address bytes", |
| 3738 | "arity": 2, |
| 3739 | "types": [ |
| 3740 | "address: ulong (at least 64 KiB, span below 1 TiB)", |
| 3741 | "bytes: ulong" |
| 3742 | ], |
| 3743 | "result": "long (handle)", |
| 3744 | "summary": "Reserve an unused page-aligned span (PROT_NONE, MAP_FIXED_NOREPLACE). Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3745 | "citations": [ |
| 3746 | { |
| 3747 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2705-2706", |
| 3748 | "quote": "ret 176" |
| 3749 | }, |
| 3750 | { |
| 3751 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:26", |
| 3752 | "quote": "`maphold address bytes`" |
| 3753 | }, |
| 3754 | { |
| 3755 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3756 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3757 | } |
| 3758 | ], |
| 3759 | "example": "mapping" |
| 3760 | }, |
| 3761 | "vfioctl": { |
| 3762 | "table": "kw", |
| 3763 | "id": 228, |
| 3764 | "category": "device", |
| 3765 | "profile": "OM-1", |
| 3766 | "form": "vfioctl fd request A off n", |
| 3767 | "arity": 5, |
| 3768 | "types": [ |
| 3769 | "fd: int", |
| 3770 | "request: uint literal from the VFIO allowlist", |
| 3771 | "A: uchar array", |
| 3772 | "off: ulong", |
| 3773 | "n: ulong (the request's exact byte count)" |
| 3774 | ], |
| 3775 | "result": "long", |
| 3776 | "summary": "Allowlisted VFIO ioctl with its exact byte count (argsz is written for spans of 8 bytes or more); signed Linux ioctl result. Program mode only, AArch64 Linux.", |
| 3777 | "citations": [ |
| 3778 | { |
| 3779 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2711-2712", |
| 3780 | "quote": "ret 228" |
| 3781 | }, |
| 3782 | { |
| 3783 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:18", |
| 3784 | "quote": "`vfioctl fd request A off n`" |
| 3785 | }, |
| 3786 | { |
| 3787 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:207-208", |
| 3788 | "quote": "These additions are program-mode only; hosted x86 VFIO and function-mode VFIO are not implemented." |
| 3789 | } |
| 3790 | ], |
| 3791 | "example": "vfio" |
| 3792 | }, |
| 3793 | "vfiomap": { |
| 3794 | "table": "kw", |
| 3795 | "id": 229, |
| 3796 | "category": "device", |
| 3797 | "profile": "OM-1", |
| 3798 | "form": "vfiomap fd A off 32", |
| 3799 | "arity": 4, |
| 3800 | "types": [ |
| 3801 | "fd: int", |
| 3802 | "A: uchar array holding a vfio_region_info", |
| 3803 | "off: ulong", |
| 3804 | "32: record length" |
| 3805 | ], |
| 3806 | "result": "long (handle)", |
| 3807 | "summary": "Read-only shared mapping of exactly one VFIO region; region flags without READ and MMAP, or a size of zero, trap 3. A handle or negative errno. Program mode only, AArch64 Linux.", |
| 3808 | "citations": [ |
| 3809 | { |
| 3810 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2714-2715", |
| 3811 | "quote": "ret 229" |
| 3812 | }, |
| 3813 | { |
| 3814 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:19", |
| 3815 | "quote": "`vfiomap fd A off 32`" |
| 3816 | }, |
| 3817 | { |
| 3818 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:207-208", |
| 3819 | "quote": "These additions are program-mode only; hosted x86 VFIO and function-mode VFIO are not implemented." |
| 3820 | } |
| 3821 | ], |
| 3822 | "example": "vfio" |
| 3823 | }, |
| 3824 | "vfiomapw": { |
| 3825 | "table": "kw", |
| 3826 | "id": 230, |
| 3827 | "category": "device", |
| 3828 | "profile": "OM-1", |
| 3829 | "form": "vfiomapw fd A off 32", |
| 3830 | "arity": 4, |
| 3831 | "types": [ |
| 3832 | "fd: int", |
| 3833 | "A: uchar array holding a vfio_region_info", |
| 3834 | "off: ulong", |
| 3835 | "32: record length" |
| 3836 | ], |
| 3837 | "result": "long (handle)", |
| 3838 | "summary": "As vfiomap, but the region flags must also contain WRITE and the mapping is read/write (mapget/mapset drive device registers). Program mode only, AArch64 Linux.", |
| 3839 | "citations": [ |
| 3840 | { |
| 3841 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2717-2718", |
| 3842 | "quote": "ret 230" |
| 3843 | }, |
| 3844 | { |
| 3845 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:20", |
| 3846 | "quote": "`vfiomapw fd A off 32`" |
| 3847 | }, |
| 3848 | { |
| 3849 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:207-208", |
| 3850 | "quote": "These additions are program-mode only; hosted x86 VFIO and function-mode VFIO are not implemented." |
| 3851 | } |
| 3852 | ], |
| 3853 | "example": "vfio" |
| 3854 | }, |
| 3855 | "eventfd": { |
| 3856 | "table": "kw", |
| 3857 | "id": 231, |
| 3858 | "category": "device", |
| 3859 | "profile": "OM-1", |
| 3860 | "form": "eventfd initial", |
| 3861 | "arity": 1, |
| 3862 | "types": [ |
| 3863 | "initial: uint" |
| 3864 | ], |
| 3865 | "result": "long", |
| 3866 | "summary": "Create a Linux eventfd (CLOEXEC, NONBLOCK, no semaphore mode); read/write exactly eight bytes, close with fclose. An fd or negative errno. Program mode only, AArch64 Linux.", |
| 3867 | "citations": [ |
| 3868 | { |
| 3869 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2720-2721", |
| 3870 | "quote": "ret 231" |
| 3871 | }, |
| 3872 | { |
| 3873 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:21", |
| 3874 | "quote": "`eventfd initial`" |
| 3875 | }, |
| 3876 | { |
| 3877 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:207-208", |
| 3878 | "quote": "These additions are program-mode only; hosted x86 VFIO and function-mode VFIO are not implemented." |
| 3879 | } |
| 3880 | ], |
| 3881 | "example": "vfio" |
| 3882 | }, |
| 3883 | "vfioirq": { |
| 3884 | "table": "kw", |
| 3885 | "id": 232, |
| 3886 | "category": "device", |
| 3887 | "profile": "OM-1", |
| 3888 | "form": "vfioirq fd request A off n", |
| 3889 | "arity": 5, |
| 3890 | "types": [ |
| 3891 | "fd: int from a successful vfioctl GROUP_GET_DEVICE_FD", |
| 3892 | "request: uint literal 15213 (GET_IRQ_INFO) or 15214 (SET_IRQS)", |
| 3893 | "A: writable uchar array", |
| 3894 | "off: ulong", |
| 3895 | "n: ulong (checked against the caller's argsz)" |
| 3896 | ], |
| 3897 | "result": "long", |
| 3898 | "summary": "Typed VFIO IRQ ioctl: an fd that is not an acquired VFIO device, or a malformed form, traps 3 before the ioctl. Program mode only, AArch64 Linux.", |
| 3899 | "citations": [ |
| 3900 | { |
| 3901 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2723-2724", |
| 3902 | "quote": "ret 232" |
| 3903 | }, |
| 3904 | { |
| 3905 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:22", |
| 3906 | "quote": "`vfioirq fd request A off n`" |
| 3907 | }, |
| 3908 | { |
| 3909 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:207-208", |
| 3910 | "quote": "These additions are program-mode only; hosted x86 VFIO and function-mode VFIO are not implemented." |
| 3911 | } |
| 3912 | ], |
| 3913 | "example": "vfioirq_trap" |
| 3914 | }, |
| 3915 | "mapbind": { |
| 3916 | "table": "kw", |
| 3917 | "id": 177, |
| 3918 | "category": "device", |
| 3919 | "profile": "OM-1", |
| 3920 | "form": "mapbind handle fd offset access", |
| 3921 | "arity": 4, |
| 3922 | "types": [ |
| 3923 | "handle: long", |
| 3924 | "fd: int", |
| 3925 | "offset: ulong", |
| 3926 | "access: int literal 1 or 3" |
| 3927 | ], |
| 3928 | "result": "long", |
| 3929 | "summary": "Bind a shared file or device mapping over a whole owned reservation. Program mode, and OM-2 function units (error 9 in OM-1 function units).", |
| 3930 | "citations": [ |
| 3931 | { |
| 3932 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2708-2709", |
| 3933 | "quote": "ret 177" |
| 3934 | }, |
| 3935 | { |
| 3936 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:27", |
| 3937 | "quote": "`mapbind handle fd offset access`" |
| 3938 | }, |
| 3939 | { |
| 3940 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:91-92", |
| 3941 | "quote": "An OM-2 function unit (first line `om2`, no `fn main`) may also use `devctl`" |
| 3942 | } |
| 3943 | ], |
| 3944 | "example": "mapping" |
| 3945 | }, |
| 3946 | "cpufence": { |
| 3947 | "table": "kw", |
| 3948 | "id": 199, |
| 3949 | "category": "device", |
| 3950 | "profile": "OM-1", |
| 3951 | "form": "cpufence", |
| 3952 | "arity": 0, |
| 3953 | "types": [], |
| 3954 | "result": "-", |
| 3955 | "summary": "Statement: host CPU publication barrier; every load and store before it completes before any after it (AArch64 DSB SY, x86-64 MFENCE). Accepted in function and program mode.", |
| 3956 | "citations": [ |
| 3957 | { |
| 3958 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3095-3096", |
| 3959 | "quote": "ret 199" |
| 3960 | }, |
| 3961 | { |
| 3962 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1476", |
| 3963 | "quote": "`cpufence` | Publication barrier (keyword id 199)." |
| 3964 | }, |
| 3965 | { |
| 3966 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:28", |
| 3967 | "quote": "`cpufence` | Statement, keyword 199" |
| 3968 | } |
| 3969 | ], |
| 3970 | "example": "cpu_order" |
| 3971 | }, |
| 3972 | "cpurelax": { |
| 3973 | "table": "kw", |
| 3974 | "id": 200, |
| 3975 | "category": "device", |
| 3976 | "profile": "OM-1", |
| 3977 | "form": "cpurelax", |
| 3978 | "arity": 0, |
| 3979 | "types": [], |
| 3980 | "result": "-", |
| 3981 | "summary": "Statement: spin-wait hint for a bounded poll loop, no ordering (AArch64 YIELD, x86-64 PAUSE). Accepted in function and program mode.", |
| 3982 | "citations": [ |
| 3983 | { |
| 3984 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3098-3099", |
| 3985 | "quote": "ret 200" |
| 3986 | }, |
| 3987 | { |
| 3988 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1477", |
| 3989 | "quote": "`cpurelax` | Spin-wait hint, no ordering (keyword id 200)." |
| 3990 | }, |
| 3991 | { |
| 3992 | "ref": "omega-mv@6c562dd1 seed/host/MAPPING.md:29", |
| 3993 | "quote": "`cpurelax` | Statement, keyword 200" |
| 3994 | } |
| 3995 | ], |
| 3996 | "example": "cpu_order" |
| 3997 | }, |
| 3998 | "kfdres": { |
| 3999 | "table": "kw", |
| 4000 | "id": 243, |
| 4001 | "category": "device", |
| 4002 | "profile": "OM-1", |
| 4003 | "form": "kfdres n", |
| 4004 | "arity": 1, |
| 4005 | "types": [ |
| 4006 | "n: ulong (nonzero multiple of 4096; otherwise trap 3)" |
| 4007 | ], |
| 4008 | "result": "long (handle)", |
| 4009 | "summary": "Reserve n bytes of address space with no access (PROT_NONE) at a kernel-chosen address aligned to 2 MiB; no memory is committed. A positive owned handle or negative errno. Program mode only, Linux (error 9 in function mode, error 25 on firmware targets).", |
| 4010 | "citations": [ |
| 4011 | { |
| 4012 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2750-2751", |
| 4013 | "quote": "ret 243" |
| 4014 | }, |
| 4015 | { |
| 4016 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1373", |
| 4017 | "quote": "`kfdres n` reserves a nonzero, 4096-byte-multiple `ulong` length" |
| 4018 | }, |
| 4019 | { |
| 4020 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1368", |
| 4021 | "quote": "Program-mode Linux only: native AArch64 and `target x86linux`." |
| 4022 | } |
| 4023 | ], |
| 4024 | "example": "kfd" |
| 4025 | }, |
| 4026 | "kfdmap": { |
| 4027 | "table": "kw", |
| 4028 | "id": 242, |
| 4029 | "category": "device", |
| 4030 | "profile": "OM-1", |
| 4031 | "form": "kfdmap fd offset n", |
| 4032 | "arity": 3, |
| 4033 | "types": [ |
| 4034 | "fd: int (a DRM render descriptor or /dev/kfd; any other descriptor traps 3)", |
| 4035 | "offset: ulong", |
| 4036 | "n: ulong (zero traps 3)" |
| 4037 | ], |
| 4038 | "result": "long (handle)", |
| 4039 | "summary": "Map n bytes of an AMD device read/write and shared at a kernel-chosen address. A positive owned handle or negative errno. Program mode only, Linux (error 9 in function mode, error 25 on firmware targets).", |
| 4040 | "citations": [ |
| 4041 | { |
| 4042 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2747-2748", |
| 4043 | "quote": "ret 242" |
| 4044 | }, |
| 4045 | { |
| 4046 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1378", |
| 4047 | "quote": "`kfdmap fd offset n` maps `n` bytes read/write and shared" |
| 4048 | }, |
| 4049 | { |
| 4050 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1368", |
| 4051 | "quote": "Program-mode Linux only: native AArch64 and `target x86linux`." |
| 4052 | } |
| 4053 | ], |
| 4054 | "example": "kfdmap_trap" |
| 4055 | }, |
| 4056 | "kfdctl": { |
| 4057 | "table": "kw", |
| 4058 | "id": 241, |
| 4059 | "category": "device", |
| 4060 | "profile": "OM-1", |
| 4061 | "form": "kfdctl fd request H off n [SUFFIX]", |
| 4062 | "arity": 5, |
| 4063 | "types": [ |
| 4064 | "fd: int", |
| 4065 | "request: uint literal from the KFD allowlist (another request is error 9)", |
| 4066 | "H: writable uchar array", |
| 4067 | "off: ulong", |
| 4068 | "n: ulong (the request's exact record length; a literal of another length is error 9)", |
| 4069 | "SUFFIX: fixed by the request. None for GET_VERSION, ACQUIRE_VM, DESTROY_QUEUE, FREE_MEMORY_OF_GPU, CREATE_EVENT and DESTROY_EVENT; a span `P poff pn` for GET_PROCESS_APERTURES_NEW, MAP_MEMORY_TO_GPU, UNMAP_MEMORY_FROM_GPU and WAIT_EVENTS; one reservation handle for ALLOC_MEMORY_OF_GPU and SET_SCRATCH_BACKING_VA; five handles `ring wptr rptr eop ctx` for CREATE_QUEUE" |
| 4070 | ], |
| 4071 | "result": "long", |
| 4072 | "summary": "Allowlisted AMD KFD ioctl through a private copy of the header; every address the kernel receives comes from a checked span or a live owned handle, and caller address fields must be zero (trap 3). The ioctl result or negative errno. Program mode only, Linux (error 9 in function mode, error 25 on firmware targets).", |
| 4073 | "citations": [ |
| 4074 | { |
| 4075 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2744-2745", |
| 4076 | "quote": "ret 241" |
| 4077 | }, |
| 4078 | { |
| 4079 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1387", |
| 4080 | "quote": "`kfdctl fd request H off n ...` uses a writable `uchar` header span." |
| 4081 | }, |
| 4082 | { |
| 4083 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1368", |
| 4084 | "quote": "Program-mode Linux only: native AArch64 and `target x86linux`." |
| 4085 | } |
| 4086 | ], |
| 4087 | "example": "kfd" |
| 4088 | }, |
| 4089 | "bool": { |
| 4090 | "table": "kw", |
| 4091 | "id": 1, |
| 4092 | "category": "type", |
| 4093 | "profile": "OM-1", |
| 4094 | "form": "bool VALUE (conversion) | NAME bool (parameter) | to bool (result)", |
| 4095 | "arity": 1, |
| 4096 | "types": [ |
| 4097 | "VALUE: any integer, float or bool value" |
| 4098 | ], |
| 4099 | "result": "bool", |
| 4100 | "summary": "Type word: bool (true 1, false 0), sizeof 1; never an array element. As a prefix it converts a value, trapping 5 when out of range.", |
| 4101 | "citations": [ |
| 4102 | { |
| 4103 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2756-2757", |
| 4104 | "quote": "ret 1" |
| 4105 | }, |
| 4106 | { |
| 4107 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:519", |
| 4108 | "quote": "`true` and `false` are the bool numbers 1 and 0." |
| 4109 | }, |
| 4110 | { |
| 4111 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4112 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4113 | } |
| 4114 | ], |
| 4115 | "example": "control" |
| 4116 | }, |
| 4117 | "uchar": { |
| 4118 | "table": "kw", |
| 4119 | "id": 2, |
| 4120 | "category": "type", |
| 4121 | "profile": "OM-1", |
| 4122 | "form": "uchar VALUE (conversion) | NAME uchar (parameter) | to uchar (result)", |
| 4123 | "arity": 1, |
| 4124 | "types": [ |
| 4125 | "VALUE: any integer, float or bool value" |
| 4126 | ], |
| 4127 | "result": "uchar", |
| 4128 | "summary": "Type word: unsigned 8-bit integer, sizeof 1. Arithmetic wraps modulo 2^width. As a prefix it converts a value, trapping 5 when out of range.", |
| 4129 | "citations": [ |
| 4130 | { |
| 4131 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2759-2760", |
| 4132 | "quote": "ret 2" |
| 4133 | }, |
| 4134 | { |
| 4135 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4136 | "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" |
| 4137 | }, |
| 4138 | { |
| 4139 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4140 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4141 | } |
| 4142 | ], |
| 4143 | "example": "ints" |
| 4144 | }, |
| 4145 | "u8": { |
| 4146 | "table": "kw", |
| 4147 | "id": 2, |
| 4148 | "category": "type", |
| 4149 | "profile": "OM-1", |
| 4150 | "form": "u8 VALUE (conversion) | NAME u8 (parameter) | to u8 (result)", |
| 4151 | "arity": 1, |
| 4152 | "types": [ |
| 4153 | "VALUE: any integer, float or bool value" |
| 4154 | ], |
| 4155 | "result": "uchar", |
| 4156 | "summary": "Alias of uchar (same keyword id): unsigned 8-bit, sizeof 1. Arithmetic wraps modulo 2^width. As a prefix it converts a value, trapping 5 when out of range.", |
| 4157 | "citations": [ |
| 4158 | { |
| 4159 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2762-2763", |
| 4160 | "quote": "ret 2" |
| 4161 | }, |
| 4162 | { |
| 4163 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4164 | "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" |
| 4165 | }, |
| 4166 | { |
| 4167 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4168 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4169 | } |
| 4170 | ], |
| 4171 | "example": "ints" |
| 4172 | }, |
| 4173 | "ushort": { |
| 4174 | "table": "kw", |
| 4175 | "id": 3, |
| 4176 | "category": "type", |
| 4177 | "profile": "OM-1", |
| 4178 | "form": "ushort VALUE (conversion) | NAME ushort (parameter) | to ushort (result)", |
| 4179 | "arity": 1, |
| 4180 | "types": [ |
| 4181 | "VALUE: any integer, float or bool value" |
| 4182 | ], |
| 4183 | "result": "ushort", |
| 4184 | "summary": "Type word: unsigned 16-bit integer, sizeof 2. Arithmetic wraps modulo 2^width. As a prefix it converts a value, trapping 5 when out of range.", |
| 4185 | "citations": [ |
| 4186 | { |
| 4187 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2765-2766", |
| 4188 | "quote": "ret 3" |
| 4189 | }, |
| 4190 | { |
| 4191 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4192 | "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" |
| 4193 | }, |
| 4194 | { |
| 4195 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4196 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4197 | } |
| 4198 | ], |
| 4199 | "example": "ints" |
| 4200 | }, |
| 4201 | "u16": { |
| 4202 | "table": "kw", |
| 4203 | "id": 3, |
| 4204 | "category": "type", |
| 4205 | "profile": "OM-1", |
| 4206 | "form": "u16 VALUE (conversion) | NAME u16 (parameter) | to u16 (result)", |
| 4207 | "arity": 1, |
| 4208 | "types": [ |
| 4209 | "VALUE: any integer, float or bool value" |
| 4210 | ], |
| 4211 | "result": "ushort", |
| 4212 | "summary": "Alias of ushort (same keyword id): unsigned 16-bit, sizeof 2. Arithmetic wraps modulo 2^width. As a prefix it converts a value, trapping 5 when out of range.", |
| 4213 | "citations": [ |
| 4214 | { |
| 4215 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2768-2769", |
| 4216 | "quote": "ret 3" |
| 4217 | }, |
| 4218 | { |
| 4219 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4220 | "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" |
| 4221 | }, |
| 4222 | { |
| 4223 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4224 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4225 | } |
| 4226 | ], |
| 4227 | "example": "ints" |
| 4228 | }, |
| 4229 | "uint": { |
| 4230 | "table": "kw", |
| 4231 | "id": 4, |
| 4232 | "category": "type", |
| 4233 | "profile": "OM-1", |
| 4234 | "form": "uint VALUE (conversion) | NAME uint (parameter) | to uint (result)", |
| 4235 | "arity": 1, |
| 4236 | "types": [ |
| 4237 | "VALUE: any integer, float or bool value" |
| 4238 | ], |
| 4239 | "result": "uint", |
| 4240 | "summary": "Type word: unsigned 32-bit integer, sizeof 4. Arithmetic wraps modulo 2^width. As a prefix it converts a value, trapping 5 when out of range.", |
| 4241 | "citations": [ |
| 4242 | { |
| 4243 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2771-2772", |
| 4244 | "quote": "ret 4" |
| 4245 | }, |
| 4246 | { |
| 4247 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4248 | "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" |
| 4249 | }, |
| 4250 | { |
| 4251 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4252 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4253 | } |
| 4254 | ], |
| 4255 | "example": "ints" |
| 4256 | }, |
| 4257 | "u32": { |
| 4258 | "table": "kw", |
| 4259 | "id": 4, |
| 4260 | "category": "type", |
| 4261 | "profile": "OM-1", |
| 4262 | "form": "u32 VALUE (conversion) | NAME u32 (parameter) | to u32 (result)", |
| 4263 | "arity": 1, |
| 4264 | "types": [ |
| 4265 | "VALUE: any integer, float or bool value" |
| 4266 | ], |
| 4267 | "result": "uint", |
| 4268 | "summary": "Alias of uint (same keyword id): unsigned 32-bit, sizeof 4. Arithmetic wraps modulo 2^width. As a prefix it converts a value, trapping 5 when out of range.", |
| 4269 | "citations": [ |
| 4270 | { |
| 4271 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2774-2775", |
| 4272 | "quote": "ret 4" |
| 4273 | }, |
| 4274 | { |
| 4275 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4276 | "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" |
| 4277 | }, |
| 4278 | { |
| 4279 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4280 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4281 | } |
| 4282 | ], |
| 4283 | "example": "ints" |
| 4284 | }, |
| 4285 | "ulong": { |
| 4286 | "table": "kw", |
| 4287 | "id": 5, |
| 4288 | "category": "type", |
| 4289 | "profile": "OM-1", |
| 4290 | "form": "ulong VALUE (conversion) | NAME ulong (parameter) | to ulong (result)", |
| 4291 | "arity": 1, |
| 4292 | "types": [ |
| 4293 | "VALUE: any integer, float or bool value" |
| 4294 | ], |
| 4295 | "result": "ulong", |
| 4296 | "summary": "Type word: unsigned 64-bit integer, sizeof 8. Arithmetic wraps modulo 2^width. As a prefix it converts a value, trapping 5 when out of range.", |
| 4297 | "citations": [ |
| 4298 | { |
| 4299 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2777-2778", |
| 4300 | "quote": "ret 5" |
| 4301 | }, |
| 4302 | { |
| 4303 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4304 | "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" |
| 4305 | }, |
| 4306 | { |
| 4307 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4308 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4309 | } |
| 4310 | ], |
| 4311 | "example": "ints" |
| 4312 | }, |
| 4313 | "u64": { |
| 4314 | "table": "kw", |
| 4315 | "id": 5, |
| 4316 | "category": "type", |
| 4317 | "profile": "OM-1", |
| 4318 | "form": "u64 VALUE (conversion) | NAME u64 (parameter) | to u64 (result)", |
| 4319 | "arity": 1, |
| 4320 | "types": [ |
| 4321 | "VALUE: any integer, float or bool value" |
| 4322 | ], |
| 4323 | "result": "ulong", |
| 4324 | "summary": "Alias of ulong (same keyword id): unsigned 64-bit, sizeof 8. Arithmetic wraps modulo 2^width. As a prefix it converts a value, trapping 5 when out of range.", |
| 4325 | "citations": [ |
| 4326 | { |
| 4327 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2780-2781", |
| 4328 | "quote": "ret 5" |
| 4329 | }, |
| 4330 | { |
| 4331 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4332 | "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" |
| 4333 | }, |
| 4334 | { |
| 4335 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4336 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4337 | } |
| 4338 | ], |
| 4339 | "example": "ints" |
| 4340 | }, |
| 4341 | "byte": { |
| 4342 | "table": "kw", |
| 4343 | "id": 6, |
| 4344 | "category": "type", |
| 4345 | "profile": "OM-1", |
| 4346 | "form": "byte VALUE (conversion) | NAME byte (parameter) | to byte (result)", |
| 4347 | "arity": 1, |
| 4348 | "types": [ |
| 4349 | "VALUE: any integer, float or bool value" |
| 4350 | ], |
| 4351 | "result": "byte", |
| 4352 | "summary": "Type word: signed 8-bit integer, sizeof 1. Signed add/sub/mul/neg/div/shl trap 1 on overflow. As a prefix it converts a value, trapping 5 when out of range.", |
| 4353 | "citations": [ |
| 4354 | { |
| 4355 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2783-2784", |
| 4356 | "quote": "ret 6" |
| 4357 | }, |
| 4358 | { |
| 4359 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 4360 | "quote": "(byte 8," |
| 4361 | }, |
| 4362 | { |
| 4363 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4364 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4365 | } |
| 4366 | ], |
| 4367 | "example": "ints" |
| 4368 | }, |
| 4369 | "i8": { |
| 4370 | "table": "kw", |
| 4371 | "id": 6, |
| 4372 | "category": "type", |
| 4373 | "profile": "OM-1", |
| 4374 | "form": "i8 VALUE (conversion) | NAME i8 (parameter) | to i8 (result)", |
| 4375 | "arity": 1, |
| 4376 | "types": [ |
| 4377 | "VALUE: any integer, float or bool value" |
| 4378 | ], |
| 4379 | "result": "byte", |
| 4380 | "summary": "Alias of byte (same keyword id): signed 8-bit, sizeof 1. Signed add/sub/mul/neg/div/shl trap 1 on overflow. As a prefix it converts a value, trapping 5 when out of range.", |
| 4381 | "citations": [ |
| 4382 | { |
| 4383 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2786-2787", |
| 4384 | "quote": "ret 6" |
| 4385 | }, |
| 4386 | { |
| 4387 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 4388 | "quote": "(byte 8," |
| 4389 | }, |
| 4390 | { |
| 4391 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4392 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4393 | } |
| 4394 | ], |
| 4395 | "example": "ints" |
| 4396 | }, |
| 4397 | "short": { |
| 4398 | "table": "kw", |
| 4399 | "id": 7, |
| 4400 | "category": "type", |
| 4401 | "profile": "OM-1", |
| 4402 | "form": "short VALUE (conversion) | NAME short (parameter) | to short (result)", |
| 4403 | "arity": 1, |
| 4404 | "types": [ |
| 4405 | "VALUE: any integer, float or bool value" |
| 4406 | ], |
| 4407 | "result": "short", |
| 4408 | "summary": "Type word: signed 16-bit integer, sizeof 2. Signed add/sub/mul/neg/div/shl trap 1 on overflow. As a prefix it converts a value, trapping 5 when out of range.", |
| 4409 | "citations": [ |
| 4410 | { |
| 4411 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2789-2790", |
| 4412 | "quote": "ret 7" |
| 4413 | }, |
| 4414 | { |
| 4415 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 4416 | "quote": "(byte 8," |
| 4417 | }, |
| 4418 | { |
| 4419 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4420 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4421 | } |
| 4422 | ], |
| 4423 | "example": "ints" |
| 4424 | }, |
| 4425 | "i16": { |
| 4426 | "table": "kw", |
| 4427 | "id": 7, |
| 4428 | "category": "type", |
| 4429 | "profile": "OM-1", |
| 4430 | "form": "i16 VALUE (conversion) | NAME i16 (parameter) | to i16 (result)", |
| 4431 | "arity": 1, |
| 4432 | "types": [ |
| 4433 | "VALUE: any integer, float or bool value" |
| 4434 | ], |
| 4435 | "result": "short", |
| 4436 | "summary": "Alias of short (same keyword id): signed 16-bit, sizeof 2. Signed add/sub/mul/neg/div/shl trap 1 on overflow. As a prefix it converts a value, trapping 5 when out of range.", |
| 4437 | "citations": [ |
| 4438 | { |
| 4439 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2792-2793", |
| 4440 | "quote": "ret 7" |
| 4441 | }, |
| 4442 | { |
| 4443 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 4444 | "quote": "(byte 8," |
| 4445 | }, |
| 4446 | { |
| 4447 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4448 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4449 | } |
| 4450 | ], |
| 4451 | "example": "ints" |
| 4452 | }, |
| 4453 | "int": { |
| 4454 | "table": "kw", |
| 4455 | "id": 8, |
| 4456 | "category": "type", |
| 4457 | "profile": "OM-1", |
| 4458 | "form": "int VALUE (conversion) | NAME int (parameter) | to int (result)", |
| 4459 | "arity": 1, |
| 4460 | "types": [ |
| 4461 | "VALUE: any integer, float or bool value" |
| 4462 | ], |
| 4463 | "result": "int", |
| 4464 | "summary": "Type word: signed 32-bit integer, sizeof 4. Signed add/sub/mul/neg/div/shl trap 1 on overflow. As a prefix it converts a value, trapping 5 when out of range.", |
| 4465 | "citations": [ |
| 4466 | { |
| 4467 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2795-2796", |
| 4468 | "quote": "ret 8" |
| 4469 | }, |
| 4470 | { |
| 4471 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 4472 | "quote": "(byte 8," |
| 4473 | }, |
| 4474 | { |
| 4475 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4476 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4477 | } |
| 4478 | ], |
| 4479 | "example": "hello" |
| 4480 | }, |
| 4481 | "i32": { |
| 4482 | "table": "kw", |
| 4483 | "id": 8, |
| 4484 | "category": "type", |
| 4485 | "profile": "OM-1", |
| 4486 | "form": "i32 VALUE (conversion) | NAME i32 (parameter) | to i32 (result)", |
| 4487 | "arity": 1, |
| 4488 | "types": [ |
| 4489 | "VALUE: any integer, float or bool value" |
| 4490 | ], |
| 4491 | "result": "int", |
| 4492 | "summary": "Alias of int (same keyword id): signed 32-bit, sizeof 4. Signed add/sub/mul/neg/div/shl trap 1 on overflow. As a prefix it converts a value, trapping 5 when out of range.", |
| 4493 | "citations": [ |
| 4494 | { |
| 4495 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2798-2799", |
| 4496 | "quote": "ret 8" |
| 4497 | }, |
| 4498 | { |
| 4499 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 4500 | "quote": "(byte 8," |
| 4501 | }, |
| 4502 | { |
| 4503 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4504 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4505 | } |
| 4506 | ], |
| 4507 | "example": "ints" |
| 4508 | }, |
| 4509 | "long": { |
| 4510 | "table": "kw", |
| 4511 | "id": 9, |
| 4512 | "category": "type", |
| 4513 | "profile": "OM-1", |
| 4514 | "form": "long VALUE (conversion) | NAME long (parameter) | to long (result)", |
| 4515 | "arity": 1, |
| 4516 | "types": [ |
| 4517 | "VALUE: any integer, float or bool value" |
| 4518 | ], |
| 4519 | "result": "long", |
| 4520 | "summary": "Type word: signed 64-bit integer, sizeof 8. Signed add/sub/mul/neg/div/shl trap 1 on overflow. As a prefix it converts a value, trapping 5 when out of range.", |
| 4521 | "citations": [ |
| 4522 | { |
| 4523 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2801-2802", |
| 4524 | "quote": "ret 9" |
| 4525 | }, |
| 4526 | { |
| 4527 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 4528 | "quote": "(byte 8," |
| 4529 | }, |
| 4530 | { |
| 4531 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4532 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4533 | } |
| 4534 | ], |
| 4535 | "example": "ints" |
| 4536 | }, |
| 4537 | "i64": { |
| 4538 | "table": "kw", |
| 4539 | "id": 9, |
| 4540 | "category": "type", |
| 4541 | "profile": "OM-1", |
| 4542 | "form": "i64 VALUE (conversion) | NAME i64 (parameter) | to i64 (result)", |
| 4543 | "arity": 1, |
| 4544 | "types": [ |
| 4545 | "VALUE: any integer, float or bool value" |
| 4546 | ], |
| 4547 | "result": "long", |
| 4548 | "summary": "Alias of long (same keyword id): signed 64-bit, sizeof 8. Signed add/sub/mul/neg/div/shl trap 1 on overflow. As a prefix it converts a value, trapping 5 when out of range.", |
| 4549 | "citations": [ |
| 4550 | { |
| 4551 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2804-2805", |
| 4552 | "quote": "ret 9" |
| 4553 | }, |
| 4554 | { |
| 4555 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 4556 | "quote": "(byte 8," |
| 4557 | }, |
| 4558 | { |
| 4559 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:511", |
| 4560 | "quote": "A conversion `<type> v` traps 5 when the value is outside the new type." |
| 4561 | } |
| 4562 | ], |
| 4563 | "example": "ints" |
| 4564 | }, |
| 4565 | "qty": { |
| 4566 | "table": "kw", |
| 4567 | "id": 223, |
| 4568 | "category": "type", |
| 4569 | "profile": "OM-1", |
| 4570 | "form": "qty VALUE (conversion) | NAME qty (parameter) | to qty (result)", |
| 4571 | "arity": 1, |
| 4572 | "types": [ |
| 4573 | "VALUE: an integer value" |
| 4574 | ], |
| 4575 | "result": "qty", |
| 4576 | "summary": "Type word: unsigned quantity 0..2^64-1. add, sub and mul are checked and trap 1 when the exact result leaves that range; mixing a quantity with a modular word (ulong etc.) is error 7. Convert explicitly: `qty w`, `ulong q`.", |
| 4577 | "citations": [ |
| 4578 | { |
| 4579 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3092-3093", |
| 4580 | "quote": "ret 223" |
| 4581 | }, |
| 4582 | { |
| 4583 | "ref": "omega-mv@6c562dd1 spec/quantities-and-modular.md:41", |
| 4584 | "quote": "Arithmetic operations are checked at runtime." |
| 4585 | }, |
| 4586 | { |
| 4587 | "ref": "omega-mv@6c562dd1 spec/quantities-and-modular.md:59", |
| 4588 | "quote": "is rejected at compile time (error 7)" |
| 4589 | }, |
| 4590 | { |
| 4591 | "ref": "omega-mv@6c562dd1 spec/quantities-and-modular.md:73", |
| 4592 | "quote": "The seeded syntax is prefix conversion (`q = qty w`, `w = ulong q`)." |
| 4593 | } |
| 4594 | ], |
| 4595 | "example": "qty" |
| 4596 | }, |
| 4597 | "dit": { |
| 4598 | "table": "kw2", |
| 4599 | "id": 225, |
| 4600 | "category": "host-cpu", |
| 4601 | "profile": "OM-2", |
| 4602 | "form": "dit v", |
| 4603 | "arity": 1, |
| 4604 | "types": [ |
| 4605 | "v: int 0 or 1 (else trap 3)" |
| 4606 | ], |
| 4607 | "result": "long", |
| 4608 | "summary": "Value word: set PSTATE.DIT (data-independent timing) to v and give the previous bit as 0 or 1. OM-2 units only, program mode only, AArch64 only.", |
| 4609 | "citations": [ |
| 4610 | { |
| 4611 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3177-3178", |
| 4612 | "quote": "ret 225" |
| 4613 | }, |
| 4614 | { |
| 4615 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:978", |
| 4616 | "quote": "**`dit v`** (v int, else error 7) sets PSTATE.DIT" |
| 4617 | }, |
| 4618 | { |
| 4619 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:955-956", |
| 4620 | "quote": "program mode only (error 9 in function mode), AArch64 only (error 25 under `target x86linux`), and give a long" |
| 4621 | } |
| 4622 | ], |
| 4623 | "example": "secrets" |
| 4624 | }, |
| 4625 | "scrub": { |
| 4626 | "table": "kw2", |
| 4627 | "id": 226, |
| 4628 | "category": "host-cpu", |
| 4629 | "profile": "OM-2", |
| 4630 | "form": "scrub n", |
| 4631 | "arity": 1, |
| 4632 | "types": [ |
| 4633 | "n: ulong, a multiple of 16 at most 1048576 (else trap 3)" |
| 4634 | ], |
| 4635 | "result": "long", |
| 4636 | "summary": "Value word: zero the n dead stack bytes below SP and every register holding no live value; gives 0. OM-2 units only, program mode only, AArch64 only.", |
| 4637 | "citations": [ |
| 4638 | { |
| 4639 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3180-3181", |
| 4640 | "quote": "ret 226" |
| 4641 | }, |
| 4642 | { |
| 4643 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:985", |
| 4644 | "quote": "**`scrub n`** (n ulong, else error 7) zeroes the dead stack and the dead registers and gives 0." |
| 4645 | }, |
| 4646 | { |
| 4647 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:955-956", |
| 4648 | "quote": "program mode only (error 9 in function mode), AArch64 only (error 25 under `target x86linux`), and give a long" |
| 4649 | } |
| 4650 | ], |
| 4651 | "example": "secrets" |
| 4652 | }, |
| 4653 | "add": { |
| 4654 | "table": "kw", |
| 4655 | "id": 33, |
| 4656 | "category": "operator", |
| 4657 | "profile": "OM-1", |
| 4658 | "form": "add A B", |
| 4659 | "arity": 2, |
| 4660 | "types": [ |
| 4661 | "A: number type T", |
| 4662 | "B: the same type T" |
| 4663 | ], |
| 4664 | "result": "T", |
| 4665 | "summary": "Binary operator: a + b. Both operands have one type (no implicit conversion, error 7).", |
| 4666 | "citations": [ |
| 4667 | { |
| 4668 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2807-2808", |
| 4669 | "quote": "ret 33" |
| 4670 | }, |
| 4671 | { |
| 4672 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4673 | "quote": "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width" |
| 4674 | } |
| 4675 | ], |
| 4676 | "example": "ints" |
| 4677 | }, |
| 4678 | "sub": { |
| 4679 | "table": "kw", |
| 4680 | "id": 34, |
| 4681 | "category": "operator", |
| 4682 | "profile": "OM-1", |
| 4683 | "form": "sub A B", |
| 4684 | "arity": 2, |
| 4685 | "types": [ |
| 4686 | "A: number type T", |
| 4687 | "B: the same type T" |
| 4688 | ], |
| 4689 | "result": "T", |
| 4690 | "summary": "Binary operator: a - b. Both operands have one type (no implicit conversion, error 7).", |
| 4691 | "citations": [ |
| 4692 | { |
| 4693 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2810-2811", |
| 4694 | "quote": "ret 34" |
| 4695 | }, |
| 4696 | { |
| 4697 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4698 | "quote": "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width" |
| 4699 | } |
| 4700 | ], |
| 4701 | "example": "arith" |
| 4702 | }, |
| 4703 | "mul": { |
| 4704 | "table": "kw", |
| 4705 | "id": 35, |
| 4706 | "category": "operator", |
| 4707 | "profile": "OM-1", |
| 4708 | "form": "mul A B", |
| 4709 | "arity": 2, |
| 4710 | "types": [ |
| 4711 | "A: number type T", |
| 4712 | "B: the same type T" |
| 4713 | ], |
| 4714 | "result": "T", |
| 4715 | "summary": "Binary operator: a * b. Both operands have one type (no implicit conversion, error 7).", |
| 4716 | "citations": [ |
| 4717 | { |
| 4718 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2813-2814", |
| 4719 | "quote": "ret 35" |
| 4720 | }, |
| 4721 | { |
| 4722 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 4723 | "quote": "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width" |
| 4724 | } |
| 4725 | ], |
| 4726 | "example": "arith" |
| 4727 | }, |
| 4728 | "div": { |
| 4729 | "table": "kw", |
| 4730 | "id": 36, |
| 4731 | "category": "operator", |
| 4732 | "profile": "OM-1", |
| 4733 | "form": "div A B", |
| 4734 | "arity": 2, |
| 4735 | "types": [ |
| 4736 | "A: number type T", |
| 4737 | "B: the same type T" |
| 4738 | ], |
| 4739 | "result": "T", |
| 4740 | "summary": "Binary operator: a / b, rounding toward zero; divisor 0 traps 2. Both operands have one type (no implicit conversion, error 7).", |
| 4741 | "citations": [ |
| 4742 | { |
| 4743 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2816-2817", |
| 4744 | "quote": "ret 36" |
| 4745 | }, |
| 4746 | { |
| 4747 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:507", |
| 4748 | "quote": "div and rem trap 2 when the divisor is 0." |
| 4749 | } |
| 4750 | ], |
| 4751 | "example": "arith" |
| 4752 | }, |
| 4753 | "rem": { |
| 4754 | "table": "kw", |
| 4755 | "id": 37, |
| 4756 | "category": "operator", |
| 4757 | "profile": "OM-1", |
| 4758 | "form": "rem A B", |
| 4759 | "arity": 2, |
| 4760 | "types": [ |
| 4761 | "A: number type T", |
| 4762 | "B: the same type T" |
| 4763 | ], |
| 4764 | "result": "T", |
| 4765 | "summary": "Binary operator: remainder with the sign of the dividend; divisor 0 traps 2. Both operands have one type (no implicit conversion, error 7).", |
| 4766 | "citations": [ |
| 4767 | { |
| 4768 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2819-2820", |
| 4769 | "quote": "ret 37" |
| 4770 | }, |
| 4771 | { |
| 4772 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:507", |
| 4773 | "quote": "div and rem trap 2 when the divisor is 0." |
| 4774 | } |
| 4775 | ], |
| 4776 | "example": "ints" |
| 4777 | }, |
| 4778 | "and": { |
| 4779 | "table": "kw", |
| 4780 | "id": 38, |
| 4781 | "category": "operator", |
| 4782 | "profile": "OM-1", |
| 4783 | "form": "and A B", |
| 4784 | "arity": 2, |
| 4785 | "types": [ |
| 4786 | "A: number type T", |
| 4787 | "B: the same type T" |
| 4788 | ], |
| 4789 | "result": "T", |
| 4790 | "summary": "Binary operator: bitwise and (bool and for bools; eager). Both operands have one type (no implicit conversion, error 7).", |
| 4791 | "citations": [ |
| 4792 | { |
| 4793 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2822-2823", |
| 4794 | "quote": "ret 38" |
| 4795 | }, |
| 4796 | { |
| 4797 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:512", |
| 4798 | "quote": "the two values of an op" |
| 4799 | } |
| 4800 | ], |
| 4801 | "example": "arith" |
| 4802 | }, |
| 4803 | "or": { |
| 4804 | "table": "kw", |
| 4805 | "id": 39, |
| 4806 | "category": "operator", |
| 4807 | "profile": "OM-1", |
| 4808 | "form": "or A B", |
| 4809 | "arity": 2, |
| 4810 | "types": [ |
| 4811 | "A: number type T", |
| 4812 | "B: the same type T" |
| 4813 | ], |
| 4814 | "result": "T", |
| 4815 | "summary": "Binary operator: bitwise or (bool or for bools; eager). Both operands have one type (no implicit conversion, error 7).", |
| 4816 | "citations": [ |
| 4817 | { |
| 4818 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2825-2826", |
| 4819 | "quote": "ret 39" |
| 4820 | }, |
| 4821 | { |
| 4822 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:512", |
| 4823 | "quote": "the two values of an op" |
| 4824 | } |
| 4825 | ], |
| 4826 | "example": "arith" |
| 4827 | }, |
| 4828 | "xor": { |
| 4829 | "table": "kw", |
| 4830 | "id": 40, |
| 4831 | "category": "operator", |
| 4832 | "profile": "OM-1", |
| 4833 | "form": "xor A B", |
| 4834 | "arity": 2, |
| 4835 | "types": [ |
| 4836 | "A: number type T", |
| 4837 | "B: the same type T" |
| 4838 | ], |
| 4839 | "result": "T", |
| 4840 | "summary": "Binary operator: bitwise exclusive or. Both operands have one type (no implicit conversion, error 7).", |
| 4841 | "citations": [ |
| 4842 | { |
| 4843 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2828-2829", |
| 4844 | "quote": "ret 40" |
| 4845 | }, |
| 4846 | { |
| 4847 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:512", |
| 4848 | "quote": "the two values of an op" |
| 4849 | } |
| 4850 | ], |
| 4851 | "example": "arith" |
| 4852 | }, |
| 4853 | "shl": { |
| 4854 | "table": "kw", |
| 4855 | "id": 41, |
| 4856 | "category": "operator", |
| 4857 | "profile": "OM-1", |
| 4858 | "form": "shl A B", |
| 4859 | "arity": 2, |
| 4860 | "types": [ |
| 4861 | "A: number type T", |
| 4862 | "B: the same type T" |
| 4863 | ], |
| 4864 | "result": "T", |
| 4865 | "summary": "Binary operator: shift left; amount outside 0..width-1 traps 7. Both operands have one type (no implicit conversion, error 7).", |
| 4866 | "citations": [ |
| 4867 | { |
| 4868 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2831-2832", |
| 4869 | "quote": "ret 41" |
| 4870 | }, |
| 4871 | { |
| 4872 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:509", |
| 4873 | "quote": "A shift amount outside 0 .. width - 1 traps 7" |
| 4874 | } |
| 4875 | ], |
| 4876 | "example": "arith" |
| 4877 | }, |
| 4878 | "shr": { |
| 4879 | "table": "kw", |
| 4880 | "id": 42, |
| 4881 | "category": "operator", |
| 4882 | "profile": "OM-1", |
| 4883 | "form": "shr A B", |
| 4884 | "arity": 2, |
| 4885 | "types": [ |
| 4886 | "A: number type T", |
| 4887 | "B: the same type T" |
| 4888 | ], |
| 4889 | "result": "T", |
| 4890 | "summary": "Binary operator: shift right (arithmetic for signed); amount outside 0..width-1 traps 7. Both operands have one type (no implicit conversion, error 7).", |
| 4891 | "citations": [ |
| 4892 | { |
| 4893 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2834-2835", |
| 4894 | "quote": "ret 42" |
| 4895 | }, |
| 4896 | { |
| 4897 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:509", |
| 4898 | "quote": "shr of a signed value keeps the sign." |
| 4899 | } |
| 4900 | ], |
| 4901 | "example": "arith" |
| 4902 | }, |
| 4903 | "eq": { |
| 4904 | "table": "kw", |
| 4905 | "id": 43, |
| 4906 | "category": "operator", |
| 4907 | "profile": "OM-1", |
| 4908 | "form": "eq A B", |
| 4909 | "arity": 2, |
| 4910 | "types": [ |
| 4911 | "A: number type T", |
| 4912 | "B: the same type T" |
| 4913 | ], |
| 4914 | "result": "bool", |
| 4915 | "summary": "Comparison: equal (unsigned or signed by the operands' type; IEEE for floats).", |
| 4916 | "citations": [ |
| 4917 | { |
| 4918 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2837-2838", |
| 4919 | "quote": "ret 43" |
| 4920 | }, |
| 4921 | { |
| 4922 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:736", |
| 4923 | "quote": "comparisons `eq ne lt le gt ge`" |
| 4924 | } |
| 4925 | ], |
| 4926 | "example": "arith" |
| 4927 | }, |
| 4928 | "ne": { |
| 4929 | "table": "kw", |
| 4930 | "id": 44, |
| 4931 | "category": "operator", |
| 4932 | "profile": "OM-1", |
| 4933 | "form": "ne A B", |
| 4934 | "arity": 2, |
| 4935 | "types": [ |
| 4936 | "A: number type T", |
| 4937 | "B: the same type T" |
| 4938 | ], |
| 4939 | "result": "bool", |
| 4940 | "summary": "Comparison: not equal (unsigned or signed by the operands' type; IEEE for floats).", |
| 4941 | "citations": [ |
| 4942 | { |
| 4943 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2840-2841", |
| 4944 | "quote": "ret 44" |
| 4945 | }, |
| 4946 | { |
| 4947 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:736", |
| 4948 | "quote": "comparisons `eq ne lt le gt ge`" |
| 4949 | } |
| 4950 | ], |
| 4951 | "example": "arith" |
| 4952 | }, |
| 4953 | "lt": { |
| 4954 | "table": "kw", |
| 4955 | "id": 45, |
| 4956 | "category": "operator", |
| 4957 | "profile": "OM-1", |
| 4958 | "form": "lt A B", |
| 4959 | "arity": 2, |
| 4960 | "types": [ |
| 4961 | "A: number type T", |
| 4962 | "B: the same type T" |
| 4963 | ], |
| 4964 | "result": "bool", |
| 4965 | "summary": "Comparison: less than (unsigned or signed by the operands' type; IEEE for floats).", |
| 4966 | "citations": [ |
| 4967 | { |
| 4968 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2843-2844", |
| 4969 | "quote": "ret 45" |
| 4970 | }, |
| 4971 | { |
| 4972 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:736", |
| 4973 | "quote": "comparisons `eq ne lt le gt ge`" |
| 4974 | } |
| 4975 | ], |
| 4976 | "example": "arith" |
| 4977 | }, |
| 4978 | "le": { |
| 4979 | "table": "kw", |
| 4980 | "id": 46, |
| 4981 | "category": "operator", |
| 4982 | "profile": "OM-1", |
| 4983 | "form": "le A B", |
| 4984 | "arity": 2, |
| 4985 | "types": [ |
| 4986 | "A: number type T", |
| 4987 | "B: the same type T" |
| 4988 | ], |
| 4989 | "result": "bool", |
| 4990 | "summary": "Comparison: less or equal (unsigned or signed by the operands' type; IEEE for floats).", |
| 4991 | "citations": [ |
| 4992 | { |
| 4993 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2846-2847", |
| 4994 | "quote": "ret 46" |
| 4995 | }, |
| 4996 | { |
| 4997 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:736", |
| 4998 | "quote": "comparisons `eq ne lt le gt ge`" |
| 4999 | } |
| 5000 | ], |
| 5001 | "example": "arith" |
| 5002 | }, |
| 5003 | "gt": { |
| 5004 | "table": "kw", |
| 5005 | "id": 47, |
| 5006 | "category": "operator", |
| 5007 | "profile": "OM-1", |
| 5008 | "form": "gt A B", |
| 5009 | "arity": 2, |
| 5010 | "types": [ |
| 5011 | "A: number type T", |
| 5012 | "B: the same type T" |
| 5013 | ], |
| 5014 | "result": "bool", |
| 5015 | "summary": "Comparison: greater than (unsigned or signed by the operands' type; IEEE for floats).", |
| 5016 | "citations": [ |
| 5017 | { |
| 5018 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2849-2850", |
| 5019 | "quote": "ret 47" |
| 5020 | }, |
| 5021 | { |
| 5022 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:736", |
| 5023 | "quote": "comparisons `eq ne lt le gt ge`" |
| 5024 | } |
| 5025 | ], |
| 5026 | "example": "arith" |
| 5027 | }, |
| 5028 | "ge": { |
| 5029 | "table": "kw", |
| 5030 | "id": 48, |
| 5031 | "category": "operator", |
| 5032 | "profile": "OM-1", |
| 5033 | "form": "ge A B", |
| 5034 | "arity": 2, |
| 5035 | "types": [ |
| 5036 | "A: number type T", |
| 5037 | "B: the same type T" |
| 5038 | ], |
| 5039 | "result": "bool", |
| 5040 | "summary": "Comparison: greater or equal (unsigned or signed by the operands' type; IEEE for floats).", |
| 5041 | "citations": [ |
| 5042 | { |
| 5043 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2852-2853", |
| 5044 | "quote": "ret 48" |
| 5045 | }, |
| 5046 | { |
| 5047 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:736", |
| 5048 | "quote": "comparisons `eq ne lt le gt ge`" |
| 5049 | } |
| 5050 | ], |
| 5051 | "example": "arith" |
| 5052 | }, |
| 5053 | "neg": { |
| 5054 | "table": "kw", |
| 5055 | "id": 49, |
| 5056 | "category": "operator", |
| 5057 | "profile": "OM-1", |
| 5058 | "form": "neg A", |
| 5059 | "arity": 1, |
| 5060 | "types": [ |
| 5061 | "A: number type T" |
| 5062 | ], |
| 5063 | "result": "T", |
| 5064 | "summary": "Negation: wraps for unsigned types, traps 1 for the signed minimum, IEEE for floats.", |
| 5065 | "citations": [ |
| 5066 | { |
| 5067 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2855-2856", |
| 5068 | "quote": "ret 49" |
| 5069 | }, |
| 5070 | { |
| 5071 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:505", |
| 5072 | "quote": "Signed add, sub, mul, neg, div and shl trap 1" |
| 5073 | } |
| 5074 | ], |
| 5075 | "example": "arith" |
| 5076 | }, |
| 5077 | "not": { |
| 5078 | "table": "kw", |
| 5079 | "id": 50, |
| 5080 | "category": "operator", |
| 5081 | "profile": "OM-1", |
| 5082 | "form": "not A", |
| 5083 | "arity": 1, |
| 5084 | "types": [ |
| 5085 | "A: integer type T or bool" |
| 5086 | ], |
| 5087 | "result": "T", |
| 5088 | "summary": "Bitwise complement of an integer; logical not of a bool.", |
| 5089 | "citations": [ |
| 5090 | { |
| 5091 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2858-2859", |
| 5092 | "quote": "ret 50" |
| 5093 | }, |
| 5094 | { |
| 5095 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:503", |
| 5096 | "quote": "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width" |
| 5097 | } |
| 5098 | ], |
| 5099 | "example": "arith" |
| 5100 | }, |
| 5101 | "get": { |
| 5102 | "table": "kw", |
| 5103 | "id": 51, |
| 5104 | "category": "data", |
| 5105 | "profile": "OM-1", |
| 5106 | "form": "get A i | get P field [i]", |
| 5107 | "arity": 2, |
| 5108 | "types": [ |
| 5109 | "A: array", |
| 5110 | "i: integer index" |
| 5111 | ], |
| 5112 | "result": "element type", |
| 5113 | "summary": "Read element i of an array (or a struct/layout field). A constant index outside is error 21; a run-time one traps 3. In a run-time pool (global NAME T *) every index, a number included, is checked against the current length when the program runs (trap 3, never error 21).", |
| 5114 | "citations": [ |
| 5115 | { |
| 5116 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2861-2862", |
| 5117 | "quote": "ret 51" |
| 5118 | }, |
| 5119 | { |
| 5120 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:546", |
| 5121 | "quote": "`get A i` reads element i" |
| 5122 | }, |
| 5123 | { |
| 5124 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1032-1033", |
| 5125 | "quote": "a number index included (it is checked at run time, never error 21)" |
| 5126 | } |
| 5127 | ], |
| 5128 | "example": "arrays" |
| 5129 | }, |
| 5130 | "len": { |
| 5131 | "table": "kw", |
| 5132 | "id": 52, |
| 5133 | "category": "data", |
| 5134 | "profile": "OM-1", |
| 5135 | "form": "len A", |
| 5136 | "arity": 1, |
| 5137 | "types": [ |
| 5138 | "A: array or text" |
| 5139 | ], |
| 5140 | "result": "ulong", |
| 5141 | "summary": "Length of an array as a ulong. For a run-time pool (global NAME T *) the current length, read when the program runs and never folded; a contract on it is checked at run time.", |
| 5142 | "citations": [ |
| 5143 | { |
| 5144 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2864-2865", |
| 5145 | "quote": "ret 52" |
| 5146 | }, |
| 5147 | { |
| 5148 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:546", |
| 5149 | "quote": "`len A` is A's length as a ulong." |
| 5150 | }, |
| 5151 | { |
| 5152 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1029", |
| 5153 | "quote": "`len NAME` is the current length, a run-time ulong, never folded" |
| 5154 | } |
| 5155 | ], |
| 5156 | "example": "hello" |
| 5157 | }, |
| 5158 | "read": { |
| 5159 | "table": "kw", |
| 5160 | "id": 53, |
| 5161 | "category": "data", |
| 5162 | "profile": "OM-1", |
| 5163 | "form": "read fd A off n", |
| 5164 | "arity": 4, |
| 5165 | "types": [ |
| 5166 | "fd: int", |
| 5167 | "A: writable uchar array", |
| 5168 | "off: ulong", |
| 5169 | "n: ulong" |
| 5170 | ], |
| 5171 | "result": "long", |
| 5172 | "summary": "Read n bytes from fd into A[off..]; bytes read or minus errno. Slice outside A traps 3.", |
| 5173 | "citations": [ |
| 5174 | { |
| 5175 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2867-2868", |
| 5176 | "quote": "ret 53" |
| 5177 | }, |
| 5178 | { |
| 5179 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:553", |
| 5180 | "quote": "`read fd A off n` and `write fd A off n` (fd int, off and n ulong)" |
| 5181 | } |
| 5182 | ], |
| 5183 | "example": "files" |
| 5184 | }, |
| 5185 | "write": { |
| 5186 | "table": "kw", |
| 5187 | "id": 54, |
| 5188 | "category": "data", |
| 5189 | "profile": "OM-1", |
| 5190 | "form": "write fd A off n", |
| 5191 | "arity": 4, |
| 5192 | "types": [ |
| 5193 | "fd: int", |
| 5194 | "A: uchar array or text", |
| 5195 | "off: ulong", |
| 5196 | "n: ulong" |
| 5197 | ], |
| 5198 | "result": "long", |
| 5199 | "summary": "Write A[off..off+n-1] to fd; bytes written or minus errno. Slice outside A traps 3.", |
| 5200 | "citations": [ |
| 5201 | { |
| 5202 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2870-2871", |
| 5203 | "quote": "ret 54" |
| 5204 | }, |
| 5205 | { |
| 5206 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:553", |
| 5207 | "quote": "`read fd A off n` and `write fd A off n` (fd int, off and n ulong)" |
| 5208 | } |
| 5209 | ], |
| 5210 | "example": "hello" |
| 5211 | }, |
| 5212 | "true": { |
| 5213 | "table": "kw", |
| 5214 | "id": 55, |
| 5215 | "category": "data", |
| 5216 | "profile": "OM-1", |
| 5217 | "form": "true", |
| 5218 | "arity": 0, |
| 5219 | "types": [], |
| 5220 | "result": "bool", |
| 5221 | "summary": "The bool value 1.", |
| 5222 | "citations": [ |
| 5223 | { |
| 5224 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2873-2874", |
| 5225 | "quote": "ret 55" |
| 5226 | }, |
| 5227 | { |
| 5228 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:519", |
| 5229 | "quote": "`true` and `false` are the bool numbers 1 and 0." |
| 5230 | } |
| 5231 | ], |
| 5232 | "example": "control" |
| 5233 | }, |
| 5234 | "false": { |
| 5235 | "table": "kw", |
| 5236 | "id": 56, |
| 5237 | "category": "data", |
| 5238 | "profile": "OM-1", |
| 5239 | "form": "false", |
| 5240 | "arity": 0, |
| 5241 | "types": [], |
| 5242 | "result": "bool", |
| 5243 | "summary": "The bool value 0.", |
| 5244 | "citations": [ |
| 5245 | { |
| 5246 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2876-2877", |
| 5247 | "quote": "ret 56" |
| 5248 | }, |
| 5249 | { |
| 5250 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:519", |
| 5251 | "quote": "`true` and `false` are the bool numbers 1 and 0." |
| 5252 | } |
| 5253 | ], |
| 5254 | "example": "control" |
| 5255 | }, |
| 5256 | "view": { |
| 5257 | "table": "kw", |
| 5258 | "id": 57, |
| 5259 | "category": "data", |
| 5260 | "profile": "OM-1", |
| 5261 | "form": "NAME view T N | NAME view T * (parameter) | view A (argument)", |
| 5262 | "arity": 3, |
| 5263 | "types": [ |
| 5264 | "T: element type", |
| 5265 | "N: length or * (OM-2 unsized)" |
| 5266 | ], |
| 5267 | "result": "-", |
| 5268 | "summary": "Read-only array parameter of exact type and length; writing through it is error 20.", |
| 5269 | "citations": [ |
| 5270 | { |
| 5271 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2879-2880", |
| 5272 | "quote": "ret 57" |
| 5273 | }, |
| 5274 | { |
| 5275 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:539", |
| 5276 | "quote": "A parameter `NAME view T N` or `NAME edit T N`" |
| 5277 | } |
| 5278 | ], |
| 5279 | "example": "arrays" |
| 5280 | }, |
| 5281 | "edit": { |
| 5282 | "table": "kw", |
| 5283 | "id": 58, |
| 5284 | "category": "data", |
| 5285 | "profile": "OM-1", |
| 5286 | "form": "NAME edit T N | NAME edit T * (parameter) | edit A (argument)", |
| 5287 | "arity": 3, |
| 5288 | "types": [ |
| 5289 | "T: element type", |
| 5290 | "N: length or * (OM-2 unsized)" |
| 5291 | ], |
| 5292 | "result": "-", |
| 5293 | "summary": "Writable array parameter of exact type and length; a global is never passed (error 19).", |
| 5294 | "citations": [ |
| 5295 | { |
| 5296 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2882-2883", |
| 5297 | "quote": "ret 58" |
| 5298 | }, |
| 5299 | { |
| 5300 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:539", |
| 5301 | "quote": "A parameter `NAME view T N` or `NAME edit T N`" |
| 5302 | } |
| 5303 | ], |
| 5304 | "example": "arrays" |
| 5305 | }, |
| 5306 | "fn": { |
| 5307 | "table": "kw", |
| 5308 | "id": 64, |
| 5309 | "category": "structure", |
| 5310 | "profile": "OM-1", |
| 5311 | "form": "fn NAME (PARAM TYPE)* to TYPE|void [inline]", |
| 5312 | "arity": 3, |
| 5313 | "types": [ |
| 5314 | "NAME: up to 63 characters", |
| 5315 | "PARAM: up to 63 characters, at most 6 slots" |
| 5316 | ], |
| 5317 | "result": "-", |
| 5318 | "summary": "Start a function; `end` closes it. `fn main` makes a whole Linux program (program mode).", |
| 5319 | "citations": [ |
| 5320 | { |
| 5321 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2885-2886", |
| 5322 | "quote": "ret 64" |
| 5323 | }, |
| 5324 | { |
| 5325 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:59", |
| 5326 | "quote": "a function; `end` closes it" |
| 5327 | }, |
| 5328 | { |
| 5329 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:427", |
| 5330 | "quote": "A program with a line `fn main` is a whole Linux program" |
| 5331 | } |
| 5332 | ], |
| 5333 | "example": "hello" |
| 5334 | }, |
| 5335 | "to": { |
| 5336 | "table": "kw", |
| 5337 | "id": 65, |
| 5338 | "category": "structure", |
| 5339 | "profile": "OM-1", |
| 5340 | "form": "fn ... to TYPE|void", |
| 5341 | "arity": 1, |
| 5342 | "types": [ |
| 5343 | "TYPE: a scalar type or void" |
| 5344 | ], |
| 5345 | "result": "-", |
| 5346 | "summary": "Introduces a function's result type.", |
| 5347 | "citations": [ |
| 5348 | { |
| 5349 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2888-2889", |
| 5350 | "quote": "ret 65" |
| 5351 | }, |
| 5352 | { |
| 5353 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:59", |
| 5354 | "quote": "to <type> | void" |
| 5355 | } |
| 5356 | ], |
| 5357 | "example": "hello" |
| 5358 | }, |
| 5359 | "end": { |
| 5360 | "table": "kw", |
| 5361 | "id": 66, |
| 5362 | "category": "structure", |
| 5363 | "profile": "OM-1", |
| 5364 | "form": "end", |
| 5365 | "arity": 0, |
| 5366 | "types": [], |
| 5367 | "result": "-", |
| 5368 | "summary": "Closes fn, if/else, while, for, struct and layout blocks. A missing end is error 15.", |
| 5369 | "citations": [ |
| 5370 | { |
| 5371 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2891-2892", |
| 5372 | "quote": "ret 66" |
| 5373 | }, |
| 5374 | { |
| 5375 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:59", |
| 5376 | "quote": "`end` closes it" |
| 5377 | } |
| 5378 | ], |
| 5379 | "example": "hello" |
| 5380 | }, |
| 5381 | "if": { |
| 5382 | "table": "kw", |
| 5383 | "id": 67, |
| 5384 | "category": "structure", |
| 5385 | "profile": "OM-1", |
| 5386 | "form": "if COND / [else] / end", |
| 5387 | "arity": 1, |
| 5388 | "types": [ |
| 5389 | "COND: bool" |
| 5390 | ], |
| 5391 | "result": "-", |
| 5392 | "summary": "Conditional block.", |
| 5393 | "citations": [ |
| 5394 | { |
| 5395 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2894-2895", |
| 5396 | "quote": "ret 67" |
| 5397 | }, |
| 5398 | { |
| 5399 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:62", |
| 5400 | "quote": "if <cond> / else / end" |
| 5401 | } |
| 5402 | ], |
| 5403 | "example": "control" |
| 5404 | }, |
| 5405 | "else": { |
| 5406 | "table": "kw", |
| 5407 | "id": 68, |
| 5408 | "category": "structure", |
| 5409 | "profile": "OM-1", |
| 5410 | "form": "else", |
| 5411 | "arity": 0, |
| 5412 | "types": [], |
| 5413 | "result": "-", |
| 5414 | "summary": "Second arm of an if block.", |
| 5415 | "citations": [ |
| 5416 | { |
| 5417 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2897-2898", |
| 5418 | "quote": "ret 68" |
| 5419 | }, |
| 5420 | { |
| 5421 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:62", |
| 5422 | "quote": "if <cond> / else / end" |
| 5423 | } |
| 5424 | ], |
| 5425 | "example": "control" |
| 5426 | }, |
| 5427 | "while": { |
| 5428 | "table": "kw", |
| 5429 | "id": 69, |
| 5430 | "category": "structure", |
| 5431 | "profile": "OM-1", |
| 5432 | "form": "while COND [bound N] / end", |
| 5433 | "arity": 1, |
| 5434 | "types": [ |
| 5435 | "COND: bool", |
| 5436 | "N: 1..9223372036854775807 (IR mode 1..1000000)" |
| 5437 | ], |
| 5438 | "result": "-", |
| 5439 | "summary": "Loop while COND holds; past N iterations (default 1000000) it traps 4.", |
| 5440 | "citations": [ |
| 5441 | { |
| 5442 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2900-2901", |
| 5443 | "quote": "ret 69" |
| 5444 | }, |
| 5445 | { |
| 5446 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:63", |
| 5447 | "quote": "while <cond> [bound N] / end" |
| 5448 | } |
| 5449 | ], |
| 5450 | "example": "control" |
| 5451 | }, |
| 5452 | "bound": { |
| 5453 | "table": "kw", |
| 5454 | "id": 70, |
| 5455 | "category": "structure", |
| 5456 | "profile": "OM-1", |
| 5457 | "form": "while COND bound N | for NAME TYPE COUNT bound N", |
| 5458 | "arity": 1, |
| 5459 | "types": [ |
| 5460 | "N: number or integer const 1..9223372036854775807 (IR mode 1..1000000)" |
| 5461 | ], |
| 5462 | "result": "-", |
| 5463 | "summary": "Pass limit of a while or for loop; one more pass traps 4. Without it a while (and a for whose count is not a number) stops at 1000000 passes.", |
| 5464 | "citations": [ |
| 5465 | { |
| 5466 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2903-2904", |
| 5467 | "quote": "ret 70" |
| 5468 | }, |
| 5469 | { |
| 5470 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:63-64", |
| 5471 | "quote": "N 1..9223372036854775807 (a number or any integer const; IR mode: 1..1000000), default 1000000; past N iterations: trap 4" |
| 5472 | }, |
| 5473 | { |
| 5474 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:66", |
| 5475 | "quote": "N as for while." |
| 5476 | } |
| 5477 | ], |
| 5478 | "example": "control" |
| 5479 | }, |
| 5480 | "for": { |
| 5481 | "table": "kw", |
| 5482 | "id": 71, |
| 5483 | "category": "structure", |
| 5484 | "profile": "OM-1", |
| 5485 | "form": "for NAME TYPE COUNT [bound N] / end", |
| 5486 | "arity": 3, |
| 5487 | "types": [ |
| 5488 | "NAME: new counter", |
| 5489 | "TYPE: integer type", |
| 5490 | "COUNT: number or value of TYPE" |
| 5491 | ], |
| 5492 | "result": "-", |
| 5493 | "summary": "Counted loop: NAME = 0 .. COUNT-1. With no bound a number COUNT runs unguarded and any other COUNT traps 4 after 1000000 passes; with `bound N` any COUNT traps 4 after N passes.", |
| 5494 | "citations": [ |
| 5495 | { |
| 5496 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2906-2907", |
| 5497 | "quote": "ret 71" |
| 5498 | }, |
| 5499 | { |
| 5500 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:65", |
| 5501 | "quote": "for <name> <type> <count> [bound N] / end" |
| 5502 | }, |
| 5503 | { |
| 5504 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:66-68", |
| 5505 | "quote": "With no bound a number count is not guarded and any other count traps 4 after 1000000 passes; with `bound N` any count traps 4 after N passes" |
| 5506 | } |
| 5507 | ], |
| 5508 | "example": "for_guard" |
| 5509 | }, |
| 5510 | "ret": { |
| 5511 | "table": "kw", |
| 5512 | "id": 72, |
| 5513 | "category": "structure", |
| 5514 | "profile": "OM-1", |
| 5515 | "form": "ret [VALUE]", |
| 5516 | "arity": 1, |
| 5517 | "types": [ |
| 5518 | "VALUE: the function's result type (none for void)" |
| 5519 | ], |
| 5520 | "result": "-", |
| 5521 | "summary": "Return from the function; ends the path (a later line in the block is error 17).", |
| 5522 | "citations": [ |
| 5523 | { |
| 5524 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2909-2910", |
| 5525 | "quote": "ret 72" |
| 5526 | }, |
| 5527 | { |
| 5528 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:74", |
| 5529 | "quote": "ret [<value>]" |
| 5530 | } |
| 5531 | ], |
| 5532 | "example": "hello" |
| 5533 | }, |
| 5534 | "=": { |
| 5535 | "table": "kw", |
| 5536 | "id": 73, |
| 5537 | "category": "structure", |
| 5538 | "profile": "OM-1", |
| 5539 | "form": "NAME = VALUE", |
| 5540 | "arity": 2, |
| 5541 | "types": [ |
| 5542 | "NAME: new or existing name of the same type", |
| 5543 | "VALUE: any value" |
| 5544 | ], |
| 5545 | "result": "-", |
| 5546 | "summary": "Bind or overwrite a name (the = may be left out).", |
| 5547 | "citations": [ |
| 5548 | { |
| 5549 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2912-2913", |
| 5550 | "quote": "ret 73" |
| 5551 | }, |
| 5552 | { |
| 5553 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:60", |
| 5554 | "quote": "<name> = <value>" |
| 5555 | } |
| 5556 | ], |
| 5557 | "example": "hello" |
| 5558 | }, |
| 5559 | "(": { |
| 5560 | "table": "kw", |
| 5561 | "id": 74, |
| 5562 | "category": "structure", |
| 5563 | "profile": "OM-1", |
| 5564 | "form": "( VALUE )", |
| 5565 | "arity": 1, |
| 5566 | "types": [ |
| 5567 | "VALUE: any value" |
| 5568 | ], |
| 5569 | "result": "VALUE's type", |
| 5570 | "summary": "Grouping: returns exactly the value inside; adds no code.", |
| 5571 | "citations": [ |
| 5572 | { |
| 5573 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2915-2916", |
| 5574 | "quote": "ret 74" |
| 5575 | }, |
| 5576 | { |
| 5577 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:773", |
| 5578 | "quote": "`(` and `)` are separate words" |
| 5579 | } |
| 5580 | ], |
| 5581 | "example": "calls" |
| 5582 | }, |
| 5583 | ")": { |
| 5584 | "table": "kw", |
| 5585 | "id": 75, |
| 5586 | "category": "structure", |
| 5587 | "profile": "OM-1", |
| 5588 | "form": "( VALUE )", |
| 5589 | "arity": 1, |
| 5590 | "types": [ |
| 5591 | "VALUE: any value" |
| 5592 | ], |
| 5593 | "result": "VALUE's type", |
| 5594 | "summary": "Closes a group; a missing ) is error 16.", |
| 5595 | "citations": [ |
| 5596 | { |
| 5597 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2918-2919", |
| 5598 | "quote": "ret 75" |
| 5599 | }, |
| 5600 | { |
| 5601 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:773", |
| 5602 | "quote": "`(` and `)` are separate words" |
| 5603 | } |
| 5604 | ], |
| 5605 | "example": "calls" |
| 5606 | }, |
| 5607 | "void": { |
| 5608 | "table": "kw", |
| 5609 | "id": 76, |
| 5610 | "category": "structure", |
| 5611 | "profile": "OM-1", |
| 5612 | "form": "fn ... to void", |
| 5613 | "arity": 0, |
| 5614 | "types": [], |
| 5615 | "result": "-", |
| 5616 | "summary": "A function that returns no value; ret without a value or reaching end returns.", |
| 5617 | "citations": [ |
| 5618 | { |
| 5619 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2921-2922", |
| 5620 | "quote": "ret 76" |
| 5621 | }, |
| 5622 | { |
| 5623 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:482", |
| 5624 | "quote": "`to void` makes a void function" |
| 5625 | } |
| 5626 | ], |
| 5627 | "example": "arrays" |
| 5628 | }, |
| 5629 | "global": { |
| 5630 | "table": "kw", |
| 5631 | "id": 78, |
| 5632 | "category": "statement", |
| 5633 | "profile": "OM-1", |
| 5634 | "form": "global NAME T N | global NAME T *", |
| 5635 | "arity": 3, |
| 5636 | "types": [ |
| 5637 | "NAME: up to 63 characters", |
| 5638 | "T: element type", |
| 5639 | "N: 1..16777216, or * (a run-time pool)" |
| 5640 | ], |
| 5641 | "result": "-", |
| 5642 | "summary": "A zero-filled pool of N elements in the program image. Program mode only; never passed as an argument (error 19). `global NAME T *` (omc only, AArch64 Linux program mode) is a run-time pool: its length is 0 when the program starts and enlarge grows it; a bool element type is error 9.", |
| 5643 | "citations": [ |
| 5644 | { |
| 5645 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2924-2925", |
| 5646 | "quote": "ret 78" |
| 5647 | }, |
| 5648 | { |
| 5649 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:526", |
| 5650 | "quote": "`global NAME T N`: a pool of N elements (1 .. 16777216)" |
| 5651 | }, |
| 5652 | { |
| 5653 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1014", |
| 5654 | "quote": "`global NAME T *`: a run-time pool of element type T" |
| 5655 | } |
| 5656 | ], |
| 5657 | "example": "arrays" |
| 5658 | }, |
| 5659 | "enlarge": { |
| 5660 | "table": "kw", |
| 5661 | "id": 244, |
| 5662 | "category": "statement", |
| 5663 | "profile": "OM-1", |
| 5664 | "form": "r = enlarge NAME n", |
| 5665 | "arity": 2, |
| 5666 | "types": [ |
| 5667 | "NAME: a run-time pool (global NAME T *)", |
| 5668 | "n: ulong", |
| 5669 | "r: long" |
| 5670 | ], |
| 5671 | "result": "long", |
| 5672 | "summary": "Grow the run-time pool NAME to n elements (omc only): the old values are kept, the new elements are 0 and r is 0; n at or below len NAME changes nothing and r is 0 (enlarge never shrinks). n times the element size at or past 2^63: r is -22; the host refusing the mapping: r is its negative errno, -12 (ENOMEM); NAME is then unchanged and nothing traps. Only the whole of an assignment (error 9 inside a value, a put or a condition; a bare enlarge line is error 16); a name that is not a run-time pool is error 7. The memory is held until the process ends.", |
| 5673 | "citations": [ |
| 5674 | { |
| 5675 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3110-3111", |
| 5676 | "quote": "ret 244" |
| 5677 | }, |
| 5678 | { |
| 5679 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1018", |
| 5680 | "quote": "`r = enlarge NAME n`: n a ulong and r a long" |
| 5681 | }, |
| 5682 | { |
| 5683 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1022", |
| 5684 | "quote": "Results: n at or below `len NAME`: 0, nothing changes (`enlarge` never shrinks)" |
| 5685 | }, |
| 5686 | { |
| 5687 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1023-1024", |
| 5688 | "quote": "n times the element size at or past 2^63: -22 and NAME is unchanged" |
| 5689 | }, |
| 5690 | { |
| 5691 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1025-1026", |
| 5692 | "quote": "the host's negative errno, -12 (ENOMEM), and NAME is unchanged" |
| 5693 | }, |
| 5694 | { |
| 5695 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1026", |
| 5696 | "quote": "A refusal is a result the program handles; it is never a trap." |
| 5697 | } |
| 5698 | ], |
| 5699 | "example": "pools" |
| 5700 | }, |
| 5701 | "text": { |
| 5702 | "table": "kw", |
| 5703 | "id": 79, |
| 5704 | "category": "statement", |
| 5705 | "profile": "OM-1", |
| 5706 | "form": "text NAME \"bytes\"", |
| 5707 | "arity": 2, |
| 5708 | "types": [ |
| 5709 | "NAME: up to 63 characters", |
| 5710 | "bytes: escapes \\n \\t \\\\ \\\"" |
| 5711 | ], |
| 5712 | "result": "-", |
| 5713 | "summary": "A read-only uchar array holding the quoted bytes. Program mode only.", |
| 5714 | "citations": [ |
| 5715 | { |
| 5716 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2927-2928", |
| 5717 | "quote": "ret 79" |
| 5718 | }, |
| 5719 | { |
| 5720 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:530", |
| 5721 | "quote": "`text NAME \"bytes\"`: a read-only array of uchar" |
| 5722 | } |
| 5723 | ], |
| 5724 | "example": "hello" |
| 5725 | }, |
| 5726 | "put": { |
| 5727 | "table": "kw", |
| 5728 | "id": 80, |
| 5729 | "category": "statement", |
| 5730 | "profile": "OM-1", |
| 5731 | "form": "put A i v | put P field [i] v", |
| 5732 | "arity": 3, |
| 5733 | "types": [ |
| 5734 | "A: writable array", |
| 5735 | "i: integer index", |
| 5736 | "v: element type" |
| 5737 | ], |
| 5738 | "result": "-", |
| 5739 | "summary": "Store v at element i. Into a view or text: error 20.", |
| 5740 | "citations": [ |
| 5741 | { |
| 5742 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2930-2931", |
| 5743 | "quote": "ret 80" |
| 5744 | }, |
| 5745 | { |
| 5746 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:75", |
| 5747 | "quote": "put <array> <index> <value>" |
| 5748 | } |
| 5749 | ], |
| 5750 | "example": "arrays" |
| 5751 | }, |
| 5752 | "free": { |
| 5753 | "table": "kw", |
| 5754 | "id": 81, |
| 5755 | "category": "statement", |
| 5756 | "profile": "OM-1", |
| 5757 | "form": "free (refused)", |
| 5758 | "arity": 0, |
| 5759 | "types": [], |
| 5760 | "result": "-", |
| 5761 | "summary": "Reserved and always refused with error 9: arrays are given back when their function returns (decision 24).", |
| 5762 | "citations": [ |
| 5763 | { |
| 5764 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2933-2934", |
| 5765 | "quote": "ret 81" |
| 5766 | }, |
| 5767 | { |
| 5768 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:537", |
| 5769 | "quote": "There is no `free`: nothing is given back by hand (decision 24), and the word is refused (error 9)." |
| 5770 | }, |
| 5771 | { |
| 5772 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:15430", |
| 5773 | "quote": "if or or or eq c 77 eq c 78 eq c 79 eq c 81" |
| 5774 | } |
| 5775 | ], |
| 5776 | "example": "free_refused" |
| 5777 | }, |
| 5778 | "own": { |
| 5779 | "table": "kw", |
| 5780 | "id": 77, |
| 5781 | "category": "statement", |
| 5782 | "profile": "OM-1", |
| 5783 | "form": "own (refused)", |
| 5784 | "arity": 0, |
| 5785 | "types": [], |
| 5786 | "result": "-", |
| 5787 | "summary": "Reserved word from the om4 draft; as a statement omc refuses it with error 9.", |
| 5788 | "citations": [ |
| 5789 | { |
| 5790 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2951-2952", |
| 5791 | "quote": "ret 77" |
| 5792 | }, |
| 5793 | { |
| 5794 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:15430", |
| 5795 | "quote": "if or or or eq c 77 eq c 78 eq c 79 eq c 81" |
| 5796 | } |
| 5797 | ], |
| 5798 | "example": "own_refused" |
| 5799 | }, |
| 5800 | "exit": { |
| 5801 | "table": "kw", |
| 5802 | "id": 82, |
| 5803 | "category": "statement", |
| 5804 | "profile": "OM-1", |
| 5805 | "form": "exit v", |
| 5806 | "arity": 1, |
| 5807 | "types": [ |
| 5808 | "v: int" |
| 5809 | ], |
| 5810 | "result": "-", |
| 5811 | "summary": "End the program with status v modulo 256; ends the path.", |
| 5812 | "citations": [ |
| 5813 | { |
| 5814 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2936-2937", |
| 5815 | "quote": "ret 82" |
| 5816 | }, |
| 5817 | { |
| 5818 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:561", |
| 5819 | "quote": "`exit v` (v int) ends the program with status v modulo 256." |
| 5820 | } |
| 5821 | ], |
| 5822 | "example": "exit" |
| 5823 | }, |
| 5824 | "note": { |
| 5825 | "table": "kw", |
| 5826 | "id": 83, |
| 5827 | "category": "statement", |
| 5828 | "profile": "OM-1", |
| 5829 | "form": "note ...", |
| 5830 | "arity": 0, |
| 5831 | "types": [], |
| 5832 | "result": "-", |
| 5833 | "summary": "A comment line: nothing after the first word is read.", |
| 5834 | "citations": [ |
| 5835 | { |
| 5836 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2939-2940", |
| 5837 | "quote": "ret 83" |
| 5838 | }, |
| 5839 | { |
| 5840 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:563", |
| 5841 | "quote": "`note ...` is a line the translator does not read beyond its first word." |
| 5842 | } |
| 5843 | ], |
| 5844 | "example": "hello" |
| 5845 | }, |
| 5846 | "new": { |
| 5847 | "table": "kw", |
| 5848 | "id": 84, |
| 5849 | "category": "statement", |
| 5850 | "profile": "OM-1", |
| 5851 | "form": "NAME = new T N v | NAME = new STRUCT v1 .. vn", |
| 5852 | "arity": 3, |
| 5853 | "types": [ |
| 5854 | "T: element type", |
| 5855 | "N: length", |
| 5856 | "v: initial element value" |
| 5857 | ], |
| 5858 | "result": "array", |
| 5859 | "summary": "A local array of N elements, each v, on the stack; only in a function's outermost block (error 9).", |
| 5860 | "citations": [ |
| 5861 | { |
| 5862 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2942-2943", |
| 5863 | "quote": "ret 84" |
| 5864 | }, |
| 5865 | { |
| 5866 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:535", |
| 5867 | "quote": "`NAME = new T N v`: a local array of N elements, each v, on the stack" |
| 5868 | } |
| 5869 | ], |
| 5870 | "example": "arrays" |
| 5871 | }, |
| 5872 | "break": { |
| 5873 | "table": "kw", |
| 5874 | "id": 86, |
| 5875 | "category": "statement", |
| 5876 | "profile": "OM-1", |
| 5877 | "form": "break", |
| 5878 | "arity": 0, |
| 5879 | "types": [], |
| 5880 | "result": "-", |
| 5881 | "summary": "Leave the innermost loop; outside a loop error 9.", |
| 5882 | "citations": [ |
| 5883 | { |
| 5884 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2945-2946", |
| 5885 | "quote": "ret 86" |
| 5886 | }, |
| 5887 | { |
| 5888 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:70", |
| 5889 | "quote": "leave the innermost loop; outside a loop: error 9." |
| 5890 | } |
| 5891 | ], |
| 5892 | "example": "control" |
| 5893 | }, |
| 5894 | "trap": { |
| 5895 | "table": "kw", |
| 5896 | "id": 87, |
| 5897 | "category": "statement", |
| 5898 | "profile": "OM-1", |
| 5899 | "form": "trap N", |
| 5900 | "arity": 1, |
| 5901 | "types": [ |
| 5902 | "N: 1..14" |
| 5903 | ], |
| 5904 | "result": "-", |
| 5905 | "summary": "Stop with trap code N: program mode exits 100 + N.", |
| 5906 | "citations": [ |
| 5907 | { |
| 5908 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2948-2949", |
| 5909 | "quote": "ret 87" |
| 5910 | }, |
| 5911 | { |
| 5912 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:76", |
| 5913 | "quote": "trap <code 1..14> stop with that code" |
| 5914 | } |
| 5915 | ], |
| 5916 | "example": "trapword" |
| 5917 | }, |
| 5918 | "continue": { |
| 5919 | "table": "kw", |
| 5920 | "id": 97, |
| 5921 | "category": "statement", |
| 5922 | "profile": "OM-1", |
| 5923 | "form": "continue", |
| 5924 | "arity": 0, |
| 5925 | "types": [], |
| 5926 | "result": "-", |
| 5927 | "summary": "Jump to the next iteration (a while's head, a for's increment).", |
| 5928 | "citations": [ |
| 5929 | { |
| 5930 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3080-3081", |
| 5931 | "quote": "ret 97" |
| 5932 | }, |
| 5933 | { |
| 5934 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:72", |
| 5935 | "quote": "jump to the next iteration" |
| 5936 | } |
| 5937 | ], |
| 5938 | "example": "control" |
| 5939 | }, |
| 5940 | "const": { |
| 5941 | "table": "kw", |
| 5942 | "id": 152, |
| 5943 | "category": "statement", |
| 5944 | "profile": "OM-1", |
| 5945 | "form": "const NAME TYPE LITERAL", |
| 5946 | "arity": 3, |
| 5947 | "types": [ |
| 5948 | "NAME: up to 63 characters", |
| 5949 | "TYPE: integer or float type", |
| 5950 | "LITERAL: value of TYPE" |
| 5951 | ], |
| 5952 | "result": "-", |
| 5953 | "summary": "A named typed constant, usable as a value, array length, for count, while bound or trap code.", |
| 5954 | "citations": [ |
| 5955 | { |
| 5956 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:2633-2634", |
| 5957 | "quote": "ret 152" |
| 5958 | }, |
| 5959 | { |
| 5960 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:792", |
| 5961 | "quote": "`const NAME TYPE LITERAL` at top level defines a named value before use." |
| 5962 | } |
| 5963 | ], |
| 5964 | "example": "consts" |
| 5965 | }, |
| 5966 | "struct": { |
| 5967 | "table": "kw", |
| 5968 | "id": 85, |
| 5969 | "category": "struct", |
| 5970 | "profile": "OM-1", |
| 5971 | "form": "struct Name field type [len] ... end", |
| 5972 | "arity": 3, |
| 5973 | "types": [ |
| 5974 | "fields: 1..16, at most 64 eight-byte cells" |
| 5975 | ], |
| 5976 | "result": "-", |
| 5977 | "summary": "A record type of eight-byte cells, declared on one line before the first fn.", |
| 5978 | "citations": [ |
| 5979 | { |
| 5980 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3050-3051", |
| 5981 | "quote": "ret 85" |
| 5982 | }, |
| 5983 | { |
| 5984 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:666", |
| 5985 | "quote": "`struct Name field type [len] ... end`, one line, before the first `fn`." |
| 5986 | } |
| 5987 | ], |
| 5988 | "example": "structs" |
| 5989 | }, |
| 5990 | "sizeof": { |
| 5991 | "table": "kw", |
| 5992 | "id": 95, |
| 5993 | "category": "struct", |
| 5994 | "profile": "OM-1", |
| 5995 | "form": "sizeof T | sizeof STRUCT", |
| 5996 | "arity": 1, |
| 5997 | "types": [ |
| 5998 | "T: scalar type or struct" |
| 5999 | ], |
| 6000 | "result": "ulong", |
| 6001 | "summary": "Size in bytes; a compile-time constant.", |
| 6002 | "citations": [ |
| 6003 | { |
| 6004 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3074-3075", |
| 6005 | "quote": "ret 95" |
| 6006 | }, |
| 6007 | { |
| 6008 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:781", |
| 6009 | "quote": "`sizeof T` is the size in bytes of a scalar type" |
| 6010 | } |
| 6011 | ], |
| 6012 | "example": "structs" |
| 6013 | }, |
| 6014 | "offsetof": { |
| 6015 | "table": "kw", |
| 6016 | "id": 96, |
| 6017 | "category": "struct", |
| 6018 | "profile": "OM-1", |
| 6019 | "form": "offsetof STRUCT field", |
| 6020 | "arity": 2, |
| 6021 | "types": [ |
| 6022 | "STRUCT: struct name", |
| 6023 | "field: field name" |
| 6024 | ], |
| 6025 | "result": "ulong", |
| 6026 | "summary": "Byte offset of a field; a compile-time constant.", |
| 6027 | "citations": [ |
| 6028 | { |
| 6029 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3077-3078", |
| 6030 | "quote": "ret 96" |
| 6031 | }, |
| 6032 | { |
| 6033 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:783", |
| 6034 | "quote": "`offsetof S f` is the byte offset of field `f`" |
| 6035 | } |
| 6036 | ], |
| 6037 | "example": "structs" |
| 6038 | }, |
| 6039 | "f32": { |
| 6040 | "table": "kw", |
| 6041 | "id": 88, |
| 6042 | "category": "float", |
| 6043 | "profile": "OM-1", |
| 6044 | "form": "f32 VALUE | 1.5f32", |
| 6045 | "arity": 1, |
| 6046 | "types": [ |
| 6047 | "VALUE: integer or float value" |
| 6048 | ], |
| 6049 | "result": "f32", |
| 6050 | "summary": "IEEE-754 binary32 type and conversion.", |
| 6051 | "citations": [ |
| 6052 | { |
| 6053 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3053-3054", |
| 6054 | "quote": "ret 88" |
| 6055 | }, |
| 6056 | { |
| 6057 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:716", |
| 6058 | "quote": "`f32` and `f64` are IEEE-754 binary32 and binary64." |
| 6059 | } |
| 6060 | ], |
| 6061 | "example": "floats" |
| 6062 | }, |
| 6063 | "f64": { |
| 6064 | "table": "kw", |
| 6065 | "id": 89, |
| 6066 | "category": "float", |
| 6067 | "profile": "OM-1", |
| 6068 | "form": "f64 VALUE | 1.5f64", |
| 6069 | "arity": 1, |
| 6070 | "types": [ |
| 6071 | "VALUE: integer or float value" |
| 6072 | ], |
| 6073 | "result": "f64", |
| 6074 | "summary": "IEEE-754 binary64 type and conversion.", |
| 6075 | "citations": [ |
| 6076 | { |
| 6077 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3056-3057", |
| 6078 | "quote": "ret 89" |
| 6079 | }, |
| 6080 | { |
| 6081 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:716", |
| 6082 | "quote": "`f32` and `f64` are IEEE-754 binary32 and binary64." |
| 6083 | } |
| 6084 | ], |
| 6085 | "example": "floats" |
| 6086 | }, |
| 6087 | "bitcast": { |
| 6088 | "table": "kw", |
| 6089 | "id": 90, |
| 6090 | "category": "float", |
| 6091 | "profile": "OM-1", |
| 6092 | "form": "bitcast T VALUE", |
| 6093 | "arity": 2, |
| 6094 | "types": [ |
| 6095 | "T: type of the same width", |
| 6096 | "VALUE: f32/i32/u32 or f64/i64/u64" |
| 6097 | ], |
| 6098 | "result": "T", |
| 6099 | "summary": "Reinterpret the bits of a same-width value.", |
| 6100 | "citations": [ |
| 6101 | { |
| 6102 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3059-3060", |
| 6103 | "quote": "ret 90" |
| 6104 | }, |
| 6105 | { |
| 6106 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:757", |
| 6107 | "quote": "`bitcast T value` reinterprets a value of the same width" |
| 6108 | } |
| 6109 | ], |
| 6110 | "example": "floats" |
| 6111 | }, |
| 6112 | "fsqrt": { |
| 6113 | "table": "kw", |
| 6114 | "id": 91, |
| 6115 | "category": "float", |
| 6116 | "profile": "OM-1", |
| 6117 | "form": "fsqrt X", |
| 6118 | "arity": 1, |
| 6119 | "types": [ |
| 6120 | "X: f32 or f64" |
| 6121 | ], |
| 6122 | "result": "the operand type", |
| 6123 | "summary": "IEEE square root.", |
| 6124 | "citations": [ |
| 6125 | { |
| 6126 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3062-3063", |
| 6127 | "quote": "ret 91" |
| 6128 | }, |
| 6129 | { |
| 6130 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:740", |
| 6131 | "quote": "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float" |
| 6132 | } |
| 6133 | ], |
| 6134 | "example": "floats" |
| 6135 | }, |
| 6136 | "fabs": { |
| 6137 | "table": "kw", |
| 6138 | "id": 92, |
| 6139 | "category": "float", |
| 6140 | "profile": "OM-1", |
| 6141 | "form": "fabs X", |
| 6142 | "arity": 1, |
| 6143 | "types": [ |
| 6144 | "X: f32 or f64" |
| 6145 | ], |
| 6146 | "result": "the operand type", |
| 6147 | "summary": "Absolute value.", |
| 6148 | "citations": [ |
| 6149 | { |
| 6150 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3065-3066", |
| 6151 | "quote": "ret 92" |
| 6152 | }, |
| 6153 | { |
| 6154 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:740", |
| 6155 | "quote": "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float" |
| 6156 | } |
| 6157 | ], |
| 6158 | "example": "floats" |
| 6159 | }, |
| 6160 | "fmin": { |
| 6161 | "table": "kw", |
| 6162 | "id": 93, |
| 6163 | "category": "float", |
| 6164 | "profile": "OM-1", |
| 6165 | "form": "fmin A B", |
| 6166 | "arity": 2, |
| 6167 | "types": [ |
| 6168 | "A, B: one float type" |
| 6169 | ], |
| 6170 | "result": "the operand type", |
| 6171 | "summary": "IEEE minNum (FMINNM).", |
| 6172 | "citations": [ |
| 6173 | { |
| 6174 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3068-3069", |
| 6175 | "quote": "ret 93" |
| 6176 | }, |
| 6177 | { |
| 6178 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:740", |
| 6179 | "quote": "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float" |
| 6180 | } |
| 6181 | ], |
| 6182 | "example": "floats" |
| 6183 | }, |
| 6184 | "fmax": { |
| 6185 | "table": "kw", |
| 6186 | "id": 94, |
| 6187 | "category": "float", |
| 6188 | "profile": "OM-1", |
| 6189 | "form": "fmax A B", |
| 6190 | "arity": 2, |
| 6191 | "types": [ |
| 6192 | "A, B: one float type" |
| 6193 | ], |
| 6194 | "result": "the operand type", |
| 6195 | "summary": "IEEE maxNum (FMAXNM).", |
| 6196 | "citations": [ |
| 6197 | { |
| 6198 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3071-3072", |
| 6199 | "quote": "ret 94" |
| 6200 | }, |
| 6201 | { |
| 6202 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:740", |
| 6203 | "quote": "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float" |
| 6204 | } |
| 6205 | ], |
| 6206 | "example": "floats" |
| 6207 | }, |
| 6208 | "fma": { |
| 6209 | "table": "kw", |
| 6210 | "id": 227, |
| 6211 | "category": "float", |
| 6212 | "profile": "OM-1", |
| 6213 | "form": "fma A B C", |
| 6214 | "arity": 3, |
| 6215 | "types": [ |
| 6216 | "A, B, C: one explicit float type (f32 or f64)" |
| 6217 | ], |
| 6218 | "result": "the operand type", |
| 6219 | "summary": "Fused multiply-add: A*B+C with one rounding of the exact result (AArch64 FMADD); ordinary mul then add round twice. Mixed or integer operands are error 7, an unresolved decimal literal error 11; x86linux and x86efi refuse it with error 9.", |
| 6220 | "citations": [ |
| 6221 | { |
| 6222 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3104-3105", |
| 6223 | "quote": "ret 227" |
| 6224 | }, |
| 6225 | { |
| 6226 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:744", |
| 6227 | "quote": "`fma a b c` multiplies `a` by `b` and adds `c` with **one rounding of the exact combined result**." |
| 6228 | }, |
| 6229 | { |
| 6230 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:712", |
| 6231 | "quote": "The words are `bitcast`, `fsqrt`, `fabs`, `fmin`, `fmax` and `fma`" |
| 6232 | } |
| 6233 | ], |
| 6234 | "example": "fma" |
| 6235 | }, |
| 6236 | "rotr": { |
| 6237 | "table": "kw2", |
| 6238 | "id": 59, |
| 6239 | "category": "OM-2", |
| 6240 | "profile": "OM-2", |
| 6241 | "form": "rotr X N", |
| 6242 | "arity": 2, |
| 6243 | "types": [ |
| 6244 | "X: unsigned type T", |
| 6245 | "N: T" |
| 6246 | ], |
| 6247 | "result": "T", |
| 6248 | "summary": "Rotate right; N outside 0..w-1 traps 7. OM-2 units only (first line `om2`).", |
| 6249 | "citations": [ |
| 6250 | { |
| 6251 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3123-3124", |
| 6252 | "quote": "ret 59" |
| 6253 | }, |
| 6254 | { |
| 6255 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:854", |
| 6256 | "quote": "`rotr x n` and `rotl x n`" |
| 6257 | }, |
| 6258 | { |
| 6259 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6260 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6261 | } |
| 6262 | ], |
| 6263 | "example": "om2_rotate" |
| 6264 | }, |
| 6265 | "rotl": { |
| 6266 | "table": "kw2", |
| 6267 | "id": 60, |
| 6268 | "category": "OM-2", |
| 6269 | "profile": "OM-2", |
| 6270 | "form": "rotl X N", |
| 6271 | "arity": 2, |
| 6272 | "types": [ |
| 6273 | "X: unsigned type T", |
| 6274 | "N: T" |
| 6275 | ], |
| 6276 | "result": "T", |
| 6277 | "summary": "Rotate left; N outside 0..w-1 traps 7. OM-2 units only (first line `om2`).", |
| 6278 | "citations": [ |
| 6279 | { |
| 6280 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3126-3127", |
| 6281 | "quote": "ret 60" |
| 6282 | }, |
| 6283 | { |
| 6284 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:854", |
| 6285 | "quote": "`rotr x n` and `rotl x n`" |
| 6286 | }, |
| 6287 | { |
| 6288 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6289 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6290 | } |
| 6291 | ], |
| 6292 | "example": "om2_rotate" |
| 6293 | }, |
| 6294 | "unroll": { |
| 6295 | "table": "kw2", |
| 6296 | "id": 181, |
| 6297 | "category": "OM-2", |
| 6298 | "profile": "OM-2", |
| 6299 | "form": "for i T K unroll", |
| 6300 | "arity": 0, |
| 6301 | "types": [ |
| 6302 | "K: number 1..64" |
| 6303 | ], |
| 6304 | "result": "-", |
| 6305 | "summary": "Compile the loop body K times with a constant counter. OM-2 units only (first line `om2`).", |
| 6306 | "citations": [ |
| 6307 | { |
| 6308 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3129-3130", |
| 6309 | "quote": "ret 181" |
| 6310 | }, |
| 6311 | { |
| 6312 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:858", |
| 6313 | "quote": "`for i T K unroll`" |
| 6314 | }, |
| 6315 | { |
| 6316 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6317 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6318 | } |
| 6319 | ], |
| 6320 | "example": "om2_unroll" |
| 6321 | }, |
| 6322 | "inline": { |
| 6323 | "table": "kw2", |
| 6324 | "id": 182, |
| 6325 | "category": "OM-2", |
| 6326 | "profile": "OM-2", |
| 6327 | "form": "fn NAME ... to T inline", |
| 6328 | "arity": 0, |
| 6329 | "types": [], |
| 6330 | "result": "-", |
| 6331 | "summary": "Compile every call of the function in place. OM-2 units only (first line `om2`).", |
| 6332 | "citations": [ |
| 6333 | { |
| 6334 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3132-3133", |
| 6335 | "quote": "ret 182" |
| 6336 | }, |
| 6337 | { |
| 6338 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:862", |
| 6339 | "quote": "`fn NAME ... to T inline`" |
| 6340 | }, |
| 6341 | { |
| 6342 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6343 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6344 | } |
| 6345 | ], |
| 6346 | "example": "om2_unroll" |
| 6347 | }, |
| 6348 | "fresh": { |
| 6349 | "table": "kw2", |
| 6350 | "id": 183, |
| 6351 | "category": "OM-2", |
| 6352 | "profile": "OM-2", |
| 6353 | "form": "NAME edit T N fresh", |
| 6354 | "arity": 0, |
| 6355 | "types": [ |
| 6356 | "N: at most 64" |
| 6357 | ], |
| 6358 | "result": "-", |
| 6359 | "summary": "Incoming elements are unspecified; every read needs a prior write (error 27). OM-2 units only (first line `om2`).", |
| 6360 | "citations": [ |
| 6361 | { |
| 6362 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3135-3136", |
| 6363 | "quote": "ret 183" |
| 6364 | }, |
| 6365 | { |
| 6366 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:901", |
| 6367 | "quote": "A parameter `s edit T N fresh`" |
| 6368 | }, |
| 6369 | { |
| 6370 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6371 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6372 | } |
| 6373 | ], |
| 6374 | "example": "om2_fresh" |
| 6375 | }, |
| 6376 | "abstract": { |
| 6377 | "table": "kw2", |
| 6378 | "id": 184, |
| 6379 | "category": "OM-2", |
| 6380 | "profile": "OM-2", |
| 6381 | "form": "abstract NAME T [ops W ...]", |
| 6382 | "arity": 2, |
| 6383 | "types": [ |
| 6384 | "T: uint or ulong", |
| 6385 | "W: rotr rotl and or xor" |
| 6386 | ], |
| 6387 | "result": "-", |
| 6388 | "summary": "Declare an abstract type made only by seal in NAMEmk. OM-2 units only (first line `om2`).", |
| 6389 | "citations": [ |
| 6390 | { |
| 6391 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3138-3139", |
| 6392 | "quote": "ret 184" |
| 6393 | }, |
| 6394 | { |
| 6395 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:911", |
| 6396 | "quote": "`abstract NAME T [ops W ...]`" |
| 6397 | }, |
| 6398 | { |
| 6399 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6400 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6401 | } |
| 6402 | ], |
| 6403 | "example": "om2_abstract" |
| 6404 | }, |
| 6405 | "seal": { |
| 6406 | "table": "kw2", |
| 6407 | "id": 185, |
| 6408 | "category": "OM-2", |
| 6409 | "profile": "OM-2", |
| 6410 | "form": "seal NAME v", |
| 6411 | "arity": 2, |
| 6412 | "types": [ |
| 6413 | "NAME: abstract type", |
| 6414 | "v: its base type T" |
| 6415 | ], |
| 6416 | "result": "NAME", |
| 6417 | "summary": "Make an abstract value; only inside the function NAMEmk (else error 28). OM-2 units only (first line `om2`).", |
| 6418 | "citations": [ |
| 6419 | { |
| 6420 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3141-3142", |
| 6421 | "quote": "ret 185" |
| 6422 | }, |
| 6423 | { |
| 6424 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:913", |
| 6425 | "quote": "A value of it is made only by `seal NAME v`" |
| 6426 | }, |
| 6427 | { |
| 6428 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6429 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6430 | } |
| 6431 | ], |
| 6432 | "example": "om2_abstract" |
| 6433 | }, |
| 6434 | "open": { |
| 6435 | "table": "kw2", |
| 6436 | "id": 186, |
| 6437 | "category": "OM-2", |
| 6438 | "profile": "OM-2", |
| 6439 | "form": "open v", |
| 6440 | "arity": 1, |
| 6441 | "types": [ |
| 6442 | "v: abstract value" |
| 6443 | ], |
| 6444 | "result": "base type T", |
| 6445 | "summary": "The base value of an abstract value. OM-2 units only (first line `om2`).", |
| 6446 | "citations": [ |
| 6447 | { |
| 6448 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3144-3145", |
| 6449 | "quote": "ret 186" |
| 6450 | }, |
| 6451 | { |
| 6452 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:915", |
| 6453 | "quote": "`open v` gives the T value." |
| 6454 | }, |
| 6455 | { |
| 6456 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6457 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6458 | } |
| 6459 | ], |
| 6460 | "example": "om2_abstract" |
| 6461 | }, |
| 6462 | "holds": { |
| 6463 | "table": "kw2", |
| 6464 | "id": 187, |
| 6465 | "category": "OM-2", |
| 6466 | "profile": "OM-2", |
| 6467 | "form": "holds NAME dup32", |
| 6468 | "arity": 2, |
| 6469 | "types": [ |
| 6470 | "NAME: ulong abstract type" |
| 6471 | ], |
| 6472 | "result": "-", |
| 6473 | "summary": "Run-time invariant on every seal: high 32 bits equal low 32 (trap 10). OM-2 units only (first line `om2`).", |
| 6474 | "citations": [ |
| 6475 | { |
| 6476 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3147-3148", |
| 6477 | "quote": "ret 187" |
| 6478 | }, |
| 6479 | { |
| 6480 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:912", |
| 6481 | "quote": "`holds NAME dup32`, at top level before the first `fn`" |
| 6482 | }, |
| 6483 | { |
| 6484 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6485 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6486 | } |
| 6487 | ], |
| 6488 | "example": "om2_abstract" |
| 6489 | }, |
| 6490 | "ops": { |
| 6491 | "table": "kw2", |
| 6492 | "id": 196, |
| 6493 | "category": "OM-2", |
| 6494 | "profile": "OM-2", |
| 6495 | "form": "abstract NAME T ops W ...", |
| 6496 | "arity": 1, |
| 6497 | "types": [ |
| 6498 | "W: rotr rotl and or xor" |
| 6499 | ], |
| 6500 | "result": "-", |
| 6501 | "summary": "The operations allowed on an abstract type. OM-2 units only (first line `om2`).", |
| 6502 | "citations": [ |
| 6503 | { |
| 6504 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3174-3175", |
| 6505 | "quote": "ret 196" |
| 6506 | }, |
| 6507 | { |
| 6508 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:911", |
| 6509 | "quote": "[ops W ...]" |
| 6510 | }, |
| 6511 | { |
| 6512 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6513 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6514 | } |
| 6515 | ], |
| 6516 | "example": "om2_abstract" |
| 6517 | }, |
| 6518 | "layout": { |
| 6519 | "table": "kw2", |
| 6520 | "id": 188, |
| 6521 | "category": "OM-2", |
| 6522 | "profile": "OM-2", |
| 6523 | "form": "layout NAME SIZE / field ... / end", |
| 6524 | "arity": 2, |
| 6525 | "types": [ |
| 6526 | "NAME: up to 8 bytes", |
| 6527 | "SIZE: 1..4096" |
| 6528 | ], |
| 6529 | "result": "-", |
| 6530 | "summary": "An external byte layout over a uchar array of SIZE bytes. OM-2 units only (first line `om2`).", |
| 6531 | "citations": [ |
| 6532 | { |
| 6533 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3150-3151", |
| 6534 | "quote": "ret 188" |
| 6535 | }, |
| 6536 | { |
| 6537 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:888", |
| 6538 | "quote": "`layout NAME SIZE`" |
| 6539 | }, |
| 6540 | { |
| 6541 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6542 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6543 | } |
| 6544 | ], |
| 6545 | "example": "om2_layout" |
| 6546 | }, |
| 6547 | "field": { |
| 6548 | "table": "kw2", |
| 6549 | "id": 189, |
| 6550 | "category": "OM-2", |
| 6551 | "profile": "OM-2", |
| 6552 | "form": "field F T [COUNT] at OFF little|big", |
| 6553 | "arity": 5, |
| 6554 | "types": [ |
| 6555 | "T: integer type", |
| 6556 | "COUNT: 1..4096", |
| 6557 | "OFF: byte offset" |
| 6558 | ], |
| 6559 | "result": "-", |
| 6560 | "summary": "One field of a layout. OM-2 units only (first line `om2`).", |
| 6561 | "citations": [ |
| 6562 | { |
| 6563 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3153-3154", |
| 6564 | "quote": "ret 189" |
| 6565 | }, |
| 6566 | { |
| 6567 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:888", |
| 6568 | "quote": "`field F T [COUNT] at OFF little|big`" |
| 6569 | }, |
| 6570 | { |
| 6571 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6572 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6573 | } |
| 6574 | ], |
| 6575 | "example": "om2_layout" |
| 6576 | }, |
| 6577 | "at": { |
| 6578 | "table": "kw2", |
| 6579 | "id": 190, |
| 6580 | "category": "OM-2", |
| 6581 | "profile": "OM-2", |
| 6582 | "form": "field F T at OFF ...", |
| 6583 | "arity": 1, |
| 6584 | "types": [ |
| 6585 | "OFF: byte offset" |
| 6586 | ], |
| 6587 | "result": "-", |
| 6588 | "summary": "Introduces a layout field's byte offset. OM-2 units only (first line `om2`).", |
| 6589 | "citations": [ |
| 6590 | { |
| 6591 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3156-3157", |
| 6592 | "quote": "ret 190" |
| 6593 | }, |
| 6594 | { |
| 6595 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:888", |
| 6596 | "quote": "at OFF little|big" |
| 6597 | }, |
| 6598 | { |
| 6599 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6600 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6601 | } |
| 6602 | ], |
| 6603 | "example": "om2_layout" |
| 6604 | }, |
| 6605 | "little": { |
| 6606 | "table": "kw2", |
| 6607 | "id": 191, |
| 6608 | "category": "OM-2", |
| 6609 | "profile": "OM-2", |
| 6610 | "form": "field ... at OFF little", |
| 6611 | "arity": 0, |
| 6612 | "types": [], |
| 6613 | "result": "-", |
| 6614 | "summary": "Little-endian layout field. OM-2 units only (first line `om2`).", |
| 6615 | "citations": [ |
| 6616 | { |
| 6617 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3159-3160", |
| 6618 | "quote": "ret 191" |
| 6619 | }, |
| 6620 | { |
| 6621 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:888", |
| 6622 | "quote": "at OFF little|big" |
| 6623 | }, |
| 6624 | { |
| 6625 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6626 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6627 | } |
| 6628 | ], |
| 6629 | "example": "om2_layout" |
| 6630 | }, |
| 6631 | "big": { |
| 6632 | "table": "kw2", |
| 6633 | "id": 192, |
| 6634 | "category": "OM-2", |
| 6635 | "profile": "OM-2", |
| 6636 | "form": "field ... at OFF big", |
| 6637 | "arity": 0, |
| 6638 | "types": [], |
| 6639 | "result": "-", |
| 6640 | "summary": "Big-endian layout field (REV on load/store). OM-2 units only (first line `om2`).", |
| 6641 | "citations": [ |
| 6642 | { |
| 6643 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3162-3163", |
| 6644 | "quote": "ret 192" |
| 6645 | }, |
| 6646 | { |
| 6647 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:888", |
| 6648 | "quote": "at OFF little|big" |
| 6649 | }, |
| 6650 | { |
| 6651 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6652 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6653 | } |
| 6654 | ], |
| 6655 | "example": "om2_layout" |
| 6656 | }, |
| 6657 | "part": { |
| 6658 | "table": "kw2", |
| 6659 | "id": 193, |
| 6660 | "category": "OM-2", |
| 6661 | "profile": "OM-2", |
| 6662 | "form": "part A o k", |
| 6663 | "arity": 3, |
| 6664 | "types": [ |
| 6665 | "A: array name", |
| 6666 | "o: ulong", |
| 6667 | "k: ulong" |
| 6668 | ], |
| 6669 | "result": "view/edit of k elements", |
| 6670 | "summary": "Elements o..o+k-1 of A, only as an argument for an unsized parameter. OM-2 units only (first line `om2`).", |
| 6671 | "citations": [ |
| 6672 | { |
| 6673 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3165-3166", |
| 6674 | "quote": "ret 193" |
| 6675 | }, |
| 6676 | { |
| 6677 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:935", |
| 6678 | "quote": "`part A o k` (o, k ulong; another type is error 7)" |
| 6679 | }, |
| 6680 | { |
| 6681 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6682 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6683 | } |
| 6684 | ], |
| 6685 | "example": "om2_part" |
| 6686 | }, |
| 6687 | "out": { |
| 6688 | "table": "kw2", |
| 6689 | "id": 194, |
| 6690 | "category": "OM-2", |
| 6691 | "profile": "OM-2", |
| 6692 | "form": "NAME out T N", |
| 6693 | "arity": 2, |
| 6694 | "types": [ |
| 6695 | "T: element type", |
| 6696 | "N: length" |
| 6697 | ], |
| 6698 | "result": "-", |
| 6699 | "summary": "A parameter written by the unit; inside it is an edit of T N. OM-2 units only (first line `om2`).", |
| 6700 | "citations": [ |
| 6701 | { |
| 6702 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3168-3169", |
| 6703 | "quote": "ret 194" |
| 6704 | }, |
| 6705 | { |
| 6706 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:943", |
| 6707 | "quote": "A parameter `NAME out T N`" |
| 6708 | }, |
| 6709 | { |
| 6710 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6711 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6712 | } |
| 6713 | ], |
| 6714 | "example": "om2_out" |
| 6715 | }, |
| 6716 | "export": { |
| 6717 | "table": "kw2", |
| 6718 | "id": 195, |
| 6719 | "category": "OM-2", |
| 6720 | "profile": "OM-2", |
| 6721 | "form": "export fn NAME ...", |
| 6722 | "arity": 0, |
| 6723 | "types": [], |
| 6724 | "result": "-", |
| 6725 | "summary": "Mark a function-mode entry (no fn main). OM-2 units only (first line `om2`).", |
| 6726 | "citations": [ |
| 6727 | { |
| 6728 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:3171-3172", |
| 6729 | "quote": "ret 195" |
| 6730 | }, |
| 6731 | { |
| 6732 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:947", |
| 6733 | "quote": "`export fn NAME ...` at top level" |
| 6734 | }, |
| 6735 | { |
| 6736 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:830", |
| 6737 | "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" |
| 6738 | } |
| 6739 | ], |
| 6740 | "example": "om2_export" |
| 6741 | } |
| 6742 | }, |
| 6743 | "topics": { |
| 6744 | "requires": { |
| 6745 | "form": "requires BOOL", |
| 6746 | "summary": "OM-2 precondition: part of a function's prefix, checked on entry; false traps 9.", |
| 6747 | "details": "Clauses run in declaration order after parameter binding. Predicates are pure: integer/bool operations, conversions, len and array reads only.", |
| 6748 | "citations": [ |
| 6749 | { |
| 6750 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1785", |
| 6751 | "quote": "`requires BOOL` and `ensures BOOL` form a function's prefix" |
| 6752 | }, |
| 6753 | { |
| 6754 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1830", |
| 6755 | "quote": "False `requires` uses existing trap **9**" |
| 6756 | } |
| 6757 | ], |
| 6758 | "example": "contract_fail" |
| 6759 | }, |
| 6760 | "ensures": { |
| 6761 | "form": "ensures BOOL", |
| 6762 | "summary": "OM-2 postcondition: checked on every normal return; `result` names the returned value; false traps 10.", |
| 6763 | "details": "Not run on exit or a trap. A parameter means its current value at return.", |
| 6764 | "citations": [ |
| 6765 | { |
| 6766 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1790", |
| 6767 | "quote": "Postconditions execute in declaration order on **every normal return**" |
| 6768 | } |
| 6769 | ], |
| 6770 | "example": "contracts" |
| 6771 | }, |
| 6772 | "invariant": { |
| 6773 | "form": "invariant BOOL", |
| 6774 | "summary": "OM-2 loop invariant: the prefix of a while or for body, checked at the loop head; false traps 10.", |
| 6775 | "details": "Runs on entry, every backedge and before the final false condition.", |
| 6776 | "citations": [ |
| 6777 | { |
| 6778 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1803", |
| 6779 | "quote": "`invariant BOOL` forms the prefix of a `while` or `for` body" |
| 6780 | } |
| 6781 | ], |
| 6782 | "example": "contracts" |
| 6783 | }, |
| 6784 | "result": { |
| 6785 | "form": "result", |
| 6786 | "summary": "OM-2: the returned value, available only inside ensures clauses (elsewhere error 30).", |
| 6787 | "details": "It has the declared return type; the caller receives the same value after the checks.", |
| 6788 | "citations": [ |
| 6789 | { |
| 6790 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1794", |
| 6791 | "quote": "The read-only name `result` is available only in value postconditions." |
| 6792 | } |
| 6793 | ], |
| 6794 | "example": "contracts" |
| 6795 | }, |
| 6796 | "om2": { |
| 6797 | "form": "om2 | om2 diag | om2 fmt", |
| 6798 | "summary": "First line that opts a unit into profile OM-2 (rotate, unroll, inline, layout, abstract types, contracts, unsized views).", |
| 6799 | "details": "Leading blank and note lines are skipped; in an OM-1 unit the om2 line is error 16.", |
| 6800 | "citations": [ |
| 6801 | { |
| 6802 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:827", |
| 6803 | "quote": "when the next line is exactly `om2`" |
| 6804 | } |
| 6805 | ], |
| 6806 | "example": "om2_rotate" |
| 6807 | }, |
| 6808 | "exit_status": { |
| 6809 | "summary": "Program exit status: main's value modulo 256; a trap N exits 100 + N; exit v exits v modulo 256.", |
| 6810 | "details": "An explicit exit 101..114 cannot be told apart from a trap by status alone.", |
| 6811 | "citations": [ |
| 6812 | { |
| 6813 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:430", |
| 6814 | "quote": "main's value modulo 256" |
| 6815 | }, |
| 6816 | { |
| 6817 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:431", |
| 6818 | "quote": "exit status 100 + the trap code" |
| 6819 | } |
| 6820 | ], |
| 6821 | "example": "exit" |
| 6822 | }, |
| 6823 | "packed_list": { |
| 6824 | "summary": "Host-word argument lists: little-endian u16 count, then per record a u16 length and the bytes.", |
| 6825 | "details": "An exec argument packet (execprog, execpure, the first packet of execenv) is at most 65536 bytes with count 1..1024; every other packed list (renames, link, symlnk, the execenv environment) at most 4096 bytes with count 1..64. Zero bytes, truncation, trailing bytes or an out-of-range count trap 3.", |
| 6826 | "citations": [ |
| 6827 | { |
| 6828 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1276", |
| 6829 | "quote": "A packed list is a little-endian `u16` count followed by that many records" |
| 6830 | }, |
| 6831 | { |
| 6832 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1278-1279", |
| 6833 | "quote": "An exec argument packet (`execprog`, `execpure` and the first packet of `execenv`) is at most 65536 bytes with count 1..1024;" |
| 6834 | } |
| 6835 | ], |
| 6836 | "example": "dirs" |
| 6837 | }, |
| 6838 | "paths": { |
| 6839 | "summary": "Host paths are length-delimited byte slices of at most 4095 bytes; embedded zero bytes trap 3.", |
| 6840 | "details": "Relative paths resolve against the current directory (AT_FDCWD).", |
| 6841 | "citations": [ |
| 6842 | { |
| 6843 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1224", |
| 6844 | "quote": "Paths are at most 4095 bytes." |
| 6845 | } |
| 6846 | ], |
| 6847 | "example": "files" |
| 6848 | }, |
| 6849 | "host_words": { |
| 6850 | "summary": "Native host words: Linux system calls with checked slices; results are long, negative errno on failure.", |
| 6851 | "details": "They do not form a sandbox: they run with the process's permissions. Program mode only, except that an OM-2 function unit may use fopen, fclose, fstat, stat, lstat, the four identity words, the clocks monons, realns and sleepns, and the twelve mapping/device words on AArch64.", |
| 6852 | "citations": [ |
| 6853 | { |
| 6854 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1135", |
| 6855 | "quote": "These operations do not form a sandbox" |
| 6856 | }, |
| 6857 | { |
| 6858 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1112", |
| 6859 | "quote": "an OM-2 function unit (first line `om2`, no `fn main`) may use the file" |
| 6860 | } |
| 6861 | ], |
| 6862 | "example": "files" |
| 6863 | }, |
| 6864 | "compile_errors": { |
| 6865 | "summary": "omc writes `omc: line N: error K` to stderr and exits with K; use explain_error for any K.", |
| 6866 | "details": "Codes 1..30 exist at the pin.", |
| 6867 | "citations": [ |
| 6868 | { |
| 6869 | "ref": "omega-mv@6c562dd1 seed/omc/omc.om:1944", |
| 6870 | "quote": "fn fail code ulong to void" |
| 6871 | } |
| 6872 | ], |
| 6873 | "example": "e03" |
| 6874 | }, |
| 6875 | "traps": { |
| 6876 | "summary": "Run-time traps 1..14 end a program with exit 100 + code.", |
| 6877 | "details": "Codes are part of the observable semantics and are never renumbered. Loops trap 4 past their bound: N from `bound N`, else 1000000 for a while and for a for whose count is not a number.", |
| 6878 | "citations": [ |
| 6879 | { |
| 6880 | "ref": "omega-mv@6c562dd1 src/compiler/osc_ir.h:165", |
| 6881 | "quote": "Trap codes are part of the observable semantics" |
| 6882 | }, |
| 6883 | { |
| 6884 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:64", |
| 6885 | "quote": "default 1000000; past N iterations: trap 4" |
| 6886 | }, |
| 6887 | { |
| 6888 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:66-68", |
| 6889 | "quote": "With no bound a number count is not guarded and any other count traps 4 after 1000000 passes" |
| 6890 | } |
| 6891 | ], |
| 6892 | "example": "t02" |
| 6893 | }, |
| 6894 | "loops": { |
| 6895 | "form": "while COND [bound N] / end | for NAME TYPE COUNT [bound N] / end", |
| 6896 | "summary": "Every loop except a for with a number count and no bound traps 4 (exit 104) past a pass limit.", |
| 6897 | "details": "`bound N` (1..9223372036854775807; IR mode 1..1000000) caps a while or a for at N passes. Without it a while, and a for whose COUNT is not a number, stop at 1000000 passes; a for with a number COUNT is unguarded.", |
| 6898 | "citations": [ |
| 6899 | { |
| 6900 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:63-64", |
| 6901 | "quote": "N 1..9223372036854775807 (a number or any integer const; IR mode: 1..1000000), default 1000000; past N iterations: trap 4" |
| 6902 | }, |
| 6903 | { |
| 6904 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:66-68", |
| 6905 | "quote": "With no bound a number count is not guarded and any other count traps 4 after 1000000 passes; with `bound N` any count traps 4 after N passes" |
| 6906 | } |
| 6907 | ], |
| 6908 | "example": "for_guard" |
| 6909 | }, |
| 6910 | "contracts": { |
| 6911 | "summary": "OM-2 contracts: requires, ensures and invariant clauses checked at run time (traps 9 and 10).", |
| 6912 | "details": "Compiler error 30 covers misplaced contracts, unavailable result and impure predicates.", |
| 6913 | "citations": [ |
| 6914 | { |
| 6915 | "ref": "omega-mv@6c562dd1 docs/one_layer/OMEGESE.md:1834", |
| 6916 | "quote": "Compiler error **30** means misplaced" |
| 6917 | } |
| 6918 | ], |
| 6919 | "example": "contracts" |
| 6920 | } |
| 6921 | }, |
| 6922 | "examples": { |
| 6923 | "hello": { |
| 6924 | "mode": "run", |
| 6925 | "exit": 0, |
| 6926 | "stdout": "hello\n" |
| 6927 | }, |
| 6928 | "ints": { |
| 6929 | "mode": "run", |
| 6930 | "exit": 61 |
| 6931 | }, |
| 6932 | "arith": { |
| 6933 | "mode": "run", |
| 6934 | "exit": 91 |
| 6935 | }, |
| 6936 | "control": { |
| 6937 | "mode": "run", |
| 6938 | "exit": 131 |
| 6939 | }, |
| 6940 | "for_guard": { |
| 6941 | "mode": "trap", |
| 6942 | "trap": 4 |
| 6943 | }, |
| 6944 | "arrays": { |
| 6945 | "mode": "run", |
| 6946 | "exit": 10 |
| 6947 | }, |
| 6948 | "calls": { |
| 6949 | "mode": "run", |
| 6950 | "exit": 55 |
| 6951 | }, |
| 6952 | "exit": { |
| 6953 | "mode": "run", |
| 6954 | "exit": 44 |
| 6955 | }, |
| 6956 | "trapword": { |
| 6957 | "mode": "trap", |
| 6958 | "trap": 4 |
| 6959 | }, |
| 6960 | "free_refused": { |
| 6961 | "mode": "error", |
| 6962 | "code": 9, |
| 6963 | "line": 3 |
| 6964 | }, |
| 6965 | "own_refused": { |
| 6966 | "mode": "error", |
| 6967 | "code": 9, |
| 6968 | "line": 3 |
| 6969 | }, |
| 6970 | "structs": { |
| 6971 | "mode": "run", |
| 6972 | "exit": 41 |
| 6973 | }, |
| 6974 | "floats": { |
| 6975 | "mode": "run", |
| 6976 | "exit": 11 |
| 6977 | }, |
| 6978 | "consts": { |
| 6979 | "mode": "run", |
| 6980 | "exit": 35 |
| 6981 | }, |
| 6982 | "om2_rotate": { |
| 6983 | "mode": "run", |
| 6984 | "exit": 3 |
| 6985 | }, |
| 6986 | "om2_unroll": { |
| 6987 | "mode": "run", |
| 6988 | "exit": 14 |
| 6989 | }, |
| 6990 | "om2_abstract": { |
| 6991 | "mode": "run", |
| 6992 | "exit": 5 |
| 6993 | }, |
| 6994 | "om2_fresh": { |
| 6995 | "mode": "run", |
| 6996 | "exit": 5 |
| 6997 | }, |
| 6998 | "om2_layout": { |
| 6999 | "mode": "run", |
| 7000 | "exit": 81 |
| 7001 | }, |
| 7002 | "om2_part": { |
| 7003 | "mode": "run", |
| 7004 | "exit": 55 |
| 7005 | }, |
| 7006 | "om2_out": { |
| 7007 | "mode": "run", |
| 7008 | "exit": 12 |
| 7009 | }, |
| 7010 | "om2_export": { |
| 7011 | "mode": "compile" |
| 7012 | }, |
| 7013 | "contracts": { |
| 7014 | "mode": "run", |
| 7015 | "exit": 0 |
| 7016 | }, |
| 7017 | "contract_fail": { |
| 7018 | "mode": "trap", |
| 7019 | "trap": 9 |
| 7020 | }, |
| 7021 | "files": { |
| 7022 | "mode": "run", |
| 7023 | "exit": 0 |
| 7024 | }, |
| 7025 | "dirs": { |
| 7026 | "mode": "run", |
| 7027 | "exit": 0 |
| 7028 | }, |
| 7029 | "procs": { |
| 7030 | "mode": "run", |
| 7031 | "exit": 0 |
| 7032 | }, |
| 7033 | "argsenv": { |
| 7034 | "mode": "run", |
| 7035 | "exit": 1 |
| 7036 | }, |
| 7037 | "argtrap": { |
| 7038 | "mode": "trap", |
| 7039 | "trap": 3 |
| 7040 | }, |
| 7041 | "clock": { |
| 7042 | "mode": "run", |
| 7043 | "exit": 0 |
| 7044 | }, |
| 7045 | "sockets": { |
| 7046 | "mode": "run", |
| 7047 | "exit": 0 |
| 7048 | }, |
| 7049 | "mapping": { |
| 7050 | "mode": "run", |
| 7051 | "exit": 0 |
| 7052 | }, |
| 7053 | "limits": { |
| 7054 | "mode": "run", |
| 7055 | "exit": 0 |
| 7056 | }, |
| 7057 | "sched": { |
| 7058 | "mode": "run", |
| 7059 | "exit": 0 |
| 7060 | }, |
| 7061 | "vfio": { |
| 7062 | "mode": "run", |
| 7063 | "exit": 0 |
| 7064 | }, |
| 7065 | "vfioirq_trap": { |
| 7066 | "mode": "trap", |
| 7067 | "trap": 3 |
| 7068 | }, |
| 7069 | "kfd": { |
| 7070 | "mode": "run", |
| 7071 | "exit": 0 |
| 7072 | }, |
| 7073 | "kfdmap_trap": { |
| 7074 | "mode": "trap", |
| 7075 | "trap": 3 |
| 7076 | }, |
| 7077 | "fma": { |
| 7078 | "mode": "run", |
| 7079 | "exit": 7 |
| 7080 | }, |
| 7081 | "e03": { |
| 7082 | "mode": "error", |
| 7083 | "code": 3, |
| 7084 | "line": 2 |
| 7085 | }, |
| 7086 | "e04": { |
| 7087 | "mode": "error", |
| 7088 | "code": 4, |
| 7089 | "line": 2 |
| 7090 | }, |
| 7091 | "e05": { |
| 7092 | "mode": "error", |
| 7093 | "code": 5, |
| 7094 | "line": 2 |
| 7095 | }, |
| 7096 | "e06": { |
| 7097 | "mode": "error", |
| 7098 | "code": 6, |
| 7099 | "line": 2 |
| 7100 | }, |
| 7101 | "e07": { |
| 7102 | "mode": "error", |
| 7103 | "code": 7, |
| 7104 | "line": 2 |
| 7105 | }, |
| 7106 | "e08": { |
| 7107 | "mode": "error", |
| 7108 | "code": 8, |
| 7109 | "line": 2 |
| 7110 | }, |
| 7111 | "e09": { |
| 7112 | "mode": "error", |
| 7113 | "code": 9, |
| 7114 | "line": 2 |
| 7115 | }, |
| 7116 | "e10": { |
| 7117 | "mode": "error", |
| 7118 | "code": 10, |
| 7119 | "line": 1 |
| 7120 | }, |
| 7121 | "e11": { |
| 7122 | "mode": "error", |
| 7123 | "code": 11, |
| 7124 | "line": 2 |
| 7125 | }, |
| 7126 | "e12": { |
| 7127 | "mode": "error", |
| 7128 | "code": 12, |
| 7129 | "line": 18 |
| 7130 | }, |
| 7131 | "e13": { |
| 7132 | "mode": "error", |
| 7133 | "code": 13, |
| 7134 | "line": 2 |
| 7135 | }, |
| 7136 | "e14": { |
| 7137 | "mode": "error", |
| 7138 | "code": 14, |
| 7139 | "line": 1 |
| 7140 | }, |
| 7141 | "e15": { |
| 7142 | "mode": "error", |
| 7143 | "code": 15, |
| 7144 | "line": 3 |
| 7145 | }, |
| 7146 | "e16": { |
| 7147 | "mode": "error", |
| 7148 | "code": 16, |
| 7149 | "line": 1 |
| 7150 | }, |
| 7151 | "e17": { |
| 7152 | "mode": "error", |
| 7153 | "code": 17, |
| 7154 | "line": 3 |
| 7155 | }, |
| 7156 | "e18": { |
| 7157 | "mode": "error", |
| 7158 | "code": 18, |
| 7159 | "line": 3 |
| 7160 | }, |
| 7161 | "e19": { |
| 7162 | "mode": "error", |
| 7163 | "code": 19, |
| 7164 | "line": 5 |
| 7165 | }, |
| 7166 | "e20": { |
| 7167 | "mode": "error", |
| 7168 | "code": 20, |
| 7169 | "line": 3 |
| 7170 | }, |
| 7171 | "e21": { |
| 7172 | "mode": "error", |
| 7173 | "code": 21, |
| 7174 | "line": 3 |
| 7175 | }, |
| 7176 | "e22": { |
| 7177 | "mode": "error", |
| 7178 | "code": 22, |
| 7179 | "line": 1 |
| 7180 | }, |
| 7181 | "e23": { |
| 7182 | "mode": "error", |
| 7183 | "code": 23, |
| 7184 | "line": 2 |
| 7185 | }, |
| 7186 | "e25": { |
| 7187 | "mode": "error", |
| 7188 | "code": 25, |
| 7189 | "line": 1 |
| 7190 | }, |
| 7191 | "e27": { |
| 7192 | "mode": "error", |
| 7193 | "code": 27, |
| 7194 | "line": 3 |
| 7195 | }, |
| 7196 | "e28": { |
| 7197 | "mode": "error", |
| 7198 | "code": 28, |
| 7199 | "line": 4 |
| 7200 | }, |
| 7201 | "e29": { |
| 7202 | "mode": "error", |
| 7203 | "code": 29, |
| 7204 | "line": 3 |
| 7205 | }, |
| 7206 | "e30": { |
| 7207 | "mode": "error", |
| 7208 | "code": 30, |
| 7209 | "line": 3 |
| 7210 | }, |
| 7211 | "t01": { |
| 7212 | "mode": "trap", |
| 7213 | "trap": 1 |
| 7214 | }, |
| 7215 | "t02": { |
| 7216 | "mode": "trap", |
| 7217 | "trap": 2 |
| 7218 | }, |
| 7219 | "t03": { |
| 7220 | "mode": "trap", |
| 7221 | "trap": 3 |
| 7222 | }, |
| 7223 | "t04": { |
| 7224 | "mode": "trap", |
| 7225 | "trap": 4 |
| 7226 | }, |
| 7227 | "t05": { |
| 7228 | "mode": "trap", |
| 7229 | "trap": 5 |
| 7230 | }, |
| 7231 | "t06": { |
| 7232 | "mode": "trap", |
| 7233 | "trap": 6 |
| 7234 | }, |
| 7235 | "t07": { |
| 7236 | "mode": "trap", |
| 7237 | "trap": 7 |
| 7238 | }, |
| 7239 | "t08": { |
| 7240 | "mode": "trap", |
| 7241 | "trap": 8 |
| 7242 | }, |
| 7243 | "t11": { |
| 7244 | "mode": "trap", |
| 7245 | "trap": 11 |
| 7246 | }, |
| 7247 | "t12": { |
| 7248 | "mode": "trap", |
| 7249 | "trap": 12 |
| 7250 | }, |
| 7251 | "t13": { |
| 7252 | "mode": "trap", |
| 7253 | "trap": 13 |
| 7254 | }, |
| 7255 | "t14": { |
| 7256 | "mode": "trap", |
| 7257 | "trap": 14 |
| 7258 | }, |
| 7259 | "t10": { |
| 7260 | "mode": "trap", |
| 7261 | "trap": 10 |
| 7262 | }, |
| 7263 | "cpu_order": { |
| 7264 | "mode": "run", |
| 7265 | "exit": 5 |
| 7266 | }, |
| 7267 | "qty": { |
| 7268 | "mode": "run", |
| 7269 | "exit": 42 |
| 7270 | }, |
| 7271 | "secrets": { |
| 7272 | "mode": "run", |
| 7273 | "exit": 10 |
| 7274 | }, |
| 7275 | "peername": { |
| 7276 | "mode": "run", |
| 7277 | "exit": 9 |
| 7278 | }, |
| 7279 | "pools": { |
| 7280 | "mode": "run", |
| 7281 | "exit": 42, |
| 7282 | "stdout": "" |
| 7283 | } |
| 7284 | } |
| 7285 | } |