omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / docs / one_layer / OM_COMPLETION.md
| 1 | # Omega `.om`: what is done, what completion still needs |
| 2 | |
| 3 | Status: 2026-10-23, compiler numbers rechecked 2026-11-10 at main `a59a425b` and 2026-11-19 at main `100a9a914`. This file is the audit trail for the objective "complete and evolve the `.om` |
| 4 | language". It separates work that is implemented and gated from work that is blocked on a decision or |
| 5 | on an external store. It is not a claim that the language is complete. Its counts and pins are those of |
| 6 | 2026-10-23 and are not refreshed here; OM-2 (section 9.13 of OMEGESE.md) has landed since, and the 1.0 |
| 7 | gaps and acceptance gates are planned in `docs/ROADMAP-1.0.md`. |
| 8 | |
| 9 | Evidence lives in `seed/README.md` (rungs), `seed/omc/gate*.sh`, `seed/host/check.sh`, and |
| 10 | `evidence/SEED-0/`. |
| 11 | |
| 12 | ## 1. Implemented and gated |
| 13 | |
| 14 | | Area | What exists | Gate / evidence | |
| 15 | |---|---|---| |
| 16 | | Core language | functions, parameters (scalar, view/edit arrays, structs), if/else, while/bound, for, break, continue, ret, trap, note, prefix values, grouping | gates 6-11, gate-ir; corpus | |
| 17 | | Types | bool, u8..u64, i8..i64, f32/f64, arrays with explicit length, structs of 8-byte cells | gate8, gate9, gate10, gate6 | |
| 18 | | Types rules | no implicit conversion; typed literals; range checks; signed traps; unsigned wrap; shifts; division/remainder; float IEEE semantics | gate14 (Wolfram-derived expectations) | |
| 19 | | Memory model | stack arrays (new), globals (pools), structs, view/edit, no free, no pointers, checked indices | gates 6-12, host | |
| 20 | | Constants | integer and float literals; expressions, calls, array lengths, struct field lengths, trap codes, loop bounds, for counts; integer folding in IR | gate16, gate-ir | |
| 21 | | Layout | sizeof/offsetof over 8-byte cells; scalar sizes | gate10 | |
| 22 | | Host words | file/path/metadata, links, permissions/ownership, access, identity, process groups, time, sleep, sockets, poll, fork/exec/wait, pipes, dup, argv/env, random, chdir, fchdir, cwd, truncate/ftrunc, chmod/chown, stat/lstat, memfd, fdatasync, pread/pwrite, getsid/syncfs/shutdown | seed/host/check.sh | |
| 23 | | Diagnostics | 29 emitted compiler codes (1..25, 27..30; 26 unused) in one registry, `seed/omc/error-codes.reg`, each with a minimal case refused at its exact line, and a drift check against omc.om, irwasm.om and OMEGESE §9.14/§11.1 | gate15 (`codereg.om`) | |
| 24 | | Robustness | 600 deterministic fuzz programs; capacity boundaries; 300-program differential fuzz against the pinned compiler; 30 randomized two-function IR units; keyword generator parity | gate12, gate13, gate17, gate18, gate-ir | |
| 25 | | IR mode | OSC IR v1 scalar subset: up to 32 functions, calls to earlier functions, integer constants folded, break; arrays/structs/floats out of scope; `TYPE value` casts convert an operand of any scalar type | gate-ir (10/10 dev, 9 call units, 3 break units, 1 shift unit, 4 bool units, 24 cast units, 2 contract-name units, 30 fuzz units; 29 refusals, including the error-30 contract lines of #791, and 38 validation refusals) | |
| 26 | |
| 27 | Compiler: 7,208 lines, 251 functions, sha256 |
| 28 | `ef19aa993d210ad20070ef99bce1e2ef02921d9541d7a443f973072c4d6fa6a3` (119,643 bytes). |
| 29 | Rechecked 2026-11-10 at main `a59a425b`: `seed/omc/omc.om` is 19,052 lines |
| 30 | with 510 top-level `fn` (source sha256 `7995e0e3...7189`); the committed `seed/out/omc` is 664,944 bytes, |
| 31 | sha256 `6d1b1cf5a44803389a831b67f750ea4cd1c9f53edfde9d6d9241d7352887f1f8`, as `seed/out/omc.sha256` records. |
| 32 | Rechecked 2026-11-19 at main `100a9a914`: `seed/omc/omc.om` is 25,250 lines (587,337 bytes) with 653 top-level `fn` |
| 33 | (source sha256 `d8a9cdc0...c833`); the committed `seed/out/omc` is 937,288 bytes, sha256 |
| 34 | `b6129ed51e07dd8ef7f33e78fdff99d6c4d914e3bccdaf8b344043b95017d4f2`. |
| 35 | Rechecked 2026-11-19 at main `48e84f0d3` (Linux `drm/xe` ioctl allowlist in `kfdctl`): `seed/omc/omc.om` is 25,316 lines (588,414 bytes) with 654 top-level `fn` |
| 36 | (source sha256 `86bc3d1f...5105`); the committed `seed/out/omc` is 939,036 bytes, sha256 |
| 37 | `210c52566e782cf15ece6e478d45bfb67f1ad338f29e41546dad9b6c4f85b54c`, matching `seed/out/omc.sha256`. |
| 38 | The error registry still lists codes 1..25 and 27..30 with 26 unused. |
| 39 | |
| 40 | Benchmark parity: 103 authored `.om` sources and 53 build-plan targets compile to identical bytes |
| 41 | and refusals as the pinned compiler `e5d60db8…` (rung R15; rechecked after every keyword). |
| 42 | |
| 43 | ## 2. Open compiler work |
| 44 | |
| 45 | IR mode is complete for the **scalar** OSC-1 subset: scalar values, up to 32 functions, calls to |
| 46 | earlier functions with full 63-byte names, integer constants (values, trap codes, loop bounds, for |
| 47 | counts), and break. `gate-ir` pins this against the C oracle and checker2. No self-contained compiler |
| 48 | feature remains for that subset. |
| 49 | |
| 50 | **Spec-blocked / model-divergent target extensions.** |
| 51 | |
| 52 | 1. **IR arrays.** OSC-1 arrays carry explicit `free`; the `.om` language has no `free` (decision 24) |
| 53 | and returns arrays automatically. The C oracle therefore cannot validate an IR lowering of `.om` |
| 54 | arrays, and IR mode refuses `new`/`get`/`put`. Needs an ownership model that both sides share. |
| 55 | |
| 56 | OSC-1 also explicitly excludes structs and strings, and its scalar tags are integer-only; `omegese` |
| 57 | cannot emit them, so there is no reference unit to verify against. |
| 58 | |
| 59 | 1. **IR structs.** Version-2 struct records exist, but allocation, field ops and identity need the |
| 60 | OSC-1 struct lowering spec. |
| 61 | 3. **IR floats.** Float constants cannot be folded until the IR type system carries f32/f64. |
| 62 | |
| 63 | **Decision-bound language/ecosystem work.** |
| 64 | |
| 65 | 4. **Generic byte/string utilities.** Array parameters carry an exact length; a standard library |
| 66 | needs open arrays or a max-length convention (language decision). |
| 67 | 5. **`sync` naming.** The benchmark corpus uses `sync` as an identifier four times; any new keyword |
| 68 | must pass the corpus collision audit (rung R13). |
| 69 | |
| 70 | ## 3. Blocked on a decision or an external store |
| 71 | |
| 72 | | FR / decision | Gap | Why it is blocked | |
| 73 | |---|---|---| |
| 74 | | FR-1 file I/O | complete for the exposed set (open/read/write/seek/stat/link/chmod/chown/truncate/memfd) | no blocker for this subset | |
| 75 | | FR-2 packed structs | structs are 8-byte cells; packed u8/u16/u32/u64 fields are not expressible | needs a layout syntax and alignment rule (decision) | |
| 76 | | FR-3 imports by digest | no `import`; units concatenate | requires the OSC content-addressed unit store (external) | |
| 77 | | FR-4 floats | implemented end to end for AArch64 (types, literals, arithmetic, arrays, pools, structs) | IR floats are spec-blocked: OSC-1 scalar tags are integer-only | |
| 78 | | FR-5 mmap/ioctl | implemented for AArch64 program mode as handle-checked words `devctl devcall uvmctl mapnew mapdrop mapread mapwrite mapaddr mapget mapset maphold mapbind` (ids 166..177, `seed/omc/genkw.awk`; contracts in [`seed/host/MAPPING.md`](../../seed/host/MAPPING.md), tests `seed/host/tests/{mapio,devcall,memcheck,reserve}.om` run by `seed/host/gate.om`) | access through a raw integer address stays refused: `mapaddr` exports a ulong but access requires the live owned handle; no GPU launcher or model execution (MAPPING.md) | |
| 79 | | FR-6 threads/atomics | absent | decision 37 (disjoint threads) has no chosen design | |
| 80 | | FR-7 shared objects/C ABI | absent | needs an ABI contract (calling convention, symbols, relocation) | |
| 81 | | FR-8 kernel words | absent | needs a target kernel interface, not a compiler change | |
| 82 | | FR-9 x86-64 | DRAFT, merged as #923 from historical backend `7eca2ac3f` on canonical base `6999fa9e6`; see [design and unsupported paths](../X86-LINUX.md) | full existing fixture differential last ran EMULATED (QEMU) at source `62d1d0d6` (`seed/qualification/x86-linux/20261030-main-62d1d0d6.json`): 15182 PASS, 0 FAIL, 2 NOT_RUN (QEMU invalid-fd ioctl artifacts), 222 EXCLUDED, aggregate verdict FAIL because NOT_RUN is not PASS; the same run's objdump invalid-encoding and valid-wrong-encoding controls PASS; native x86 NOT_RUN; default AArch64 byte preservation is not separately recorded in that receipt; no completion or qualification claim | |
| 83 | | decision 24 | no heap, no free | Drake's rule; any allocation model would reverse it | |
| 84 | | decision 37 | no shared-state threads | design decision pending | |
| 85 | |
| 86 | ## 4. Next concrete step |
| 87 | |
| 88 | No self-contained compiler feature remains for the supported scalar subset. Next work requires a |
| 89 | decision (FR-2/3/6/7/8, decisions 24/37) or a shared target-extension model (IR arrays, |
| 90 | structs, floats); FR-9 is merged as a draft (#923) described above, not a completed second target. |