Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/ng/tests/ir/cases # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / ng / tests / ir / cases` 380 lines ยท 15837 bytes Raw Blame History 1 # seed/ng/tests/ir/cases: ngcheck, ngas, ngdis and ng ir-copy expectations, run by seed/ng/gate-ir.om. 2 # Every refusal is judged by its whole stderr line (IR.md s10, s11) and an empty stdout; an acceptance by 3 # the whole ngcheck line "ACCEPT fns=F blocks=B ops=O" with F, B, O counted from the fixture text. 4 # ng ir-copy sees every unit: classes 10, 11, 12, 14, 15, 23, 27 must give ngcheck's refusal line, any 5 # other verdict the same bytes back (or, when ngcheck refuses, a refusal of its own). An explicit 6 # NGEXIT NGOFF overrides only ng for the reader-capacity exceptions in IR.md s12. 7 # T NAME EXIT OFFSET NAME.oir: ngas exit 0, ngdis(ngas(t)) == t, ngcheck exit and offset (- when 0) 8 # S NAME LINE NAME.oir: ngas refuses, exit 3, at LINE 9 # M BASE POS BYTE EXIT OFF [NGEXIT NGOFF] BASE.oir assembled, byte POS set to BYTE: ngcheck and ngdis 10 # exit EXIT at OFF. Optional NGEXIT NGOFF pins ng separately (IR.md s12 exceptions). 11 # C BASE LEN EXIT OFF ... cut to LEN bytes 12 # A BASE BYTE EXIT OFF ... BYTE appended 13 # D EXIT OFF stdin is a directory: ngcheck, ngdis and ng exit EXIT at OFF, ngas exit EXIT 14 # G GEN TOOL EXIT OFF generated input (gate-ir.om gt_gen): full = a unit of exactly `16777216` bytes, 15 # over = full + 1 byte, types = 65537 populated type entries; tyN, gl65537, 16 # fn65537, bl65537, fp65537, bp65537 = text with N (65537) types, globals, 17 # functions, blocks in one function, function or block parameters. TOOL c ngcheck, 18 # d ngdis, n ng ir-copy, a ngas (OFF is a line), r ngas then ngdis gives the text back 19 # x ngrun FILE (refusals only) 20 # R NAME NAME.oir accepted by ngcheck and run by ngrun; NAME.om compiled by OMC and run: 21 # exit status, stdout and stderr equal (D9 differential, IR.md s7 semantics) 22 # Q N ngrand seeds 1..N: ngcheck ACCEPT (whole line), ngas(ngdis(b)) == b, ngrun ends 23 # cleanly (exit 0..63 with 0 or 8 stdout bytes, 64..95, or a trap 101..114) 24 # and the optimizer passes on each seed (as O below) 25 # N NAME EXIT OFF NAME.oir run by `ngrun FILE `1000000`` (a step budget): exit EXIT, empty stdout, 26 # stderr empty or, for 124 / 126, "ngrun: step limit at OFF" / "ngrun: access 27 # outside storage at OFF" 28 # K SEED STATUS ngrand shrink SEED STATUS with ngrun as the predicate: the result is accepted, 29 # ngrun exits STATUS on it, it is smaller than SEED's unit, its tape replays it 30 # O NAME [ROW] seed/ng/tests/opt/NAME.oir through `@ng opt`: exit 0, stderr empty, ngcheck's 31 # whole ACCEPT line, ngas(ngdis(out)) == out, ngrun before == after (exit, stdout, 32 # stderr; one decimal clock line each side counts as equal), `@ng opt-count` of 33 # the output a fixed point; prints "ok O NAME fns=.. loops=.. inloop=A->B ...". 34 # ROW, when given (" fns=.. preheaders=.."), must equal `@ng opt-count` of the 35 # input after its "opt", so each pass is pinned to do what it did, no less 36 # ("FAIL ...: opt counts differ, got ..." otherwise) 37 # L NAME [ROW] as O, for a long-running unit: skipped under a mutant 38 T a-arith 0 - 39 T a-back 0 - 40 T a-fib 0 - 41 T a-host 0 - 42 T a-kernel 0 - 43 T a-mem 0 - 44 T a-probe 0 - 45 T r13-duptype 13 37 46 T r13-factorigin 13 62 47 T r13-backsig 13 36 48 T r13-backtwo 13 95 49 T r13-fnflags 13 36 50 T r13-fnflags4 13 36 51 T r16-shfl 16 75 52 T r16-store 16 160 53 T r16-type 16 66 54 T r17-usebeforedef 17 62 55 T r18-dominance 18 166 56 T r19-arity 19 62 57 T r20-earlyterm 20 62 58 T r20-unterminated 20 62 59 T r21-checkcode 21 62 60 T r22-alloca 22 103 61 T r22-effect 22 58 62 T r22-launchinkernel 22 84 63 T r23-limit 23 38 64 T r24-ref 24 58 65 T r24-reftype 24 36 66 T r25-hostslice 25 131 67 T r25-oldtoken 25 147 68 T r25-unchecked 25 105 69 T r26-unreachable 26 67 70 T r28-token 28 87 71 T r28-tokenvalue 28 58 72 T r29-fact 29 62 73 T r30-entryparams 30 32 74 T r30-noentry 30 32 75 T r30-twoentries 30 84 76 T t00-add-i32-1-2 16 383 77 T t01-add-bool-6-6 16 383 78 T t02-rem-f32-5-5 16 383 79 T t03-shl-f32-5-5 16 383 80 T t04-rotl-i32-1-1 16 383 81 T t05-fsqrt-i32-1 16 383 82 T t06-fmath-f32-8-5 13 383 83 T t07-lt-i32-1-1 16 383 84 T t08-eq-bool-6-5 16 383 85 T t09-conv-i32-1-5 13 383 86 T t10-conv-bool-0-1 16 383 87 T t11-bitcast-i64-1 16 383 88 T t12-select-i32-1-1-1 16 383 89 T t13-load-u64-15-7-4 16 383 90 T t14-load-u32-15-7-1 16 383 91 T t15-store-15-8-4-3 16 383 92 T t16-store-15-7-4-1 16 383 93 T t17-vload-t35-15-7-4 25 383 94 T t18-vsplat-t35-1 16 383 95 T t19-vextract-u32-4-12 16 383 96 T t20-vreduce-u32-6-12 13 383 97 T t21-fma-i32-1-1-1 16 383 98 T t22-len-u64-3 16 383 99 T t23-call-i64-15-f0 16 383 100 T t24-atom-f32-3-15-14-4-5 16 383 101 T t25-chk-add-1-15-1-2 16 383 102 T t26-chk-divz-2-15-5 16 383 103 T t27-chk-bounds-3-15-7-1-9 16 383 104 T t28-chk-true-1-15-1 16 383 105 T t29-chk-true-15-15-6 21 383 106 T t30-chk-conv-bool-5-15-1 16 383 107 T t31-fact-range-1-1-2-1 16 383 108 T t32-host-i64-54-15-1-8-4-4 16 383 109 T t33-host-i64-9999-15 22 383 110 T t34-host-i32-129-15 16 383 111 T t35-gaddr-t33-g1 16 383 112 T t36-gaddr-t33-g7 24 383 113 T t37-fload-u64-0-15-7 16 383 114 T t38-shfl-u32-1-3-3 22 383 115 T t39-sync-15 22 383 116 T t40-mma-t35-0-12-12-12 22 383 117 T t41-neg-bool-6 16 383 118 T t42-not-f32-5 16 383 119 T t43-min-bool-6-6 16 383 120 T u00-trap-0-15 21 383 121 T u01-trap-15-15 21 383 122 T u02-exit-15-2 16 383 123 T u03-retv-15-2 16 383 124 T u04-retv-11-1 28 383 125 T u05-ret-15 16 383 126 S s-const-range 4 127 S s-negzero 4 128 S s-numbering 4 129 S s-namedt 2 130 S s-defs 5 131 M a-arith 0 80 10 0 132 M a-arith 7 8 11 7 133 M a-arith 8 79 11 8 134 M a-arith 66 3 15 66 135 M a-arith 67 1 13 66 136 M a-arith 36 3 13 36 137 C a-arith 0 12 0 138 C a-arith 40 12 38 139 C a-arith 66 12 66 140 A a-arith 0 14 1206 141 D 27 0 142 # run pairs: traps at the exact boundaries (D9: overflow at 2^63, fuel at exactly 1e6, index == len) 143 T x-ovf64 0 - 144 T x-ovf64ok 0 - 145 T x-i8 0 - 146 T x-divmin 0 - 147 T x-remmin 0 - 148 T x-shift 0 - 149 T x-conv 0 - 150 T x-fuel 0 - 151 T x-fuelok 0 - 152 T x-index 0 - 153 T x-indexok 0 - 154 T x-float 0 - 155 T x-bits 0 - 156 T x-shlneg 0 - 157 T x-convlo 0 - 158 T n-addu 0 - 159 T n-mulu 0 - 160 T n-bnd0 0 - 161 T n-neg8 0 - 162 T n-deep 0 - 163 T n-deepok 0 - 164 T n-loop 0 - 165 T n-loop2 0 - 166 T n-oob 25 118 167 R x-ovf64 168 R x-ovf64ok 169 R x-i8 170 R x-divmin 171 R x-remmin 172 R x-shift 173 R x-conv 174 R x-fuel 175 R x-fuelok 176 R x-index 177 R x-indexok 178 R x-fib 179 R x-hello 180 R x-float 181 R x-bits 182 R x-shlneg 183 R x-convlo 184 # ngrun alone (no omc oracle: Omega wraps u64 add/mul and has no zero-length bounds, wrapping narrow neg, 185 # unfuelled loop or unchecked access; trap 6 depth is ngrun's own): exit, empty stdout, stderr line 186 N n-addu 101 - 187 N n-mulu 101 - 188 N n-bnd0 103 - 189 N n-neg8 0 - 190 N n-deep 106 - 191 N n-deepok 0 - 192 N n-loop 124 87 193 # a two-op loop: the op after the budget alternates 87/116, so a step limit one op late (or early) names 87 194 N n-loop2 124 116 195 N n-oob 126 118 196 # desk review @`2f3f3d01` B1: 64-bit shuffles (ids 5, 9, 14) are admitted; delta, mode and type rules hold 197 T k-shfl-u32 0 - 198 T k-shfl-u64 0 - 199 T k-shfl-i64 0 - 200 T k-shfl-f64 0 - 201 T r-shfl-u16 16 97 202 T r-shfl-d0 16 97 203 T r-shfl-d32 16 97 204 T r-shfl-d128 16 97 205 T r-shfl-du64 16 97 206 # N1: an entry block with parameters is BLOCK_ARITY at the block; N2: STRUCT elements are storage-only 207 T r-entry-param 19 50 208 T r-struct-elem 16 156 209 T k-soa 0 - 210 # B2: input capacity `16777216` bytes in ngcheck and ngdis: one byte past it is LIMIT at `16777216` there. ng and 211 # ngrun read the payload into the arena of src/ir.om (no capacity since 2026-11-11, bounded by the arena), so the 212 # unit reads whole and the byte past the full unit is TRAILING (14) at `16777216` 213 G full c 30 `16777212` 214 G full d 0 - 215 G full n 0 - 216 G over c 23 `16777216` 217 G over d 23 `16777216` 218 G over n 14 `16777216` 219 G over x 14 `16777216` 220 # B3: table counts over 65536 are LIMIT at the count, before the entries (count only and populated). 221 # ng lifts the globals count cap only (IR.md s12), pinned separately on the corresponding M row. 222 M k-soa 26 1 23 24 223 # Globals count at 28 becomes `16777216` (IR.md s12 lifts that cap for ng only). With s5 records of 224 # five bytes, the third entry at 42 has class 5 at 46: s11 NONCANONICAL, not TRUNCATED (s14 reader). 225 M a-fib 31 1 23 28 13 42 226 M a-fib 34 1 23 32 227 M a-fib 40 1 23 38 228 M a-fib 52 1 23 50 229 M a-fib 111 1 23 109 230 G types c 23 24 231 G types d 23 24 232 G types n 23 24 233 G ty65536 r 0 - 234 G ty65537 a 23 65538 235 G gl65537 a 23 65539 236 G fn65537 a 23 262146 237 G bl65537 a 23 131075 238 G fp65537 a 23 2 239 G bp65537 a 23 5 240 Q 1000 241 K 6 103 242 # the optimizer (seed/ng/src/opt.om). The 23 front units: `@ng front-ir` of the run units of ng-front's 243 # cases-front-ir.txt but x-float and linear, front-m3 `536bbc83` built by ngbuild sha256 `78cb2aed`..., as ngdis 244 # text; o-pre2 (a loop entered by a cbr and a br: a new preheader) and o-zero (a loop of zero passes holding a 245 # check that would fail and a division by zero) by hand 246 O x-bits fns=1 loops=0 inloop=0->0 phi=3 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 247 O x-conv fns=2 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 248 O x-divmin fns=2 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 249 O x-fib fns=2 loops=0 inloop=0->0 phi=1 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 250 O x-fuel fns=1 loops=1 inloop=11->7 phi=0 bce=0 hoisted=4 merged=1 rotated=1 preheaders=0 251 O x-fuelok fns=1 loops=1 inloop=11->7 phi=0 bce=0 hoisted=4 merged=2 rotated=1 preheaders=0 252 O x-hello fns=1 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 253 O x-i8 fns=2 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 254 O x-index fns=1 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 255 O x-indexok fns=1 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 256 O x-ovf64 fns=2 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 257 O x-ovf64ok fns=2 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 258 O x-remmin fns=2 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 259 O x-shift fns=2 loops=0 inloop=0->0 phi=0 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 260 L arith fns=2 loops=2 inloop=43->26 phi=7 bce=4 hoisted=14 merged=5 rotated=2 preheaders=0 261 L branch fns=2 loops=3 inloop=65->40 phi=22 bce=3 hoisted=25 merged=16 rotated=3 preheaders=0 262 L leafcall fns=3 loops=2 inloop=35->21 phi=7 bce=3 hoisted=12 merged=6 rotated=2 preheaders=0 263 L fib38 fns=3 loops=1 inloop=24->13 phi=3 bce=3 hoisted=9 merged=5 rotated=1 preheaders=0 264 L fib40 fns=3 loops=1 inloop=24->13 phi=2 bce=3 hoisted=9 merged=5 rotated=1 preheaders=0 265 L isort fns=4 loops=6 inloop=127->71 phi=24 bce=11 hoisted=50 merged=26 rotated=6 preheaders=0 266 L sieve fns=3 loops=6 inloop=102->61 phi=18 bce=5 hoisted=42 merged=16 rotated=6 preheaders=0 267 L sort fns=5 loops=6 inloop=119->71 phi=15 bce=11 hoisted=42 merged=22 rotated=6 preheaders=0 268 # matmul: without PHI 145->88 hoisted=72 merged=32; the outer index its inner loops carry unchanged makes i*300 invariant 269 L matmul fns=4 loops=8 inloop=145->87 phi=34 bce=5 hoisted=76 merged=33 rotated=8 preheaders=0 270 O o-pre2 fns=1 loops=1 inloop=10->6 phi=0 bce=2 hoisted=3 merged=0 rotated=1 preheaders=1 271 O o-zero fns=1 loops=1 inloop=10->6 phi=0 bce=0 hoisted=4 merged=2 rotated=1 preheaders=0 272 O o-bce0 fns=1 loops=1 inloop=9->6 phi=0 bce=2 hoisted=2 merged=0 rotated=1 preheaders=0 273 O o-bce1 fns=1 loops=1 inloop=9->7 phi=0 bce=1 hoisted=2 merged=0 rotated=1 preheaders=0 274 O o-shfl fns=2 loops=1 inloop=6->5 phi=0 bce=0 hoisted=1 merged=0 rotated=1 preheaders=0 275 # a kernel loop with an invariant mma (operands from mmald before the loop): it stays in the loop; `854d8152` gave 8->5 hoisted=3 276 O o-mma fns=2 loops=1 inloop=8->6 phi=0 bce=2 hoisted=2 merged=0 rotated=1 preheaders=0 277 # o-phi: a join whose first parameter gets 7 or 9 by path (it stays) and whose second gets the same value on 278 # both paths (PHI removes it); exit 18. A PHI that kept a parameter's first argument even where another br 279 # passes a different one exits 16 (the PHI mutant in the READY; the gate's O check "opt run differs" fires) 280 O o-phi fns=1 loops=0 inloop=0->0 phi=1 bce=0 hoisted=0 merged=0 rotated=0 preheaders=0 281 # o-phi2: a loop join whose parameter gets `bitcast u64 %1` on one path and the equal op of block 0 on the 282 # other; LICM merges the first into the second only after PHI ran, so one PHI round leaves phi=0 here and a 283 # second `@ng opt` removes it (ngrand seed 523); the repeat of PHI, BCE and LICM removes it in one; exit 140 284 O o-phi2 fns=1 loops=1 inloop=16->11 phi=1 bce=0 hoisted=5 merged=2 rotated=1 preheaders=0 285 # Float sign-bit and toward-zero minimal repros, plus unsigned-to-signed checked conversion. 286 N n-bcastf32 0 0 287 N n-bcastf64 0 0 288 N n-convtz 0 0 289 T x-convu 0 - 290 R x-convu 291 # n-s7821, n-s10623: ngrand seeds 7821 and 10623 (rgate random-phase divergences in a 20000-seed run, CompilerBugHunt 292 # NG-3/NG-4), shrunk by `ngrand shrink SEED 1 OUT diverge` (predicate: ngrun before `26f67fbb` differs from `@ng a64`) 293 # and kept as found. chk.conv i32 of u64 2^64-1 (`not u64 0`) and of u64 2^64-100 (`conv u64` of i64 -100) is 294 # outside i32, so both trap 5 (IR.md s7.9) before @f0 prints (Wolfram: Mod[-100,2^64] = `18446744073709551516` > 295 # 2^31-1). ngrun before `26f67fbb` read the u64 as signed: exit 32 and 28 with 8 stdout bytes. rgate runs both too. 296 T n-s7821 0 - 297 T n-s10623 0 - 298 N n-s7821 105 - 299 N n-s10623 105 - 300 # Safe host argument execution, completed compiler table, and arithmetic NaN quieting. 301 N n-hostargs 1 0 302 T a-hostexecenv 0 - 303 T a-hostprlimit 0 - 304 T x-minnan 0 - 305 R x-minnan 306 # Bay 1 review of `36edfca2`: a native trap 3 (zero byte in a path, malformed packet) precedes ngrun's confinement refusal. 307 T x-pathnul 0 - 308 R x-pathnul 309 T x-renpkt 0 - 310 R x-renpkt 311 # FixRound2Ng answer to bay 1's review of `36edfca2` (same class as x-pathnul): a native trap 3 also precedes 312 # ngrun's refusal or descriptor check for an empty stat/lstat/readlnk path, a stat/lstat/fstat output under 313 # 128 bytes and a negative sleepns interval. 314 T x-statnul 0 - 315 R x-statnul 316 T x-lstatcap 0 - 317 R x-lstatcap 318 T x-rlnul 0 - 319 R x-rlnul 320 T x-fstatcap 0 - 321 R x-fstatcap 322 T x-sleepneg 0 - 323 R x-sleepneg 324 # bay 5 review of `b203fc8c` (same class as x-sleepneg): a native trap 3 also precedes ngrun's refusal of waitio 325 # (events outside 0..65535), peercred (output under 12), pollfds (length not a multiple of 8), waitpid (output 326 # under 4), pipefds (output under 8) and a malformed execprog, execpure, execenv or symlnk packet. 327 T x-waitioev 0 - 328 R x-waitioev 329 T x-pcredcap 0 - 330 R x-pcredcap 331 T x-pollmis 0 - 332 R x-pollmis 333 T x-wpidcap 0 - 334 R x-wpidcap 335 T x-pipecap 0 - 336 R x-pipecap 337 T x-execpkt 0 - 338 R x-execpkt 339 T x-purepkt 0 - 340 R x-purepkt 341 T x-envpkt 0 - 342 R x-envpkt 343 T x-symlpkt 0 - 344 R x-symlpkt 345 # ham/ngrun-hostwords-4: the exec argument packet caps of omc `564c5835` (count 1..1024, 2..65536 bytes): one 346 # past each traps 3 natively and in ngrun (host-refusals modes 324/325 hold packets inside the caps). 347 T x-execcap 0 - 348 R x-execcap 349 T x-execbig 0 - 350 R x-execbig 351 # bay 3 review of `2d6ed949`: one past each cap with a well-formed packet, so only the cap can trap (x-execbig 352 # holds one 65533-byte record). symlnk and the execenv environment keep 2..4096 bytes and count 1..64. 353 T x-envbig 0 - 354 R x-envbig 355 T x-envcap 0 - 356 R x-envcap 357 T x-symlbig 0 - 358 R x-symlbig 359 360 # Runtime pools: independent wire readers and native source oracle. 361 T x-pool 0 - 362 R x-pool 363 T r28-pool-stale 28 186 364 O o-pool 365 T r16-pool-array 16 41 366 T r16-pool-bool 16 32 367 T r16-pool-fixed 16 72 368 T r16-pool-index 16 76 369 T r16-pool-io 16 89 370 T r16-pool-result 16 63 371 T r24-pool-global 24 63 372 T r16-pool-ref 16 79 373 T r22-pool-kernel 22 76 374 T x-pool-widths 0 - 375 R x-pool-widths 376 T x-pool-bound 0 - 377 R x-pool-bound 378 M x-pool 36 3 13 32 379 # Bounded t_pool_grow: 64 elements, sum 2016; pool readers stay inside both loops. 380 O o-pool-loop