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 / spec / omegese-om3.md
| 1 | # Omegese profile OM-3: additions after the OM-2 freeze |
| 2 | |
| 3 | Status: PROPOSED (draft omega-mv#1008, 2026-10-31). Not frozen, not reviewed by the #599 |
| 4 | language-evolution coordinator. `spec/omegese-om2.md` is frozen and says "A change after freeze needs |
| 5 | `omegese-om3.md`"; this file is where such changes are written. It is additive to |
| 6 | `spec/omegese-om2.md`, its errata and `docs/one_layer/OMEGESE.md`, which stay normative for everything |
| 7 | not stated here. |
| 8 | |
| 9 | ## 0. Opt-in and compatibility |
| 10 | |
| 11 | - Each addition below names the units it applies to. Section 1 applies to units whose first line that |
| 12 | is not a `note` is `om2`; this draft adds no `om3` line. Whether later additions need their own |
| 13 | opt-in line is open. |
| 14 | - **C1 and C2 of OM-2 still hold.** Every OM-1 unit keeps its meaning, error code and line, and the |
| 15 | frozen C2 manifest compiles byte-identically. An addition may only turn an OM-2 refusal into an |
| 16 | accepted unit; it never changes the output of a unit that compiles today. |
| 17 | - **C3 still holds.** The compiler source stays inside om4's language and om4's function limit. |
| 18 | |
| 19 | ## 1. Host words in function mode (#1008) |
| 20 | |
| 21 | - An OM-2 function unit (first line `om2`, no `fn main`) may use the host words `fopen`, `fclose`, |
| 22 | `fstat`, `stat`, `lstat`, `getuid`, `geteuid`, `getgid` and `getegid` (OMEGESE.md section 10) on |
| 23 | AArch64, with their program-mode meaning and machine code. |
| 24 | - The same units may use the clocks `monons`, `realns` and `sleepns` and the device words `devctl`, |
| 25 | `mapnew`, `mapdrop`, `mapread`, `mapwrite`, `devcall`, `uvmctl`, `mapaddr`, `mapget`, |
| 26 | `mapset`, `maphold` and `mapbind` (`seed/host/MAPPING.md`). Function-mode entry31 |
| 27 | is a data pointer to a32-byte capacity/generation header followed by1..4098 |
| 28 | 32-byte owned slots; handles have13 low slot bits. The bridge supplies an |
| 29 | explicit context with disjoint generation ranges and serializes its calls. |
| 30 | Fixed bind can replace only the whole owned PROT_NONE reservation; failure |
| 31 | unmaps/retires the token if cleanup succeeds. Cleanup failure traps3 with a |
| 32 | quarantined owner: bind/read/write refuse; mapaddr/drop remain available, |
| 33 | and destroy stays busy until drop succeeds. Neither outcome promises to |
| 34 | preserve a reservation. An absent table pointer may fault, not status34. |
| 35 | - **Context ABI revision is DRAFT and requires Drake approval before merge.** |
| 36 | It supersedes the unmerged#1040 raw128-slot function-mode format, not an |
| 37 | accepted frozen OM-2 feature. The bridge must reject incompatible mapping |
| 38 | compiler/runtime fingerprints. Program-mode raw128 slots/eight slot bits, |
| 39 | frozen C2 manifest, pure and file/identity units stay unchanged. |
| 40 | - Every other host word in function mode, any host word in an OM-1 function unit, and any host word for |
| 41 | another target is error 9. |
| 42 | - These words do not form a sandbox: a caller that embeds such a unit grants it the file and identity |
| 43 | view (and, for the device words, the ioctl and mapping view) of its own process, so the omega-bridge refuses a unit that names one unless the caller opts in. |
| 44 | - Gate: `seed/omc/om2/fnhost/fnhost.cases` with the mutants in `seed/omc/om2/fnhost/mutants.cases`, |
| 45 | run by `seed/host/check.sh`. |