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 / seed / explain / README.md

32 lines · 2029 bytes Raw Blame History Rendered
1# seed/explain: refusals in words
2
3`explain` is a small Omega program (`explain.om`, OM-2 profile) that runs the seeded compiler on one
4source file and, when the compiler refuses it, says why in a sentence and shows the line:
5
6```
7$ seed/out/omc < seed/explain/explain.om > explain && chmod +x explain
8$ ./explain seed/out/omc bad.om bad
9bad.om:2: error 7: type mismatch
10 2 | x = add int 1 uint 2
11```
12
13- The compiler is not changed. Its stderr line `omc: line L: error C` stays exactly as gate15, gate5,
14 the OM-2 conductor and the x86 qualification compare it; `explain` reads it from a pipe.
15- The exit status is the compiler's own code. `explain` adds 64 (usage), 65 (a file could not be
16 opened or the compiler could not be started) and 66 (the compiler was stopped by a signal).
17- The sentence for each code is the MEANING column of `seed/omc/error-codes.reg`, embedded as the
18 `text means` line. `sh seed/explain/gate.sh table` prints that line; the gate fails when the two
19 differ, so a registry change must regenerate it.
20- An `om2 diag` unit's machine record follows the explanation unchanged.
21- A message that is not in the expected form, or whose code differs from the exit status, is shown
22 raw with a note instead of being explained.
23
24`sh seed/explain/gate.sh` (run by `seed/host/check.sh` after gate15) checks: the table against the
25registry with a changed-meaning negative control; every gate15 refusal case, read from `gate15.sh`,
26for exit code, sentence and source line; a valid program giving the same bytes as the compiler alone;
27the om2 diag pass-through; stand-in compilers for an odd message, a code mismatch, a signal, a missing
28compiler and 100 KB of stderr; a missing source; usage; and two identical runs. Four planted bugs
29(no code-mismatch check, meaning off by one, wrong source line, exit code lost) each fail it.
30
31This covers the human-message part of ROADMAP-1.0 RM8 without touching the compiler's output. A
32message inside omc itself, and diagnostics in every profile, remain open there.