diff --git a/.crumb b/.crumb index b85a10e..c73332b 100644 --- a/.crumb +++ b/.crumb @@ -3,17 +3,17 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-11-04T22:50:56Z", + "compiled_at": "2026-11-06T14:46:12Z", "compiler": "crumb-compile/1", - "digest": "sha256:f26a4f8b7272916809e201e5756be2912fb08cc3e7cad2cdb6e7911a17d88ba0", + "digest": "sha256:1d8d334d1f3907fa2e27034be39d2770deb4b887f565aace1a6526fcd561c57b", "evidence_files": 3, - "evidence_root": "sha256:66b5f8dd905a61d5c92cdfcd3a82460ea637719b3b226c7c7158ec43cf3bf49c", - "files": 97, - "generated_at_commit": "8032f190e2b12961ba9653105c0ea0af4ba24f8f", - "source_tree": "sha256:3e91c684bb11999d9a3c3c0d15888c4b1faf199f80b9dac2447667486f3303ca" + "evidence_root": "sha256:8cde18e61a5aace08cfdc5e41b88638624340664a8e4d011d8001af0f5deca67", + "files": 98, + "generated_at_commit": "32e4f184ce01805a1afd279eccc65907d7bfed02", + "source_tree": "sha256:65b40bce104de0abad42c8dd436bb864516d0bf6c0b21eab2f5c82e991a6cb10" }, "pin": { - "omega_mv": "aien-dev/omega-mv@e5b32567a7aff3ce594e3254a622a846a6cd190b" + "omega_mv": "aien-dev/omega-mv@f4df82394e35893dcf1354dda69a2fe028d94bc1" } }, "invariants": [ @@ -25,6 +25,6 @@ ], "layer": "tooling", "name": "omega-mcp", - "purpose": "MCP stdio server written in Omega (src/*.om, built by build.sh with the seeded omc pinned at sha256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f): tools compile and run .om in a per-call bwrap+prlimit sandbox, explain_error and lookup answer from data/ checked against omega-mv@e5b32567; gates/ holds the smoke session and the trust-boundary gate, evidence/ their recorded results.", + "purpose": "MCP stdio server written in Omega (src/*.om, built by build.sh with the seeded omc pinned at sha256 3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194): tools compile and run .om in a per-call bwrap+prlimit sandbox, explain_error and lookup answer from data/ checked against omega-mv@f4df8239; gates/ holds the smoke session and the trust-boundary gate, evidence/ their recorded results.", "schema_version": "1.0.0" } diff --git a/.github/workflows/gates.yml b/.github/workflows/gates.yml index d6a8304..e354634 100644 --- a/.github/workflows/gates.yml +++ b/.github/workflows/gates.yml @@ -1,4 +1,4 @@ -# Gates: build omega-mcp with the pinned compiler (omega-mv e5b32567, omc sha256 2c824805..., +# Gates: build omega-mcp with the pinned compiler (omega-mv f4df8239, omc sha256 3ad9f10f..., # born from the seed on this runner and checked by build.sh) and run the three gates from the # README: smoke.py, trust.py and check-reference.py --self-test. # Host evidence on a GitHub arm64 runner, not a qualification of any other kernel or sandbox. @@ -25,10 +25,10 @@ jobs: sudo apt-get install -y -q bubblewrap util-linux sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 bwrap --version; prlimit --version | head -1 - - name: pinned omc from the seed (omega-mv e5b32567) + - name: pinned omc from the seed (omega-mv f4df8239) run: | git clone --quiet --filter=blob:none https://github.com/aien-dev/omega-mv.git ../omega-mv - git -C ../omega-mv checkout --quiet --detach e5b32567a7aff3ce594e3254a622a846a6cd190b + git -C ../omega-mv checkout --quiet --detach f4df82394e35893dcf1354dda69a2fe028d94bc1 cd ../omega-mv && sh seed/omega-from-seed.sh sha256sum seed/out/omc - name: build diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index dbc2e8b..7e5aef3 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -1,16 +1,16 @@ # Dependencies The server is first-party Omega (`src/*.om`, plus `vendor/omega-mv/` copied unchanged from -omega-mv@e5b32567). Everything below is a host tool. Versions are the ones the recorded evidence ran +omega-mv@f4df8239). Everything below is a host tool. Versions are the ones the recorded evidence ran with on Linux arm64 (Ubuntu 24.04 packages). ## Runtime (the server executes these) | Tool | Version | What it does for us | Omega replacement | |---|---|---|---| -| `/usr/bin/bwrap` | bubblewrap 0.9.0 (deb 0.9.0-1ubuntu0.3) | Builds the per-call sandbox: new user, mount, pid, net, ipc, uts and cgroup namespaces, cleared environment, read-only binds of the compiler or program and the reaper, a 16 MiB tmpfs working directory | A first-party Omega sandbox launcher using `clone`/`unshare`, `mount` and `pivot_root` host words, once omega-mv exposes namespace and mount words (not present at e5b32567) | +| `/usr/bin/bwrap` | bubblewrap 0.9.0 (deb 0.9.0-1ubuntu0.3) | Builds the per-call sandbox: new user, mount, pid, net, ipc, uts and cgroup namespaces, cleared environment, read-only binds of the compiler or program and the reaper, a 16 MiB tmpfs working directory | A first-party Omega sandbox launcher using `clone`/`unshare`, `mount` and `pivot_root` host words, once omega-mv exposes namespace and mount words (not present at f4df8239) | | `/usr/bin/prlimit` | util-linux 2.39.3 (deb 2.39.3-9ubuntu6.6) | Applies RLIMIT_CPU, AS, FSIZE, NPROC, NOFILE and CORE to the sandbox's pid before it is released | A `setrlimit`/`prlimit64` host word in omega-mv, after which the reaper sets its own limits | -| omc (pinned) | sha256 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`, omega-mv e5b32567 | The compiler the `compile` and `run` tools invoke | none needed: it is the Omega compiler | +| omc (pinned) | sha256 `3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194`, omega-mv f4df8239 | The compiler the `compile` and `run` tools invoke | none needed: it is the Omega compiler | ## Build diff --git a/NOTICE b/NOTICE index efe52ed..181680a 100644 --- a/NOTICE +++ b/NOTICE @@ -2,5 +2,5 @@ omega-mcp Copyright 2026 AIEN (aien-dev) This product includes software from omega-mv (https://github.com/aien-dev/omega-mv), commit -e5b32567a7aff3ce594e3254a622a846a6cd190b, copied unchanged under vendor/omega-mv/: +f4df82394e35893dcf1354dda69a2fe028d94bc1, copied unchanged under vendor/omega-mv/: om/sha256/sha256-om2.om, seed/json/json.om, seed/json/jsonw.om diff --git a/README.md b/README.md index 2c55bc4..77ff019 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ An MCP server, written in Omega, that lets an agent compile and run Omega (`.om` pinned seeded compiler and look up the language. It speaks MCP (protocol version `2025-06-18`) as newline-delimited JSON-RPC 2.0 over stdio. -Pin: omega-mv `e5b32567a7aff3ce594e3254a622a846a6cd190b`, omc sha256 -`2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`. `build.sh` refuses any other +Pin: omega-mv `f4df82394e35893dcf1354dda69a2fe028d94bc1`, omc sha256 +`3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194`. `build.sh` refuses any other compiler, and the server checks the sha256 of its compiler again at start-up. ## Tools @@ -16,7 +16,7 @@ compiler, and the server checks the sha256 of its compiler again at start-up. |---|---|---| | `compile` | `source` | `ok`, binary size and sha256, or the compile error `{line, code, meaning, fix}` | | `run` | `source`, `stdin`, `timeout_ms` (1..30000, default 5000) | compile result, capped stdout/stderr, and the exit: `normal`, `trap` (with its meaning), or the `limit` that stopped it (`cpu_time`, `file_size`, `wall_clock`, `killed`) | -| `explain_error` | `query`: an error code 1..30, an `omc: line N: error K` line, `trap T`, or an exit status 101..114 | meaning, cause, fix, a minimal example and citations into omega-mv@e5b32567 | +| `explain_error` | `query`: an error code 1..30, an `omc: line N: error K` line, `trap T`, or an exit status 101..114 | meaning, cause, fix, a minimal example and citations into omega-mv@f4df8239 | | `lookup` | `query`: a keyword or topic, or a substring | the entry (form, arity, types, result, example, citations), or up to 20 search hits | A compile diagnostic is a successful tool result (`isError: false`); `isError` is true when nothing @@ -27,9 +27,13 @@ arguments are JSON-RPC errors (`-32602`). Each `compile` and `run` stage gets a fresh `/tmp/omega-mcp-<16 hex>` directory (mode 0700, removed after the reply) and runs under `bwrap --unshare-all --clearenv`. The sandbox sees only the compiler -or the program (read-only), its in-sandbox reaper and a 16 MiB tmpfs working directory: no network, -no host files, an empty environment. `prlimit` applies the resource limits to the sandbox before it -starts, and the server kills the whole sandbox at the wall clock. +or the program (read-only), its in-sandbox reaper, the stage's own stdin file (`/i`, read-only) and +stdout/stderr files (`/o`, `/e`), and a 16 MiB tmpfs working directory: no network, no other host +files, an empty environment. `prlimit` applies the resource limits to the sandbox before it starts, +and the server kills the whole sandbox at the wall clock. Since omega-mv #970, `execprog` closes +every descriptor at or above 3, so bwrap gets its block, info and status pipes on fds 0..2 and the +reaper opens the bound stage files onto fds 0..2 of the program; the program holds no other +descriptor. | Stage | CPU | Address space | File size | Processes | Wall clock | |---|---|---|---|---|---| @@ -42,7 +46,7 @@ off and exists only so the trust gate can prove it detects an escape; never give ## Build and use ```sh -OMEGA_SRC=/path/to/omega-mv ./build.sh # omega-mv checkout at e5b32567 with seed/out/omc built +OMEGA_SRC=/path/to/omega-mv ./build.sh # omega-mv checkout at f4df8239 with seed/out/omc built build/omega-mcp # reads JSON-RPC on stdin; logs one line per request on stderr ``` @@ -73,7 +77,7 @@ on a GitHub-hosted Ubuntu 24.04 arm64 runner with the compiler born from the see ## Layout - `src/*.om`: the server (`src/UNITS` lists the concatenation order; `build.sh` builds it) -- `vendor/omega-mv/`: sha256 and JSON units copied unchanged from omega-mv@e5b32567 +- `vendor/omega-mv/`: sha256 and JSON units copied unchanged from omega-mv@f4df8239 - `data/`: reference data and example programs, written by `tools/gen-reference.py` and checked by `tools/check-reference.py` - `gates/`, `evidence/`: verification oracles and their recorded results diff --git a/build.sh b/build.sh index 3146766..c79d6ef 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ # then the server units. The leading `om2` line opts the whole unit into profile OM-2. set -eu cd "$(dirname "$0")" -PIN=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f +PIN=3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194 OMC=${OMC:-${OMEGA_SRC:-../omega-mv}/seed/out/omc} got=$(sha256sum "$OMC" | cut -d' ' -f1) if [ "$got" != "$PIN" ]; then diff --git a/data/examples/cpu_order.om b/data/examples/cpu_order.om new file mode 100644 index 0000000..01c46d6 --- /dev/null +++ b/data/examples/cpu_order.om @@ -0,0 +1,6 @@ +note cpufence: publication barrier (AArch64 DSB SY); cpurelax: spin-wait hint (YIELD); no operands, no value +fn main to int +cpufence +cpurelax +ret 5 +end diff --git a/data/examples/e25.om b/data/examples/e25.om new file mode 100644 index 0000000..3dfdc37 --- /dev/null +++ b/data/examples/e25.om @@ -0,0 +1,4 @@ +target x86efi +fn f to int +ret 0 +end diff --git a/data/examples/peername.om b/data/examples/peername.om new file mode 100644 index 0000000..cd894af --- /dev/null +++ b/data/examples/peername.om @@ -0,0 +1,5 @@ +note peername on a descriptor that is not open gives minus EBADF (9) +fn main to int +x = new uchar 16 0 +ret int neg peername 99 x 0 16 +end diff --git a/data/examples/procs.om b/data/examples/procs.om index ee56272..0837540 100644 --- a/data/examples/procs.om +++ b/data/examples/procs.om @@ -28,5 +28,6 @@ put x 2 2 put x 4 47 put x 5 120 ck eq execprog x 0 6 neg long 2 +ck eq execpure x 0 6 neg long 2 ret 0 end diff --git a/data/examples/qty.om b/data/examples/qty.om new file mode 100644 index 0000000..936f4b3 --- /dev/null +++ b/data/examples/qty.om @@ -0,0 +1,6 @@ +note a qty is an unsigned quantity whose add/sub/mul trap 1 instead of wrapping; convert with qty w and ulong q +fn main to int +q = qty 40 +r = add q 2 +ret int ulong r +end diff --git a/data/examples/secrets.om b/data/examples/secrets.om new file mode 100644 index 0000000..d3288b3 --- /dev/null +++ b/data/examples/secrets.om @@ -0,0 +1,8 @@ +om2 +note dit sets PSTATE.DIT and gives the old bit; scrub zeroes dead stack and registers and gives 0 (OM-2, program mode) +fn main to int +old = dit 1 +z = scrub 64 +was = dit 0 +ret int add add mul 10 was z mul 100 old +end diff --git a/data/reference.json b/data/reference.json index df8c1be..9133190 100644 --- a/data/reference.json +++ b/data/reference.json @@ -1,13 +1,13 @@ { "pin": { - "omega_mv": "e5b32567a7aff3ce594e3254a622a846a6cd190b", - "omc_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + "omega_mv": "f4df82394e35893dcf1354dda69a2fe028d94bc1", + "omc_sha256": "3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194" }, "tools": [ { "name": "compile", "title": "Compile Omega source", - "description": "Compile Omega (.om) source with the pinned seeded compiler omc (omega-mv@e5b32567). Returns ok, the binary's size and sha256, or the compile error {line, code, meaning, fix}.", + "description": "Compile Omega (.om) source with the pinned seeded compiler omc (omega-mv@f4df8239). Returns ok, the binary's size and sha256, or the compile error {line, code, meaning, fix}.", "inputSchema": { "type": "object", "properties": { @@ -74,7 +74,7 @@ { "name": "lookup", "title": "Look up an Omega word or topic", - "description": "Look up any Omega keyword (all 177 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).", + "description": "Look up any Omega keyword (all 184 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).", "inputSchema": { "type": "object", "properties": { @@ -99,12 +99,16 @@ "fix": "Give omc a readable source file on stdin.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:12005", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:14097", "quote": "fail 1" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": null, @@ -116,12 +120,16 @@ "fix": "Write omc's stdout to a regular file with space.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:8166", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:10024", "quote": "fail 2" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": null, @@ -133,20 +141,20 @@ "fix": "Declare the name first, or fix its spelling.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2104", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:2281", "quote": "fail 3" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:514", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:574", "quote": "An unknown field is error 3." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e03" @@ -157,20 +165,20 @@ "fix": "Supply the missing operand (see the word's form).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2743", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:3360", "quote": "fail 4" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:503", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:563", "quote": "error 4 if the line ends before `end`" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e04" @@ -181,20 +189,20 @@ "fix": "Remove the extra words or split the line.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2785", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:3405", "quote": "fail 5" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:938", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1157", "quote": "trailing words (error 5)" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e05" @@ -205,20 +213,20 @@ "fix": "Write a plain decimal (or OM-2 lowercase 0x hex) number.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1504", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1653", "quote": "fail 6" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:445", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:495", "quote": "more than 20 digits, or a character that is not a digit, is error 6" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e06" @@ -229,20 +237,20 @@ "fix": "Convert explicitly with a type word, e.g. `add int a int b`.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2077", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:2254", "quote": "fail 7" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:440-441", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:491", "quote": "or the line is refused (error 7)." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e07" @@ -253,20 +261,20 @@ "fix": "Use a value inside the type's range or a wider type.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1815", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1970", "quote": "fail 8" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:443-444", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:493", "quote": "it must be a" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e08" @@ -277,20 +285,20 @@ "fix": "Move the statement to a valid position or use the documented alternative.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2686", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:3303", "quote": "fail 9" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:61", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:70", "quote": "outside a loop: error 9." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e09" @@ -301,20 +309,20 @@ "fix": "Choose a new name.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2369", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:2891", "quote": "fail 10" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:424-425", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:470", "quote": "A new name" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e10" @@ -325,20 +333,20 @@ "fix": "Prefix it with a type word, e.g. `x = int 5`.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2609", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:3199", "quote": "fail 11" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:442", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:492", "quote": "A bare number takes the type the place needs." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e11" @@ -349,20 +357,20 @@ "fix": "Split the function or reuse names so fewer values are live.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2410", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:2933", "quote": "fail 12" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:492", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:546", "quote": "A function that needs more than the 16 registers it hands out is error 12." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e12" @@ -373,20 +381,20 @@ "fix": "Shorten the name to at most 8 characters.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2089", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:2266", "quote": "fail 13" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:423", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:467", "quote": "Function names may have up to 63 characters; other names up to 8 (error 13)." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e13" @@ -397,20 +405,20 @@ "fix": "Reduce the count below the documented capacity.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:524", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:579", "quote": "fail 14" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:490", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:544", "quote": "Input over a capacity is refused with error 14, never overrun" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e14" @@ -421,20 +429,20 @@ "fix": "Add the missing `end`.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:6671", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:8451", "quote": "fail 15" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:944", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1163", "quote": "Missing function `end` is error 15." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e15" @@ -445,20 +453,20 @@ "fix": "Check the word's spelling and form with lookup.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:746", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:820", "quote": "fail 16" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:453", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:503", "quote": "a pool written without its length is refused (error 16)" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e16" @@ -469,20 +477,20 @@ "fix": "Delete the unreachable line or move it before the path end.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:6405", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:10302", "quote": "fail 17" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:61-62", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:71", "quote": "(a later line in the same block is error 17)" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e17" @@ -493,20 +501,20 @@ "fix": "Add a ret on every path (or make the function void).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:7609", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:9454", "quote": "fail 18" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:421", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:465", "quote": "A function with a return type whose `end` can be reached is error 18." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e18" @@ -517,20 +525,20 @@ "fix": "Copy the global into a local array (new) or pass distinct arrays.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:3772", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:5107", "quote": "fail 19" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:467-468", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:519", "quote": "A global is" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e19" @@ -541,20 +549,20 @@ "fix": "Write into a local, global or edit array instead.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:3777", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:5112", "quote": "fail 20" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:465", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:517", "quote": "A view is read-only; `put`, `read` into it, or passing it as edit is error 20." }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e20" @@ -565,20 +573,20 @@ "fix": "Use an index below the length.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:3687", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:5022", "quote": "fail 21" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:472", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:524", "quote": "A number index must be inside A when om4 reads it (error 21)" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e21" @@ -589,20 +597,20 @@ "fix": "Use only \\n \\t \\\\ \\\" escapes and close the quote.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:627", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:701", "quote": "fail 22" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:458-459", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:508", "quote": "any other escape, or a quote missing its end," }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e22" @@ -613,61 +621,93 @@ "fix": "Use a smaller array.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2696", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:3313", "quote": "fail 23" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:461", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:513", "quote": "at most 4 MiB of local arrays (error 23)" }, { - "ref": "omega-mv@e5b32567 seed/omc/gate15.sh:85", - "quote": "codes 3..23; 1 and 2 are compiler I/O" + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e23" }, "24": { "meaning": "branch displacement out of range", - "cause": "A conditional branch target is misaligned or more than 2^18 words away.", - "fix": "Split very large functions or programs; this is reached only by programs with about 1 MiB of code between a branch and its target.", + "cause": "A branch target is misaligned or out of reach: B.cond, CBZ and CBNZ reach 2^18 words, B and BL 2^25.", + "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2468", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:2999", "quote": "fail 24" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:2463-2464", - "quote": "else error 24 before any artifact is accepted" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:425", + "quote": "refused with error 24 before any output is accepted" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": null, "example_note": "No minimal example: it needs about 1 MiB of machine code between a branch and its target." }, + "25": { + "meaning": "not available on this target", + "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.", + "fix": "Use the default AArch64 target for that construct, or write it with words the target supports.", + "citations": [ + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:595", + "quote": "fail 25" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", + "quote": "fn fail code ulong to void" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:443-444", + "quote": "a bare unit is refused at line 1 with error 25" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" + } + ], + "example": "e25" + }, "27": { "meaning": "fresh element read before write (OM-2 init)", "cause": "A fresh parameter element is read before it is definitely written, or the array is passed on.", "fix": "Write every element before reading it (put with a number index).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:9622", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:11537", "quote": "fail 27" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:720", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:785", "quote": "else error 27, `obligation=init`, on the get line" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e27" @@ -678,16 +718,20 @@ "fix": "Seal only inside the function named NAME followed by mk.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:9187", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:11180", "quote": "fail 28" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:729-730", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:794", "quote": "a `seal` anywhere else is" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e28" @@ -698,16 +742,20 @@ "fix": "Keep every field inside SIZE and non-overlapping.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:9747", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:11695", "quote": "fail 29" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:706", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:771", "quote": "SIZE outside 1..4096 or a `layout` after the first `fn` is error 29" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e29" @@ -718,16 +766,20 @@ "fix": "Put contracts first in the function or loop body and use only pure integer/bool operations.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:3894", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:5251", "quote": "fail 30" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1177-1178", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1479", "quote": "Compiler error **30** means misplaced" + }, + { + "ref": "omega-mv@f4df8239 seed/omc/gate15.sh:154", + "quote": "refusal cases (codes 1..25, 27..30; 24 with its accept side)" } ], "example": "e30" @@ -741,11 +793,11 @@ "fix": "Use a wider type, check the range first, or use an unsigned type if wrapping is intended.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "Signed add, sub, mul, neg, div and shl trap 1" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -758,11 +810,11 @@ "fix": "Check the divisor before dividing.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:435", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:485", "quote": "div and rem trap 2 when the divisor is 0." }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -775,11 +827,11 @@ "fix": "Check the index against len A, or fix off/n.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:473", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:525", "quote": "traps 3 when it is not below the length" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -788,19 +840,19 @@ "4": { "name": "LOOP_BOUND", "meaning": "loop exceeded its bound", - "cause": "A while ran more than its bound (default 1000000) iterations, or a for whose count is not a number ran 1000000 passes.", - "fix": "Fix the loop condition, raise a while's bound N (at most 999999), or for more passes use a number count or nest two loops.", + "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.", + "fix": "Fix the loop condition or give the loop a larger `bound N` (up to 9223372036854775807).", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:58", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:64", "quote": "past N iterations: trap 4" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:60", - "quote": "(any other count: trap 4 after 1000000 passes, as a while with no bound)" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:66-68", + "quote": "With no bound a number count is not guarded and any other count traps 4 after 1000000 passes" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -813,11 +865,11 @@ "fix": "Check the range before converting, or convert to a wider type.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -830,11 +882,11 @@ "fix": "Bound the recursion or use a loop / smaller local arrays.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:426-427", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:472", "quote": "a call or a local array that would go below it traps" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -847,11 +899,11 @@ "fix": "Check the amount against the width.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:437", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:487", "quote": "A shift amount outside 0 .. width - 1 traps 7" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -864,11 +916,11 @@ "fix": "Find the explicit trap 8 in the program.", "citations": [ { - "ref": "omega-mv@e5b32567 src/compiler/osc_ir.h:176", + "ref": "omega-mv@f4df8239 src/compiler/osc_ir.h:176", "quote": "OSC_TRAP_RUNTIME = 8" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -881,11 +933,11 @@ "fix": "Call the function only with arguments that satisfy its requires clauses.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1173", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1475", "quote": "False `requires` uses existing trap **9** (program exit **109**)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -898,11 +950,11 @@ "fix": "Fix the function body or loop so the stated property holds.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1174", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1476", "quote": "`ensures` or `invariant` uses existing trap **10** (exit **110**)." }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -915,11 +967,11 @@ "fix": "Find the explicit trap 11 in the program.", "citations": [ { - "ref": "omega-mv@e5b32567 src/compiler/osc_ir.h:183", + "ref": "omega-mv@f4df8239 src/compiler/osc_ir.h:183", "quote": "OSC_TRAP_ARENA_FULL = 11" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -932,11 +984,11 @@ "fix": "Find the explicit trap 12 in the program.", "citations": [ { - "ref": "omega-mv@e5b32567 src/compiler/osc_ir.h:185", + "ref": "omega-mv@f4df8239 src/compiler/osc_ir.h:185", "quote": "OSC_TRAP_STALE = 12" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -949,11 +1001,11 @@ "fix": "Find the explicit trap 13 in the program.", "citations": [ { - "ref": "omega-mv@e5b32567 src/compiler/osc_ir.h:186", + "ref": "omega-mv@f4df8239 src/compiler/osc_ir.h:186", "quote": "OSC_TRAP_POOL_FULL = 13" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -966,11 +1018,11 @@ "fix": "Find the explicit trap 14 in the program.", "citations": [ { - "ref": "omega-mv@e5b32567 src/compiler/osc_ir.h:187", + "ref": "omega-mv@f4df8239 src/compiler/osc_ir.h:187", "quote": "OSC_TRAP_RETIRED = 14" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "A trap in program mode ends the program with exit status 100 + the trap code" } ], @@ -996,15 +1048,15 @@ "summary": "Open a length-delimited path relative to the current directory; return the descriptor. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1204-1205", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1285-1286", "quote": "ret 110" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:790", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:941", "quote": "`fopen A off n flags mode`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1024,15 +1076,15 @@ "summary": "Close a descriptor. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1174-1175", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1255-1256", "quote": "ret 100" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:791", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:942", "quote": "`fclose fd`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1052,15 +1104,15 @@ "summary": "Sync file data and metadata. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1177-1178", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1258-1259", "quote": "ret 101" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:792", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:943", "quote": "`fsync fd`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1080,15 +1132,15 @@ "summary": "Sync file data only (fdatasync). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:850-851", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:931-932", "quote": "ret 156" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:793", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:944", "quote": "`fdsync fd`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1111,15 +1163,15 @@ "summary": "Create an anonymous in-memory file (memfd_create); return its descriptor. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:853-854", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:934-935", "quote": "ret 157" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:794", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:945", "quote": "`memfd A off n flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1140,15 +1192,15 @@ "summary": "Set permissions on an open descriptor. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1180-1181", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1261-1262", "quote": "ret 102" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:795", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:946", "quote": "`fchmod fd mode`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1171,15 +1223,15 @@ "summary": "Set permissions on a checked path (fchmodat, flags 0). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:811-812", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:892-893", "quote": "ret 143" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:796", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:947", "quote": "`chmod A off n mode`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1203,15 +1255,15 @@ "summary": "Set ownership on a checked path (fchownat, flags 0). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:835-836", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:916-917", "quote": "ret 151" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:797", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:948", "quote": "`chown A off n uid gid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1234,15 +1286,15 @@ "summary": "Check access to a checked path (faccessat): mode 0/1/2/4. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:814-815", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:895-896", "quote": "ret 144" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:798", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:949", "quote": "`faccess A off n mode`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1260,15 +1312,15 @@ "summary": "Real user id of the process. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:817-818", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:898-899", "quote": "ret 145" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:799", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:950", "quote": "`getuid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1286,15 +1338,15 @@ "summary": "Effective user id of the process. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:820-821", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:901-902", "quote": "ret 146" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:799", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:950", "quote": "`geteuid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1312,15 +1364,15 @@ "summary": "Real group id of the process. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:823-824", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:904-905", "quote": "ret 147" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:799", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:950", "quote": "`getgid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1338,15 +1390,15 @@ "summary": "Effective group id of the process. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:826-827", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:907-908", "quote": "ret 148" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:799", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:950", "quote": "`getegid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1366,15 +1418,15 @@ "summary": "Change the working directory to an open directory descriptor. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:841-842", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:922-923", "quote": "ret 153" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:800", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:951", "quote": "`fchdir fd`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1392,15 +1444,15 @@ "summary": "Parent process id. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:844-845", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:925-926", "quote": "ret 154" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:801", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:952", "quote": "`getppid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1418,15 +1470,15 @@ "summary": "Create a session and become its leader. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:856-857", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:937-938", "quote": "ret 158" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:802", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:953", "quote": "`setsid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1446,15 +1498,15 @@ "summary": "Process group id of pid (0 = self). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:859-860", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:940-941", "quote": "ret 159" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:803", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:954", "quote": "`getpgid pid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1474,15 +1526,15 @@ "summary": "Session id of pid (0 = self). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:871-872", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:952-953", "quote": "ret 163" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:804", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:955", "quote": "`getsid pid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1502,15 +1554,15 @@ "summary": "Sync the filesystem containing an open descriptor. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:874-875", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:955-956", "quote": "ret 164" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:805", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:956", "quote": "`syncfs fd`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1531,15 +1583,15 @@ "summary": "Shut down part of a connected socket (how 0 read, 1 write, 2 both). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:877-878", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:958-959", "quote": "ret 165" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:806", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:957", "quote": "`shutdown fd how`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1560,15 +1612,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:916-917", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:997-998", "quote": "ret 197" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:807", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:958", "quote": "`flock fd op`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1589,15 +1641,15 @@ "summary": "Set a process's group (0 = self/own pid). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:862-863", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:943-944", "quote": "ret 160" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:808", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:959", "quote": "`setpgid pid pgid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1617,15 +1669,15 @@ "summary": "Set the file-mode mask; return the previous mask. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:847-848", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:928-929", "quote": "ret 155" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:809", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:960", "quote": "`umask mask`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1647,15 +1699,15 @@ "summary": "Seek; return the resulting file offset. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1183-1184", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1264-1265", "quote": "ret 103" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:810", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:961", "quote": "`fseek fd offset whence`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1676,15 +1728,15 @@ "summary": "Set an open descriptor's length (ftruncate). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:799-800", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:880-881", "quote": "ret 139" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:811", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:962", "quote": "`ftrunc fd length`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1707,15 +1759,15 @@ "summary": "Set a checked path's length (truncate). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:832-833", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:913-914", "quote": "ret 150" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:812", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:963", "quote": "`truncate A off n length`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1737,15 +1789,15 @@ "summary": "Remove the named file. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1207-1208", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1288-1289", "quote": "ret 111" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:813", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:964", "quote": "`unlink A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1768,15 +1820,15 @@ "summary": "Create a directory. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1210-1211", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1291-1292", "quote": "ret 112" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:814", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:965", "quote": "`makedir A off n mode`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1798,15 +1850,15 @@ "summary": "Remove an empty directory. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1129-1130", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1210-1211", "quote": "ret 126" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:815", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:966", "quote": "`rmdir A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1828,15 +1880,15 @@ "summary": "Write the current directory into writable bytes; the count includes the trailing zero. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:766-767", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:847-848", "quote": "ret 132" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:816", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:967", "quote": "`cwd A off capacity`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1858,15 +1910,15 @@ "summary": "Change the working directory to a checked, nonempty path. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:796-797", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:877-878", "quote": "ret 138" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:817", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:968", "quote": "`chdir A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1891,15 +1943,15 @@ "summary": "Read a symbolic link into writable output bytes; no zero byte is appended. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:775-776", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:856-857", "quote": "ret 133" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:818", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:969", "quote": "`readlnk PATH off n OUT off capacity`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1922,15 +1974,15 @@ "summary": "Write raw Linux getdents64 records; return bytes written. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1144-1145", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1225-1226", "quote": "ret 113" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:819", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:970", "quote": "`getdnts fd A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1953,15 +2005,15 @@ "summary": "Write the 128-byte Linux ARM64 stat structure of an open descriptor. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1156-1157", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1237-1238", "quote": "ret 117" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:820", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:971", "quote": "`fstat fd A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -1986,15 +2038,15 @@ "summary": "Metadata for a checked path (newfstatat) into a 128-byte ARM64 stat structure. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:802-803", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:883-884", "quote": "ret 140" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:821", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:972", "quote": "`stat A off n B off capacity`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2019,15 +2071,15 @@ "summary": "As stat, without following a final symbolic link. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:829-830", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:910-911", "quote": "ret 149" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:822", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:973", "quote": "`lstat A off n B off capacity`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2050,15 +2102,15 @@ "summary": "Rename the two paths of a packed list (renameat2); flag 1 refuses replacement. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1126-1127", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1207-1208", "quote": "ret 125" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:823", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:974", "quote": "`renames A off n flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2080,15 +2132,15 @@ "summary": "Create a hard link from a packed two-path list (old, new). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:805-806", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:886-887", "quote": "ret 141" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:824", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:975", "quote": "`link A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2110,15 +2162,15 @@ "summary": "Create a symbolic link from a packed two-path list (target text, link path). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:808-809", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:889-890", "quote": "ret 142" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:825", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:976", "quote": "`symlnk A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2136,15 +2188,15 @@ "summary": "Monotonic nanoseconds, for elapsed-time measurement. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1201-1202", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1282-1283", "quote": "ret 109" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:826", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:977", "quote": "`monons`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2162,15 +2214,15 @@ "summary": "Realtime nanoseconds since the Unix epoch. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1120-1121", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1201-1202", "quote": "ret 130" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:827", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:978", "quote": "`realns`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2190,15 +2242,15 @@ "summary": "Sleep for nonnegative nanoseconds; a negative interval traps 3. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1165-1166", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1246-1247", "quote": "ret 120" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:828", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:979", "quote": "`sleepns interval`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2220,15 +2272,15 @@ "summary": "Create a socket. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1186-1187", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1267-1268", "quote": "ret 104" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:829", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:980", "quote": "`socknew domain kind protocol`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2251,15 +2303,15 @@ "summary": "Bind a socket to the address bytes of the slice. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1150-1151", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1231-1232", "quote": "ret 115" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:830", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:981", "quote": "`bind fd A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2282,15 +2334,15 @@ "summary": "Connect using the address bytes of the slice. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1147-1148", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1228-1229", "quote": "ret 114" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:831", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:982", "quote": "`connect fd A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2311,15 +2363,15 @@ "summary": "Listen for connections. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1189-1190", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1270-1271", "quote": "ret 105" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:832", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:983", "quote": "`listen fd backlog`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2340,15 +2392,15 @@ "summary": "Accept a connection (accept4) without peer-address output; return the descriptor. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1192-1193", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1273-1274", "quote": "ret 106" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:833", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:984", "quote": "`accept fd flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2371,15 +2423,15 @@ "summary": "Write the socket's address bytes; return the full address length. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1117-1118", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1198-1199", "quote": "ret 131" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:834", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:985", "quote": "`sockname fd A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2404,15 +2456,15 @@ "summary": "Set one allowlisted four-byte socket option. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:784-785", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:865-866", "quote": "ret 134" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:835", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:987", "quote": "`sockopt fd level option A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2436,15 +2488,15 @@ "summary": "Receive into a writable slice. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1159-1160", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1240-1241", "quote": "ret 118" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:836", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:988", "quote": "`recv fd A off n flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2468,15 +2520,15 @@ "summary": "Send a slice; MSG_NOSIGNAL is added so a closed peer returns an error. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1162-1163", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1243-1244", "quote": "ret 119" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:837", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:989", "quote": "`send fd A off n flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2498,15 +2550,15 @@ "summary": "Poll one descriptor: readiness bits, 0 on timeout, or negative errno. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1141-1142", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1222-1223", "quote": "ret 123" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:838", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:990", "quote": "`waitio fd events interval`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2529,15 +2581,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1246-1247", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1327-1328", "quote": "ret 220" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:839", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:991", "quote": "`peercred fd A off capacity`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2560,15 +2612,15 @@ "summary": "Poll packed eight-byte pollfd records in a writable slice. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1249-1250", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1330-1331", "quote": "ret 221" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:840", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:992", "quote": "`pollfds A off n interval`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2592,15 +2644,15 @@ "summary": "Send one checked payload through a private msghdr, no ancillary data. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1252-1253", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1333-1334", "quote": "ret 222" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:841", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:993", "quote": "`sendmsg fd A off n flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2618,15 +2670,15 @@ "summary": "Copy the process: 0 in the child, the child pid in the parent. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1195-1196", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1276-1277", "quote": "ret 107" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:842", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:994", "quote": "`fork`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2644,15 +2696,15 @@ "summary": "The current process id. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1138-1139", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1219-1220", "quote": "ret 129" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:843", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:995", "quote": "`getpid`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2673,15 +2725,15 @@ "summary": "Send a signal; signal 0 checks existence and permission. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1132-1133", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1213-1214", "quote": "ret 127" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:844", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:996", "quote": "`killpid pid signal`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2705,15 +2757,15 @@ "summary": "Wait with wait4; write a four-byte status; return the pid. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1153-1154", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1234-1235", "quote": "ret 116" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:845", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:997", "quote": "`waitpid pid A off n options`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2736,15 +2788,15 @@ "summary": "Create a pipe (pipe2); write two little-endian 32-bit descriptors. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1135-1136", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1216-1217", "quote": "ret 128" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:846", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:998", "quote": "`pipefds A off n flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2766,15 +2818,15 @@ "summary": "Duplicate onto a chosen descriptor (dup3). Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1198-1199", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1279-1280", "quote": "ret 108" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:847", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:999", "quote": "`dupfd fd target flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2796,15 +2848,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1123-1124", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1204-1205", "quote": "ret 124" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:848", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1000", "quote": "`execprog A off n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2822,15 +2874,15 @@ "summary": "Argument count, including the executable name. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1168-1169", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1249-1250", "quote": "ret 121" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:849", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1002", "quote": "`argcnt`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2853,15 +2905,15 @@ "summary": "Copy one argument's bytes without a terminator; return its length. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1171-1172", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1252-1253", "quote": "ret 122" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:850", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1003", "quote": "`argread index A off capacity`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2879,15 +2931,15 @@ "summary": "Number of environment entries. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:790-791", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:871-872", "quote": "ret 136" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:851", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1004", "quote": "`envcnt`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2910,15 +2962,15 @@ "summary": "Copy one environment entry without its terminator; return its length. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:793-794", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:874-875", "quote": "ret 137" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:852", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1005", "quote": "`envread index A off capacity`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], @@ -2941,20 +2993,81 @@ "summary": "Fill a writable byte slice from getrandom; return the bytes written. Program mode only; failure is minus the Linux errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:787-788", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:868-869", "quote": "ret 135" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:853", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1006", "quote": "`random A off n flags`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:780-786", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" } ], "example": "clock" }, + "peername": { + "table": "kw", + "id": 224, + "category": "host-net", + "profile": "OM-1", + "form": "peername fd A off n", + "arity": 4, + "types": [ + "fd: int", + "A: uchar array (sized, unsized view/edit, or text when only read)", + "off: ulong", + "n: ulong" + ], + "result": "long", + "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.", + "citations": [ + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1345-1346", + "quote": "ret 224" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:986", + "quote": "`peername fd A off n`" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", + "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" + } + ], + "example": "peername" + }, + "execpure": { + "table": "kw", + "id": 198, + "category": "host-process", + "profile": "OM-1", + "form": "execpure A off n", + "arity": 3, + "types": [ + "A: uchar array (sized, unsized view/edit, or text when only read)", + "off: ulong", + "n: ulong" + ], + "result": "long", + "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.", + "citations": [ + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:844-845", + "quote": "ret 198" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1001", + "quote": "`execpure A off n`" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:933", + "quote": "Offsets, byte counts, capacities and argument indices are `ulong`" + } + ], + "example": "procs" + }, "pread": { "table": "kw", "id": 161, @@ -2973,16 +3086,15 @@ "summary": "Read n bytes at file position pos into A[off..] without moving the descriptor offset; bytes read or -errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:865-866", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:946-947", "quote": "ret 161" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:482-483", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:534", "quote": "`pread fd A off n pos` / `pwrite fd A off n pos` (pos long)" } ], - "example": "files", - "notes": "At the pin (omega-mv e5b32567) omc checks writability the wrong way round for these two words: pwrite refuses a text or view source with error 20 and pread accepts a text destination (the kernel then returns -14 EFAULT). Pass a global or new array to pwrite; never pass a text to pread." + "example": "files" }, "pwrite": { "table": "kw", @@ -3002,16 +3114,15 @@ "summary": "Write A[off..off+n-1] at file position pos without moving the descriptor offset; bytes written or -errno.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:868-869", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:949-950", "quote": "ret 162" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:482-483", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:534", "quote": "`pread fd A off n pos` / `pwrite fd A off n pos` (pos long)" } ], - "example": "files", - "notes": "At the pin (omega-mv e5b32567) omc checks writability the wrong way round for these two words: pwrite refuses a text or view source with error 20 and pread accepts a text destination (the kernel then returns -14 EFAULT). Pass a global or new array to pwrite; never pass a text to pread." + "example": "files" }, "devctl": { "table": "kw", @@ -3031,11 +3142,11 @@ "summary": "Checked Linux ioctl on an allowlisted request with its exact encoded size. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:880-881", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:961-962", "quote": "ret 166" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:11", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:11", "quote": "`devctl fd request A off n`" } ], @@ -3059,11 +3170,11 @@ "summary": "Map a file or anonymous memory; a positive owned handle or negative errno. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:883-884", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:964-965", "quote": "ret 167" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:12", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:12", "quote": "`mapnew fd offset bytes access mode`" } ], @@ -3083,11 +3194,11 @@ "summary": "Unmap an owned mapping; 0 or negative errno. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:886-887", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:967-968", "quote": "ret 168" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:13", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:13", "quote": "`mapdrop handle`" } ], @@ -3111,11 +3222,11 @@ "summary": "Copy n bytes from the mapping into A; return n. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:889-890", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:970-971", "quote": "ret 169" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:14", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:14", "quote": "`mapread handle offset A off n`" } ], @@ -3139,11 +3250,11 @@ "summary": "Copy n bytes from A into a writable mapping; return n. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:892-893", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:973-974", "quote": "ret 170" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:15", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:15", "quote": "`mapwrite handle offset A off n`" } ], @@ -3170,11 +3281,11 @@ "summary": "Checked NVIDIA RM_ALLOC / RM_CONTROL call with a private header and a bounded parameter span. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:895-896", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:976-977", "quote": "ret 171" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:16", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:16", "quote": "`devcall fd request H hoff 32 P poff n`" } ], @@ -3198,11 +3309,11 @@ "summary": "Allowlisted Linux UVM ioctl with its exact writable payload. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:898-899", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:979-980", "quote": "ret 172" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:17", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:17", "quote": "`uvmctl fd command A off n`" } ], @@ -3222,11 +3333,11 @@ "summary": "Base address of an owned live mapping or reservation (no access through it). Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:901-902", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:982-983", "quote": "ret 173" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:18", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:18", "quote": "`mapaddr handle`" } ], @@ -3248,11 +3359,11 @@ "summary": "One aligned 32- or 64-bit load from a readable mapping. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:904-905", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:985-986", "quote": "ret 174" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:19", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:19", "quote": "`mapget handle offset width`" } ], @@ -3275,11 +3386,11 @@ "summary": "One aligned 32- or 64-bit store into a writable mapping; returns 0. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:907-908", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:988-989", "quote": "ret 175" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:20", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:20", "quote": "`mapset handle offset width value`" } ], @@ -3300,11 +3411,11 @@ "summary": "Reserve an unused page-aligned span (PROT_NONE, MAP_FIXED_NOREPLACE). Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:910-911", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:991-992", "quote": "ret 176" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:21", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:21", "quote": "`maphold address bytes`" } ], @@ -3327,16 +3438,68 @@ "summary": "Bind a shared file or device mapping over a whole owned reservation. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:913-914", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:994-995", "quote": "ret 177" }, { - "ref": "omega-mv@e5b32567 seed/host/MAPPING.md:22", + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:22", "quote": "`mapbind handle fd offset access`" } ], "example": "mapping" }, + "cpufence": { + "table": "kw", + "id": 199, + "category": "device", + "profile": "OM-1", + "form": "cpufence", + "arity": 0, + "types": [], + "result": "-", + "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.", + "citations": [ + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1339-1340", + "quote": "ret 199" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1122", + "quote": "`cpufence` | Publication barrier (keyword id 199)." + }, + { + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:23", + "quote": "`cpufence` | Statement, keyword 199" + } + ], + "example": "cpu_order" + }, + "cpurelax": { + "table": "kw", + "id": 200, + "category": "device", + "profile": "OM-1", + "form": "cpurelax", + "arity": 0, + "types": [], + "result": "-", + "summary": "Statement: spin-wait hint for a bounded poll loop, no ordering (AArch64 YIELD, x86-64 PAUSE). Accepted in function and program mode.", + "citations": [ + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1342-1343", + "quote": "ret 200" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1123", + "quote": "`cpurelax` | Spin-wait hint, no ordering (keyword id 200)." + }, + { + "ref": "omega-mv@f4df8239 seed/host/MAPPING.md:24", + "quote": "`cpurelax` | Statement, keyword 200" + } + ], + "example": "cpu_order" + }, "bool": { "table": "kw", "id": 1, @@ -3351,15 +3514,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:919-920", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1000-1001", "quote": "ret 1" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:447", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:497", "quote": "`true` and `false` are the bool numbers 1 and 0." }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3379,15 +3542,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:922-923", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1003-1004", "quote": "ret 2" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3407,15 +3570,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:925-926", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1006-1007", "quote": "ret 2" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3435,15 +3598,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:928-929", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1009-1010", "quote": "ret 3" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3463,15 +3626,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:931-932", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1012-1013", "quote": "ret 3" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3491,15 +3654,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:934-935", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1015-1016", "quote": "ret 4" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3519,15 +3682,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:937-938", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1018-1019", "quote": "ret 4" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3547,15 +3710,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:940-941", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1021-1022", "quote": "ret 5" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3575,15 +3738,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:943-944", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1024-1025", "quote": "ret 5" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "(uchar 8, ushort 16, uint 32, ulong 64 bits)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3603,15 +3766,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:946-947", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1027-1028", "quote": "ret 6" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433-434", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "(byte 8," }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3631,15 +3794,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:949-950", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1030-1031", "quote": "ret 6" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433-434", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "(byte 8," }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3659,15 +3822,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:952-953", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1033-1034", "quote": "ret 7" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433-434", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "(byte 8," }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3687,15 +3850,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:955-956", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1036-1037", "quote": "ret 7" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433-434", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "(byte 8," }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3715,15 +3878,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:958-959", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1039-1040", "quote": "ret 8" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433-434", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "(byte 8," }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3743,15 +3906,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:961-962", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1042-1043", "quote": "ret 8" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433-434", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "(byte 8," }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3771,15 +3934,15 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:964-965", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1045-1046", "quote": "ret 9" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433-434", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "(byte 8," }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], @@ -3799,20 +3962,108 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:967-968", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1048-1049", "quote": "ret 9" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433-434", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "(byte 8," }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:439", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:489", "quote": "A conversion ` v` traps 5 when the value is outside the new type." } ], "example": "ints" }, + "qty": { + "table": "kw", + "id": 223, + "category": "type", + "profile": "OM-1", + "form": "qty VALUE (conversion) | NAME qty (parameter) | to qty (result)", + "arity": 1, + "types": [ + "VALUE: an integer value" + ], + "result": "qty", + "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`.", + "citations": [ + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1336-1337", + "quote": "ret 223" + }, + { + "ref": "omega-mv@f4df8239 spec/quantities-and-modular.md:41", + "quote": "Arithmetic operations are checked at runtime." + }, + { + "ref": "omega-mv@f4df8239 spec/quantities-and-modular.md:59", + "quote": "is rejected at compile time (error 7)" + }, + { + "ref": "omega-mv@f4df8239 spec/quantities-and-modular.md:73", + "quote": "The seeded syntax is prefix conversion (`q = qty w`, `w = ulong q`)." + } + ], + "example": "qty" + }, + "dit": { + "table": "kw2", + "id": 225, + "category": "host-cpu", + "profile": "OM-2", + "form": "dit v", + "arity": 1, + "types": [ + "v: int 0 or 1 (else trap 3)" + ], + "result": "long", + "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.", + "citations": [ + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1412-1413", + "quote": "ret 225" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:849", + "quote": "**`dit v`** (v int, else error 7) sets PSTATE.DIT" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:835-836", + "quote": "program mode only (error 9 in function mode), AArch64 only (error 25 under `target x86linux`), and give a long" + } + ], + "example": "secrets" + }, + "scrub": { + "table": "kw2", + "id": 226, + "category": "host-cpu", + "profile": "OM-2", + "form": "scrub n", + "arity": 1, + "types": [ + "n: ulong, a multiple of 16 at most 1048576 (else trap 3)" + ], + "result": "long", + "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.", + "citations": [ + { + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1415-1416", + "quote": "ret 226" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:856", + "quote": "**`scrub n`** (n ulong, else error 7) zeroes the dead stack and the dead registers and gives 0." + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:835-836", + "quote": "program mode only (error 9 in function mode), AArch64 only (error 25 under `target x86linux`), and give a long" + } + ], + "example": "secrets" + }, "add": { "table": "kw", "id": 33, @@ -3828,11 +4079,11 @@ "summary": "Binary operator: a + b. Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:970-971", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1051-1052", "quote": "ret 33" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width" } ], @@ -3853,11 +4104,11 @@ "summary": "Binary operator: a - b. Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:973-974", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1054-1055", "quote": "ret 34" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width" } ], @@ -3878,11 +4129,11 @@ "summary": "Binary operator: a * b. Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:976-977", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1057-1058", "quote": "ret 35" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width" } ], @@ -3903,11 +4154,11 @@ "summary": "Binary operator: a / b, rounding toward zero; divisor 0 traps 2. Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:979-980", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1060-1061", "quote": "ret 36" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:435", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:485", "quote": "div and rem trap 2 when the divisor is 0." } ], @@ -3928,11 +4179,11 @@ "summary": "Binary operator: remainder with the sign of the dividend; divisor 0 traps 2. Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:982-983", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1063-1064", "quote": "ret 37" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:435", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:485", "quote": "div and rem trap 2 when the divisor is 0." } ], @@ -3953,11 +4204,11 @@ "summary": "Binary operator: bitwise and (bool and for bools; eager). Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:985-986", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1066-1067", "quote": "ret 38" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:440-441", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:490", "quote": "the two values of an op" } ], @@ -3978,11 +4229,11 @@ "summary": "Binary operator: bitwise or (bool or for bools; eager). Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:988-989", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1069-1070", "quote": "ret 39" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:440-441", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:490", "quote": "the two values of an op" } ], @@ -4003,11 +4254,11 @@ "summary": "Binary operator: bitwise exclusive or. Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:991-992", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1072-1073", "quote": "ret 40" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:440-441", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:490", "quote": "the two values of an op" } ], @@ -4028,11 +4279,11 @@ "summary": "Binary operator: shift left; amount outside 0..width-1 traps 7. Both operands have one type (no implicit conversion, error 7).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:994-995", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1075-1076", "quote": "ret 41" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:437", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:487", "quote": "A shift amount outside 0 .. width - 1 traps 7" } ], @@ -4053,11 +4304,11 @@ "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).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:997-998", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1078-1079", "quote": "ret 42" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:437", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:487", "quote": "shr of a signed value keeps the sign." } ], @@ -4078,11 +4329,11 @@ "summary": "Comparison: equal (unsigned or signed by the operands' type; IEEE for floats).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1000-1001", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1081-1082", "quote": "ret 43" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:567", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:627", "quote": "comparisons `eq ne lt le gt ge`" } ], @@ -4103,11 +4354,11 @@ "summary": "Comparison: not equal (unsigned or signed by the operands' type; IEEE for floats).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1003-1004", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1084-1085", "quote": "ret 44" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:567", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:627", "quote": "comparisons `eq ne lt le gt ge`" } ], @@ -4128,11 +4379,11 @@ "summary": "Comparison: less than (unsigned or signed by the operands' type; IEEE for floats).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1006-1007", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1087-1088", "quote": "ret 45" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:567", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:627", "quote": "comparisons `eq ne lt le gt ge`" } ], @@ -4153,11 +4404,11 @@ "summary": "Comparison: less or equal (unsigned or signed by the operands' type; IEEE for floats).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1009-1010", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1090-1091", "quote": "ret 46" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:567", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:627", "quote": "comparisons `eq ne lt le gt ge`" } ], @@ -4178,11 +4429,11 @@ "summary": "Comparison: greater than (unsigned or signed by the operands' type; IEEE for floats).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1012-1013", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1093-1094", "quote": "ret 47" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:567", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:627", "quote": "comparisons `eq ne lt le gt ge`" } ], @@ -4203,11 +4454,11 @@ "summary": "Comparison: greater or equal (unsigned or signed by the operands' type; IEEE for floats).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1015-1016", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1096-1097", "quote": "ret 48" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:567", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:627", "quote": "comparisons `eq ne lt le gt ge`" } ], @@ -4227,11 +4478,11 @@ "summary": "Negation: wraps for unsigned types, traps 1 for the signed minimum, IEEE for floats.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1018-1019", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1099-1100", "quote": "ret 49" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:433", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:483", "quote": "Signed add, sub, mul, neg, div and shl trap 1" } ], @@ -4251,11 +4502,11 @@ "summary": "Bitwise complement of an integer; logical not of a bool.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1021-1022", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1102-1103", "quote": "ret 50" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:431", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:481", "quote": "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width" } ], @@ -4276,11 +4527,11 @@ "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1024-1025", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1105-1106", "quote": "ret 51" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:471", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:523", "quote": "`get A i` reads element i" } ], @@ -4300,16 +4551,15 @@ "summary": "Length of an array as a ulong.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1027-1028", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1108-1109", "quote": "ret 52" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:471", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:523", "quote": "`len A` is A's length as a ulong." } ], - "example": "hello", - "notes": "At the pin (omega-mv e5b32567) the count of an empty text (`text e \"\"`) is read from a stale register (omega-mv #775): `len e` returns whatever that register holds (`ret int add 7 len e` exits 14), and get, part and write check against the same stale count, so they can use bytes past the text instead of trapping 3. Fixed in omega-mv #904 (e2662fff): the count is 0. At this pin, avoid empty texts." + "example": "hello" }, "read": { "table": "kw", @@ -4328,11 +4578,11 @@ "summary": "Read n bytes from fd into A[off..]; bytes read or minus errno. Slice outside A traps 3.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1030-1031", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1111-1112", "quote": "ret 53" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:478", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:530", "quote": "`read fd A off n` and `write fd A off n` (fd int, off and n ulong)" } ], @@ -4355,11 +4605,11 @@ "summary": "Write A[off..off+n-1] to fd; bytes written or minus errno. Slice outside A traps 3.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1033-1034", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1114-1115", "quote": "ret 54" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:478", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:530", "quote": "`read fd A off n` and `write fd A off n` (fd int, off and n ulong)" } ], @@ -4377,11 +4627,11 @@ "summary": "The bool value 1.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1036-1037", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1117-1118", "quote": "ret 55" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:447", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:497", "quote": "`true` and `false` are the bool numbers 1 and 0." } ], @@ -4399,11 +4649,11 @@ "summary": "The bool value 0.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1039-1040", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1120-1121", "quote": "ret 56" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:447", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:497", "quote": "`true` and `false` are the bool numbers 1 and 0." } ], @@ -4424,11 +4674,11 @@ "summary": "Read-only array parameter of exact type and length; writing through it is error 20.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1042-1043", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1123-1124", "quote": "ret 57" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:464", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:516", "quote": "A parameter `NAME view T N` or `NAME edit T N`" } ], @@ -4449,11 +4699,11 @@ "summary": "Writable array parameter of exact type and length; a global is never passed (error 19).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1045-1046", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1126-1127", "quote": "ret 58" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:464", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:516", "quote": "A parameter `NAME view T N` or `NAME edit T N`" } ], @@ -4474,15 +4724,15 @@ "summary": "Start a function; `end` closes it. `fn main` makes a whole Linux program (program mode).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1048-1049", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1129-1130", "quote": "ret 64" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:54", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:59", "quote": "a function; `end` closes it" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:402", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:417", "quote": "A program with a line `fn main` is a whole Linux program" } ], @@ -4502,11 +4752,11 @@ "summary": "Introduces a function's result type.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1051-1052", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1132-1133", "quote": "ret 65" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:54", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:59", "quote": "to | void" } ], @@ -4524,11 +4774,11 @@ "summary": "Closes fn, if/else, while, for, struct and layout blocks. A missing end is error 15.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1054-1055", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1135-1136", "quote": "ret 66" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:54", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:59", "quote": "`end` closes it" } ], @@ -4548,11 +4798,11 @@ "summary": "Conditional block.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1057-1058", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1138-1139", "quote": "ret 67" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:57", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:62", "quote": "if / else / end" } ], @@ -4570,11 +4820,11 @@ "summary": "Second arm of an if block.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1060-1061", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1141-1142", "quote": "ret 68" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:57", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:62", "quote": "if / else / end" } ], @@ -4589,17 +4839,17 @@ "arity": 1, "types": [ "COND: bool", - "N: 1..999999" + "N: 1..9223372036854775807 (IR mode 1..1000000)" ], "result": "-", "summary": "Loop while COND holds; past N iterations (default 1000000) it traps 4.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1063-1064", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1144-1145", "quote": "ret 69" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:58", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:63", "quote": "while [bound N] / end" } ], @@ -4610,21 +4860,25 @@ "id": 70, "category": "structure", "profile": "OM-1", - "form": "while COND bound N", + "form": "while COND bound N | for NAME TYPE COUNT bound N", "arity": 1, "types": [ - "N: integer literal or constant 1..999999" + "N: number or integer const 1..9223372036854775807 (IR mode 1..1000000)" ], "result": "-", - "summary": "Iteration limit of a while loop; exceeding it traps 4. A for takes no bound at this pin (error 5).", + "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1066-1067", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1147-1148", "quote": "ret 70" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:58", - "quote": "N 1..999999, default 1000000; past N iterations: trap 4" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:63-64", + "quote": "N 1..9223372036854775807 (a number or any integer const; IR mode: 1..1000000), default 1000000; past N iterations: trap 4" + }, + { + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:66", + "quote": "N as for while." } ], "example": "control" @@ -4634,7 +4888,7 @@ "id": 71, "category": "structure", "profile": "OM-1", - "form": "for NAME TYPE COUNT [unroll] / end", + "form": "for NAME TYPE COUNT [bound N] / end", "arity": 3, "types": [ "NAME: new counter", @@ -4642,23 +4896,22 @@ "COUNT: number or value of TYPE" ], "result": "-", - "summary": "Counted loop: NAME = 0 .. COUNT-1. A number COUNT runs unguarded; any other COUNT traps 4 after 1000000 passes, as a while with no bound.", + "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.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1069-1070", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1150-1151", "quote": "ret 71" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:59", - "quote": "for / end" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:65", + "quote": "for [bound N] / end" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:60", - "quote": "(any other count: trap 4 after 1000000 passes, as a while with no bound)" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:66-68", + "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" } ], - "example": "for_guard", - "notes": "At the pin no bound gives a loop more than 1000000 passes: `for ... bound N` is error 5 (it came with omega-mv #857, 3a163bc5) and a while bound is at most 999999. For more passes use a number count, which is unguarded, or nest two loops." + "example": "for_guard" }, "ret": { "table": "kw", @@ -4674,11 +4927,11 @@ "summary": "Return from the function; ends the path (a later line in the block is error 17).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1072-1073", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1153-1154", "quote": "ret 72" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:65", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:74", "quote": "ret []" } ], @@ -4699,11 +4952,11 @@ "summary": "Bind or overwrite a name (the = may be left out).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1075-1076", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1156-1157", "quote": "ret 73" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:55", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:60", "quote": " = " } ], @@ -4723,11 +4976,11 @@ "summary": "Grouping: returns exactly the value inside; adds no code.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1078-1079", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1159-1160", "quote": "ret 74" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:589", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:653", "quote": "`(` and `)` are separate words" } ], @@ -4747,11 +5000,11 @@ "summary": "Closes a group; a missing ) is error 16.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1081-1082", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1162-1163", "quote": "ret 75" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:589", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:653", "quote": "`(` and `)` are separate words" } ], @@ -4769,11 +5022,11 @@ "summary": "A function that returns no value; ret without a value or reaching end returns.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1084-1085", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1165-1166", "quote": "ret 76" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:420", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:464", "quote": "`to void` makes a void function" } ], @@ -4795,11 +5048,11 @@ "summary": "A zero-filled pool of N elements in the program image. Program mode only; never passed as an argument (error 19).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1087-1088", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1168-1169", "quote": "ret 78" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:454", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:504", "quote": "`global NAME T N`: a pool of N elements (1 .. 16777216)" } ], @@ -4820,16 +5073,15 @@ "summary": "A read-only uchar array holding the quoted bytes. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1090-1091", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1171-1172", "quote": "ret 79" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:457", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:507", "quote": "`text NAME \"bytes\"`: a read-only array of uchar" } ], - "example": "hello", - "notes": "At the pin (omega-mv e5b32567) the count of an empty text (`text e \"\"`) is read from a stale register (omega-mv #775): `len e` returns whatever that register holds (`ret int add 7 len e` exits 14), and get, part and write check against the same stale count, so they can use bytes past the text instead of trapping 3. Fixed in omega-mv #904 (e2662fff): the count is 0. At this pin, avoid empty texts." + "example": "hello" }, "put": { "table": "kw", @@ -4847,11 +5099,11 @@ "summary": "Store v at element i. Into a view or text: error 20.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1093-1094", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1174-1175", "quote": "ret 80" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:66", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:75", "quote": "put " } ], @@ -4869,15 +5121,15 @@ "summary": "Reserved and always refused with error 9: arrays are given back when their function returns (decision 24).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1096-1097", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1177-1178", "quote": "ret 81" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:462", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:514", "quote": "There is no `free`: nothing is given back by hand (decision 24), and the word is refused (error 9)." }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:8530-8531", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:10464", "quote": "if or or or eq c 77 eq c 78 eq c 79 eq c 81" } ], @@ -4895,11 +5147,11 @@ "summary": "Reserved word from the om4 draft; as a statement omc refuses it with error 9.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1114-1115", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1195-1196", "quote": "ret 77" }, { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:8530-8531", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:10464", "quote": "if or or or eq c 77 eq c 78 eq c 79 eq c 81" } ], @@ -4919,11 +5171,11 @@ "summary": "End the program with status v modulo 256; ends the path.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1099-1100", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1180-1181", "quote": "ret 82" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:484", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:538", "quote": "`exit v` (v int) ends the program with status v modulo 256." } ], @@ -4941,11 +5193,11 @@ "summary": "A comment line: nothing after the first word is read.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1102-1103", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1183-1184", "quote": "ret 83" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:486", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:540", "quote": "`note ...` is a line the translator does not read beyond its first word." } ], @@ -4967,11 +5219,11 @@ "summary": "A local array of N elements, each v, on the stack; only in a function's outermost block (error 9).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1105-1106", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1186-1187", "quote": "ret 84" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:460", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:512", "quote": "`NAME = new T N v`: a local array of N elements, each v, on the stack" } ], @@ -4989,11 +5241,11 @@ "summary": "Leave the innermost loop; outside a loop error 9.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1108-1109", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1189-1190", "quote": "ret 86" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:61", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:70", "quote": "leave the innermost loop; outside a loop: error 9." } ], @@ -5013,11 +5265,11 @@ "summary": "Stop with trap code N: program mode exits 100 + N.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1111-1112", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1192-1193", "quote": "ret 87" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:67", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:76", "quote": "trap stop with that code" } ], @@ -5035,11 +5287,11 @@ "summary": "Jump to the next iteration (a while's head, a for's increment).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1243-1244", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1324-1325", "quote": "ret 97" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:63", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:72", "quote": "jump to the next iteration" } ], @@ -5061,11 +5313,11 @@ "summary": "A named typed constant, usable as a value, array length, for count, while bound or trap code.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:838-839", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:919-920", "quote": "ret 152" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:608", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:672", "quote": "`const NAME TYPE LITERAL` at top level defines a named value before use." } ], @@ -5085,11 +5337,11 @@ "summary": "A record type of eight-byte cells, declared on one line before the first fn.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1213-1214", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1294-1295", "quote": "ret 85" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:502", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:562", "quote": "`struct Name field type [len] ... end`, one line, before the first `fn`." } ], @@ -5109,11 +5361,11 @@ "summary": "Size in bytes; a compile-time constant.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1237-1238", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1318-1319", "quote": "ret 95" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:597", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:661", "quote": "`sizeof T` is the size in bytes of a scalar type" } ], @@ -5134,11 +5386,11 @@ "summary": "Byte offset of a field; a compile-time constant.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1240-1241", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1321-1322", "quote": "ret 96" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:599", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:663", "quote": "`offsetof S f` is the byte offset of field `f`" } ], @@ -5158,11 +5410,11 @@ "summary": "IEEE-754 binary32 type and conversion.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1216-1217", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1297-1298", "quote": "ret 88" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:552", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:612", "quote": "`f32` and `f64` are IEEE-754 binary32 and binary64." } ], @@ -5182,11 +5434,11 @@ "summary": "IEEE-754 binary64 type and conversion.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1219-1220", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1300-1301", "quote": "ret 89" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:552", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:612", "quote": "`f32` and `f64` are IEEE-754 binary32 and binary64." } ], @@ -5207,11 +5459,11 @@ "summary": "Reinterpret the bits of a same-width value.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1222-1223", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1303-1304", "quote": "ret 90" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:577", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:637", "quote": "`bitcast T value` reinterprets a value of the same width" } ], @@ -5231,11 +5483,11 @@ "summary": "IEEE square root.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1225-1226", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1306-1307", "quote": "ret 91" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:571", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:631", "quote": "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float" } ], @@ -5255,11 +5507,11 @@ "summary": "Absolute value.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1228-1229", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1309-1310", "quote": "ret 92" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:571", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:631", "quote": "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float" } ], @@ -5279,11 +5531,11 @@ "summary": "IEEE minNum (FMINNM).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1231-1232", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1312-1313", "quote": "ret 93" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:571", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:631", "quote": "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float" } ], @@ -5303,11 +5555,11 @@ "summary": "IEEE maxNum (FMAXNM).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1234-1235", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1315-1316", "quote": "ret 94" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:571", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:631", "quote": "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float" } ], @@ -5328,15 +5580,15 @@ "summary": "Rotate right; N outside 0..w-1 traps 7. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1264-1265", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1358-1359", "quote": "ret 59" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:669", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:734", "quote": "`rotr x n` and `rotl x n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5357,15 +5609,15 @@ "summary": "Rotate left; N outside 0..w-1 traps 7. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1267-1268", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1361-1362", "quote": "ret 60" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:669", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:734", "quote": "`rotr x n` and `rotl x n`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5385,15 +5637,15 @@ "summary": "Compile the loop body K times with a constant counter. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1270-1271", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1364-1365", "quote": "ret 181" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:673", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:738", "quote": "`for i T K unroll`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5411,15 +5663,15 @@ "summary": "Compile every call of the function in place. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1273-1274", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1367-1368", "quote": "ret 182" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:677", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:742", "quote": "`fn NAME ... to T inline`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5439,15 +5691,15 @@ "summary": "Incoming elements are unspecified; every read needs a prior write (error 27). OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1276-1277", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1370-1371", "quote": "ret 183" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:716", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:781", "quote": "A parameter `s edit T N fresh`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5468,15 +5720,15 @@ "summary": "Declare an abstract type made only by seal in NAMEmk. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1279-1280", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1373-1374", "quote": "ret 184" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:726", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:791", "quote": "`abstract NAME T [ops W ...]`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5497,15 +5749,15 @@ "summary": "Make an abstract value; only inside the function NAMEmk (else error 28). OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1282-1283", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1376-1377", "quote": "ret 185" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:728", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:793", "quote": "A value of it is made only by `seal NAME v`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5525,15 +5777,15 @@ "summary": "The base value of an abstract value. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1285-1286", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1379-1380", "quote": "ret 186" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:730", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:795", "quote": "`open v` gives the T value." }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5553,15 +5805,15 @@ "summary": "Run-time invariant on every seal: high 32 bits equal low 32 (trap 10). OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1288-1289", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1382-1383", "quote": "ret 187" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:727", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:792", "quote": "`holds NAME dup32`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5581,15 +5833,15 @@ "summary": "The operations allowed on an abstract type. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1315-1316", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1409-1410", "quote": "ret 196" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:726", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:791", "quote": "[ops W ...]" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5610,15 +5862,15 @@ "summary": "An external byte layout over a uchar array of SIZE bytes. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1291-1292", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1385-1386", "quote": "ret 188" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:703", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:768", "quote": "`layout NAME SIZE`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5640,15 +5892,15 @@ "summary": "One field of a layout. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1294-1295", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1388-1389", "quote": "ret 189" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:703", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:768", "quote": "`field F T [COUNT] at OFF little|big`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5668,15 +5920,15 @@ "summary": "Introduces a layout field's byte offset. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1297-1298", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1391-1392", "quote": "ret 190" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:703", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:768", "quote": "at OFF little|big" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5694,15 +5946,15 @@ "summary": "Little-endian layout field. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1300-1301", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1394-1395", "quote": "ret 191" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:703", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:768", "quote": "at OFF little|big" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5720,15 +5972,15 @@ "summary": "Big-endian layout field (REV on load/store). OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1303-1304", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1397-1398", "quote": "ret 192" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:703", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:768", "quote": "at OFF little|big" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5750,15 +6002,15 @@ "summary": "Elements o..o+k-1 of A, only as an argument for an unsized parameter. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1306-1307", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1400-1401", "quote": "ret 193" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:750", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:815", "quote": "`part A o k` (o, k ulong; another type is error 7)" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5779,15 +6031,15 @@ "summary": "A parameter written by the unit; inside it is an edit of T N. OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1309-1310", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1403-1404", "quote": "ret 194" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:758", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:823", "quote": "A parameter `NAME out T N`" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5805,15 +6057,15 @@ "summary": "Mark a function-mode entry (no fn main). OM-2 units only (first line `om2`).", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:1312-1313", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:1406-1407", "quote": "ret 195" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:762", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:827", "quote": "`export fn NAME ...` at top level" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:644-645", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:710", "quote": "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out" } ], @@ -5827,11 +6079,11 @@ "details": "Clauses run in declaration order after parameter binding. Predicates are pure: integer/bool operations, conversions, len and array reads only.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1128", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1430", "quote": "`requires BOOL` and `ensures BOOL` form a function's prefix" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1173", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1475", "quote": "False `requires` uses existing trap **9**" } ], @@ -5843,7 +6095,7 @@ "details": "Not run on exit or a trap. A parameter means its current value at return.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1133", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1435", "quote": "Postconditions execute in declaration order on **every normal return**" } ], @@ -5855,7 +6107,7 @@ "details": "Runs on entry, every backedge and before the final false condition.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1146", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1448", "quote": "`invariant BOOL` forms the prefix of a `while` or `for` body" } ], @@ -5867,7 +6119,7 @@ "details": "It has the declared return type; the caller receives the same value after the checks.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1137", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1439", "quote": "The read-only name `result` is available only in value postconditions." } ], @@ -5879,7 +6131,7 @@ "details": "Leading blank and note lines are skipped; in an OM-1 unit the om2 line is error 16.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:642-643", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:707", "quote": "when the next line is exactly `om2`" } ], @@ -5890,11 +6142,11 @@ "details": "An explicit exit 101..114 cannot be told apart from a trap by status alone.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:404-405", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:420", "quote": "main's value modulo 256" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:406", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:421", "quote": "exit status 100 + the trap code" } ], @@ -5905,7 +6157,7 @@ "details": "At most 4096 bytes, count 1..64; zero bytes, truncation or trailing bytes trap 3. Used by execprog, renames, link, symlnk.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:896", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1062", "quote": "A packed list is a little-endian `u16` count followed by that many records" } ], @@ -5916,7 +6168,7 @@ "details": "Relative paths resolve against the current directory (AT_FDCWD).", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:857", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1010", "quote": "Paths are at most 4095 bytes." } ], @@ -5927,7 +6179,7 @@ "details": "They do not form a sandbox: they run with the process's permissions. Program mode only.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:775-778", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:928", "quote": "These operations do not form a sandbox" } ], @@ -5935,10 +6187,10 @@ }, "compile_errors": { "summary": "omc writes `omc: line N: error K` to stderr and exits with K; use explain_error for any K.", - "details": "Codes 1..24 and 27..30 exist at the pin; 25 and 26 are unused.", + "details": "Codes 1..25 and 27..30 exist at the pin; 26 is unused.", "citations": [ { - "ref": "omega-mv@e5b32567 seed/omc/omc.om:292-293", + "ref": "omega-mv@f4df8239 seed/omc/omc.om:345", "quote": "fn fail code ulong to void" } ], @@ -5946,35 +6198,35 @@ }, "traps": { "summary": "Run-time traps 1..14 end a program with exit 100 + code.", - "details": "Codes are part of the observable semantics and are never renumbered. Loops trap 4: a while past its bound (default 1000000) and a for whose count is not a number after 1000000 passes.", + "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.", "citations": [ { - "ref": "omega-mv@e5b32567 src/compiler/osc_ir.h:165-166", + "ref": "omega-mv@f4df8239 src/compiler/osc_ir.h:165", "quote": "Trap codes are part of the observable semantics" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:58", - "quote": "N 1..999999, default 1000000; past N iterations: trap 4" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:64", + "quote": "default 1000000; past N iterations: trap 4" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:60", - "quote": "(any other count: trap 4 after 1000000 passes, as a while with no bound)" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:66-68", + "quote": "With no bound a number count is not guarded and any other count traps 4 after 1000000 passes" } ], "example": "t02" }, "loops": { - "form": "while COND [bound N] / end | for NAME TYPE COUNT [unroll] / end", - "summary": "Every loop except a for with a number count traps 4 (exit 104) past a pass limit.", - "details": "A while runs at most N passes (bound N, 1..999999; default 1000000). A for with a number COUNT is unguarded; any other COUNT traps 4 after 1000000 passes. At this pin a for takes no bound (error 5).", + "form": "while COND [bound N] / end | for NAME TYPE COUNT [bound N] / end", + "summary": "Every loop except a for with a number count and no bound traps 4 (exit 104) past a pass limit.", + "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.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:58", - "quote": "N 1..999999, default 1000000; past N iterations: trap 4" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:63-64", + "quote": "N 1..9223372036854775807 (a number or any integer const; IR mode: 1..1000000), default 1000000; past N iterations: trap 4" }, { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:60", - "quote": "(any other count: trap 4 after 1000000 passes, as a while with no bound)" + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:66-68", + "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" } ], "example": "for_guard" @@ -5984,7 +6236,7 @@ "details": "Compiler error 30 covers misplaced contracts, unavailable result and impure predicates.", "citations": [ { - "ref": "omega-mv@e5b32567 docs/one_layer/OMEGESE.md:1177-1178", + "ref": "omega-mv@f4df8239 docs/one_layer/OMEGESE.md:1479", "quote": "Compiler error **30** means misplaced" } ], @@ -6223,6 +6475,11 @@ "code": 23, "line": 2 }, + "e25": { + "mode": "error", + "code": 25, + "line": 1 + }, "e27": { "mode": "error", "code": 27, @@ -6294,6 +6551,22 @@ "t10": { "mode": "trap", "trap": 10 + }, + "cpu_order": { + "mode": "run", + "exit": 5 + }, + "qty": { + "mode": "run", + "exit": 42 + }, + "secrets": { + "mode": "run", + "exit": 10 + }, + "peername": { + "mode": "run", + "exit": 9 } } } diff --git a/evidence/check-reference.txt b/evidence/check-reference.txt index 6830a45..a2d8c69 100644 --- a/evidence/check-reference.txt +++ b/evidence/check-reference.txt @@ -1,5 +1,5 @@ -words 177 errors 28 traps 14 topics 12 examples 68 bytes 168454 failures 0 -negative control (moved citation): DETECTED: ["word add: first citation 'omega-mv@e5b32567 seed/omc/omc.om:973-974' is not its keyword-table line 970"] +words 184 errors 29 traps 14 topics 13 examples 74 bytes 178899 failures 0 +negative control (moved citation): DETECTED: ["word add: first citation 'omega-mv@f4df8239 seed/omc/omc.om:1054-1055' is not its keyword-table line 1051"] negative control (wrong expectation): DETECTED: ["example hello: wanted exit 1, got 0 stdout b'hello\\n'"] negative control (missing keyword): DETECTED: ["keyword 'mapbind' has no lookup entry"] PASS diff --git a/evidence/smoke-transcript.jsonl b/evidence/smoke-transcript.jsonl index 1649f47..f8c9367 100644 --- a/evidence/smoke-transcript.jsonl +++ b/evidence/smoke-transcript.jsonl @@ -1,20 +1,20 @@ {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"initialize\", \"params\": {\"protocolVersion\": \"2025-06-18\", \"capabilities\": {}, \"clientInfo\": {\"name\": \"omega-mcp-smoke\", \"version\": \"1\"}}}"} -{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{\"tools\":{\"listChanged\":false}},\"serverInfo\":{\"name\":\"omega-mcp\",\"version\":\"0.1.0\"},\"instructions\":\"Compile and run Omega (.om) programs with the pinned seeded compiler omc (omega-mv e5b32567, omc sha256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f). Tools: compile, run (each call gets a fresh sandbox: no network, no host files, cleared environment, cpu/memory/file-size/process limits and a wall clock), explain_error (compiler error 1..30, an `omc: line N: error K` line, or a trap exit 101..114) and lookup (every keyword of the compiler's keyword table, with citations into omega-mv@e5b32567).\"}}"} +{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{\"tools\":{\"listChanged\":false}},\"serverInfo\":{\"name\":\"omega-mcp\",\"version\":\"0.1.0\"},\"instructions\":\"Compile and run Omega (.om) programs with the pinned seeded compiler omc (omega-mv f4df8239, omc sha256 3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194). Tools: compile, run (each call gets a fresh sandbox: no network, no host files, cleared environment, cpu/memory/file-size/process limits and a wall clock), explain_error (compiler error 1..30, an `omc: line N: error K` line, or a trap exit 101..114) and lookup (every keyword of the compiler's keyword table, with citations into omega-mv@f4df8239).\"}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"method\": \"notifications/initialized\"}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 2, \"method\": \"tools/list\", \"params\": {}}"} -{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":2,\"result\":{\"tools\":[{\"name\":\"compile\",\"title\":\"Compile Omega source\",\"description\":\"Compile Omega (.om) source with the pinned seeded compiler omc (omega-mv@e5b32567). Returns ok, the binary's size and sha256, or the compile error {line, code, meaning, fix}.\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"string\",\"description\":\"Omega (.om) source text of one unit\"}},\"required\":[\"source\"],\"additionalProperties\":false}},{\"name\":\"run\",\"title\":\"Compile and run Omega source\",\"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).\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"string\",\"description\":\"Omega (.om) source text of one unit\"},\"stdin\":{\"type\":\"string\",\"description\":\"bytes given to the program on stdin (default empty)\"},\"timeout_ms\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":30000,\"description\":\"wall-clock limit in milliseconds (default 5000)\"}},\"required\":[\"source\"],\"additionalProperties\":false}},{\"name\":\"explain_error\",\"title\":\"Explain an Omega error or trap\",\"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.\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":[\"string\",\"integer\"],\"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\"}},\"required\":[\"query\"],\"additionalProperties\":false}},{\"name\":\"lookup\",\"title\":\"Look up an Omega word or topic\",\"description\":\"Look up any Omega keyword (all 177 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).\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":64,\"description\":\"exact keyword or topic, or a case-insensitive substring to search for\"}},\"required\":[\"query\"],\"additionalProperties\":false}}]}}"} +{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":2,\"result\":{\"tools\":[{\"name\":\"compile\",\"title\":\"Compile Omega source\",\"description\":\"Compile Omega (.om) source with the pinned seeded compiler omc (omega-mv@f4df8239). Returns ok, the binary's size and sha256, or the compile error {line, code, meaning, fix}.\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"string\",\"description\":\"Omega (.om) source text of one unit\"}},\"required\":[\"source\"],\"additionalProperties\":false}},{\"name\":\"run\",\"title\":\"Compile and run Omega source\",\"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).\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"string\",\"description\":\"Omega (.om) source text of one unit\"},\"stdin\":{\"type\":\"string\",\"description\":\"bytes given to the program on stdin (default empty)\"},\"timeout_ms\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":30000,\"description\":\"wall-clock limit in milliseconds (default 5000)\"}},\"required\":[\"source\"],\"additionalProperties\":false}},{\"name\":\"explain_error\",\"title\":\"Explain an Omega error or trap\",\"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.\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":[\"string\",\"integer\"],\"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\"}},\"required\":[\"query\"],\"additionalProperties\":false}},{\"name\":\"lookup\",\"title\":\"Look up an Omega word or topic\",\"description\":\"Look up any Omega keyword (all 184 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).\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":64,\"description\":\"exact keyword or topic, or a case-insensitive substring to search for\"}},\"required\":[\"query\"],\"additionalProperties\":false}}]}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 3, \"method\": \"tools/call\", \"params\": {\"name\": \"compile\", \"arguments\": {\"source\": \"text msg \\\"hello\\\\n\\\"\\nfn main to int\\nw = write 1 msg 0 len msg\\nret 0\\nend\\n\"}}}"} -{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":3,\"result\":{\"structuredContent\":{\"ok\":true,\"binary_bytes\":352,\"sha256\":\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\",\"compiler_sha256\":\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\",\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"ok\\\":true,\\\"binary_bytes\\\":352,\\\"sha256\\\":\\\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\\\",\\\"compiler_sha256\\\":\\\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\\\",\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} +{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":3,\"result\":{\"structuredContent\":{\"ok\":true,\"binary_bytes\":352,\"sha256\":\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\",\"compiler_sha256\":\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\",\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"ok\\\":true,\\\"binary_bytes\\\":352,\\\"sha256\\\":\\\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\\\",\\\"compiler_sha256\\\":\\\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\\\",\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 4, \"method\": \"tools/call\", \"params\": {\"name\": \"run\", \"arguments\": {\"source\": \"text msg \\\"hello\\\\n\\\"\\nfn main to int\\nw = write 1 msg 0 len msg\\nret 0\\nend\\n\"}}}"} -{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":4,\"result\":{\"structuredContent\":{\"compile\":{\"ok\":true,\"binary_bytes\":352,\"sha256\":\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\",\"compiler_sha256\":\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\"},\"exit\":{\"kind\":\"normal\",\"code\":0},\"stdout\":\"hello\\n\",\"stdout_bytes\":6,\"stdout_truncated\":false,\"stderr\":\"\",\"stderr_bytes\":0,\"stderr_truncated\":false,\"limits\":{\"timeout_ms\":5000,\"cpu_seconds\":10,\"address_space_bytes\":268435456,\"file_size_bytes\":1048576,\"processes\":5},\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"compile\\\":{\\\"ok\\\":true,\\\"binary_bytes\\\":352,\\\"sha256\\\":\\\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\\\",\\\"compiler_sha256\\\":\\\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\\\"},\\\"exit\\\":{\\\"kind\\\":\\\"normal\\\",\\\"code\\\":0},\\\"stdout\\\":\\\"hello\\\\n\\\",\\\"stdout_bytes\\\":6,\\\"stdout_truncated\\\":false,\\\"stderr\\\":\\\"\\\",\\\"stderr_bytes\\\":0,\\\"stderr_truncated\\\":false,\\\"limits\\\":{\\\"timeout_ms\\\":5000,\\\"cpu_seconds\\\":10,\\\"address_space_bytes\\\":268435456,\\\"file_size_bytes\\\":1048576,\\\"processes\\\":5},\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} +{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":4,\"result\":{\"structuredContent\":{\"compile\":{\"ok\":true,\"binary_bytes\":352,\"sha256\":\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\",\"compiler_sha256\":\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\"},\"exit\":{\"kind\":\"normal\",\"code\":0},\"stdout\":\"hello\\n\",\"stdout_bytes\":6,\"stdout_truncated\":false,\"stderr\":\"\",\"stderr_bytes\":0,\"stderr_truncated\":false,\"limits\":{\"timeout_ms\":5000,\"cpu_seconds\":10,\"address_space_bytes\":268435456,\"file_size_bytes\":1048576,\"processes\":5},\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"compile\\\":{\\\"ok\\\":true,\\\"binary_bytes\\\":352,\\\"sha256\\\":\\\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\\\",\\\"compiler_sha256\\\":\\\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\\\"},\\\"exit\\\":{\\\"kind\\\":\\\"normal\\\",\\\"code\\\":0},\\\"stdout\\\":\\\"hello\\\\n\\\",\\\"stdout_bytes\\\":6,\\\"stdout_truncated\\\":false,\\\"stderr\\\":\\\"\\\",\\\"stderr_bytes\\\":0,\\\"stderr_truncated\\\":false,\\\"limits\\\":{\\\"timeout_ms\\\":5000,\\\"cpu_seconds\\\":10,\\\"address_space_bytes\\\":268435456,\\\"file_size_bytes\\\":1048576,\\\"processes\\\":5},\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 5, \"method\": \"tools/call\", \"params\": {\"name\": \"run\", \"arguments\": {\"source\": \"fn main to int\\nz = int 0\\nret div 7 z\\nend\\n\"}}}"} -{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":5,\"result\":{\"structuredContent\":{\"compile\":{\"ok\":true,\"binary_bytes\":260,\"sha256\":\"c08c02905120ba58469a9d09ea07625ab2d30ebd5bdda600ab3428aa9f2acf16\",\"compiler_sha256\":\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\"},\"exit\":{\"kind\":\"trap\",\"trap\":2,\"exit_code\":102,\"meaning\":\"division by zero\",\"note\":\"an explicit exit status 101..114 looks the same as this trap\"},\"stdout\":\"\",\"stdout_bytes\":0,\"stdout_truncated\":false,\"stderr\":\"\",\"stderr_bytes\":0,\"stderr_truncated\":false,\"limits\":{\"timeout_ms\":5000,\"cpu_seconds\":10,\"address_space_bytes\":268435456,\"file_size_bytes\":1048576,\"processes\":5},\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"compile\\\":{\\\"ok\\\":true,\\\"binary_bytes\\\":260,\\\"sha256\\\":\\\"c08c02905120ba58469a9d09ea07625ab2d30ebd5bdda600ab3428aa9f2acf16\\\",\\\"compiler_sha256\\\":\\\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\\\"},\\\"exit\\\":{\\\"kind\\\":\\\"trap\\\",\\\"trap\\\":2,\\\"exit_code\\\":102,\\\"meaning\\\":\\\"division by zero\\\",\\\"note\\\":\\\"an explicit exit status 101..114 looks the same as this trap\\\"},\\\"stdout\\\":\\\"\\\",\\\"stdout_bytes\\\":0,\\\"stdout_truncated\\\":false,\\\"stderr\\\":\\\"\\\",\\\"stderr_bytes\\\":0,\\\"stderr_truncated\\\":false,\\\"limits\\\":{\\\"timeout_ms\\\":5000,\\\"cpu_seconds\\\":10,\\\"address_space_bytes\\\":268435456,\\\"file_size_bytes\\\":1048576,\\\"processes\\\":5},\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} +{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":5,\"result\":{\"structuredContent\":{\"compile\":{\"ok\":true,\"binary_bytes\":260,\"sha256\":\"c08c02905120ba58469a9d09ea07625ab2d30ebd5bdda600ab3428aa9f2acf16\",\"compiler_sha256\":\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\"},\"exit\":{\"kind\":\"trap\",\"trap\":2,\"exit_code\":102,\"meaning\":\"division by zero\",\"note\":\"an explicit exit status 101..114 looks the same as this trap\"},\"stdout\":\"\",\"stdout_bytes\":0,\"stdout_truncated\":false,\"stderr\":\"\",\"stderr_bytes\":0,\"stderr_truncated\":false,\"limits\":{\"timeout_ms\":5000,\"cpu_seconds\":10,\"address_space_bytes\":268435456,\"file_size_bytes\":1048576,\"processes\":5},\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"compile\\\":{\\\"ok\\\":true,\\\"binary_bytes\\\":260,\\\"sha256\\\":\\\"c08c02905120ba58469a9d09ea07625ab2d30ebd5bdda600ab3428aa9f2acf16\\\",\\\"compiler_sha256\\\":\\\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\\\"},\\\"exit\\\":{\\\"kind\\\":\\\"trap\\\",\\\"trap\\\":2,\\\"exit_code\\\":102,\\\"meaning\\\":\\\"division by zero\\\",\\\"note\\\":\\\"an explicit exit status 101..114 looks the same as this trap\\\"},\\\"stdout\\\":\\\"\\\",\\\"stdout_bytes\\\":0,\\\"stdout_truncated\\\":false,\\\"stderr\\\":\\\"\\\",\\\"stderr_bytes\\\":0,\\\"stderr_truncated\\\":false,\\\"limits\\\":{\\\"timeout_ms\\\":5000,\\\"cpu_seconds\\\":10,\\\"address_space_bytes\\\":268435456,\\\"file_size_bytes\\\":1048576,\\\"processes\\\":5},\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 6, \"method\": \"tools/call\", \"params\": {\"name\": \"compile\", \"arguments\": {\"source\": \"fn main to int\\nret x\\nend\\n\"}}}"} -{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":6,\"result\":{\"structuredContent\":{\"ok\":false,\"error\":{\"line\":2,\"code\":3,\"meaning\":\"unknown name or field\",\"fix\":\"Declare the name first, or fix its spelling.\",\"compiler_stderr\":\"omc: line 2: error 3\\n\"},\"compiler_sha256\":\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\",\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"ok\\\":false,\\\"error\\\":{\\\"line\\\":2,\\\"code\\\":3,\\\"meaning\\\":\\\"unknown name or field\\\",\\\"fix\\\":\\\"Declare the name first, or fix its spelling.\\\",\\\"compiler_stderr\\\":\\\"omc: line 2: error 3\\\\n\\\"},\\\"compiler_sha256\\\":\\\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\\\",\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} +{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":6,\"result\":{\"structuredContent\":{\"ok\":false,\"error\":{\"line\":2,\"code\":3,\"meaning\":\"unknown name or field\",\"fix\":\"Declare the name first, or fix its spelling.\",\"compiler_stderr\":\"omc: line 2: error 3\\n\"},\"compiler_sha256\":\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\",\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"ok\\\":false,\\\"error\\\":{\\\"line\\\":2,\\\"code\\\":3,\\\"meaning\\\":\\\"unknown name or field\\\",\\\"fix\\\":\\\"Declare the name first, or fix its spelling.\\\",\\\"compiler_stderr\\\":\\\"omc: line 2: error 3\\\\n\\\"},\\\"compiler_sha256\\\":\\\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\\\",\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 7, \"method\": \"tools/call\", \"params\": {\"name\": \"explain_error\", \"arguments\": {\"query\": \"omc: line 2: error 3\"}}}"} -{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":7,\"result\":{\"structuredContent\":{\"query\":\"omc: line 2: error 3\",\"kind\":\"compile_error\",\"code\":3,\"exit_status\":3,\"line\":2,\"meaning\":\"unknown name or field\",\"cause\":\"A word is used as a name but nothing of that name is in scope (or a struct has no such field).\",\"fix\":\"Declare the name first, or fix its spelling.\",\"citations\":[{\"ref\":\"omega-mv@e5b32567 seed/omc/omc.om:2104\",\"quote\":\"fail 3\"},{\"ref\":\"omega-mv@e5b32567 seed/omc/omc.om:292-293\",\"quote\":\"fn fail code ulong to void\"},{\"ref\":\"omega-mv@e5b32567 docs/one_layer/OMEGESE.md:514\",\"quote\":\"An unknown field is error 3.\"},{\"ref\":\"omega-mv@e5b32567 seed/omc/gate15.sh:85\",\"quote\":\"codes 3..23; 1 and 2 are compiler I/O\"}],\"example\":{\"id\":\"e03\",\"expect\":{\"mode\":\"error\",\"code\":3,\"line\":2},\"source\":\"fn main to int\\nret q\\nend\\n\"}},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"query\\\":\\\"omc: line 2: error 3\\\",\\\"kind\\\":\\\"compile_error\\\",\\\"code\\\":3,\\\"exit_status\\\":3,\\\"line\\\":2,\\\"meaning\\\":\\\"unknown name or field\\\",\\\"cause\\\":\\\"A word is used as a name but nothing of that name is in scope (or a struct has no such field).\\\",\\\"fix\\\":\\\"Declare the name first, or fix its spelling.\\\",\\\"citations\\\":[{\\\"ref\\\":\\\"omega-mv@e5b32567 seed/omc/omc.om:2104\\\",\\\"quote\\\":\\\"fail 3\\\"},{\\\"ref\\\":\\\"omega-mv@e5b32567 seed/omc/omc.om:292-293\\\",\\\"quote\\\":\\\"fn fail code ulong to void\\\"},{\\\"ref\\\":\\\"omega-mv@e5b32567 docs/one_layer/OMEGESE.md:514\\\",\\\"quote\\\":\\\"An unknown field is error 3.\\\"},{\\\"ref\\\":\\\"omega-mv@e5b32567 seed/omc/gate15.sh:85\\\",\\\"quote\\\":\\\"codes 3..23; 1 and 2 are compiler I/O\\\"}],\\\"example\\\":{\\\"id\\\":\\\"e03\\\",\\\"expect\\\":{\\\"mode\\\":\\\"error\\\",\\\"code\\\":3,\\\"line\\\":2},\\\"source\\\":\\\"fn main to int\\\\nret q\\\\nend\\\\n\\\"}}\"}],\"isError\":false}}"} +{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":7,\"result\":{\"structuredContent\":{\"query\":\"omc: line 2: error 3\",\"kind\":\"compile_error\",\"code\":3,\"exit_status\":3,\"line\":2,\"meaning\":\"unknown name or field\",\"cause\":\"A word is used as a name but nothing of that name is in scope (or a struct has no such field).\",\"fix\":\"Declare the name first, or fix its spelling.\",\"citations\":[{\"ref\":\"omega-mv@f4df8239 seed/omc/omc.om:2281\",\"quote\":\"fail 3\"},{\"ref\":\"omega-mv@f4df8239 seed/omc/omc.om:345\",\"quote\":\"fn fail code ulong to void\"},{\"ref\":\"omega-mv@f4df8239 docs/one_layer/OMEGESE.md:574\",\"quote\":\"An unknown field is error 3.\"},{\"ref\":\"omega-mv@f4df8239 seed/omc/gate15.sh:154\",\"quote\":\"refusal cases (codes 1..25, 27..30; 24 with its accept side)\"}],\"example\":{\"id\":\"e03\",\"expect\":{\"mode\":\"error\",\"code\":3,\"line\":2},\"source\":\"fn main to int\\nret q\\nend\\n\"}},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"query\\\":\\\"omc: line 2: error 3\\\",\\\"kind\\\":\\\"compile_error\\\",\\\"code\\\":3,\\\"exit_status\\\":3,\\\"line\\\":2,\\\"meaning\\\":\\\"unknown name or field\\\",\\\"cause\\\":\\\"A word is used as a name but nothing of that name is in scope (or a struct has no such field).\\\",\\\"fix\\\":\\\"Declare the name first, or fix its spelling.\\\",\\\"citations\\\":[{\\\"ref\\\":\\\"omega-mv@f4df8239 seed/omc/omc.om:2281\\\",\\\"quote\\\":\\\"fail 3\\\"},{\\\"ref\\\":\\\"omega-mv@f4df8239 seed/omc/omc.om:345\\\",\\\"quote\\\":\\\"fn fail code ulong to void\\\"},{\\\"ref\\\":\\\"omega-mv@f4df8239 docs/one_layer/OMEGESE.md:574\\\",\\\"quote\\\":\\\"An unknown field is error 3.\\\"},{\\\"ref\\\":\\\"omega-mv@f4df8239 seed/omc/gate15.sh:154\\\",\\\"quote\\\":\\\"refusal cases (codes 1..25, 27..30; 24 with its accept side)\\\"}],\\\"example\\\":{\\\"id\\\":\\\"e03\\\",\\\"expect\\\":{\\\"mode\\\":\\\"error\\\",\\\"code\\\":3,\\\"line\\\":2},\\\"source\\\":\\\"fn main to int\\\\nret q\\\\nend\\\\n\\\"}}\"}],\"isError\":false}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 8, \"method\": \"tools/call\", \"params\": {\"name\": \"lookup\", \"arguments\": {\"query\": \"while\"}}}"} -{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":8,\"result\":{\"structuredContent\":{\"query\":\"while\",\"match\":\"keyword\",\"name\":\"while\",\"table\":\"kw\",\"id\":69,\"category\":\"structure\",\"profile\":\"OM-1\",\"form\":\"while COND [bound N] / end\",\"arity\":1,\"types\":[\"COND: bool\",\"N: 1..999999\"],\"result\":\"-\",\"summary\":\"Loop while COND holds; past N iterations (default 1000000) it traps 4.\",\"citations\":[{\"ref\":\"omega-mv@e5b32567 seed/omc/omc.om:1063-1064\",\"quote\":\"ret 69\"},{\"ref\":\"omega-mv@e5b32567 docs/one_layer/OMEGESE.md:58\",\"quote\":\"while [bound N] / end\"}],\"example\":{\"id\":\"control\",\"expect\":{\"mode\":\"run\",\"exit\":131},\"source\":\"note while with a bound, continue, break, for, if/else and bool values\\nfn pick c bool to uint\\nif c\\nret 100\\nelse\\nret 1\\nend\\nend\\nfn main to int\\ns = uint 0\\ni = uint 0\\nwhile lt i 100 bound 1000\\ni = add i 1\\nif eq rem i 2 0\\ncontinue\\nend\\nif gt i 9\\nbreak\\nend\\ns = add s i\\nend\\nfor j uint 4\\ns = add s j\\nend\\nt = true\\nf = false\\ns = add s pick and t not f\\nret int s\\nend\\n\"}},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"query\\\":\\\"while\\\",\\\"match\\\":\\\"keyword\\\",\\\"name\\\":\\\"while\\\",\\\"table\\\":\\\"kw\\\",\\\"id\\\":69,\\\"category\\\":\\\"structure\\\",\\\"profile\\\":\\\"OM-1\\\",\\\"form\\\":\\\"while COND [bound N] / end\\\",\\\"arity\\\":1,\\\"types\\\":[\\\"COND: bool\\\",\\\"N: 1..999999\\\"],\\\"result\\\":\\\"-\\\",\\\"summary\\\":\\\"Loop while COND holds; past N iterations (default 1000000) it traps 4.\\\",\\\"citations\\\":[{\\\"ref\\\":\\\"omega-mv@e5b32567 seed/omc/omc.om:1063-1064\\\",\\\"quote\\\":\\\"ret 69\\\"},{\\\"ref\\\":\\\"omega-mv@e5b32567 docs/one_layer/OMEGESE.md:58\\\",\\\"quote\\\":\\\"while [bound N] / end\\\"}],\\\"example\\\":{\\\"id\\\":\\\"control\\\",\\\"expect\\\":{\\\"mode\\\":\\\"run\\\",\\\"exit\\\":131},\\\"source\\\":\\\"note while with a bound, continue, break, for, if/else and bool values\\\\nfn pick c bool to uint\\\\nif c\\\\nret 100\\\\nelse\\\\nret 1\\\\nend\\\\nend\\\\nfn main to int\\\\ns = uint 0\\\\ni = uint 0\\\\nwhile lt i 100 bound 1000\\\\ni = add i 1\\\\nif eq rem i 2 0\\\\ncontinue\\\\nend\\\\nif gt i 9\\\\nbreak\\\\nend\\\\ns = add s i\\\\nend\\\\nfor j uint 4\\\\ns = add s j\\\\nend\\\\nt = true\\\\nf = false\\\\ns = add s pick and t not f\\\\nret int s\\\\nend\\\\n\\\"}}\"}],\"isError\":false}}"} +{"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":8,\"result\":{\"structuredContent\":{\"query\":\"while\",\"match\":\"keyword\",\"name\":\"while\",\"table\":\"kw\",\"id\":69,\"category\":\"structure\",\"profile\":\"OM-1\",\"form\":\"while COND [bound N] / end\",\"arity\":1,\"types\":[\"COND: bool\",\"N: 1..9223372036854775807 (IR mode 1..1000000)\"],\"result\":\"-\",\"summary\":\"Loop while COND holds; past N iterations (default 1000000) it traps 4.\",\"citations\":[{\"ref\":\"omega-mv@f4df8239 seed/omc/omc.om:1144-1145\",\"quote\":\"ret 69\"},{\"ref\":\"omega-mv@f4df8239 docs/one_layer/OMEGESE.md:63\",\"quote\":\"while [bound N] / end\"}],\"example\":{\"id\":\"control\",\"expect\":{\"mode\":\"run\",\"exit\":131},\"source\":\"note while with a bound, continue, break, for, if/else and bool values\\nfn pick c bool to uint\\nif c\\nret 100\\nelse\\nret 1\\nend\\nend\\nfn main to int\\ns = uint 0\\ni = uint 0\\nwhile lt i 100 bound 1000\\ni = add i 1\\nif eq rem i 2 0\\ncontinue\\nend\\nif gt i 9\\nbreak\\nend\\ns = add s i\\nend\\nfor j uint 4\\ns = add s j\\nend\\nt = true\\nf = false\\ns = add s pick and t not f\\nret int s\\nend\\n\"}},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"query\\\":\\\"while\\\",\\\"match\\\":\\\"keyword\\\",\\\"name\\\":\\\"while\\\",\\\"table\\\":\\\"kw\\\",\\\"id\\\":69,\\\"category\\\":\\\"structure\\\",\\\"profile\\\":\\\"OM-1\\\",\\\"form\\\":\\\"while COND [bound N] / end\\\",\\\"arity\\\":1,\\\"types\\\":[\\\"COND: bool\\\",\\\"N: 1..9223372036854775807 (IR mode 1..1000000)\\\"],\\\"result\\\":\\\"-\\\",\\\"summary\\\":\\\"Loop while COND holds; past N iterations (default 1000000) it traps 4.\\\",\\\"citations\\\":[{\\\"ref\\\":\\\"omega-mv@f4df8239 seed/omc/omc.om:1144-1145\\\",\\\"quote\\\":\\\"ret 69\\\"},{\\\"ref\\\":\\\"omega-mv@f4df8239 docs/one_layer/OMEGESE.md:63\\\",\\\"quote\\\":\\\"while [bound N] / end\\\"}],\\\"example\\\":{\\\"id\\\":\\\"control\\\",\\\"expect\\\":{\\\"mode\\\":\\\"run\\\",\\\"exit\\\":131},\\\"source\\\":\\\"note while with a bound, continue, break, for, if/else and bool values\\\\nfn pick c bool to uint\\\\nif c\\\\nret 100\\\\nelse\\\\nret 1\\\\nend\\\\nend\\\\nfn main to int\\\\ns = uint 0\\\\ni = uint 0\\\\nwhile lt i 100 bound 1000\\\\ni = add i 1\\\\nif eq rem i 2 0\\\\ncontinue\\\\nend\\\\nif gt i 9\\\\nbreak\\\\nend\\\\ns = add s i\\\\nend\\\\nfor j uint 4\\\\ns = add s j\\\\nend\\\\nt = true\\\\nf = false\\\\ns = add s pick and t not f\\\\nret int s\\\\nend\\\\n\\\"}}\"}],\"isError\":false}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 9, \"method\": \"no/such/method\", \"params\": {}}"} {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":9,\"error\":{\"code\":-32601,\"message\":\"Method not found\"}}"} {"dir": "client->server", "line": "not json{"} @@ -23,4 +23,4 @@ {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":10,\"error\":{\"code\":-32602,\"message\":\"Invalid params: unknown argument; see the tool's inputSchema in tools/list\"}}"} {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 11, \"method\": \"tools/call\", \"params\": {\"name\": \"format_disk\", \"arguments\": {}}}"} {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":11,\"error\":{\"code\":-32602,\"message\":\"Invalid params: unknown tool; tools/list names compile, run, explain_error and lookup\"}}"} -{"dir": "server stderr", "line": "omega-mcp: ready; isolation bwrap+prlimit; compiler 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\nreq initialize id=1 -> ok\nreq notifications/initialized no reply\nreq tools/list id=2 -> ok\nreq tools/call id=3 tool=compile compile=0 ms=6 -> ok\nreq tools/call id=4 tool=run compile=0 ms=5 run=1/0 ms=5 -> ok\nreq tools/call id=5 tool=run compile=0 ms=7 run=2/2 ms=5 -> ok\nreq tools/call id=6 tool=compile compile=1 ms=5 -> ok\nreq tools/call id=7 tool=explain_error -> ok\nreq tools/call id=8 tool=lookup -> ok\nreq no/such/method id=9 -> error -32601\nreq -> error -32700\nreq tools/call id=10 tool=lookup -> error -32602\nreq tools/call id=11 -> error -32602\nomega-mcp: end of input; exiting\n"} +{"dir": "server stderr", "line": "omega-mcp: ready; isolation bwrap+prlimit; compiler 3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\nreq initialize id=1 -> ok\nreq notifications/initialized no reply\nreq tools/list id=2 -> ok\nreq tools/call id=3 tool=compile compile=0 ms=7 -> ok\nreq tools/call id=4 tool=run compile=0 ms=7 run=1/0 ms=7 -> ok\nreq tools/call id=5 tool=run compile=0 ms=7 run=2/2 ms=6 -> ok\nreq tools/call id=6 tool=compile compile=1 ms=6 -> ok\nreq tools/call id=7 tool=explain_error -> ok\nreq tools/call id=8 tool=lookup -> ok\nreq no/such/method id=9 -> error -32601\nreq -> error -32700\nreq tools/call id=10 tool=lookup -> error -32602\nreq tools/call id=11 -> error -32602\nomega-mcp: end of input; exiting\n"} diff --git a/evidence/trust-gate.json b/evidence/trust-gate.json index c1b6ce0..9f98ade 100644 --- a/evidence/trust-gate.json +++ b/evidence/trust-gate.json @@ -1,11 +1,11 @@ { - "server": "/home/drakestapleton/workspace/omega-mcp/build/omega-mcp", + "server": "/tmp/sweep/M/OmcDefects/mcp/build/omega-mcp", "rows": [ { "gate": "read", "case": "canary + state dir", "server": "sandbox", - "seconds": 0.01, + "seconds": 0.02, "want": "exit 0: canary and ~/.local/state both invisible, secret absent from stdout", "observed": { "compile_ok": true, @@ -24,7 +24,7 @@ "gate": "read", "case": "canary + state dir (control)", "server": "noiso", - "seconds": 0.0, + "seconds": 0.01, "want": "exit 10 and the secret on stdout (the gate sees a leak)", "observed": { "compile_ok": true, @@ -32,7 +32,7 @@ "kind": "normal", "code": 10 }, - "stdout": "omega-mcp-canary-89e5ea4a60ef723e\n", + "stdout": "omega-mcp-canary-73144229ea608632\n", "stdout_bytes": 34, "isolation": "OFF (--test-only-no-isolation): ran on the host with the server environment and no limits except the wall clock" }, @@ -59,19 +59,19 @@ "leftover_processes": [], "pass": true, "mid_run_processes": [ - "1266658 /usr/bin/bwrap --unshare-all --unshare-user --disable-userns --die-with-parent --new-session --clearenv --block-fd 4 --info-fd 5 --ro-bind /home/drakestapleton/workspace/omega-mcp/build/omega-mcp /r --ro-bind /tmp/omega-mcp-1f0e55ad63f0b742/bin /p --size 16777216 --tmpfs /w --chdir /w --remount-ro / /r reap /p", - "1266660 /usr/bin/bwrap --unshare-all --unshare-user --disable-userns --die-with-parent --new-session --clearenv --block-fd 4 --info-fd 5 --ro-bind /home/drakestapleton/workspace/omega-mcp/build/omega-mcp /r --ro-bind /tmp/omega-mcp-1f0e55ad63f0b742/bin /p --size 16777216 --tmpfs /w --chdir /w --remount-ro / /r reap /p", - "1266662 /r reap /p", - "1266664 /p", - "1266665 /p", - "1266666 /p" + "1461935 /usr/bin/bwrap --unshare-all --unshare-user --disable-userns --die-with-parent --new-session --clearenv --block-fd 0 --info-fd 1 --ro-bind /tmp/sweep/M/OmcDefects/mcp/build/omega-mcp /r --ro-bind /tmp/omega-mcp-069b4566319e853b/bin /p --ro-bind /tmp/omega-mcp-069b4566319e853b/in /i --bind /tmp/omega-mcp-069b4566319e853b/out /o --bind /tmp/omega-mcp-069b4566319e853b/err /e --size 16777216 --tmpfs /w --chdir /w --remount-ro / /r reap /p", + "1461936 /usr/bin/bwrap --unshare-all --unshare-user --disable-userns --die-with-parent --new-session --clearenv --block-fd 0 --info-fd 1 --ro-bind /tmp/sweep/M/OmcDefects/mcp/build/omega-mcp /r --ro-bind /tmp/omega-mcp-069b4566319e853b/bin /p --ro-bind /tmp/omega-mcp-069b4566319e853b/in /i --bind /tmp/omega-mcp-069b4566319e853b/out /o --bind /tmp/omega-mcp-069b4566319e853b/err /e --size 16777216 --tmpfs /w --chdir /w --remount-ro / /r reap /p", + "1461938 /r reap /p", + "1461939 /p", + "1461940 /p", + "1461941 /p" ] }, { "gate": "forkbomb", "case": "count 20 forks", "server": "sandbox", - "seconds": 0.01, + "seconds": 0.02, "want": "at most 5 forks succeed (nproc 5)", "observed": { "compile_ok": true, @@ -129,7 +129,7 @@ "gate": "loop", "case": "cpu limit (wall 30 s)", "server": "sandbox", - "seconds": 10.12, + "seconds": 10.08, "want": "killed by RLIMIT_CPU (10 s) before the 30 s wall clock", "observed": { "compile_ok": true, @@ -150,7 +150,7 @@ "gate": "loop", "case": "cpu limit (control)", "server": "noiso", - "seconds": 30.31, + "seconds": 30.01, "want": "without prlimit only the 30 s wall clock stops it", "observed": { "compile_ok": true, @@ -170,7 +170,7 @@ "gate": "write", "case": "10 GiB to a file", "server": "sandbox", - "seconds": 0.57, + "seconds": 0.08, "want": "SIGXFSZ at the 1 MiB file-size limit", "observed": { "compile_ok": true, @@ -191,7 +191,7 @@ "gate": "write", "case": "10 GiB to stdout", "server": "sandbox", - "seconds": 0.11, + "seconds": 0.08, "want": "SIGXFSZ; at most 1 MiB reached the host capture file", "observed": { "compile_ok": true, @@ -234,8 +234,8 @@ 0 ], "server_stderr": { - "sandbox": "omega-mcp: ready; isolation bwrap+prlimit; compiler 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\nreq initialize id=1 -> ok\nreq notifications/initialized no reply\nreq tools/call id=2 tool=run compile=0 ms=4 run=1/0 ms=4 -> ok\nreq tools/call id=3 tool=run compile=0 ms=4 run=6/0 ms=3006 -> ok\nreq tools/call id=4 tool=run compile=0 ms=4 run=1/2 ms=4 -> ok\nreq tools/call id=5 tool=run compile=0 ms=4 run=6/0 ms=2008 -> ok\nreq tools/call id=6 tool=run compile=0 ms=4 run=3/24 ms=10110 -> ok\nreq tools/call id=7 tool=run compile=0 ms=160 run=5/25 ms=207 -> ok\nreq tools/call id=8 tool=run compile=0 ms=4 run=5/25 ms=97 -> ok\nomega-mcp: end of input; exiting\n", - "noiso": "omega-mcp: WARNING: --test-only-no-isolation is set; programs run on the host without sandbox, limits or environment clearing. Test use only; never use this flag with an agent.\nreq initialize id=1 -> ok\nreq notifications/initialized no reply\nreq tools/call id=2 tool=run compile=0 ms=2 run=1/10 ms=2 -> ok\nreq tools/call id=3 tool=run compile=0 ms=2 run=1/20 ms=2 -> ok\nreq tools/call id=4 tool=run compile=0 ms=2 run=6/0 ms=30273 -> ok\nreq tools/call id=5 tool=run compile=0 ms=2 run=1/0 ms=2 -> ok\nomega-mcp: end of input; exiting\n" + "sandbox": "omega-mcp: ready; isolation bwrap+prlimit; compiler 3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\nreq initialize id=1 -> ok\nreq notifications/initialized no reply\nreq tools/call id=2 tool=run compile=0 ms=8 run=1/0 ms=7 -> ok\nreq tools/call id=3 tool=run compile=0 ms=7 run=6/0 ms=3004 -> ok\nreq tools/call id=4 tool=run compile=0 ms=6 run=1/2 ms=6 -> ok\nreq tools/call id=5 tool=run compile=0 ms=7 run=6/0 ms=2004 -> ok\nreq tools/call id=6 tool=run compile=0 ms=8 run=3/24 ms=10066 -> ok\nreq tools/call id=7 tool=run compile=0 ms=7 run=5/25 ms=63 -> ok\nreq tools/call id=8 tool=run compile=0 ms=6 run=5/25 ms=64 -> ok\nomega-mcp: end of input; exiting\n", + "noiso": "omega-mcp: WARNING: --test-only-no-isolation is set; programs run on the host without sandbox, limits or environment clearing. Test use only; never use this flag with an agent.\nreq initialize id=1 -> ok\nreq notifications/initialized no reply\nreq tools/call id=2 tool=run compile=0 ms=2 run=1/10 ms=2 -> ok\nreq tools/call id=3 tool=run compile=0 ms=2 run=1/20 ms=2 -> ok\nreq tools/call id=4 tool=run compile=0 ms=2 run=6/0 ms=30004 -> ok\nreq tools/call id=5 tool=run compile=0 ms=2 run=1/0 ms=4 -> ok\nomega-mcp: end of input; exiting\n" }, "verdict": "PASS" } diff --git a/gates/smoke.py b/gates/smoke.py index 350dced..f9692ba 100755 --- a/gates/smoke.py +++ b/gates/smoke.py @@ -67,7 +67,7 @@ def main(): sc = tool(3, "compile", {"source": HELLO})["result"]["structuredContent"] check("compile hello.om: ok, pinned compiler", - sc.get("ok") is True and sc.get("compiler_sha256") == "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f") + sc.get("ok") is True and sc.get("compiler_sha256") == "3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194") r = tool(4, "run", {"source": HELLO})["result"] sc = r["structuredContent"] diff --git a/src/rpc.om b/src/rpc.om index 276e9c9..809f0fc 100644 --- a/src/rpc.om +++ b/src/rpc.om @@ -38,7 +38,7 @@ text k_iserr "isError" text v_pv1 "2025-06-18" text v_pv2 "2025-03-26" text v_pv3 "2024-11-05" -text v_instr "Compile and run Omega (.om) programs with the pinned seeded compiler omc (omega-mv e5b32567, omc sha256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f). Tools: compile, run (each call gets a fresh sandbox: no network, no host files, cleared environment, cpu/memory/file-size/process limits and a wall clock), explain_error (compiler error 1..30, an `omc: line N: error K` line, or a trap exit 101..114) and lookup (every keyword of the compiler's keyword table, with citations into omega-mv@e5b32567)." +text v_instr "Compile and run Omega (.om) programs with the pinned seeded compiler omc (omega-mv f4df8239, omc sha256 3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194). Tools: compile, run (each call gets a fresh sandbox: no network, no host files, cleared environment, cpu/memory/file-size/process limits and a wall clock), explain_error (compiler error 1..30, an `omc: line N: error K` line, or a trap exit 101..114) and lookup (every keyword of the compiler's keyword table, with citations into omega-mv@f4df8239)." text e_parse "Parse error: the line is not one RFC 8259 JSON value" text e_long "Parse error: the line is longer than 983040 bytes" text e_batch "Invalid Request: batch arrays are not supported" diff --git a/src/sandbox.om b/src/sandbox.om index 3788ace..e0b394c 100644 --- a/src/sandbox.om +++ b/src/sandbox.om @@ -1,15 +1,19 @@ note omega-mcp: per-call temporary directory, the sandboxed spawn and the in-sandbox reaper. note note One compile or run: -note 1. the parent opens the stage's stdin/stdout/stderr files in the 0700 temp dir and three close-on-exec +note 1. the parent creates the stage's stdin/stdout/stderr files in the 0700 temp dir and three close-on-exec note pipes (status, block, info), then forks child A; -note 2. A moves them to fds 0..5 and execs /usr/bin/bwrap (no shell, empty environment) with every namespace -note unshared, a cleared environment, a read-only root holding only this executable (/r) and the program -note (/p), a 16 MiB tmpfs /w, and --block-fd 4 / --info-fd 5; +note 2. execprog closes every descriptor at or above 3 (omega-mv OMEGESE.md, Path and process boundaries), +note so A moves the block, info and status pipes to fds 0, 1 and 2 and execs /usr/bin/bwrap (no shell, +note empty environment) with every namespace unshared, a cleared environment, a read-only root holding +note only this executable (/r), the program (/p) and the three stage files (/i read-only, /o and /e +note writable), a 16 MiB tmpfs /w, and --block-fd 0 / --info-fd 1; note 3. the parent reads the sandbox pid 1 from the info fd, runs /usr/bin/prlimit --pid on it (cpu, as, note fsize, nproc, nofile, core) and only then writes the byte that lets bwrap continue; -note 4. inside, /r reap /p forks, the child execs /p with fds >= 3 closed, and the reaper writes the raw -note wait status to fd 3 (the status pipe) as 'X' + 4 bytes ('E' + errno when exec failed); +note 4. inside, /r reap /p forks; the child opens /i, /o and /e onto fds 0..2 and execs /p (execprog closes +note fds >= 3, the status pipe among them), and the reaper writes the raw wait status to fd 2 (the +note status pipe) as 'X' + 4 bytes ('E' + errno when the stage files could not be opened or fork failed; +note a failed exec leaves only fds 0..2, so the child reports it on /e and exits 127); note 5. the parent polls the status pipe and waitpid(WNOHANG) against a monons deadline and kills bwrap note with SIGKILL when the wall clock runs out (--die-with-parent tears the namespaces down). @@ -25,15 +29,20 @@ text a_ce "--clearenv" text a_bf "--block-fd" text a_if "--info-fd" text a_rob "--ro-bind" +text a_bind "--bind" text a_size "--size" text a_tmpfs "--tmpfs" text a_chdir "--chdir" text a_rro "--remount-ro" -text a_4 "4" -text a_5 "5" +text a_0 "0" +text a_1 "1" text a_r "/r" text a_p "/p" text a_w "/w" +text a_i "/i" +text a_o "/o" +text a_e "/e" +text k_xf "omega-mcp reaper: exec of the program failed, errno " text a_root "/" text a_16m "16777216" text a_reap "reap" @@ -149,9 +158,9 @@ pk_arg a_dwp pk_arg a_ns pk_arg a_ce pk_arg a_bf -pk_arg a_4 +pk_arg a_0 pk_arg a_if -pk_arg a_5 +pk_arg a_1 pk_arg a_rob pk_beg pk_sx @@ -169,6 +178,15 @@ pk_t f_bin end pk_end pk_arg a_p +pk_arg a_rob +pk_stage f_src f_in md +pk_arg a_i +pk_arg a_bind +pk_stage f_bin f_out md +pk_arg a_o +pk_arg a_bind +pk_stage f_cerr f_err md +pk_arg a_e pk_arg a_size pk_arg a_16m pk_arg a_tmpfs @@ -182,6 +200,20 @@ pk_arg a_reap pk_arg a_p end +note pk_stage: one packed temp-dir path, tdir/c for the compile stage (md 0) or tdir/r for the run stage +fn pk_stage c view uchar * r view uchar * md ulong to void +pk_beg +pk_tdir +pk_b 47 +if eq md 0 +pk_t c +end +if ne md 0 +pk_t r +end +pk_end +end + note pk_noiso: the isolation-off control (--test-only-no-isolation). The program runs directly on the note host through /usr/bin/env with the server environment entries that fit the packed list (at most 62 note entries and 4096 bytes; later entries are dropped), in the temp dir, with no limits. @@ -258,21 +290,25 @@ fn fdof slot ulong to int ret int get gv slot end +note childgo: isolation off, the stage files become fds 0..2 of the program itself; otherwise the block, +note info and status pipes become fds 0..2 of bwrap (execprog closes everything at or above 3) fn childgo to void -z = dupfd fdof gfin 100 524288 -z = dupfd fdof gfout 101 524288 -z = dupfd fdof gferr 102 524288 -z = dupfd fdof gsw 103 524288 -z = dupfd fdof gbr 104 524288 -z = dupfd fdof giw 105 524288 +a = gbr +b = giw +c = gsw +if ne get gv gnoiso 0 +a = gfin +b = gfout +c = gferr +end +z = dupfd fdof a 100 524288 +z = dupfd fdof b 101 524288 +z = dupfd fdof c 102 524288 z = dupfd 100 0 0 z = dupfd 101 1 0 z = dupfd 102 2 0 -z = dupfd 103 3 0 -z = dupfd 104 4 0 -z = dupfd 105 5 0 if ne get gv gnoiso 0 -c = chdir tdir 0 get gv gtdl +q = chdir tdir 0 get gv gtdl end r = execprog pk 0 get gv gpkl exit 127 @@ -568,7 +604,7 @@ reapkid ulong n end if lt pid 0 note exec of the program never happened: 'E' + errno 0 -w = write 3 one 0 5 +w = write 2 one 0 5 ret 0 end for i ulong 999999 @@ -583,17 +619,27 @@ end for i ulong 4 put rec add i 1 get wst i end -w = write 3 rec 0 5 +w = write 2 rec 0 5 ret 0 end +note reapkid: fds 0 and 1 arrive closed (bwrap closes its block and info fds), fd 2 is the status pipe. +note Each stage file is staged at 60..62 first (the sandbox runs under --nofile=64), so an open that lands +note on 0 or 1 is never dup3'd onto itself; the status pipe is staged at 63 for reapfail. fn reapkid n ulong to void -z = dupfd 3 9 524288 -for f ulong 61 -if ne f 6 -c = fclose int add f 3 -end +z = dupfd 2 63 524288 +if lt z 0 +exit 127 end +a = fopen a_i 0 len a_i ofrd 0 +reapstage a 60 +b = fopen a_o 0 len a_o ofwr 0 +reapstage b 61 +c = fopen a_e 0 len a_e ofwr 0 +reapstage c 62 +reapstage long dupfd 60 0 0 0 +reapstage long dupfd 61 1 0 1 +reapstage long dupfd 62 2 0 2 pk_reset pk_beg for i ulong n @@ -601,11 +647,52 @@ pk_b get pa i end pk_end r = execprog pk 0 get gv gpkl +reapxf r +end + +note reapxf: execprog failed after closing fds >= 3, so the errno goes to the program's stderr (/e) +fn reapxf r long to void +v = ulong neg r +d = new uchar 20 0 +k = ulong 0 +for i ulong 20 +put d sub 19 i uchar add 48 rem v 10 +k = add k 1 +v = div v 10 +if eq v 0 +break +end +end +w = write 2 k_xf 0 len k_xf +w = write 2 d sub 20 k k +put d 0 10 +w = write 2 d 0 1 +exit 127 +end + +note reapstage: move an open stage file r to fd t (or check that a final dup3 landed on t); 'E' + errno +note when it failed +fn reapstage r long t int to void +if ge r 0 +if eq r long t +ret +end +z = dupfd int r t 524288 +if ge z 0 +ret +end +reapfail long z +end +reapfail r +end + +note reapfail: a stage file did not open; 'E' + errno on the status pipe (staged at fd 63), nothing ran +fn reapfail r long to void e = new uchar 5 69 v = ulong neg r for i ulong 4 put e add i 1 uchar and shr v mul i 8 255 end -w = write 9 e 0 5 +w = write 63 e 0 5 exit 127 end diff --git a/src/state.om b/src/state.om index 34277ae..3f8979d 100644 --- a/src/state.om +++ b/src/state.om @@ -118,13 +118,15 @@ const cmpwall ulong 20000000000 const deftmo ulong 5000 const maxtmo ulong 30000 -note arm64 open flags: wronly|creat|excl|nofollow|cloexec = 557249; rdonly|nofollow|cloexec = 557056 +note arm64 open flags: wronly|creat|excl|nofollow|cloexec = 557249; rdonly|nofollow|cloexec = 557056; +note wronly|nofollow|cloexec = 557057 (the reaper opens the stage files the parent already created) const ofnew int 557249 const ofrd int 557056 +const ofwr int 557057 note texts text khex "0123456789abcdef" text ktmp "/tmp/omega-mcp-" -text kpin "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" +text kpin "3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194" text kver "0.1.0" text kname "omega-mcp" diff --git a/tools/check-reference.py b/tools/check-reference.py index 34837ae..235d23e 100755 --- a/tools/check-reference.py +++ b/tools/check-reference.py @@ -14,8 +14,8 @@ Exit 0 when every check passes; 1 with the failures listed otherwise. """ import argparse, copy, hashlib, json, os, re, subprocess, sys, tempfile -PIN = "e5b32567a7aff3ce594e3254a622a846a6cd190b" -OMC_SHA = "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" +PIN = "f4df82394e35893dcf1354dda69a2fe028d94bc1" +OMC_SHA = "3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194" REF_RE = re.compile(r"^omega-mv@" + PIN[:8] + r" ([A-Za-z0-9_./-]+):(\d+)(?:-(\d+))?$") WORD_KEYS = ["table", "id", "category", "profile", "form", "arity", "types", "result", "summary", "citations", "example"] ENTRY_KEYS = ["meaning", "cause", "fix", "citations"] @@ -140,8 +140,8 @@ def check_example(omc, eid, source, exp, errs, tmp): def check(ref, exdir, src, omc, run_examples=True): errs = [] table = kwtable(src) - if len(table) != 177: - errs.append(f"keyword table has {len(table)} entries, expected 177 at the pin") + if len(table) != 184: + errs.append(f"keyword table has {len(table)} entries, expected 184 at the pin") words = ref.get("words", {}) want = {w: (i, line, t) for w, i, line, t in table} for w in sorted(set(want) - set(words)): @@ -167,7 +167,7 @@ def check(ref, exdir, src, omc, run_examples=True): elif os.path.exists(os.path.join(exdir, ex + ".om")): if w not in tokens(open(os.path.join(exdir, ex + ".om")).read()): errs.append(f"word {w}: example {ex} does not use the word") - for sect, lo, hi, holes in (("errors", 1, 30, {25, 26}), ("traps", 1, 14, set())): + for sect, lo, hi, holes in (("errors", 1, 30, {26}), ("traps", 1, 14, set())): d = ref.get(sect, {}) keys = {str(k) for k in range(lo, hi + 1) if k not in holes} if set(d) != keys: @@ -263,7 +263,8 @@ def self_test(ref, exdir, src, omc): rc = 0 m1 = copy.deepcopy(ref) c = m1["words"]["add"]["citations"][0] - c["ref"] = c["ref"].replace(":970-971", ":973-974") + path, a, b = re.match(r"^(.*):(\d+)-(\d+)$", c["ref"]).groups() + c["ref"] = f"{path}:{int(a) + 3}-{int(b) + 3}" m2 = copy.deepcopy(ref) m2["examples"]["hello"]["exit"] = m2["examples"]["hello"]["exit"] + 1 m3 = copy.deepcopy(ref) diff --git a/tools/gen-reference.py b/tools/gen-reference.py index d3689e2..ee93d17 100755 --- a/tools/gen-reference.py +++ b/tools/gen-reference.py @@ -4,7 +4,7 @@ data/examples/*.om. Keyword ids, arities and citation lines come from the pinned the same decoder the oracle uses (tools/check-reference.py); tools/check-reference.py then re-verifies every committed entry against that source and the pinned omc. - python3 tools/gen-reference.py --omega-src + python3 tools/gen-reference.py --omega-src """ import argparse, importlib.util, json, os, re, sys HERE = os.path.dirname(os.path.abspath(__file__)) @@ -24,7 +24,7 @@ def kwtable(): OUT = os.path.join(HERE, "..", "data") -P = "omega-mv@e5b32567 " +P = "omega-mv@f4df8239 " OMG = "docs/one_layer/OMEGESE.md" OMC = "seed/omc/omc.om" MAP = "seed/host/MAPPING.md" @@ -73,76 +73,78 @@ def host_types(params): return out -HOST_HDR = c(OMG, "780-786", "Offsets, byte counts, capacities and argument indices are `ulong`") +HOST_HDR = c(OMG, "933", "Offsets, byte counts, capacities and argument indices are `ulong`") HOST = [ # name, OMEGESE line, form (as in the table), category, summary, example - ("fopen", 790, "fopen A off n flags mode", "host-file", "Open a length-delimited path relative to the current directory; return the descriptor.", "files"), - ("fclose", 791, "fclose fd", "host-file", "Close a descriptor.", "files"), - ("fsync", 792, "fsync fd", "host-file", "Sync file data and metadata.", "files"), - ("fdsync", 793, "fdsync fd", "host-file", "Sync file data only (fdatasync).", "files"), - ("memfd", 794, "memfd A off n flags", "host-file", "Create an anonymous in-memory file (memfd_create); return its descriptor.", "files"), - ("fchmod", 795, "fchmod fd mode", "host-file", "Set permissions on an open descriptor.", "files"), - ("chmod", 796, "chmod A off n mode", "host-file", "Set permissions on a checked path (fchmodat, flags 0).", "files"), - ("chown", 797, "chown A off n uid gid", "host-dir", "Set ownership on a checked path (fchownat, flags 0).", "dirs"), - ("faccess", 798, "faccess A off n mode", "host-file", "Check access to a checked path (faccessat): mode 0/1/2/4.", "files"), - ("getuid", 799, "getuid", "host-process", "Real user id of the process.", "dirs"), - ("geteuid", 799, "geteuid", "host-process", "Effective user id of the process.", "dirs"), - ("getgid", 799, "getgid", "host-process", "Real group id of the process.", "dirs"), - ("getegid", 799, "getegid", "host-process", "Effective group id of the process.", "dirs"), - ("fchdir", 800, "fchdir fd", "host-dir", "Change the working directory to an open directory descriptor.", "dirs"), - ("getppid", 801, "getppid", "host-process", "Parent process id.", "procs"), - ("setsid", 802, "setsid", "host-process", "Create a session and become its leader.", "procs"), - ("getpgid", 803, "getpgid pid", "host-process", "Process group id of pid (0 = self).", "procs"), - ("getsid", 804, "getsid pid", "host-process", "Session id of pid (0 = self).", "procs"), - ("syncfs", 805, "syncfs fd", "host-file", "Sync the filesystem containing an open descriptor.", "files"), - ("shutdown", 806, "shutdown fd how", "host-net", "Shut down part of a connected socket (how 0 read, 1 write, 2 both).", "sockets"), - ("flock", 807, "flock fd op", "host-file", "Advisory whole-file lock (Linux flock); op 1 shared, 2 exclusive, 8 unlock, |4 nonblocking.", "files"), - ("setpgid", 808, "setpgid pid pgid", "host-process", "Set a process's group (0 = self/own pid).", "procs"), - ("umask", 809, "umask mask", "host-file", "Set the file-mode mask; return the previous mask.", "files"), - ("fseek", 810, "fseek fd offset whence", "host-file", "Seek; return the resulting file offset.", "files"), - ("ftrunc", 811, "ftrunc fd length", "host-file", "Set an open descriptor's length (ftruncate).", "files"), - ("truncate", 812, "truncate A off n length", "host-file", "Set a checked path's length (truncate).", "files"), - ("unlink", 813, "unlink A off n", "host-file", "Remove the named file.", "files"), - ("makedir", 814, "makedir A off n mode", "host-dir", "Create a directory.", "dirs"), - ("rmdir", 815, "rmdir A off n", "host-dir", "Remove an empty directory.", "dirs"), - ("cwd", 816, "cwd A off capacity", "host-dir", "Write the current directory into writable bytes; the count includes the trailing zero.", "dirs"), - ("chdir", 817, "chdir A off n", "host-dir", "Change the working directory to a checked, nonempty path.", "dirs"), - ("readlnk", 818, "readlnk PATH off n OUT off capacity", "host-dir", "Read a symbolic link into writable output bytes; no zero byte is appended.", "dirs"), - ("getdnts", 819, "getdnts fd A off n", "host-dir", "Write raw Linux getdents64 records; return bytes written.", "dirs"), - ("fstat", 820, "fstat fd A off n", "host-file", "Write the 128-byte Linux ARM64 stat structure of an open descriptor.", "files"), - ("stat", 821, "stat A off n B off capacity", "host-file", "Metadata for a checked path (newfstatat) into a 128-byte ARM64 stat structure.", "files"), - ("lstat", 822, "lstat A off n B off capacity", "host-file", "As stat, without following a final symbolic link.", "files"), - ("renames", 823, "renames A off n flags", "host-dir", "Rename the two paths of a packed list (renameat2); flag 1 refuses replacement.", "dirs"), - ("link", 824, "link A off n", "host-dir", "Create a hard link from a packed two-path list (old, new).", "dirs"), - ("symlnk", 825, "symlnk A off n", "host-dir", "Create a symbolic link from a packed two-path list (target text, link path).", "dirs"), - ("monons", 826, "monons", "host-time", "Monotonic nanoseconds, for elapsed-time measurement.", "clock"), - ("realns", 827, "realns", "host-time", "Realtime nanoseconds since the Unix epoch.", "clock"), - ("sleepns", 828, "sleepns interval", "host-time", "Sleep for nonnegative nanoseconds; a negative interval traps 3.", "clock"), - ("socknew", 829, "socknew domain kind protocol", "host-net", "Create a socket.", "sockets"), - ("bind", 830, "bind fd A off n", "host-net", "Bind a socket to the address bytes of the slice.", "sockets"), - ("connect", 831, "connect fd A off n", "host-net", "Connect using the address bytes of the slice.", "sockets"), - ("listen", 832, "listen fd backlog", "host-net", "Listen for connections.", "sockets"), - ("accept", 833, "accept fd flags", "host-net", "Accept a connection (accept4) without peer-address output; return the descriptor.", "sockets"), - ("sockname", 834, "sockname fd A off n", "host-net", "Write the socket's address bytes; return the full address length.", "sockets"), - ("sockopt", 835, "sockopt fd level option A off n", "host-net", "Set one allowlisted four-byte socket option.", "sockets"), - ("recv", 836, "recv fd A off n flags", "host-net", "Receive into a writable slice.", "sockets"), - ("send", 837, "send fd A off n flags", "host-net", "Send a slice; MSG_NOSIGNAL is added so a closed peer returns an error.", "sockets"), - ("waitio", 838, "waitio fd events interval", "host-net", "Poll one descriptor: readiness bits, 0 on timeout, or negative errno.", "sockets"), - ("peercred", 839, "peercred fd A off capacity", "host-net", "Read SO_PEERCRED (pid, uid, gid as little-endian int32) into at least 12 writable bytes.", "sockets"), - ("pollfds", 840, "pollfds A off n interval", "host-net", "Poll packed eight-byte pollfd records in a writable slice.", "sockets"), - ("sendmsg", 841, "sendmsg fd A off n flags", "host-net", "Send one checked payload through a private msghdr, no ancillary data.", "sockets"), - ("fork", 842, "fork", "host-process", "Copy the process: 0 in the child, the child pid in the parent.", "procs"), - ("getpid", 843, "getpid", "host-process", "The current process id.", "procs"), - ("killpid", 844, "killpid pid signal", "host-process", "Send a signal; signal 0 checks existence and permission.", "procs"), - ("waitpid", 845, "waitpid pid A off n options", "host-process", "Wait with wait4; write a four-byte status; return the pid.", "procs"), - ("pipefds", 846, "pipefds A off n flags", "host-process", "Create a pipe (pipe2); write two little-endian 32-bit descriptors.", "procs"), - ("dupfd", 847, "dupfd fd target flags", "host-process", "Duplicate onto a chosen descriptor (dup3).", "procs"), - ("execprog", 848, "execprog A off n", "host-process", "Replace the process using a packed argument list and an empty environment; returns only on failure.", "procs"), - ("argcnt", 849, "argcnt", "host-process", "Argument count, including the executable name.", "argsenv"), - ("argread", 850, "argread index A off capacity", "host-process", "Copy one argument's bytes without a terminator; return its length.", "argsenv"), - ("envcnt", 851, "envcnt", "host-process", "Number of environment entries.", "argsenv"), - ("envread", 852, "envread index A off capacity", "host-process", "Copy one environment entry without its terminator; return its length.", "argsenv"), - ("random", 853, "random A off n flags", "host-time", "Fill a writable byte slice from getrandom; return the bytes written.", "clock"), + ("fopen", 941, "fopen A off n flags mode", "host-file", "Open a length-delimited path relative to the current directory; return the descriptor.", "files"), + ("fclose", 942, "fclose fd", "host-file", "Close a descriptor.", "files"), + ("fsync", 943, "fsync fd", "host-file", "Sync file data and metadata.", "files"), + ("fdsync", 944, "fdsync fd", "host-file", "Sync file data only (fdatasync).", "files"), + ("memfd", 945, "memfd A off n flags", "host-file", "Create an anonymous in-memory file (memfd_create); return its descriptor.", "files"), + ("fchmod", 946, "fchmod fd mode", "host-file", "Set permissions on an open descriptor.", "files"), + ("chmod", 947, "chmod A off n mode", "host-file", "Set permissions on a checked path (fchmodat, flags 0).", "files"), + ("chown", 948, "chown A off n uid gid", "host-dir", "Set ownership on a checked path (fchownat, flags 0).", "dirs"), + ("faccess", 949, "faccess A off n mode", "host-file", "Check access to a checked path (faccessat): mode 0/1/2/4.", "files"), + ("getuid", 950, "getuid", "host-process", "Real user id of the process.", "dirs"), + ("geteuid", 950, "geteuid", "host-process", "Effective user id of the process.", "dirs"), + ("getgid", 950, "getgid", "host-process", "Real group id of the process.", "dirs"), + ("getegid", 950, "getegid", "host-process", "Effective group id of the process.", "dirs"), + ("fchdir", 951, "fchdir fd", "host-dir", "Change the working directory to an open directory descriptor.", "dirs"), + ("getppid", 952, "getppid", "host-process", "Parent process id.", "procs"), + ("setsid", 953, "setsid", "host-process", "Create a session and become its leader.", "procs"), + ("getpgid", 954, "getpgid pid", "host-process", "Process group id of pid (0 = self).", "procs"), + ("getsid", 955, "getsid pid", "host-process", "Session id of pid (0 = self).", "procs"), + ("syncfs", 956, "syncfs fd", "host-file", "Sync the filesystem containing an open descriptor.", "files"), + ("shutdown", 957, "shutdown fd how", "host-net", "Shut down part of a connected socket (how 0 read, 1 write, 2 both).", "sockets"), + ("flock", 958, "flock fd op", "host-file", "Advisory whole-file lock (Linux flock); op 1 shared, 2 exclusive, 8 unlock, |4 nonblocking.", "files"), + ("setpgid", 959, "setpgid pid pgid", "host-process", "Set a process's group (0 = self/own pid).", "procs"), + ("umask", 960, "umask mask", "host-file", "Set the file-mode mask; return the previous mask.", "files"), + ("fseek", 961, "fseek fd offset whence", "host-file", "Seek; return the resulting file offset.", "files"), + ("ftrunc", 962, "ftrunc fd length", "host-file", "Set an open descriptor's length (ftruncate).", "files"), + ("truncate", 963, "truncate A off n length", "host-file", "Set a checked path's length (truncate).", "files"), + ("unlink", 964, "unlink A off n", "host-file", "Remove the named file.", "files"), + ("makedir", 965, "makedir A off n mode", "host-dir", "Create a directory.", "dirs"), + ("rmdir", 966, "rmdir A off n", "host-dir", "Remove an empty directory.", "dirs"), + ("cwd", 967, "cwd A off capacity", "host-dir", "Write the current directory into writable bytes; the count includes the trailing zero.", "dirs"), + ("chdir", 968, "chdir A off n", "host-dir", "Change the working directory to a checked, nonempty path.", "dirs"), + ("readlnk", 969, "readlnk PATH off n OUT off capacity", "host-dir", "Read a symbolic link into writable output bytes; no zero byte is appended.", "dirs"), + ("getdnts", 970, "getdnts fd A off n", "host-dir", "Write raw Linux getdents64 records; return bytes written.", "dirs"), + ("fstat", 971, "fstat fd A off n", "host-file", "Write the 128-byte Linux ARM64 stat structure of an open descriptor.", "files"), + ("stat", 972, "stat A off n B off capacity", "host-file", "Metadata for a checked path (newfstatat) into a 128-byte ARM64 stat structure.", "files"), + ("lstat", 973, "lstat A off n B off capacity", "host-file", "As stat, without following a final symbolic link.", "files"), + ("renames", 974, "renames A off n flags", "host-dir", "Rename the two paths of a packed list (renameat2); flag 1 refuses replacement.", "dirs"), + ("link", 975, "link A off n", "host-dir", "Create a hard link from a packed two-path list (old, new).", "dirs"), + ("symlnk", 976, "symlnk A off n", "host-dir", "Create a symbolic link from a packed two-path list (target text, link path).", "dirs"), + ("monons", 977, "monons", "host-time", "Monotonic nanoseconds, for elapsed-time measurement.", "clock"), + ("realns", 978, "realns", "host-time", "Realtime nanoseconds since the Unix epoch.", "clock"), + ("sleepns", 979, "sleepns interval", "host-time", "Sleep for nonnegative nanoseconds; a negative interval traps 3.", "clock"), + ("socknew", 980, "socknew domain kind protocol", "host-net", "Create a socket.", "sockets"), + ("bind", 981, "bind fd A off n", "host-net", "Bind a socket to the address bytes of the slice.", "sockets"), + ("connect", 982, "connect fd A off n", "host-net", "Connect using the address bytes of the slice.", "sockets"), + ("listen", 983, "listen fd backlog", "host-net", "Listen for connections.", "sockets"), + ("accept", 984, "accept fd flags", "host-net", "Accept a connection (accept4) without peer-address output; return the descriptor.", "sockets"), + ("sockname", 985, "sockname fd A off n", "host-net", "Write the socket's address bytes; return the full address length.", "sockets"), + ("sockopt", 987, "sockopt fd level option A off n", "host-net", "Set one allowlisted four-byte socket option.", "sockets"), + ("recv", 988, "recv fd A off n flags", "host-net", "Receive into a writable slice.", "sockets"), + ("send", 989, "send fd A off n flags", "host-net", "Send a slice; MSG_NOSIGNAL is added so a closed peer returns an error.", "sockets"), + ("waitio", 990, "waitio fd events interval", "host-net", "Poll one descriptor: readiness bits, 0 on timeout, or negative errno.", "sockets"), + ("peercred", 991, "peercred fd A off capacity", "host-net", "Read SO_PEERCRED (pid, uid, gid as little-endian int32) into at least 12 writable bytes.", "sockets"), + ("pollfds", 992, "pollfds A off n interval", "host-net", "Poll packed eight-byte pollfd records in a writable slice.", "sockets"), + ("sendmsg", 993, "sendmsg fd A off n flags", "host-net", "Send one checked payload through a private msghdr, no ancillary data.", "sockets"), + ("fork", 994, "fork", "host-process", "Copy the process: 0 in the child, the child pid in the parent.", "procs"), + ("getpid", 995, "getpid", "host-process", "The current process id.", "procs"), + ("killpid", 996, "killpid pid signal", "host-process", "Send a signal; signal 0 checks existence and permission.", "procs"), + ("waitpid", 997, "waitpid pid A off n options", "host-process", "Wait with wait4; write a four-byte status; return the pid.", "procs"), + ("pipefds", 998, "pipefds A off n flags", "host-process", "Create a pipe (pipe2); write two little-endian 32-bit descriptors.", "procs"), + ("dupfd", 999, "dupfd fd target flags", "host-process", "Duplicate onto a chosen descriptor (dup3).", "procs"), + ("execprog", 1000, "execprog A off n", "host-process", "Replace the process using a packed argument list and an empty environment; returns only on failure.", "procs"), + ("argcnt", 1002, "argcnt", "host-process", "Argument count, including the executable name.", "argsenv"), + ("argread", 1003, "argread index A off capacity", "host-process", "Copy one argument's bytes without a terminator; return its length.", "argsenv"), + ("envcnt", 1004, "envcnt", "host-process", "Number of environment entries.", "argsenv"), + ("envread", 1005, "envread index A off capacity", "host-process", "Copy one environment entry without its terminator; return its length.", "argsenv"), + ("random", 1006, "random A off n flags", "host-time", "Fill a writable byte slice from getrandom; return the bytes written.", "clock"), + ("peername", 986, "peername fd A off n", "host-net", "Write the connected peer's address bytes (getpeername) into a writable slice; return the full address length (greater than n means truncated).", "peername"), + ("execpure", 1001, "execpure A off n", "host-process", "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).", "procs"), ] for name, line, form, cat, summ, exid in HOST: params = form.split()[1:] @@ -157,15 +159,12 @@ for name, line, form, cat, summ, exid in HOST: [c(OMG, str(line), quote), HOST_HDR], exid) # pread / pwrite are in section 9.5 -PRW_NOTE = ("At the pin (omega-mv e5b32567) omc checks writability the wrong way round for these two words: " - "pwrite refuses a text or view source with error 20 and pread accepts a text destination (the kernel " - "then returns -14 EFAULT). Pass a global or new array to pwrite; never pass a text to pread.") word("pread", "host-file", "pread fd A off n pos", 5, host_types(["fd", "A", "off", "n", "pos"]), "long", "Read n bytes at file position pos into A[off..] without moving the descriptor offset; bytes read or -errno.", - [c(OMG, "482-483", "`pread fd A off n pos` / `pwrite fd A off n pos` (pos long)")], "files", notes=PRW_NOTE) + [c(OMG, "534", "`pread fd A off n pos` / `pwrite fd A off n pos` (pos long)")], "files") word("pwrite", "host-file", "pwrite fd A off n pos", 5, host_types(["fd", "A", "off", "n", "pos"]), "long", "Write A[off..off+n-1] at file position pos without moving the descriptor offset; bytes written or -errno.", - [c(OMG, "482-483", "`pread fd A off n pos` / `pwrite fd A off n pos` (pos long)")], "files", notes=PRW_NOTE) + [c(OMG, "534", "`pread fd A off n pos` / `pwrite fd A off n pos` (pos long)")], "files") # device words (seed/host/MAPPING.md) DEV = [ @@ -195,6 +194,16 @@ DEV = [ for name, line, form, types, res, summ, exid in DEV: word(name, "device", form, len(form.split()) - 1, types, res, summ + " Program mode only.", [c(MAP, str(line), f"`{form}`")], exid) +word("cpufence", "device", "cpufence", 0, [], "-", + "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.", + [c(OMG, "1122", "`cpufence` | Publication barrier (keyword id 199)."), + c(MAP, "23", "`cpufence` | Statement, keyword 199")], "cpu_order") +word("cpurelax", "device", "cpurelax", 0, [], "-", + "Statement: spin-wait hint for a bounded poll loop, no ordering (AArch64 YIELD, x86-64 PAUSE). " + "Accepted in function and program mode.", + [c(OMG, "1123", "`cpurelax` | Spin-wait hint, no ordering (keyword id 200)."), + c(MAP, "24", "`cpurelax` | Statement, keyword 200")], "cpu_order") # types TYPES = [("bool", None, "1-bit truth value: true 1, false 0", 1, "control"), @@ -208,9 +217,9 @@ TYPES = [("bool", None, "1-bit truth value: true 1, false 0", 1, "control"), ("long", None, "signed 64-bit", 8, "ints"), ("i64", "long", "signed 64-bit", 8, "ints")] for name, alias, desc, size, exid in TYPES: signed = desc.startswith("signed") - cite = (c(OMG, "447", "`true` and `false` are the bool numbers 1 and 0.") if name == "bool" else - c(OMG, "433-434", "(byte 8,") if signed else - c(OMG, "431", "(uchar 8, ushort 16, uint 32, ulong 64 bits)")) + cite = (c(OMG, "497", "`true` and `false` are the bool numbers 1 and 0.") if name == "bool" else + c(OMG, "483", "(byte 8,") if signed else + c(OMG, "481", "(uchar 8, ushort 16, uint 32, ulong 64 bits)")) summ = f"Type word: {desc} integer, sizeof {size}." if name != "bool" else "Type word: bool (true 1, false 0), sizeof 1; never an array element." if alias: summ = f"Alias of {alias} (same keyword id): {desc}, sizeof {size}." @@ -219,18 +228,36 @@ for name, alias, desc, size, exid in TYPES: word(name, "type", f"{name} VALUE (conversion) | NAME {name} (parameter) | to {name} (result)", 1, ["VALUE: any integer, float or bool value"], name if not alias else alias, summ + " As a prefix it converts a value, trapping 5 when out of range.", - [cite, c(OMG, "439", "A conversion ` v` traps 5 when the value is outside the new type.")], exid) - -OPS = [("add", "a + b", "431", "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width", "ints"), - ("sub", "a - b", "431", "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width", "arith"), - ("mul", "a * b", "431", "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width", "arith"), - ("div", "a / b, rounding toward zero; divisor 0 traps 2", "435", "div and rem trap 2 when the divisor is 0.", "arith"), - ("rem", "remainder with the sign of the dividend; divisor 0 traps 2", "435", "div and rem trap 2 when the divisor is 0.", "ints"), - ("and", "bitwise and (bool and for bools; eager)", "440-441", "the two values of an op", "arith"), - ("or", "bitwise or (bool or for bools; eager)", "440-441", "the two values of an op", "arith"), - ("xor", "bitwise exclusive or", "440-441", "the two values of an op", "arith"), - ("shl", "shift left; amount outside 0..width-1 traps 7", "437", "A shift amount outside 0 .. width - 1 traps 7", "arith"), - ("shr", "shift right (arithmetic for signed); amount outside 0..width-1 traps 7", "437", "shr of a signed value keeps the sign.", "arith")] + [cite, c(OMG, "489", "A conversion ` v` traps 5 when the value is outside the new type.")], exid) +QTY = "spec/quantities-and-modular.md" +word("qty", "type", "qty VALUE (conversion) | NAME qty (parameter) | to qty (result)", 1, + ["VALUE: an integer value"], "qty", + "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`.", + [c(QTY, "41", "Arithmetic operations are checked at runtime."), + c(QTY, "59", "is rejected at compile time (error 7)"), + c(QTY, "73", "The seeded syntax is prefix conversion (`q = qty w`, `w = ulong q`).")], "qty") +DIT_SCRUB = c(OMG, "835-836", "program mode only (error 9 in function mode), AArch64 only (error 25 under `target x86linux`), and give a long") +word("dit", "host-cpu", "dit v", 1, ["v: int 0 or 1 (else trap 3)"], "long", + "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.", + [c(OMG, "849", "**`dit v`** (v int, else error 7) sets PSTATE.DIT"), DIT_SCRUB], "secrets", profile="OM-2") +word("scrub", "host-cpu", "scrub n", 1, ["n: ulong, a multiple of 16 at most 1048576 (else trap 3)"], "long", + "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.", + [c(OMG, "856", "**`scrub n`** (n ulong, else error 7) zeroes the dead stack and the dead registers and gives 0."), + DIT_SCRUB], "secrets", profile="OM-2") + +OPS = [("add", "a + b", "481", "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width", "ints"), + ("sub", "a - b", "481", "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width", "arith"), + ("mul", "a * b", "481", "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width", "arith"), + ("div", "a / b, rounding toward zero; divisor 0 traps 2", "485", "div and rem trap 2 when the divisor is 0.", "arith"), + ("rem", "remainder with the sign of the dividend; divisor 0 traps 2", "485", "div and rem trap 2 when the divisor is 0.", "ints"), + ("and", "bitwise and (bool and for bools; eager)", "490", "the two values of an op", "arith"), + ("or", "bitwise or (bool or for bools; eager)", "490", "the two values of an op", "arith"), + ("xor", "bitwise exclusive or", "490", "the two values of an op", "arith"), + ("shl", "shift left; amount outside 0..width-1 traps 7", "487", "A shift amount outside 0 .. width - 1 traps 7", "arith"), + ("shr", "shift right (arithmetic for signed); amount outside 0..width-1 traps 7", "487", "shr of a signed value keeps the sign.", "arith")] for name, desc, line, quote, exid in OPS: word(name, "operator", f"{name} A B", 2, ["A: number type T", "B: the same type T"], "T", f"Binary operator: {desc}. Both operands have one type (no implicit conversion, error 7).", @@ -239,153 +266,149 @@ for name, desc in (("eq", "equal"), ("ne", "not equal"), ("lt", "less than"), (" ("gt", "greater than"), ("ge", "greater or equal")): word(name, "operator", f"{name} A B", 2, ["A: number type T", "B: the same type T"], "bool", f"Comparison: {desc} (unsigned or signed by the operands' type; IEEE for floats).", - [c(OMG, "567", "comparisons `eq ne lt le gt ge`")], "arith") + [c(OMG, "627", "comparisons `eq ne lt le gt ge`")], "arith") word("neg", "operator", "neg A", 1, ["A: number type T"], "T", "Negation: wraps for unsigned types, traps 1 for the signed minimum, IEEE for floats.", - [c(OMG, "433", "Signed add, sub, mul, neg, div and shl trap 1")], "arith") + [c(OMG, "483", "Signed add, sub, mul, neg, div and shl trap 1")], "arith") word("not", "operator", "not A", 1, ["A: integer type T or bool"], "T", "Bitwise complement of an integer; logical not of a bool.", - [c(OMG, "431", "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width")], "arith") + [c(OMG, "481", "Unsigned add, sub, mul, shl, neg, not wrap modulo 2^width")], "arith") -EMPTY_TEXT_NOTE = ("At the pin (omega-mv e5b32567) the count of an empty text (`text e \"\"`) is read from a stale " - "register (omega-mv #775): `len e` returns whatever that register holds (`ret int add 7 len e` exits " - "14), and get, part and write check against the same stale count, so they can use bytes past " - "the text instead of trapping 3. Fixed in omega-mv #904 (e2662fff): the count is 0. At this pin, " - "avoid empty texts.") D = "data" word("get", D, "get A i | get P field [i]", 2, ["A: array", "i: integer index"], "element type", "Read element i of an array (or a struct/layout field). A constant index outside is error 21; a run-time one traps 3.", - [c(OMG, "471", "`get A i` reads element i")], "arrays") + [c(OMG, "523", "`get A i` reads element i")], "arrays") word("len", D, "len A", 1, ["A: array or text"], "ulong", "Length of an array as a ulong.", - [c(OMG, "471", "`len A` is A's length as a ulong.")], "hello", notes=EMPTY_TEXT_NOTE) + [c(OMG, "523", "`len A` is A's length as a ulong.")], "hello") word("read", D, "read fd A off n", 4, ["fd: int", "A: writable uchar array", "off: ulong", "n: ulong"], "long", "Read n bytes from fd into A[off..]; bytes read or minus errno. Slice outside A traps 3.", - [c(OMG, "478", "`read fd A off n` and `write fd A off n` (fd int, off and n ulong)")], "files") + [c(OMG, "530", "`read fd A off n` and `write fd A off n` (fd int, off and n ulong)")], "files") word("write", D, "write fd A off n", 4, ["fd: int", "A: uchar array or text", "off: ulong", "n: ulong"], "long", "Write A[off..off+n-1] to fd; bytes written or minus errno. Slice outside A traps 3.", - [c(OMG, "478", "`read fd A off n` and `write fd A off n` (fd int, off and n ulong)")], "hello") -word("true", D, "true", 0, [], "bool", "The bool value 1.", [c(OMG, "447", "`true` and `false` are the bool numbers 1 and 0.")], "control") -word("false", D, "false", 0, [], "bool", "The bool value 0.", [c(OMG, "447", "`true` and `false` are the bool numbers 1 and 0.")], "control") + [c(OMG, "530", "`read fd A off n` and `write fd A off n` (fd int, off and n ulong)")], "hello") +word("true", D, "true", 0, [], "bool", "The bool value 1.", [c(OMG, "497", "`true` and `false` are the bool numbers 1 and 0.")], "control") +word("false", D, "false", 0, [], "bool", "The bool value 0.", [c(OMG, "497", "`true` and `false` are the bool numbers 1 and 0.")], "control") word("view", D, "NAME view T N | NAME view T * (parameter) | view A (argument)", 3, ["T: element type", "N: length or * (OM-2 unsized)"], "-", "Read-only array parameter of exact type and length; writing through it is error 20.", - [c(OMG, "464", "A parameter `NAME view T N` or `NAME edit T N`")], "arrays") + [c(OMG, "516", "A parameter `NAME view T N` or `NAME edit T N`")], "arrays") word("edit", D, "NAME edit T N | NAME edit T * (parameter) | edit A (argument)", 3, ["T: element type", "N: length or * (OM-2 unsized)"], "-", "Writable array parameter of exact type and length; a global is never passed (error 19).", - [c(OMG, "464", "A parameter `NAME view T N` or `NAME edit T N`")], "arrays") + [c(OMG, "516", "A parameter `NAME view T N` or `NAME edit T N`")], "arrays") S = "structure" word("fn", S, "fn NAME (PARAM TYPE)* to TYPE|void [inline]", 3, ["NAME: up to 63 characters", "PARAM: up to 8 characters, at most 6 slots"], "-", "Start a function; `end` closes it. `fn main` makes a whole Linux program (program mode).", - [c(OMG, "54", "a function; `end` closes it"), c(OMG, "402", "A program with a line `fn main` is a whole Linux program")], "hello") + [c(OMG, "59", "a function; `end` closes it"), c(OMG, "417", "A program with a line `fn main` is a whole Linux program")], "hello") word("to", S, "fn ... to TYPE|void", 1, ["TYPE: a scalar type or void"], "-", "Introduces a function's result type.", - [c(OMG, "54", "to | void")], "hello") + [c(OMG, "59", "to | void")], "hello") word("end", S, "end", 0, [], "-", "Closes fn, if/else, while, for, struct and layout blocks. A missing end is error 15.", - [c(OMG, "54", "`end` closes it")], "hello") + [c(OMG, "59", "`end` closes it")], "hello") word("if", S, "if COND / [else] / end", 1, ["COND: bool"], "-", "Conditional block.", - [c(OMG, "57", "if / else / end")], "control") -word("else", S, "else", 0, [], "-", "Second arm of an if block.", [c(OMG, "57", "if / else / end")], "control") -FOR_NOTE = ("At the pin no bound gives a loop more than 1000000 passes: `for ... bound N` is error 5 (it came with " - "omega-mv #857, 3a163bc5) and a while bound is at most 999999. For more passes use a number count, " - "which is unguarded, or nest two loops.") -word("while", S, "while COND [bound N] / end", 1, ["COND: bool", "N: 1..999999"], "-", + [c(OMG, "62", "if / else / end")], "control") +word("else", S, "else", 0, [], "-", "Second arm of an if block.", [c(OMG, "62", "if / else / end")], "control") +word("while", S, "while COND [bound N] / end", 1, ["COND: bool", "N: 1..9223372036854775807 (IR mode 1..1000000)"], "-", "Loop while COND holds; past N iterations (default 1000000) it traps 4.", - [c(OMG, "58", "while [bound N] / end")], "control") -word("bound", S, "while COND bound N", 1, ["N: integer literal or constant 1..999999"], "-", - "Iteration limit of a while loop; exceeding it traps 4. A for takes no bound at this pin (error 5).", - [c(OMG, "58", "N 1..999999, default 1000000; past N iterations: trap 4")], "control") -word("for", S, "for NAME TYPE COUNT [unroll] / end", 3, ["NAME: new counter", "TYPE: integer type", "COUNT: number or value of TYPE"], "-", - "Counted loop: NAME = 0 .. COUNT-1. A number COUNT runs unguarded; any other COUNT traps 4 after 1000000 passes, as a while with no bound.", - [c(OMG, "59", "for / end"), - c(OMG, "60", "(any other count: trap 4 after 1000000 passes, as a while with no bound)")], "for_guard", - notes=FOR_NOTE) + [c(OMG, "63", "while [bound N] / end")], "control") +word("bound", S, "while COND bound N | for NAME TYPE COUNT bound N", 1, + ["N: number or integer const 1..9223372036854775807 (IR mode 1..1000000)"], "-", + "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.", + [c(OMG, "63-64", "N 1..9223372036854775807 (a number or any integer const; IR mode: 1..1000000), default 1000000; past N iterations: trap 4"), + c(OMG, "66", "N as for while.")], "control") +word("for", S, "for NAME TYPE COUNT [bound N] / end", 3, ["NAME: new counter", "TYPE: integer type", "COUNT: number or value of TYPE"], "-", + "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.", + [c(OMG, "65", "for [bound N] / end"), + c(OMG, "66-68", "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")], + "for_guard") word("ret", S, "ret [VALUE]", 1, ["VALUE: the function's result type (none for void)"], "-", "Return from the function; ends the path (a later line in the block is error 17).", - [c(OMG, "65", "ret []")], "hello") + [c(OMG, "74", "ret []")], "hello") word("=", S, "NAME = VALUE", 2, ["NAME: new or existing name of the same type", "VALUE: any value"], "-", "Bind or overwrite a name (the = may be left out).", - [c(OMG, "55", " = ")], "hello") + [c(OMG, "60", " = ")], "hello") word("(", S, "( VALUE )", 1, ["VALUE: any value"], "VALUE's type", "Grouping: returns exactly the value inside; adds no code.", - [c(OMG, "589", "`(` and `)` are separate words")], "calls") + [c(OMG, "653", "`(` and `)` are separate words")], "calls") word(")", S, "( VALUE )", 1, ["VALUE: any value"], "VALUE's type", "Closes a group; a missing ) is error 16.", - [c(OMG, "589", "`(` and `)` are separate words")], "calls") + [c(OMG, "653", "`(` and `)` are separate words")], "calls") word("void", S, "fn ... to void", 0, [], "-", "A function that returns no value; ret without a value or reaching end returns.", - [c(OMG, "420", "`to void` makes a void function")], "arrays") + [c(OMG, "464", "`to void` makes a void function")], "arrays") ST = "statement" word("global", ST, "global NAME T N", 3, ["NAME: up to 8 characters", "T: element type", "N: 1..16777216"], "-", "A zero-filled pool of N elements in the program image. Program mode only; never passed as an argument (error 19).", - [c(OMG, "454", "`global NAME T N`: a pool of N elements (1 .. 16777216)")], "arrays") + [c(OMG, "504", "`global NAME T N`: a pool of N elements (1 .. 16777216)")], "arrays") word("text", ST, 'text NAME "bytes"', 2, ["NAME: up to 8 characters", "bytes: escapes \\n \\t \\\\ \\\""], "-", "A read-only uchar array holding the quoted bytes. Program mode only.", - [c(OMG, "457", '`text NAME "bytes"`: a read-only array of uchar')], "hello", notes=EMPTY_TEXT_NOTE) + [c(OMG, "507", '`text NAME "bytes"`: a read-only array of uchar')], "hello") word("put", ST, "put A i v | put P field [i] v", 3, ["A: writable array", "i: integer index", "v: element type"], "-", "Store v at element i. Into a view or text: error 20.", - [c(OMG, "66", "put ")], "arrays") + [c(OMG, "75", "put ")], "arrays") word("free", ST, "free (refused)", 0, [], "-", "Reserved and always refused with error 9: arrays are given back when their function returns (decision 24).", - [c(OMG, "462", "There is no `free`: nothing is given back by hand (decision 24), and the word is refused (error 9)."), - c(OMC, "8530-8531", "if or or or eq c 77 eq c 78 eq c 79 eq c 81")], "free_refused") + [c(OMG, "514", "There is no `free`: nothing is given back by hand (decision 24), and the word is refused (error 9)."), + c(OMC, "10464", "if or or or eq c 77 eq c 78 eq c 79 eq c 81")], "free_refused") word("own", ST, "own (refused)", 0, [], "-", "Reserved word from the om4 draft; as a statement omc refuses it with error 9.", - [c(OMC, "8530-8531", "if or or or eq c 77 eq c 78 eq c 79 eq c 81")], "own_refused") + [c(OMC, "10464", "if or or or eq c 77 eq c 78 eq c 79 eq c 81")], "own_refused") word("exit", ST, "exit v", 1, ["v: int"], "-", "End the program with status v modulo 256; ends the path.", - [c(OMG, "484", "`exit v` (v int) ends the program with status v modulo 256.")], "exit") + [c(OMG, "538", "`exit v` (v int) ends the program with status v modulo 256.")], "exit") word("note", ST, "note ...", 0, [], "-", "A comment line: nothing after the first word is read.", - [c(OMG, "486", "`note ...` is a line the translator does not read beyond its first word.")], "hello") + [c(OMG, "540", "`note ...` is a line the translator does not read beyond its first word.")], "hello") word("new", ST, "NAME = new T N v | NAME = new STRUCT v1 .. vn", 3, ["T: element type", "N: length", "v: initial element value"], "array", "A local array of N elements, each v, on the stack; only in a function's outermost block (error 9).", - [c(OMG, "460", "`NAME = new T N v`: a local array of N elements, each v, on the stack")], "arrays") + [c(OMG, "512", "`NAME = new T N v`: a local array of N elements, each v, on the stack")], "arrays") word("break", ST, "break", 0, [], "-", "Leave the innermost loop; outside a loop error 9.", - [c(OMG, "61", "leave the innermost loop; outside a loop: error 9.")], "control") + [c(OMG, "70", "leave the innermost loop; outside a loop: error 9.")], "control") word("trap", ST, "trap N", 1, ["N: 1..14"], "-", "Stop with trap code N: program mode exits 100 + N.", - [c(OMG, "67", "trap stop with that code")], "trapword") + [c(OMG, "76", "trap stop with that code")], "trapword") word("continue", ST, "continue", 0, [], "-", "Jump to the next iteration (a while's head, a for's increment).", - [c(OMG, "63", "jump to the next iteration")], "control") + [c(OMG, "72", "jump to the next iteration")], "control") word("const", ST, "const NAME TYPE LITERAL", 3, ["NAME: up to 8 characters", "TYPE: integer or float type", "LITERAL: value of TYPE"], "-", "A named typed constant, usable as a value, array length, for count, while bound or trap code.", - [c(OMG, "608", "`const NAME TYPE LITERAL` at top level defines a named value before use.")], "consts") + [c(OMG, "672", "`const NAME TYPE LITERAL` at top level defines a named value before use.")], "consts") word("struct", "struct", "struct Name field type [len] ... end", 3, ["fields: 1..16, at most 64 eight-byte cells"], "-", "A record type of eight-byte cells, declared on one line before the first fn.", - [c(OMG, "502", "`struct Name field type [len] ... end`, one line, before the first `fn`.")], "structs") + [c(OMG, "562", "`struct Name field type [len] ... end`, one line, before the first `fn`.")], "structs") word("sizeof", "struct", "sizeof T | sizeof STRUCT", 1, ["T: scalar type or struct"], "ulong", - "Size in bytes; a compile-time constant.", [c(OMG, "597", "`sizeof T` is the size in bytes of a scalar type")], "structs") + "Size in bytes; a compile-time constant.", [c(OMG, "661", "`sizeof T` is the size in bytes of a scalar type")], "structs") word("offsetof", "struct", "offsetof STRUCT field", 2, ["STRUCT: struct name", "field: field name"], "ulong", - "Byte offset of a field; a compile-time constant.", [c(OMG, "599", "`offsetof S f` is the byte offset of field `f`")], "structs") + "Byte offset of a field; a compile-time constant.", [c(OMG, "663", "`offsetof S f` is the byte offset of field `f`")], "structs") F = "float" word("f32", F, "f32 VALUE | 1.5f32", 1, ["VALUE: integer or float value"], "f32", "IEEE-754 binary32 type and conversion.", - [c(OMG, "552", "`f32` and `f64` are IEEE-754 binary32 and binary64.")], "floats") + [c(OMG, "612", "`f32` and `f64` are IEEE-754 binary32 and binary64.")], "floats") word("f64", F, "f64 VALUE | 1.5f64", 1, ["VALUE: integer or float value"], "f64", "IEEE-754 binary64 type and conversion.", - [c(OMG, "552", "`f32` and `f64` are IEEE-754 binary32 and binary64.")], "floats") + [c(OMG, "612", "`f32` and `f64` are IEEE-754 binary32 and binary64.")], "floats") word("bitcast", F, "bitcast T VALUE", 2, ["T: type of the same width", "VALUE: f32/i32/u32 or f64/i64/u64"], "T", - "Reinterpret the bits of a same-width value.", [c(OMG, "577", "`bitcast T value` reinterprets a value of the same width")], "floats") + "Reinterpret the bits of a same-width value.", [c(OMG, "637", "`bitcast T value` reinterprets a value of the same width")], "floats") for name, form, ar, summ in (("fsqrt", "fsqrt X", 1, "IEEE square root."), ("fabs", "fabs X", 1, "Absolute value."), ("fmin", "fmin A B", 2, "IEEE minNum (FMINNM)."), ("fmax", "fmax A B", 2, "IEEE maxNum (FMAXNM).")): word(name, F, form, ar, ["X: f32 or f64" if ar == 1 else "A, B: one float type"], "the operand type", summ, - [c(OMG, "571", "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float")], "floats") + [c(OMG, "631", "Intrinsics `fsqrt x` and `fabs x` take one float; `fmin a b` and `fmax a b` take two of one float")], "floats") O2 = "OM-2" -OM2 = c(OMG, "644-645", "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out") +OM2 = c(OMG, "710", "rotr rotl unroll inline fresh abstract seal open holds layout field at little big part out") for name, form, ar, types, res, summ, line, quote, exid in [ - ("rotr", "rotr X N", 2, ["X: unsigned type T", "N: T"], "T", "Rotate right; N outside 0..w-1 traps 7.", "669", "`rotr x n` and `rotl x n`", "om2_rotate"), - ("rotl", "rotl X N", 2, ["X: unsigned type T", "N: T"], "T", "Rotate left; N outside 0..w-1 traps 7.", "669", "`rotr x n` and `rotl x n`", "om2_rotate"), - ("unroll", "for i T K unroll", 0, ["K: number 1..64"], "-", "Compile the loop body K times with a constant counter.", "673", "`for i T K unroll`", "om2_unroll"), - ("inline", "fn NAME ... to T inline", 0, [], "-", "Compile every call of the function in place.", "677", "`fn NAME ... to T inline`", "om2_unroll"), - ("fresh", "NAME edit T N fresh", 0, ["N: at most 64"], "-", "Incoming elements are unspecified; every read needs a prior write (error 27).", "716", "A parameter `s edit T N fresh`", "om2_fresh"), - ("abstract", "abstract NAME T [ops W ...]", 2, ["T: uint or ulong", "W: rotr rotl and or xor"], "-", "Declare an abstract type made only by seal in NAMEmk.", "726", "`abstract NAME T [ops W ...]`", "om2_abstract"), - ("seal", "seal NAME v", 2, ["NAME: abstract type", "v: its base type T"], "NAME", "Make an abstract value; only inside the function NAMEmk (else error 28).", "728", "A value of it is made only by `seal NAME v`", "om2_abstract"), - ("open", "open v", 1, ["v: abstract value"], "base type T", "The base value of an abstract value.", "730", "`open v` gives the T value.", "om2_abstract"), - ("holds", "holds NAME dup32", 2, ["NAME: ulong abstract type"], "-", "Run-time invariant on every seal: high 32 bits equal low 32 (trap 10).", "727", "`holds NAME dup32`", "om2_abstract"), - ("ops", "abstract NAME T ops W ...", 1, ["W: rotr rotl and or xor"], "-", "The operations allowed on an abstract type.", "726", "[ops W ...]", "om2_abstract"), - ("layout", "layout NAME SIZE / field ... / end", 2, ["NAME: up to 8 bytes", "SIZE: 1..4096"], "-", "An external byte layout over a uchar array of SIZE bytes.", "703", "`layout NAME SIZE`", "om2_layout"), - ("field", "field F T [COUNT] at OFF little|big", 5, ["T: integer type", "COUNT: 1..4096", "OFF: byte offset"], "-", "One field of a layout.", "703", "`field F T [COUNT] at OFF little|big`", "om2_layout"), - ("at", "field F T at OFF ...", 1, ["OFF: byte offset"], "-", "Introduces a layout field's byte offset.", "703", "at OFF little|big", "om2_layout"), - ("little", "field ... at OFF little", 0, [], "-", "Little-endian layout field.", "703", "at OFF little|big", "om2_layout"), - ("big", "field ... at OFF big", 0, [], "-", "Big-endian layout field (REV on load/store).", "703", "at OFF little|big", "om2_layout"), - ("part", "part A o k", 3, ["A: array name", "o: ulong", "k: ulong"], "view/edit of k elements", "Elements o..o+k-1 of A, only as an argument for an unsized parameter.", "750", "`part A o k` (o, k ulong; another type is error 7)", "om2_part"), - ("out", "NAME out T N", 2, ["T: element type", "N: length"], "-", "A parameter written by the unit; inside it is an edit of T N.", "758", "A parameter `NAME out T N`", "om2_out"), - ("export", "export fn NAME ...", 0, [], "-", "Mark a function-mode entry (no fn main).", "762", "`export fn NAME ...` at top level", "om2_export"), + ("rotr", "rotr X N", 2, ["X: unsigned type T", "N: T"], "T", "Rotate right; N outside 0..w-1 traps 7.", "734", "`rotr x n` and `rotl x n`", "om2_rotate"), + ("rotl", "rotl X N", 2, ["X: unsigned type T", "N: T"], "T", "Rotate left; N outside 0..w-1 traps 7.", "734", "`rotr x n` and `rotl x n`", "om2_rotate"), + ("unroll", "for i T K unroll", 0, ["K: number 1..64"], "-", "Compile the loop body K times with a constant counter.", "738", "`for i T K unroll`", "om2_unroll"), + ("inline", "fn NAME ... to T inline", 0, [], "-", "Compile every call of the function in place.", "742", "`fn NAME ... to T inline`", "om2_unroll"), + ("fresh", "NAME edit T N fresh", 0, ["N: at most 64"], "-", "Incoming elements are unspecified; every read needs a prior write (error 27).", "781", "A parameter `s edit T N fresh`", "om2_fresh"), + ("abstract", "abstract NAME T [ops W ...]", 2, ["T: uint or ulong", "W: rotr rotl and or xor"], "-", "Declare an abstract type made only by seal in NAMEmk.", "791", "`abstract NAME T [ops W ...]`", "om2_abstract"), + ("seal", "seal NAME v", 2, ["NAME: abstract type", "v: its base type T"], "NAME", "Make an abstract value; only inside the function NAMEmk (else error 28).", "793", "A value of it is made only by `seal NAME v`", "om2_abstract"), + ("open", "open v", 1, ["v: abstract value"], "base type T", "The base value of an abstract value.", "795", "`open v` gives the T value.", "om2_abstract"), + ("holds", "holds NAME dup32", 2, ["NAME: ulong abstract type"], "-", "Run-time invariant on every seal: high 32 bits equal low 32 (trap 10).", "792", "`holds NAME dup32`", "om2_abstract"), + ("ops", "abstract NAME T ops W ...", 1, ["W: rotr rotl and or xor"], "-", "The operations allowed on an abstract type.", "791", "[ops W ...]", "om2_abstract"), + ("layout", "layout NAME SIZE / field ... / end", 2, ["NAME: up to 8 bytes", "SIZE: 1..4096"], "-", "An external byte layout over a uchar array of SIZE bytes.", "768", "`layout NAME SIZE`", "om2_layout"), + ("field", "field F T [COUNT] at OFF little|big", 5, ["T: integer type", "COUNT: 1..4096", "OFF: byte offset"], "-", "One field of a layout.", "768", "`field F T [COUNT] at OFF little|big`", "om2_layout"), + ("at", "field F T at OFF ...", 1, ["OFF: byte offset"], "-", "Introduces a layout field's byte offset.", "768", "at OFF little|big", "om2_layout"), + ("little", "field ... at OFF little", 0, [], "-", "Little-endian layout field.", "768", "at OFF little|big", "om2_layout"), + ("big", "field ... at OFF big", 0, [], "-", "Big-endian layout field (REV on load/store).", "768", "at OFF little|big", "om2_layout"), + ("part", "part A o k", 3, ["A: array name", "o: ulong", "k: ulong"], "view/edit of k elements", "Elements o..o+k-1 of A, only as an argument for an unsized parameter.", "815", "`part A o k` (o, k ulong; another type is error 7)", "om2_part"), + ("out", "NAME out T N", 2, ["T: element type", "N: length"], "-", "A parameter written by the unit; inside it is an edit of T N.", "823", "A parameter `NAME out T N`", "om2_out"), + ("export", "export fn NAME ...", 0, [], "-", "Mark a function-mode entry (no fn main).", "827", "`export fn NAME ...` at top level", "om2_export"), ]: word(name, O2, form, ar, types, res, summ + " OM-2 units only (first line `om2`).", [c(OMG, line, quote), OM2], exid, profile="OM-2") @@ -396,38 +419,39 @@ assert not missing and not extra, (missing, extra) # ---------------------------------------------------------------- errors G15 = "seed/omc/gate15.sh" ERR = { - 1: ("stdin read failed", "The compiler could not read its input (stdin is not readable, e.g. a directory).", "Give omc a readable source file on stdin.", 12005, None), - 2: ("stdout write failed", "The compiler could not write the binary (stdout is full or closed).", "Write omc's stdout to a regular file with space.", 8166, None), - 3: ("unknown name or field", "A word is used as a name but nothing of that name is in scope (or a struct has no such field).", "Declare the name first, or fix its spelling.", 2104, (OMG, "514", "An unknown field is error 3.")), - 4: ("line ends early", "The line stops before a required operand or word.", "Supply the missing operand (see the word's form).", 2743, (OMG, "503", "error 4 if the line ends before `end`")), - 5: ("extra words", "Words remain on the line after a complete statement.", "Remove the extra words or split the line.", 2785, (OMG, "938", "trailing words (error 5)")), - 6: ("malformed number", "A number has a non-digit character, more than 20 digits or a bad hex form.", "Write a plain decimal (or OM-2 lowercase 0x hex) number.", 1504, (OMG, "445", "more than 20 digits, or a character that is not a digit, is error 6")), - 7: ("type mismatch", "Two values of an operation, an assignment or a call argument have different types; there are no implicit conversions.", "Convert explicitly with a type word, e.g. `add int a int b`.", 2077, (OMG, "440-441", "or the line is refused (error 7).")), - 8: ("out of range", "A literal is outside its type, or a count/bound/trap code is out of its range.", "Use a value inside the type's range or a wider type.", 1815, (OMG, "443-444", "it must be a")), - 9: ("word not allowed here", "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.", "Move the statement to a valid position or use the documented alternative.", 2686, (OMG, "61", "outside a loop: error 9.")), - 10: ("duplicate name", "A name already in scope, a function or a struct is declared again.", "Choose a new name.", 2369, (OMG, "424-425", "A new name")), - 11: ("ambiguous bare number", "A number appears where no context gives it a type.", "Prefix it with a type word, e.g. `x = int 5`.", 2609, (OMG, "442", "A bare number takes the type the place needs.")), - 12: ("register pool exhausted", "More than 16 values are live at once in a function.", "Split the function or reuse names so fewer values are live.", 2410, (OMG, "492", "A function that needs more than the 16 registers it hands out is error 12.")), - 13: ("name too long", "A variable, text, global or constant name has more than 8 characters (functions allow 63).", "Shorten the name to at most 8 characters.", 2089, (OMG, "423", "Function names may have up to 63 characters; other names up to 8 (error 13).")), - 14: ("capacity exceeded", "A compiler table is full: too many names/globals, struct fields or cells, break sites, fresh arrays, unroll growth.", "Reduce the count below the documented capacity.", 524, (OMG, "490", "Input over a capacity is refused with error 14, never overrun")), - 15: ("missing end", "The input ends inside an open block.", "Add the missing `end`.", 6671, (OMG, "944", "Missing function `end` is error 15.")), - 16: ("syntax error or unknown word", "A line does not start with a known statement form, or a type/length position holds something else.", "Check the word's spelling and form with lookup.", 746, (OMG, "453", "a pool written without its length is refused (error 16)")), - 17: ("line after a path end", "A line follows ret, break, continue, trap or exit in the same block and can never run.", "Delete the unreachable line or move it before the path end.", 6405, (OMG, "61-62", "(a later line in the same block is error 17)")), - 18: ("missing ret", "A function with a result type can reach its end without a ret.", "Add a ret on every path (or make the function void).", 7609, (OMG, "421", "A function with a return type whose `end` can be reached is error 18.")), - 19: ("global passed or same array twice", "A global is passed as an argument, or one array is passed twice in a call.", "Copy the global into a local array (new) or pass distinct arrays.", 3772, (OMG, "467-468", "A global is")), - 20: ("write to a read-only array", "put, read or an edit argument targets a view or a text.", "Write into a local, global or edit array instead.", 3777, (OMG, "465", "A view is read-only; `put`, `read` into it, or passing it as edit is error 20.")), - 21: ("constant index out of range", "A literal index is outside the array or field.", "Use an index below the length.", 3687, (OMG, "472", "A number index must be inside A when om4 reads it (error 21)")), - 22: ("bad text literal", "A text literal has an unknown escape or no closing quote.", "Use only \\n \\t \\\\ \\\" escapes and close the quote.", 627, (OMG, "458-459", "any other escape, or a quote missing its end,")), - 23: ("size capacity", "An array is over 16777216 elements, globals over 1 GiB or local arrays over 4 MiB.", "Use a smaller array.", 2696, (OMG, "461", "at most 4 MiB of local arrays (error 23)")), - 24: ("branch displacement out of range", "A conditional branch target is misaligned or more than 2^18 words away.", "Split very large functions or programs; this is reached only by programs with about 1 MiB of code between a branch and its target.", 2468, (OMC, "2463-2464", "else error 24 before any artifact is accepted")), - 27: ("fresh element read before write (OM-2 init)", "A fresh parameter element is read before it is definitely written, or the array is passed on.", "Write every element before reading it (put with a number index).", 9622, (OMG, "720", "else error 27, `obligation=init`, on the get line")), - 28: ("abstract constructor violation (OM-2 ctor)", "seal outside the NAMEmk constructor, or a bad holds predicate.", "Seal only inside the function named NAME followed by mk.", 9187, (OMG, "729-730", "a `seal` anywhere else is")), - 29: ("layout violation (OM-2 layout)", "Layout SIZE outside 1..4096, a field past SIZE or overlapping an earlier field.", "Keep every field inside SIZE and non-overlapping.", 9747, (OMG, "706", "SIZE outside 1..4096 or a `layout` after the first `fn` is error 29")), - 30: ("contract syntax (OM-2)", "Misplaced requires/ensures/invariant, result outside a value postcondition, or a forbidden predicate operation.", "Put contracts first in the function or loop body and use only pure integer/bool operations.", 3894, (OMG, "1177-1178", "Compiler error **30** means misplaced")), + 1: ("stdin read failed", "The compiler could not read its input (stdin is not readable, e.g. a directory).", "Give omc a readable source file on stdin.", 14097, None), + 2: ("stdout write failed", "The compiler could not write the binary (stdout is full or closed).", "Write omc's stdout to a regular file with space.", 10024, None), + 3: ("unknown name or field", "A word is used as a name but nothing of that name is in scope (or a struct has no such field).", "Declare the name first, or fix its spelling.", 2281, (OMG, "574", "An unknown field is error 3.")), + 4: ("line ends early", "The line stops before a required operand or word.", "Supply the missing operand (see the word's form).", 3360, (OMG, "563", "error 4 if the line ends before `end`")), + 5: ("extra words", "Words remain on the line after a complete statement.", "Remove the extra words or split the line.", 3405, (OMG, "1157", "trailing words (error 5)")), + 6: ("malformed number", "A number has a non-digit character, more than 20 digits or a bad hex form.", "Write a plain decimal (or OM-2 lowercase 0x hex) number.", 1653, (OMG, "495", "more than 20 digits, or a character that is not a digit, is error 6")), + 7: ("type mismatch", "Two values of an operation, an assignment or a call argument have different types; there are no implicit conversions.", "Convert explicitly with a type word, e.g. `add int a int b`.", 2254, (OMG, "491", "or the line is refused (error 7).")), + 8: ("out of range", "A literal is outside its type, or a count/bound/trap code is out of its range.", "Use a value inside the type's range or a wider type.", 1970, (OMG, "493", "it must be a")), + 9: ("word not allowed here", "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.", "Move the statement to a valid position or use the documented alternative.", 3303, (OMG, "70", "outside a loop: error 9.")), + 10: ("duplicate name", "A name already in scope, a function or a struct is declared again.", "Choose a new name.", 2891, (OMG, "470", "A new name")), + 11: ("ambiguous bare number", "A number appears where no context gives it a type.", "Prefix it with a type word, e.g. `x = int 5`.", 3199, (OMG, "492", "A bare number takes the type the place needs.")), + 12: ("register pool exhausted", "More than 16 values are live at once in a function.", "Split the function or reuse names so fewer values are live.", 2933, (OMG, "546", "A function that needs more than the 16 registers it hands out is error 12.")), + 13: ("name too long", "A variable, text, global or constant name has more than 8 characters (functions allow 63).", "Shorten the name to at most 8 characters.", 2266, (OMG, "467", "Function names may have up to 63 characters; other names up to 8 (error 13).")), + 14: ("capacity exceeded", "A compiler table is full: too many names/globals, struct fields or cells, break sites, fresh arrays, unroll growth.", "Reduce the count below the documented capacity.", 579, (OMG, "544", "Input over a capacity is refused with error 14, never overrun")), + 15: ("missing end", "The input ends inside an open block.", "Add the missing `end`.", 8451, (OMG, "1163", "Missing function `end` is error 15.")), + 16: ("syntax error or unknown word", "A line does not start with a known statement form, or a type/length position holds something else.", "Check the word's spelling and form with lookup.", 820, (OMG, "503", "a pool written without its length is refused (error 16)")), + 17: ("line after a path end", "A line follows ret, break, continue, trap or exit in the same block and can never run.", "Delete the unreachable line or move it before the path end.", 10302, (OMG, "71", "(a later line in the same block is error 17)")), + 18: ("missing ret", "A function with a result type can reach its end without a ret.", "Add a ret on every path (or make the function void).", 9454, (OMG, "465", "A function with a return type whose `end` can be reached is error 18.")), + 19: ("global passed or same array twice", "A global is passed as an argument, or one array is passed twice in a call.", "Copy the global into a local array (new) or pass distinct arrays.", 5107, (OMG, "519", "A global is")), + 20: ("write to a read-only array", "put, read or an edit argument targets a view or a text.", "Write into a local, global or edit array instead.", 5112, (OMG, "517", "A view is read-only; `put`, `read` into it, or passing it as edit is error 20.")), + 21: ("constant index out of range", "A literal index is outside the array or field.", "Use an index below the length.", 5022, (OMG, "524", "A number index must be inside A when om4 reads it (error 21)")), + 22: ("bad text literal", "A text literal has an unknown escape or no closing quote.", "Use only \\n \\t \\\\ \\\" escapes and close the quote.", 701, (OMG, "508", "any other escape, or a quote missing its end,")), + 23: ("size capacity", "An array is over 16777216 elements, globals over 1 GiB or local arrays over 4 MiB.", "Use a smaller array.", 3313, (OMG, "513", "at most 4 MiB of local arrays (error 23)")), + 24: ("branch displacement out of range", "A branch target is misaligned or out of reach: B.cond, CBZ and CBNZ reach 2^18 words, B and BL 2^25.", "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.", 2999, (OMG, "425", "refused with error 24 before any output is accepted")), + 25: ("not available on this target", "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.", "Use the default AArch64 target for that construct, or write it with words the target supports.", 595, (OMG, "443-444", "a bare unit is refused at line 1 with error 25")), + 27: ("fresh element read before write (OM-2 init)", "A fresh parameter element is read before it is definitely written, or the array is passed on.", "Write every element before reading it (put with a number index).", 11537, (OMG, "785", "else error 27, `obligation=init`, on the get line")), + 28: ("abstract constructor violation (OM-2 ctor)", "seal outside the NAMEmk constructor, or a bad holds predicate.", "Seal only inside the function named NAME followed by mk.", 11180, (OMG, "794", "a `seal` anywhere else is")), + 29: ("layout violation (OM-2 layout)", "Layout SIZE outside 1..4096, a field past SIZE or overlapping an earlier field.", "Keep every field inside SIZE and non-overlapping.", 11695, (OMG, "771", "SIZE outside 1..4096 or a `layout` after the first `fn` is error 29")), + 30: ("contract syntax (OM-2)", "Misplaced requires/ensures/invariant, result outside a value postcondition, or a forbidden predicate operation.", "Put contracts first in the function or loop body and use only pure integer/bool operations.", 5251, (OMG, "1479", "Compiler error **30** means misplaced")), } ERRS = {} for k, (meaning, cause, fix, line, doc) in ERR.items(): - cites = [c(OMC, str(line), f"fail {k}"), c(OMC, "292-293", "fn fail code ulong to void")] + cites = [c(OMC, str(line), f"fail {k}"), c(OMC, "345", "fn fail code ulong to void")] if doc: cites.append(c(*doc)) e = {"meaning": meaning, "cause": cause, "fix": fix, "citations": cites} @@ -442,21 +466,20 @@ for k, (meaning, cause, fix, line, doc) in ERR.items(): e["example_note"] = "No minimal example: it needs about 1 MiB of machine code between a branch and its target." else: e["example"] = f"e{k:02d}" - if k in range(3, 24): - e["citations"].append(c(G15, "85", "codes 3..23; 1 and 2 are compiler I/O")) + e["citations"].append(c(G15, "154", "refusal cases (codes 1..25, 27..30; 24 with its accept side)")) ERRS[str(k)] = e # ---------------------------------------------------------------- traps -TR = {1: ("OVERFLOW", "checked signed arithmetic out of range", "Signed add/sub/mul/neg/div/shl produced a value outside the type.", "Use a wider type, check the range first, or use an unsigned type if wrapping is intended.", (OMG, "433", "Signed add, sub, mul, neg, div and shl trap 1")), - 2: ("DIV0", "division by zero", "div or rem with a divisor of 0.", "Check the divisor before dividing.", (OMG, "435", "div and rem trap 2 when the divisor is 0.")), - 3: ("BOUNDS", "index or slice out of bounds", "A run-time index is not below the length, or a host/read/write slice is outside its array.", "Check the index against len A, or fix off/n.", (OMG, "473", "traps 3 when it is not below the length")), - 4: ("LOOP_BOUND", "loop exceeded its bound", "A while ran more than its bound (default 1000000) iterations, or a for whose count is not a number ran 1000000 passes.", "Fix the loop condition, raise a while's bound N (at most 999999), or for more passes use a number count or nest two loops.", (OMG, "58", "past N iterations: trap 4")), - 5: ("CAST", "checked conversion out of range", "A conversion `T v` got a value outside T.", "Check the range before converting, or convert to a wider type.", (OMG, "439", "A conversion ` v` traps 5 when the value is outside the new type.")), - 6: ("OOM", "stack pool exhausted", "A call or local array would go below the fixed 8 MiB stack (deep recursion).", "Bound the recursion or use a loop / smaller local arrays.", (OMG, "426-427", "a call or a local array that would go below it traps")), - 7: ("SHIFT", "shift or rotate amount out of range", "A shift or rotate amount is outside 0..width-1.", "Check the amount against the width.", (OMG, "437", "A shift amount outside 0 .. width - 1 traps 7")), +TR = {1: ("OVERFLOW", "checked signed arithmetic out of range", "Signed add/sub/mul/neg/div/shl produced a value outside the type.", "Use a wider type, check the range first, or use an unsigned type if wrapping is intended.", (OMG, "483", "Signed add, sub, mul, neg, div and shl trap 1")), + 2: ("DIV0", "division by zero", "div or rem with a divisor of 0.", "Check the divisor before dividing.", (OMG, "485", "div and rem trap 2 when the divisor is 0.")), + 3: ("BOUNDS", "index or slice out of bounds", "A run-time index is not below the length, or a host/read/write slice is outside its array.", "Check the index against len A, or fix off/n.", (OMG, "525", "traps 3 when it is not below the length")), + 4: ("LOOP_BOUND", "loop exceeded its bound", "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.", "Fix the loop condition or give the loop a larger `bound N` (up to 9223372036854775807).", (OMG, "64", "past N iterations: trap 4")), + 5: ("CAST", "checked conversion out of range", "A conversion `T v` got a value outside T.", "Check the range before converting, or convert to a wider type.", (OMG, "489", "A conversion ` v` traps 5 when the value is outside the new type.")), + 6: ("OOM", "stack pool exhausted", "A call or local array would go below the fixed 8 MiB stack (deep recursion).", "Bound the recursion or use a loop / smaller local arrays.", (OMG, "472", "a call or a local array that would go below it traps")), + 7: ("SHIFT", "shift or rotate amount out of range", "A shift or rotate amount is outside 0..width-1.", "Check the amount against the width.", (OMG, "487", "A shift amount outside 0 .. width - 1 traps 7")), 8: ("RUNTIME", "runtime invariant broken", "A runtime invariant (double release, bad handle) failed; checked native code raises it only through `trap 8`.", "Find the explicit trap 8 in the program.", (IRH, "176", "OSC_TRAP_RUNTIME = 8")), - 9: ("REQUIRES", "precondition failed", "A requires clause was false on entry.", "Call the function only with arguments that satisfy its requires clauses.", (OMG, "1173", "False `requires` uses existing trap **9** (program exit **109**)")), - 10: ("ENSURES", "postcondition or invariant failed", "An ensures, invariant or holds check was false.", "Fix the function body or loop so the stated property holds.", (OMG, "1174", "`ensures` or `invariant` uses existing trap **10** (exit **110**).")), + 9: ("REQUIRES", "precondition failed", "A requires clause was false on entry.", "Call the function only with arguments that satisfy its requires clauses.", (OMG, "1475", "False `requires` uses existing trap **9** (program exit **109**)")), + 10: ("ENSURES", "postcondition or invariant failed", "An ensures, invariant or holds check was false.", "Fix the function body or loop so the stated property holds.", (OMG, "1476", "`ensures` or `invariant` uses existing trap **10** (exit **110**).")), 11: ("ARENA_FULL", "arena allocation over capacity", "An OSC arena allocation exceeded the arena's capacity; native program mode raises it only through `trap 11`.", "Find the explicit trap 11 in the program.", (IRH, "183", "OSC_TRAP_ARENA_FULL = 11")), 12: ("STALE", "stale versioned handle", "A handle whose generation no longer matches its slot; native program mode raises it only through `trap 12`.", "Find the explicit trap 12 in the program.", (IRH, "185", "OSC_TRAP_STALE = 12")), 13: ("POOL_FULL", "pool allocation with every slot live", "An OSC pool allocation found no free slot; native program mode raises it only through `trap 13`.", "Find the explicit trap 13 in the program.", (IRH, "186", "OSC_TRAP_POOL_FULL = 13")), @@ -464,62 +487,62 @@ TR = {1: ("OVERFLOW", "checked signed arithmetic out of range", "Signed add/sub/ TRAPS = {} for k, (name, meaning, cause, fix, doc) in TR.items(): TRAPS[str(k)] = {"name": name, "meaning": meaning, "cause": cause, "fix": fix, - "citations": [c(*doc), c(OMG, "406", "A trap in program mode ends the program with exit status 100 + the trap code")], + "citations": [c(*doc), c(OMG, "421", "A trap in program mode ends the program with exit status 100 + the trap code")], "example": "contract_fail" if k == 9 else f"t{k:02d}"} -TRAPS["4"]["citations"].insert(1, c(OMG, "60", "(any other count: trap 4 after 1000000 passes, as a while with no bound)")) +TRAPS["4"]["citations"].insert(1, c(OMG, "66-68", "With no bound a number count is not guarded and any other count traps 4 after 1000000 passes")) # ---------------------------------------------------------------- topics TOP = { "requires": {"form": "requires BOOL", "summary": "OM-2 precondition: part of a function's prefix, checked on entry; false traps 9.", "details": "Clauses run in declaration order after parameter binding. Predicates are pure: integer/bool operations, conversions, len and array reads only.", - "citations": [c(OMG, "1128", "`requires BOOL` and `ensures BOOL` form a function's prefix"), c(OMG, "1173", "False `requires` uses existing trap **9**")], "example": "contract_fail"}, + "citations": [c(OMG, "1430", "`requires BOOL` and `ensures BOOL` form a function's prefix"), c(OMG, "1475", "False `requires` uses existing trap **9**")], "example": "contract_fail"}, "ensures": {"form": "ensures BOOL", "summary": "OM-2 postcondition: checked on every normal return; `result` names the returned value; false traps 10.", "details": "Not run on exit or a trap. A parameter means its current value at return.", - "citations": [c(OMG, "1133", "Postconditions execute in declaration order on **every normal return**")], "example": "contracts"}, + "citations": [c(OMG, "1435", "Postconditions execute in declaration order on **every normal return**")], "example": "contracts"}, "invariant": {"form": "invariant BOOL", "summary": "OM-2 loop invariant: the prefix of a while or for body, checked at the loop head; false traps 10.", "details": "Runs on entry, every backedge and before the final false condition.", - "citations": [c(OMG, "1146", "`invariant BOOL` forms the prefix of a `while` or `for` body")], "example": "contracts"}, + "citations": [c(OMG, "1448", "`invariant BOOL` forms the prefix of a `while` or `for` body")], "example": "contracts"}, "result": {"form": "result", "summary": "OM-2: the returned value, available only inside ensures clauses (elsewhere error 30).", "details": "It has the declared return type; the caller receives the same value after the checks.", - "citations": [c(OMG, "1137", "The read-only name `result` is available only in value postconditions.")], "example": "contracts"}, + "citations": [c(OMG, "1439", "The read-only name `result` is available only in value postconditions.")], "example": "contracts"}, "om2": {"form": "om2 | om2 diag | om2 fmt", "summary": "First line that opts a unit into profile OM-2 (rotate, unroll, inline, layout, abstract types, contracts, unsized views).", "details": "Leading blank and note lines are skipped; in an OM-1 unit the om2 line is error 16.", - "citations": [c(OMG, "642-643", "when the next line is exactly `om2`")], "example": "om2_rotate"}, + "citations": [c(OMG, "707", "when the next line is exactly `om2`")], "example": "om2_rotate"}, "exit_status": {"summary": "Program exit status: main's value modulo 256; a trap N exits 100 + N; exit v exits v modulo 256.", "details": "An explicit exit 101..114 cannot be told apart from a trap by status alone.", - "citations": [c(OMG, "404-405", "main's value modulo 256"), c(OMG, "406", "exit status 100 + the trap code")], "example": "exit"}, + "citations": [c(OMG, "420", "main's value modulo 256"), c(OMG, "421", "exit status 100 + the trap code")], "example": "exit"}, "packed_list": {"summary": "Host-word argument lists: little-endian u16 count, then per record a u16 length and the bytes.", "details": "At most 4096 bytes, count 1..64; zero bytes, truncation or trailing bytes trap 3. Used by execprog, renames, link, symlnk.", - "citations": [c(OMG, "896", "A packed list is a little-endian `u16` count followed by that many records")], "example": "dirs"}, + "citations": [c(OMG, "1062", "A packed list is a little-endian `u16` count followed by that many records")], "example": "dirs"}, "paths": {"summary": "Host paths are length-delimited byte slices of at most 4095 bytes; embedded zero bytes trap 3.", "details": "Relative paths resolve against the current directory (AT_FDCWD).", - "citations": [c(OMG, "857", "Paths are at most 4095 bytes.")], "example": "files"}, + "citations": [c(OMG, "1010", "Paths are at most 4095 bytes.")], "example": "files"}, "host_words": {"summary": "Native host words: Linux system calls with checked slices; results are long, negative errno on failure.", "details": "They do not form a sandbox: they run with the process's permissions. Program mode only.", - "citations": [c(OMG, "775-778", "These operations do not form a sandbox")], "example": "files"}, + "citations": [c(OMG, "928", "These operations do not form a sandbox")], "example": "files"}, "compile_errors": {"summary": "omc writes `omc: line N: error K` to stderr and exits with K; use explain_error for any K.", - "details": "Codes 1..24 and 27..30 exist at the pin; 25 and 26 are unused.", - "citations": [c(OMC, "292-293", "fn fail code ulong to void")], "example": "e03"}, + "details": "Codes 1..25 and 27..30 exist at the pin; 26 is unused.", + "citations": [c(OMC, "345", "fn fail code ulong to void")], "example": "e03"}, "traps": {"summary": "Run-time traps 1..14 end a program with exit 100 + code.", - "details": "Codes are part of the observable semantics and are never renumbered. Loops trap 4: a while past its bound (default 1000000) and a for whose count is not a number after 1000000 passes.", - "citations": [c(IRH, "165-166", "Trap codes are part of the observable semantics"), - c(OMG, "58", "N 1..999999, default 1000000; past N iterations: trap 4"), - c(OMG, "60", "(any other count: trap 4 after 1000000 passes, as a while with no bound)")], "example": "t02"}, - "loops": {"form": "while COND [bound N] / end | for NAME TYPE COUNT [unroll] / end", - "summary": "Every loop except a for with a number count traps 4 (exit 104) past a pass limit.", - "details": "A while runs at most N passes (bound N, 1..999999; default 1000000). A for with a number COUNT is unguarded; any other COUNT traps 4 after 1000000 passes. At this pin a for takes no bound (error 5).", - "citations": [c(OMG, "58", "N 1..999999, default 1000000; past N iterations: trap 4"), - c(OMG, "60", "(any other count: trap 4 after 1000000 passes, as a while with no bound)")], "example": "for_guard"}, + "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.", + "citations": [c(IRH, "165", "Trap codes are part of the observable semantics"), + c(OMG, "64", "default 1000000; past N iterations: trap 4"), + c(OMG, "66-68", "With no bound a number count is not guarded and any other count traps 4 after 1000000 passes")], "example": "t02"}, + "loops": {"form": "while COND [bound N] / end | for NAME TYPE COUNT [bound N] / end", + "summary": "Every loop except a for with a number count and no bound traps 4 (exit 104) past a pass limit.", + "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.", + "citations": [c(OMG, "63-64", "N 1..9223372036854775807 (a number or any integer const; IR mode: 1..1000000), default 1000000; past N iterations: trap 4"), + c(OMG, "66-68", "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")], "example": "for_guard"}, "contracts": {"summary": "OM-2 contracts: requires, ensures and invariant clauses checked at run time (traps 9 and 10).", "details": "Compiler error 30 covers misplaced contracts, unavailable result and impure predicates.", - "citations": [c(OMG, "1177-1178", "Compiler error **30** means misplaced")], "example": "contracts"}, + "citations": [c(OMG, "1479", "Compiler error **30** means misplaced")], "example": "contracts"}, } # ---------------------------------------------------------------- tools (MCP definitions) SRC = {"type": "string", "description": "Omega (.om) source text of one unit"} TOOLS = [ {"name": "compile", "title": "Compile Omega source", - "description": "Compile Omega (.om) source with the pinned seeded compiler omc (omega-mv@e5b32567). Returns ok, the binary's size and sha256, or the compile error {line, code, meaning, fix}.", + "description": "Compile Omega (.om) source with the pinned seeded compiler omc (omega-mv@f4df8239). Returns ok, the binary's size and sha256, or the compile error {line, code, meaning, fix}.", "inputSchema": {"type": "object", "properties": {"source": SRC}, "required": ["source"], "additionalProperties": False}}, {"name": "run", "title": "Compile and run Omega source", "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).", @@ -531,13 +554,13 @@ TOOLS = [ "inputSchema": {"type": "object", "properties": {"query": {"type": ["string", "integer"], "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"}}, "required": ["query"], "additionalProperties": False}}, {"name": "lookup", "title": "Look up an Omega word or topic", - "description": "Look up any Omega keyword (all 177 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).", + "description": "Look up any Omega keyword (all 184 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).", "inputSchema": {"type": "object", "properties": {"query": {"type": "string", "minLength": 1, "maxLength": 64, "description": "exact keyword or topic, or a case-insensitive substring to search for"}}, "required": ["query"], "additionalProperties": False}}, ] -ref = {"pin": {"omega_mv": "e5b32567a7aff3ce594e3254a622a846a6cd190b", - "omc_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f"}, +ref = {"pin": {"omega_mv": "f4df82394e35893dcf1354dda69a2fe028d94bc1", + "omc_sha256": "3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194"}, "tools": TOOLS, "errors": ERRS, "traps": TRAPS, "words": W, "topics": TOP, "examples": {i: exp for i, (src, exp) in EX.items()}} used = {e["example"] for e in W.values()} | {e["example"] for e in ERRS.values() if e["example"]} | \ diff --git a/tools/ref_examples.py b/tools/ref_examples.py index c32582f..c44338b 100644 --- a/tools/ref_examples.py +++ b/tools/ref_examples.py @@ -508,6 +508,7 @@ put x 2 2 put x 4 47 put x 5 120 ck eq execprog x 0 6 neg long 2 +ck eq execpure x 0 6 neg long 2 ret 0 end ''', mode="run", exit=0) @@ -650,6 +651,7 @@ ex("e20", "text t \"abc\"\nfn main to int\nput t 0 1\nret 0\nend\n", mode="error ex("e21", "fn main to int\na = new uint 4 0\nput a 4 1\nret 0\nend\n", mode="error", code=21, line=3) ex("e22", "text t \"a\\q\"\nfn main to int\nret 0\nend\n", mode="error", code=22, line=1) ex("e23", "fn main to int\na = new uchar 16777217 0\nret 0\nend\n", mode="error", code=23, line=2) +ex("e25", "target x86efi\nfn f to int\nret 0\nend\n", mode="error", code=25, line=1) ex("e27", "om2\nfn f s edit uchar 4 fresh to ulong\nret ulong get s 0\nend\nfn main to int\na = new uchar 4 0\nret int f a\nend\n", mode="error", code=27, line=3) ex("e28", "om2\nabstract tag uint\nfn main to int\nt = seal tag 1\nret 0\nend\n", mode="error", code=28, line=4) @@ -668,3 +670,40 @@ for n in (8, 11, 12, 13, 14): ex(f"t{n:02d}", f"note native program mode raises trap {n} only through the trap word\nfn main to int\ntrap {n}\nend\n", mode="trap", trap=n) ex("t10", "om2\nfn one to uint\nensures eq result 2\nret 1\nend\nfn main to int\nret int one\nend\n", mode="trap", trap=10) + +ex("cpu_order", ''' +note cpufence: publication barrier (AArch64 DSB SY); cpurelax: spin-wait hint (YIELD); no operands, no value +fn main to int +cpufence +cpurelax +ret 5 +end +''', mode="run", exit=5) + +ex("qty", ''' +note a qty is an unsigned quantity whose add/sub/mul trap 1 instead of wrapping; convert with qty w and ulong q +fn main to int +q = qty 40 +r = add q 2 +ret int ulong r +end +''', mode="run", exit=42) + +ex("secrets", ''' +om2 +note dit sets PSTATE.DIT and gives the old bit; scrub zeroes dead stack and registers and gives 0 (OM-2, program mode) +fn main to int +old = dit 1 +z = scrub 64 +was = dit 0 +ret int add add mul 10 was z mul 100 old +end +''', mode="run", exit=10) + +ex("peername", ''' +note peername on a descriptor that is not open gives minus EBADF (9) +fn main to int +x = new uchar 16 0 +ret int neg peername 99 x 0 16 +end +''', mode="run", exit=9)