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 / qualification / om2 / sec / s0s2 / README.txt

113 lines · 9225 bytes Raw Blame History
1SPDX-License-Identifier: Apache-2.0
2L836 Phase B, lane FixLex: independent fixtures for omegese-om2.md sections 0, 1, 2
3(contract sha256 245bb74e..0881; errata E1, E2, E4, E6 on aien-dev om2/contract fd9e05a2).
4Written from the contract, the errata, OMEGESE.md and baseline main acb3f15 only.
5
6FILES
7 lib/putu.om OM-1 decimal printer appended after a fixture (SRC a+b)
8 s0/ opt-in line, OM-1 name preservation, OM-1 refusals of OM-2 words, CR LF in OM-1,
9 q1-*: OM-2 reserved words declared as names (E6 Q1)
10 s1/ om2 diag units (refusals), plain om2 twins
11 s2hex/ hex literals: OM-2 programs, refusals, same pairs, OM-1 decimal twins
12 s2bnd/ expression boundaries and grouping, om1-* and om2-* twins
13 s2fmt/ hdr.txt ("om2 fmt\n"); formatter inputs x1..x5 (x5 is an OM-1 rest);
14 malformed inputs bad-*; notes-before.om and om2-then-fmt.om (E6 f)
15 exp/ expected stdout/stderr, generated by oracle/s0s2/oracle.py (never by a compiler)
16 candidate.cases for an OM-2 candidate (each case has its contract/errata citation on the # line
17 above it)
18 pinned.cases for the pinned OM-1 compiler 734f0a39 now
19 c2-extra.txt OM-1 units with the sha256 of their pinned output (C2), refusals as comments
20Evidence: evidence/phaseB/s0s2-pinned.log (OM2GATE PASS cases=144) and
21evidence/phaseB/s0s2-candidate-under-pinned.log (candidate.cases under the OM-1 compiler,
22invalid=0: the OM-1 cases pass, the OM-2 cases fail; a negative control, not a candidate result).
23
24DECIDED BY ERRATA (formerly open questions)
25E4 col = 1-based byte column of A on A's line; span = offending lexer token, len-len at end of
26 input; found = hex of the span bytes or '-'; fmt "rest" = bytes after the first LF, output
27 without the om2 fmt line.
28E6 Q1 reserved word declared as a name in an OM-2 unit: error 16 (s0/q1-*: fn rotr, fn layout,
29 parameter part, variables fresh and at).
30E6 Q2 expect=number for error 6/8 literals; expect=end, sev=incomplete for a missing end at EOF;
31 expect=name for an unknown name; LF span, sev=error for a line ending early with more input;
32 callee-name span, sev=unknown for an incomplete call to an unread function. All these s1 cases
33 are now exact (file:) except d-mid-short (below).
34E6 Q3 fmt refusal lines count every input line, om2 fmt included: bad-* cases are exact err:.
35E6 Q4 a: trailing blank lines are error 6 (bad-trailblank). b: whitespace-only line becomes empty
36 (x3). c,d: any line whose first token is note is kept byte for byte, indented or with trailing
37 blanks (x1, x3). e: whitespace next to ( or ) is kept as written (x3, x4). f: om2 fmt only at
38 byte 0; elsewhere error 16 at its line (bad-fmtlater, notes-before, om2-then-fmt). g: CR is
39 error 6 anywhere, including in text (bad-cr, bad-cr1, bad-crtext). h: the rest may be OM-1 (x5;
40 its same case runs under the pinned compiler now). Correction: s2-fmt-bad-crtext expected line 3,
41 but with the om2 fmt line and the fixture's note line the CR is on line 4 (err:4:6); the S1 run
42 exposed the miscount and the coordinator confirmed it.
43
44ASSUMPTIONS (where contract and errata are silent; each also stated next to its case)
45A1 0 line 13 + erratum E10: blank lines (empty or only spaces) are skipped like notes when finding the
46 om2 line, so s0-blank-first and s0-blank-spaces-first are OM-2 units (they run, exit 0); OM-1 still
47 refuses them at the om2 line (pinned: error 16 at line 5). Lines with trailing text (om2 , om2 foo,
48 om2 diag x, om2 diag, " om2", OM2) are not the opt-in line: OM-1 units keeping the OM-1 result.
49A2 OM-1 codes for OM-2-only constructs in OM-1 units (s0/w-*) are what the pinned compiler gives
50 today; C1 (line 17) requires the candidate to keep them (line 14: recognised only in OM-2 units).
51A3 s0-optin-diag-same: an om2 diag unit compiles to the same artifact as the same om2 unit (lines
52 34-37 and 116: diag adds stderr records, stdout unchanged).
53A4 OM-2 units keep OM-1 error codes for non-OM-2 failures (preamble line 5: additive; 2 line 59
54 "both profiles, unchanged"). [ and { stay error 3 in OM-2 (line 62). Undeclared struct stays
55 error 16, undeclared function error 3.
56A5 Formatter tokens: TAB is whitespace (the OM-1 lexer accepts it); indentation is the leading run of
57 spaces/tabs; a text literal is one token from " to the closing unescaped ". "Whitespace next to (
58 or )" (E6 e) = a whitespace run whose left token ends in ( or ) or whose right token starts with
59 ( or ); every such run is kept, every other inner run becomes one space, trailing runs are dropped
60 (x3 `ret (add y x)` -> `ret (add y x)`; x4 `z = ( add y x )` -> `z = ( add y x )`).
61A6 Hex: the human line names the literal's line. 17+ digits is error 6 whether or not the value fits
62 (r6-17small value 1, r6-17big 2^64): line 56 counts digits before the range rule applies.
63A7 found for a token longer than 32 bytes holds its first 32 bytes (d-longtok; line 40 "at most 32").
64A8 The record's line= equals the human line N (all exact s1 cases). For an EOF span after a final LF
65 the line is the empty last line, col 1 (d-eof-noend), which is also OM-1's human line.
66A9 An fmt CR error names the line holding the first CR (bad-cr: the note line of the rest, line 2).
67
68REMAINING NOT FIXED (2 notrun in candidate.cases)
69R1 d-mid-short: E6 Q2 puts the span on the LF that ends `ret add x`, but OM-1's human line is the next
70 line (`end`). Whether the record's line= is the LF's line or the human N, and its expect=, are not
71 stated. tok: case checks human line, code, sev=error, col=10 (A's column on A's line), span,
72 found=0a, obligation, profile; s1-d-mid-short-line notrun.
73R2 bad-trailblank: E6 (a) gives error 6 but not which line (first or last blank line) the human line
74 names: refuse + empty-stdout cases; s2-fmt-bad-trailblank-line notrun.
75
76OBSERVATIONS ON THE PINNED COMPILER (all re-checked by pinned.cases)
77O1 0 line 14 "OM-1 refuses that line": true only when nothing earlier in OM-1's pass order fails.
78 OMEGESE 9.2's names pass reads every fn signature before any body or top-level line, so an OM-2
79 unit whose signature is not OM-1-clean is refused at the FIRST such fn line (error 16 for
80 fresh / view T * / out / unknown type; error 5 for a trailing `inline`), not at the om2 line.
81 Rule applied to every pinned expectation: refused at the om2 line iff all signatures are
82 OM-1-clean. All s0 opt-in and q1 fixtures and every other OM-2 fixture in this lane are
83 signature-clean except s1/d-unknown-sparam.om (opt-in at line 3, undeclared struct Pt in the
84 line-4 signature), whose pinned case expects line 4, error 16.
85O2 `ret add 1 2 3` is error 11 (ambiguous bare-number add, found before the extra token), not a
86 tokens-left code. With a typed operand (`ret add x 2 3`) tokens left is error 5. Both are pinned.
87O3 A line ending before an operand is complete is error 4 reported on the NEXT line when more input
88 follows (`ret add x` then `end`: the end line), and on the same line at end of input without LF.
89O4 OM-1 accepts CR (CR LF and a lone CR before LF) as whitespace; s0-om1-crlf pins it under C1. The
90 CR refusal (2 line 66, E6 g) is formatter-only.
91O5 Grouped and ungrouped forms (g0..g4) compile to byte-identical output under 734f0a39, and so do
92 x1..x5 against their oracle fmt output when the om2 line is removed (dev check; only x5, an OM-1
93 unit, is a delivered pinned case).
94
95MUTANT KILL SPECS (candidate.cases, run under the mutant candidate compiler)
96(a) accepts uppercase hex digits / 0X: s2-r6-upper, s2-r6-mixed, s2-r6-upperX, s2-r6-upper-ulong,
97 s1-d-hexupper-plain and s2-fmt-bad-hex FAIL "compile exit=0 expected=6" (artifact on stdout);
98 s1-d-hexupper FAIL likewise.
99 accepts 17 digits: s2-r6-17small FAIL "compile exit=0 expected=6"; s2-r6-17big FAIL
100 "compile exit=8 expected=6" if the mutant then applies the range rule, exit 0 if it wraps;
101 s1-d-longtok FAIL (exit 0 or 8, expected 6).
102(b) fmt rewrites a note line (collapses its spaces/tabs, strips its indentation or trailing blanks):
103 s2-fmt-x1 (lines 2-3: triple/double spaces, TAB) and s2-fmt-x3 (line 2 trailing spaces, line 3
104 indented note with a trailing TAB) FAIL "stdout differs at byte".
105 fmt rewrites text-literal bytes (collapses the "a b" / "q q" spaces, the all-space " ", or
106 decodes an escape): s2-fmt-x1 and s2-fmt-x5 ("ok \n") FAIL "stdout differs"; if the compiled
107 bytes change too, s2-fmt-x1-same / s2-fmt-x5-same and the x1fmt / x5fmt runs FAIL as well.
108(c) diag with a wrong span (off by one, whole line, start of line, a different token): every exact
109 s1 case (d-left, d-eof-left, d-eof-mid, d-eof-noend, d-hexupper, d-hexrange, d-longtok,
110 d-unknown-fn, d-unknown-struct, d-unknown-sparam, d-unknown-args) FAIL "stderr differs at
111 byte"; d-mid-short FAIL on its tok line (span=214-215, col=10, found=0a).
112 A wrong sev (incomplete for every EOF failure) fails s1-d-eof-left; error at EOF fails
113 s1-d-eof-mid and s1-d-eof-noend; error instead of unknown fails the s1-d-unknown-* cases.