interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / docs / osc / OSC-1-SELF-HOST-STATEMENT.md

64 lines · 3677 bytes Raw Blame History Rendered
1# OSC-1 self-hosting statement
2
3**OSC-1 slice; not a general Omega compiler; no self-hosting.**
4
5Question: can the OSC-1 compiler compile any part of itself?
6
7**Answer: no.** No part of the OSC-1 compiler's source is written in the OSC-1
8language, and the OSC-1 language cannot express it. Reasons, each a missing
9language feature, not a missing test:
10
111. **No bytes, strings or text.** The lexer and parser consume source bytes and
12 produce names and diagnostics. OSC-1 has integer scalars, bool and fixed
13 arrays of at most 64 integers. It has no `u8` slice over input, no string
14 type and no way to receive a source file.
152. **No structs, unions or tagged data.** The IR (`osc_ir.h`) is a tree of
16 structs and enums (`OscUnit`, `OscFunc`, `OscInsn`). OSC-1 has no aggregate
17 type other than `own [T; N]` with N <= 64, so it cannot hold an IR.
183. **No growable or large storage.** The compiler needs tables of thousands of
19 entries (4096 instructions per function, 480 vregs). OSC-1 allocations are
20 fixed-size pool slots of 64 cells, at most 64 live.
214. **No recursion and no forward calls.** The parser is recursive descent. OSC-1
22 calls only functions defined earlier in the unit.
235. **No output channel.** The back end writes machine code into a buffer the
24 host maps executable, and the receipt writer writes files. OSC-1 programs can
25 only return a scalar; they have no I/O, no capabilities and no effects.
266. **No checked contracts.** `requires`/`ensures` are recorded text in OSC-1
27 (OSC-0 decision 3). By OSC-0 rule, no production C migrates into Omega
28 Systems Core until contract enforcement exists (OSC-2).
29
30What could be written in OSC-1 today is a re-implementation of a few pure
31integer helpers that the compiler uses (for example the width mask or the
32"is this value representable in type T" check). That would be new code that
33happens to compute the same numbers, not the compiler compiling its own
34source, and it is not claimed as self-hosting.
35
36What this means for the roadmap. Self-hosting is OSC-14 in the OSC-0 migration
37order (audit III.7). The determinism gate II.9 defines the evidence it will
38need: `compiler_n` built by `compiler_{n-1}` producing byte-identical output
39on a fixed corpus. The M6 `OMEGA_SELF_HOST` result is a fixed-output self-copy
40check and is never evidence of a compiler (OSC-0 decision 2, ROADMAP ยง3 M6
41correction note). OSC-1 does not change that and does not touch M6.
42
43## Addendum 2026-10-01: OSC-2 status (history above is kept unchanged)
44
45The text above describes OSC-1 as written. OSC-2 has since changed two of its six reasons:
46
47- Reason 2 ("No structs, unions or tagged data") is superseded for structs by OSC-2 item 2
48 (omega#149, merge `845dce4`).
49- Reason 6 ("No checked contracts") is superseded by OSC-2 item 1 (omega#148, merge `0abdb08`):
50 `requires`/`ensures` are now enforced, by constant folding or a run-time check.
51- OSC-2 item 3 (omega#150, merge `c773622`) wires arenas to the OSC-0B memory model.
52 OSC-2 item 4 (omega#151, merge `7e713e3`) makes the legacy AArch64 writer refuse out-of-range fields.
53- Reasons 1, 3, 4 and 5 are not addressed by this addendum.
54
55Status of OSC-1 and OSC-2: **IMPLEMENTED / NOT QUALIFIED.** The receipts are host receipts only. Neither slice
56is self-hosting, neither is a general Omega compiler, and no production code is compiled by either.
57
58OSC-2 shortfalls against `docs/adr/OMEGA-SYSTEMS-CORE-0000.md` and audit III.7
59(`OMEGA_SYSTEMS_CORE_CODE_AUDIT.md`):
60
61- The aienos ADR 0013 u64 generation amendment is not done.
62- The II.6 identity break is not done.
63- Generational handles moved to OSC-3 (not merged).
64- Crumbline migration is not done.