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/patches/a3446fb2616233b6 # 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 ## GitHub aien-dev/omega-mv#923 (code only) closed derived `a3446fb2616233b6` #923 Imported from GitHub aien-dev/omega-mv#923 (code only) GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed). Base `e2662fffbce1c21ef09da71c0d8808133a6af8ab` · Head `e3ef85a0cb1ec84ae35622a23bf53244ee67fa61` ### Fetch it A git bundle of the pull request's head, 715613 bytes. ``` curl -fsSL https://interplane.io/drakestapleton/omega-mv/patches/a3446fb2616233b6.bundle -o a3446fb2616233b6.bundle git fetch a3446fb2616233b6.bundle refs/pull/923/head ``` Raw bundle · Diff ### Provenance This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record: ``` github-import 1 aien-dev/omega-mv 923 e3ef85a0cb1ec84ae35622a23bf53244ee67fa61 ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"omega-mv","number":923,"url":"https://github.com/aien-dev/omega-mv/pull/923","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:39:22Z","metadata":"unavailable","state_derived":true} ``` ### Changes ``` diff --git a/.crumb b/.crumb index 366b218af..5adc902b2 100644 --- a/.crumb +++ b/.crumb @@ -47,8 +47,8 @@ "purpose": "Directory calibration. Purpose not yet described by a human." }, { - "digest": "20dd4413b7cc76d8372db0934f11deb296b278fd1c9f9b4fb86b94c47fb7c631", - "last_commit": "7bce2a4fd", + "digest": "46d7fbc4d1add6b7de3520e745027c4ba6533d0a49f0d1ae6e7a2ed81c3b17d4", + "last_commit": "8a65c4df9", "name": "docs", "purpose": "Directory docs. Purpose not yet described by a human." }, @@ -77,8 +77,8 @@ "purpose": "Directory spec. Purpose not yet described by a human." }, { - "digest": "f9266553f366d03fffd5c6eb5e4b6050166ca0eebfa811c134f4bbd4c0a57d5f", - "last_commit": "7bce2a4fd", + "digest": "199749684598b36b610b14a4c5b59703df5e53bba1db2b5939297c55ac423153", + "last_commit": "8499f2233", "name": "src", "purpose": "Directory src. Purpose not yet described by a human." }, @@ -95,15 +95,15 @@ "purpose": "Directory tools. Purpose not yet described by a human." } ], - "children_root": "sha256:03c08e3f02c7d9f78dcb8fefa73ce38eaebe0f2fdc6bab517ac939bdae5b2cdc", - "compiled_at": "2026-10-29T01:20:13Z", + "children_root": "sha256:9ae4bf901c191306f33abf6f0ac317efb7f4c8587facfb8d94c63d268d6970c9", + "compiled_at": "2026-10-29T02:20:47Z", "compiler": "crumb-compile/1", - "digest": "sha256:f4b8246f116bfd11e1843fa1df1b6a23c419319906e96973754666d94ccd0a93", - "evidence_files": 12522, - "evidence_root": "sha256:22bec1d6768f1fb65ccaecb14e2915fc19d0b346ac67067fb889a8b2adeb8f36", - "files": 17705, - "generated_at_commit": "7bce2a4fddc43268ac2af09cddc4a5a67d78312d", - "source_tree": "sha256:2008736d61c68394f3b52289abc71ae8c97ca1b05fc969aa2cc367e7ed17cf55" + "digest": "sha256:07fc071f60f7ddf7e140d6366594edc34b66f3a9aab92a2d1be5521e6eb341a6", + "evidence_files": 12523, + "evidence_root": "sha256:a4f0e111f55b6b66b3924783341a8310a4d387d362d9756815df6f6c723f09b6", + "files": 17727, + "generated_at_commit": "8a65c4df9b9fc5b5247fd47aca36327eb716847e", + "source_tree": "sha256:d712f1a9b564179edb45738813ab0d076927f213727320782b605ca7c9566e8c" }, "owner_lane": "", "provenance": { diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c883915cc..a3f04b7c7 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,6 +5,7 @@ Every model below did real work. A model is listed only for work it did. The orc | Model | What it did | |---|---| +| Codex (GPT-6.1 Sol) | FR-9 x86-64 Linux backend integration from historical 7eca2ac3f, full-language lowering, contract-loop/output-capacity/dead-branch repairs, division/shift proof-aware diagnostics, original-conductor and historical-mutant qualification repair, independent disassembly and cross-architecture qualification; orphaned-lane recovery, current mutation re-anchoring and x86 OM-2 emitted-storage bound | | Codex (GPT-6.1 Sol) | Corrected qty prefix-query types and capacity-only diagnostic repairability, with exact-record regression controls (#911) | | Codex | Inference-cost driver compiler-failure status repair, host-only refusal regression probes and independent review; native Omega execution NOT_RUN | | Codex (GPT-6 Astra) | Bounded native peer credentials, multi-descriptor polling, single-iovec sendmsg, socket-option allowlist and host fixtures (#788) | @@ -40,3 +41,6 @@ Update this table in the same commit as the work it credits. | Claude Opus 5.5 | Seeded compiler: `pread` needs a writable array (error 20) and `pwrite` takes a text, the writable check moved from code 162 to 161 in `hpread`; s4 regression rows, a reintroducing mutant and the 2c824805 negative control | | Codex | Integrated compiler batch #904 with the quantity and diagnostic audit on current main; rebuilt compiler and bindings, refreshed pinned checks, and repaired the recursive-inline mutant anchor without changing its obligation. | + +| Codex | Integrated FR-9 with compiler batch 3 and the latest quantity/diagnostic audit; preserved empty text and integer-bitcast behavior on x86 and kept seed bootstrap within its function budget by removing unused helpers and inlining one single-use helper. | +| Codex | Fixed x86 quantity unary refusals and empty-text emission; added explicit per-target acceptance contracts, preserved historical failed experiments, and exercised missing diagnostic callers and stale-binding controls. | diff --git a/README.md b/README.md index 6cff6147d..cf7499ac6 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Omega was decided by Drake on 2026-09-29 to be both the reaction runtime and the Research-grade, with a staged Alpha qualification programme in progress. An Alpha plan or an open PR is not a qualified release. Plainly: - **Seeded `.om` compiler (on `main` from PR #696):** one compiler, `seed/out/omc`, written in `.om` and rebuilt from the 408-byte loader by `sh seed/omega-from-seed.sh` (`seed0 -> hex1 -> asm2 -> om4 -> omc`). Its one supported profile is AArch64 Linux, static ELF output, with the whole language in `docs/one_layer/OMEGESE.md`: native host words (ids 100..165) and the checked device/mapping words (ids 166..177). Host qualification is `tests/gates/run.sh seed` (the `OMEGA-SEED` gate: stage fixpoint, `seed/host/check.sh` and the IR comparison against the C oracles, no gate skipped). What it does not prove: the fixpoint is a same-lineage rebuild check, not diverse double compilation; the reference interpreter on `seed/omega-ref` predates this compiler source (it refuses a call to a function defined later, first at `fexp`, `seed/omc/omc.om` line 935). The synced interpreter on `seed/omega-ref-sync` (190130b7, not merged yet) runs `omc.om` on itself and reproduces this compiler byte for byte (`tools/omega_ref/gate_ddc.sh`: GATE_DDC PASS, omc sha256 734f0a39, both negative controls caught, author-run 2026-10-24; [omega#650](https://github.com/aien-dev/omega-mv/issues/650)). GPU launch and model execution through these device words are not qualified. The language has bounded native recursion; a restricted importer does not describe the whole language. See [conformance and evidence limits](https://github.com/aien-dev/omega-mv/issues/624). +- **Candidate x86-64 Linux backend (FR-9):** an initial `target x86linux` line selects x86-64 static ELF output for whole programs; no selector preserves AArch64 output. The backend is implemented in `seed/omc/omc.om`, not a C translation. [Design, ABI, provenance and qualification](docs/X86-LINUX.md) distinguish emulated execution from native x86 execution and the existing AArch64 seed chain. Bare x86 units use a private frame ABI, not the SysV C ABI; foreign callers still use omega-bridge. This pending branch is not a merged or hardware-qualified release. - **Legacy OSC/C implementation on `main`:** OSC-0/1/2 and OSC-3 material describes the earlier implementation and unfinished migration, not the forward source-language path. The old Milestone 6 "self-host" result was a fixed-output self-copy check, not compilation ([historical note](docs/osc/OSC-1-SELF-HOST-STATEMENT.md)); do not confuse it with the later seeded compiler work. - **Reaction runtime:** the R1 to R16 qualification ladder passed on builds that predate the composition modules (omega#126), a historical result. Requalification at `3108fc2` recorded R15 FAIL (14 of 16 gates: G1, G15) and R16 FAIL (`evidence/REQUAL-3108fc2/`); the R16 receipt `22d7a79a` at `850fc54` is invalid as a current claim because its script was later found defective; none of R1 to R16 is requalified on the current candidate, and the ladder rerun is in progress. The R16 loop-site inventory was reconciled on the candidate tree (502 sites, 0 unclassified, 0 stale, PR #279); that is the inventory gate only, not R16. The current living build is IMPLEMENTED / NOT QUALIFIED until re-qualified. Composition, Capability Graph, Skill Router, J-Space and Cortex run on the host; the Fabric interface is a host-only loopback with no network; none of this is on silicon as a qualified system. - **Numerics (E1):** closed 2026-10-02 on the GB10 chip campaign (Gate 5 26/26 with 47 parity lines, reductions SUM/MAX/MIN/MEAN, nine transcendental ops over all 2^32 inputs each, 148 load/store kernels), consolidated receipt `evidence/E1-CLOSURE/e7851c69d34ac777a9436af16d0bdd5d69264c8528c62d562b600f5d89153061.json`; exclusions (natural-base EXP/LOG have no GB10 kernel) are listed in [E1_GAP_TABLE](docs/numeric/E1_GAP_TABLE.md). diff --git a/docs/.crumb b/docs/.crumb index 3f8be425a..1e1f0d586 100644 --- a/docs/.crumb +++ b/docs/.crumb @@ -124,14 +124,14 @@ } ], "children_root": "sha256:c81d43c0c392dfec2b6ed5b38ba95ea7c592782b283950e32b777e7b9cfd9d61", - "compiled_at": "2026-10-29T01:12:21Z", + "compiled_at": "2026-10-29T02:20:22Z", "compiler": "crumb-compile/1", - "digest": "sha256:20dd4413b7cc76d8372db0934f11deb296b278fd1c9f9b4fb86b94c47fb7c631", + "digest": "sha256:46d7fbc4d1add6b7de3520e745027c4ba6533d0a49f0d1ae6e7a2ed81c3b17d4", "evidence_files": 34, "evidence_root": "sha256:589d8b3706e6d7a202ab20b278dac5fc5bafc973f1c2a867b2668aa7210b65cc", - "files": 136, - "generated_at_commit": "d94a503f7aae57d09697046405da2e9a5895be6d", - "source_tree": "sha256:12881795407873ade69a54a35c1f6f69198b0583c6d36219fe23a58614f0743d" + "files": 137, + "generated_at_commit": "00ebdee8461467f26e7ec7b56289ab6549f2c0a2", + "source_tree": "sha256:3427ce7d3e095790ba861f592ad77df8b5dfc51dd752d3c9ee9132de3276f80b" }, "owner_lane": "", "provenance": { diff --git a/docs/ROADMAP-1.0.md b/docs/ROADMAP-1.0.md index 3713e0318..cc65df38c 100644 --- a/docs/ROADMAP-1.0.md +++ b/docs/ROADMAP-1.0.md @@ -99,10 +99,10 @@ feature anyone may want", and it never means hardware qualification beyond the t `aien-math`; a local unpublished x86 branch raises to 1024), 16 registers with no spilling (error 12), 6 parameter slots, 8-character local names (error 13). These are implementation limits, not language rules, and each needs a decision before 1.0 freezes them. -7. **A second target exists only off GitHub.** omega-harness#9 cites commit `7eca2ac3f` ("x86-64 Linux and - UEFI back ends", 2,043 lines added to `omc.om`) on branch `feat/allen-imac-competition`; that commit is - not on `aien-dev/omega-mv` (GitHub returns 422 for it). Reported IMPLEMENTED in omega-harness#9; - not independently verified by this audit, unreviewed and unpublished. +7. **A second target is in draft integration, not qualified.** FR-9 integrates the historical + `7eca2ac3f` backend into canonical base `6999fa9e6`; [X86-LINUX.md](X86-LINUX.md) records + the design and actual unsupported paths. Implementation and execution evidence are pending. + The earlier off-GitHub observation is not a current publication check or a completion claim. 8. **No contracts in the forward compiler.** omc has no `requires`, `ensures` or `assert`; the only contract syntax is in the legacy C front end, and OSC IR carries contract text as metadata. 9. **Efficiency is not measured against an optimizing baseline.** The only filed comparison @@ -293,7 +293,8 @@ Acceptance: | AArch64 Linux static ELF (program and function mode) | MERGED; host EXERCISED by `OMEGA-SEED` | QUALIFIED by RM1's full gate at the release commit | | WebAssembly MVP via OSC IR v1 (`irwasm`) | MERGED, scalar subset; host EXERCISED by authors | Gate wired (RM1); scope decision: stay scalar-only for 1.0, or add linear memory, text and globals with IR v2+ | | SPIR-V 1.0 OpenCL Kernel via OSC IR v1 (`irspirv`) | IMPLEMENTED and CPU EXERCISED in [#804](https://github.com/aien-dev/omega-mv/pull/804); [ABI, parity and toolchain](SPIRV.md) | Standalone `seed/spirv/gate-irspirv.sh`: full irwasm scalar corpus, exact trap/result parity on PoCL CPU, validator, determinism, mutant and refusals. Manifest wiring needs operator authorization; GPU and DPC++ integration NOT_RUN. | -| x86-64 Linux ELF and x86-64 UEFI PE32+ | Reported IMPLEMENTED in omega-harness#9 on unpublished commit `7eca2ac3f`; not independently verified here | Published PR; default AArch64 output byte-identical (C2 manifest); differential against AArch64 on the full fixture set; trap codes equal; QEMU run labelled EMULATED; physical x86 hardware NOT_RUN unless tested | +| x86-64 Linux static ELF | DRAFT integration pending implementation/evidence on canonical base `6999fa9e6`, using historical `7eca2ac3f`; [design and unsupported paths](X86-LINUX.md) | Published PR; default AArch64 output byte-identical (C2 manifest); full existing fixture differential with equal trap codes; independent objdump oracle and wrong-encoding mutants; all NOT_RUN for this draft; QEMU labelled EMULATED, physical x86 NOT_RUN unless tested | +| x86-64 UEFI PE32+ | Historical implementation in `7eca2ac3f`; removed from the Linux-only FR-9 draft | Outside this integration; separate firmware/PE32+ acceptance and evidence required; Linux execution does not establish firmware or physical x86 qualification | | RISC-V RV64GC (#630), other ISAs (#629, #628) | PROPOSED | Out of 1.0 unless a decision adds it | | GB10 sm_121 device code (`seed/sm121`, device/mapping words) | IMPLEMENTED encodings and host-side device words; no GPU launcher | Chip gate BLOCKED_OPERATOR; host and simulator results are never cited as GPU qualification | diff --git a/docs/X86-LINUX.md b/docs/X86-LINUX.md new file mode 100644 index 000000000..7dd62ee27 --- /dev/null +++ b/docs/X86-LINUX.md @@ -0,0 +1,513 @@ +# x86-64 Linux backend (FR-9) + +Status: **DRAFT; native x86 qualification NOT_RUN**, 2026-10-28. +The canonical integration base is `aien-dev/omega-mv` commit +`d94a503f7aae57d09697046405da2e9a5895be6d`, with compiler batch 3 integrated +at `7bce2a4fddc43268ac2af09cddc4a5a67d78312d`; the historical backend is +`7eca2ac3fbd1f35a7d65471065408ce4bea07fd4`. Current implementation lives in +`seed/omc/omc.om`. Source anchors describe implementation, not by themselves +execution evidence. The dated baseline below is immutable history; resumed +qualification records supersede it only for their exact source/tool pins. + +## Selection and implementation boundary + +The required opt-in is the exact first line `target x86linux`. Inputs without +that line retain the AArch64 default. Target selection belongs in `xlead`, +before `prescan` and normal parsing; it must preserve diagnostic line numbers. +Whitespace variants, truncated/extended target names, a later target line, and +combining the target with another output mode must not accidentally select a +backend. The historical `xlead` token comparison is not itself sufficient proof +of the exact-line contract: the tokenizer packs only the initial name bytes. + +The backend is handwritten Omega in `seed/omc/omc.om`, not a C, Python or +assembly implementation behind an Omega facade. Shared semantic operations +select x86 emission before the AArch64 `emit` path. `emit` refuses with error 25 +when a nondefault target reaches it. This is a refusal boundary, not a substitute +for implementing a reachable language operation. The historical commit also +contained `target x86efi` and a firmware boundary; those are removed from this +Linux-only integration. FR-9 does not qualify PE32+, OVMF or physical firmware. + +## Instruction selection + +The backend lowers language operations directly; it does not decode AArch64 +words. `xb`, `xword`, `ximm`, `xrr`, and `xmem` emit bytes, little-endian +immediates, REX prefixes, ModRM and (for a stack base) SIB. Hardware register +numbers are private emitter operands, distinct from the language value IDs. +The instruction references are the Intel SDM volume 2 entries cited beside the +backend in the source. + +| Operation | Source anchors and selection | +|---|---| +| Integer constants and moves | `matconst`, `force`, `ximm`, `xload`, `xstore`: materialize a full-width immediate or copy a frame value through a hardware register | +| Add/subtract/multiply and bitwise operations | `bo_add`, `bo_mul`, `bo_log`, `xarith`: ADD, SUB, two-operand IMUL, AND, OR, XOR; signed checks branch before later operations overwrite flags | +| Division/remainder | `bo_div`, `xdiv`: test zero first, DIV for unsigned, CQO/IDIV for signed; handle the signed divisor-minus-one case explicitly so remainder does not raise a hardware divide exception | +| Shifts | `xshift`: check count against the language width before CL-based SHL/SHR/SAR; signed left shifts must retain the overflow check | +| Unary/conversion | `xunary`, `xconv`, `xcanrax`, `xext`: NEG/NOT, shift-based width canonicalization and checked narrowing; bool conversions retain language restrictions | +| Comparison | `xcmp`, `xcc`, `cset`: CMP and SETcc followed by zero extension; signed/unsigned predicates must not be interchanged | +| Branch/call/return | `xbranch`, `xpatch`, `ca_bl`, `resolve`, `epi`: rel32 Jcc, JMP, CALL, then LEAVE/RET; patch byte displacements, not AArch64 word displacements | +| Arrays and cells | `xelem`, `xmemval`, `st_ld`, `st_put`: bounds check, scaled index, width-specific MOV/MOVZX/MOVSX/MOVSXD; internal addresses are not source scalar pointers | + +`xbranch` reserves six bytes for every branch site. An unconditional JMP uses +its relative displacement and a padding NOP; conditional branches use the long +Jcc form. `xpatch` distinguishes their displacement positions. Calls have a +separate rel32 fixup in `resolve`. + +The x86 byte-output pool is 16 MiB; default AArch64 emission retains its existing +8 MiB ceiling. This target-specific capacity accommodates the larger variable- +length instruction stream without changing the default target's refusal gate. +Dead then-arms do not emit an unreachable skip branch past the final bare-unit +instruction. Numeric and value `for` loops both check invariant obligations at +the loop head, including final false heads and `continue` backedges. + +The historical backend refused floating-point paths. The current draft adds +baseline SSE2 scalar lowering through `xfmov`, `xfsse`, `xfucom`, `xfbin`, +`xfminmax`, `xfcmp`, `xfint`, `xftoint` and `xfconv`, routed from `fp_*`. +Float bits retain the same frame slots; f32 extraction zero-extends its bits. +Comparisons normalize unordered/parity handling to the existing boolean flag +contract rather than adding a public condition code. The source implements +signaling-NaN priority and quieting, numeric selection for quiet NaNs in min/max, +signed-zero min/max, and default positive NaN for invalid arithmetic. +Float-to-integer conversion truncates and saturates to the destination bounds, +with NaN producing zero, rather than raising the checked integer-conversion +trap. Unsigned 64-bit conversion has dedicated high-half handling. These are +IMPLEMENTED source paths, not exercised IEEE parity claims; full fixtures must +still cover arithmetic, comparisons, conversions, arrays, pools and structs. + +## Sixteen-value register model and frame map + +The parser's allocation model is retained; frame storage is not general spilling +and does not remove error 12. `poolc` allocates these sixteen operand IDs: + +| Pool positions (source `poolc`) | Stored operand IDs | +|---|---| +| Before the first branch in `poolc` | `0, 1, 2, 3, 4, 5, 6` | +| Before the second branch in `poolc` | `8, 9, 10, 11, 12, 13, 14, 15` | +| Final return in `poolc` | `17` | + +The historical operand-ID holes `7` (runtime) and `16` (scratch) are retained. +For **each** operand ID `s`, `xload` and `xstore` use exactly the source expression +`RBP - ((s + 1) * 8)` for its slot. This is an operand-ID-indexed frame, not a +new dense renumbering of the sixteen values. `xpro` reserves 256 bytes below RBP; +`xsave` and `xrestore` copy storage indices `0..17`, including the holes. RBP +addresses values; RSP moves for local arrays and call reservations. R15 retains +the owned-stack floor. RAX, RCX and RDX are commonly temporary integer operands; +R11 temporarily retains the caller's frame pointer during prologue entry. + +The source constants for Linux startup are stack floor `268435456` and initial +RSP `276824064`. `xcheck` compares prospective RSP against R15. `xsave` checks +space for a callee return address, saved frame pointer and frame before CALL; +`xsp` checks before stack subtraction. The owned stack is not Linux's original +argument/environment stack. + +## Internal ABI versus Linux SysV + +This is a private Omega calling convention, **not** the SysV C function ABI. +`xsave` snapshots caller storage into a 256-byte reservation. `xarg` installs +arguments in caller frame slots, and `xpro` copies parameters from the old RBP +into the new frame. `epi` loads result slot zero into RAX and emits LEAVE/RET. +`xrestore` preserves that result while restoring other saved storage and RSP. +The existing six-parameter/slot accounting is a front-end contract; OM-2 unsized +arrays additionally require their pointer/count slot accounting (`pwid`, +`pslot`), not a scalar-only parameter loop. + +Bare-function output is now implemented by `xunit` using this same private +frame ABI. Each exported entry occupies a six-byte JMP/NOP slot in source +order; without exports, the unit enters its last function. `writeout 512` +removes the image reservation, so the result is raw code, not ELF or an +independently executable process. The caller must establish the private frame +and owned-stack convention. Existing `fnstore` restrictions on globals/text, +call-cycle checks and refusal boundaries remain in force. + +For bare units, physical R12 holds the wrapper's recovery-stack anchor, R14 +points to an immutable table of 32 runtime entry pointers, and R15 holds the +owned-stack floor. These physical registers are distinct from language operand +IDs. The native host-extension helpers overwrite R12/R14 in program mode and +remain forbidden in bare units. Legacy byte `read`/`write` use the separate +`xio` syscall path, preserve these registers and remain allowed in bare units. +Before CALL, the wrapper supplies a separate 256-byte old-RBP slot area, +including pointer/count argument slots, and at least 272 writable bytes below +pre-CALL RSP for the return address, saved RBP and callee frame. The first +prologue does not check this caller-owned initial allowance. + +A bare trap places its code in ESI and jumps through runtime table entry 2 +(`JMP [R14 + 16]`). This is a private nonlocal landing pad, not a C function call: +there is no new return address and the current frame may be incomplete. The +landing pad restores RSP from R12 and the wrapper's saved SysV callee-preserved +registers and RBP, then returns the status without storing a result. It must +validate trap codes and restore SysV alignment before any foreign CALL. Normal +unit returns still produce their value in RAX through LEAVE/RET. Trap recovery +does not roll back earlier writes or I/O. + +The raw compiler output itself has no SysV C-callable export, shared-object +relocation contract, PLT/GOT, dynamic linker, libc startup or general foreign-call +boundary. The separate omega-bridge x86 wrapper supplies the C boundary; its +qualification is separate from the private compiler ABI. Linux syscall register +conventions alone do not establish FR-7. + +## Linux syscalls and cross-architecture records + +The imported Linux implementation covers `read` and `write` through `xio`, and +process termination through `xleave`. `xio` supplies fd in RDI, the checked byte +slice address in RSI, count in RDX and the syscall number in RAX; SYSCALL returns +in RAX. Its source selects `read`/`write` numbers with `c - 53`. `xleave` moves +the status to RDI and uses syscall number 60. Caller frame storage must survive +the architectural RCX/R11 clobbers. Raw kernel error returns must retain the +existing host-word result convention, rather than silently becoming success. + +**Historical host gap:** imported `hostval` refused every nondefault target with +error 25. The draft now contains an `xhost` dispatcher and native host helpers, +including socket, polling and device/mapping routes; wiring and coverage are +still being integrated. Their presence alone does not establish support for +every existing host fixture. Reusing AArch64 emitters is not an implementation. + +A complete host lowering needs a per-word x86 Linux syscall-number and +argument-order mapping, checked against the x86 UAPI rather than +`asm-generic/unistd.h`. Record layouts need a separate audit: `stat` fields and +offsets, `timespec`, polling records, socket addresses/options, ancillary data, +`iovec`/`msghdr`, wait results and architecture-dependent flags cannot be assumed +portable by changing a syscall number. Private kernel records must be translated +to the existing language-visible layout where those layouts differ. No kernel +pointer may escape into a source scalar; slice bounds and refusal allowlists +must remain enforced. Startup argument/environment support must preserve the +initial Linux stack before replacing RSP. This paragraph is a design obligation, +not a claim that these translations are present. + +## Static ELF64 and address fixups + +`xelf` reuses the static `elfhdr` layout, replacing the executable/machine word +for x86-64 and the entry address. The two PT_LOAD mappings remain code at +`0x400000` (read/execute) and owned pools/stack at `0x10000000` (read/write). +The output is ELF64 little-endian ET_EXEC, without a PT_INTERP or dynamic +linker. `xeof` emits startup after the functions, installs the owned stack, +calls parameterless `main`, then exits. The Linux code reservation starts at +byte 512 in the historical path. + +`mataddr`, `xaddr`, and `xfixaddr` retain address origin separately from integer +constants and patch RIP-relative LEA displacements after layout. A numeric +constant that happens to resemble a pool address must not relocate. Calls and +branches are resolved against code byte offsets. Static fixed-address segments +are not a claim of PIE or a shared-object ABI. + +## Traps and refusal paths + +`xtrap` records a branch site and language trap code; `xfinish` resolves each +site to process termination with status `100 + code` in program mode, or the +runtime-table landing pad described above in bare mode. Trap numbers and +source-level boundaries match AArch64, including signed overflow (1), division +by zero (2), bounds (3), loop bound (4), conversion (5), stack (6) and shift count +(7). Explicit and contract-related traps retain their existing definitions. +Linux termination is not a host signal oracle. + +Compiler refusal is distinct from runtime trapping: error 25 identifies an +unsupported target/emission path, while existing parse, type, capacity and +bounds refusals remain compiler errors. The historical program-only restriction +has been replaced by the private bare-unit output described above. No unsupported +construct may be represented by empty emission or a fallback AArch64 instruction. + +## Integration gaps and acceptance evidence + +The historical import lacked host words beyond byte I/O/exit, floating-point +lowering, OM-2 unsized-array checks, pointer/count parameter accounting and newer +semantic operations. The current draft adds SSE2 lowering, an `xhost` dispatcher, +`nm_lr` checks in `xelem`, parameter-slot integration, and core/layout/rotate +lowering (`xrot` among the native helpers). These are source integration changes, +not execution evidence. The guard against AArch64 emission remains required. + +The historical target-name prefix comparison is now length checked in `xlead`; +the exact-first-line contract still needs its complete negative controls. +Bare-function and multi-entry output boundaries, all host records and every +current language path must be accounted for by the final differential. No gap +listed here is an approved reduction of FR-9 scope. Final source pins and +exercised coverage must supersede draft observations before FR-9 is complete. + +Acceptance requires the **full existing fixture differential**, not a selected +integer subset: default AArch64 bytes/refusals/diagnostics unchanged against the +independently pinned baseline; x86 results, stdout/stderr, side effects and trap +statuses compared to the corresponding AArch64 executions; documented treatment +of architecture-specific fixtures without silently omitting them. An independent +`objdump` instruction oracle must inspect emitted instructions and fixups, and +wrong-encoding mutants must demonstrably fail that oracle or the behavioral +checks. Record exact commands, source/compiler pins, baseline hashes and both +expected and observed results. An x86 QEMU run is **EMULATED**; it is not a +physical x86 execution receipt. Full acceptance remains pending for this draft. + +## Seed impact + +The compiler source and its generated seed compiler are separate artifacts. +Adding x86 output does not replace the AArch64 seed ladder or authorize editing +handwritten bootstrap rungs. The source remains within om4's unchanged +512-function table: two one-use ELF/relocation helpers were inlined after a +514-function candidate correctly failed bootstrap error 14. No bootstrap gate, +table capacity, seed0, hex1, asm2 or om4 was weakened or replaced. + +### Historical baseline at `becf5c817bcb7e0846d12ebfc2be91042d8ad89a` + +- `sh seed/host/check.sh`: PASS, including seed ladder/fixpoint, IR C-oracle + comparisons, gates 7 through 18, 44 contract cases, enforcement/prover + negative controls, native host checks, 53 negative controls and 62 unchanged + historical fixture outputs. +- `sh seed/omc/gate5.sh`: GATE5 PASS, including 153 corpus inputs, 4,860 + cut/changed inputs and the existing wrong-compiler mutants. +- Baseline source: 15,525 lines, 512 functions, SHA256 + `3a40637bfc11eb4b0c0af80a73bd228a3975c25ef805859f06cb1f6d7fc089f4`. +- AArch64 compiler: 473,348 bytes, SHA256 + `5f0faab7cd4fc12158cf8e099418098d278df644efc10e4e7e2e5ca6141fca86`. +- x86 compiler: 3,652,870 bytes, SHA256 + `a95de640177954118482f4fab45945e6cdefc8935afe3eb4e0ac0ec314dc78fc`. + Under QEMU it compiled the complete compiler source for both targets to + bytes identical to the AArch64-hosted compiler, including its own x86 image. + This is **EMULATED**, not a native x86 seed chain. +- Independent GNU x86-64 objdump 2.42 decoded all 517,049 instructions of that + x86 compiler image without invalid opcodes or undecoded bytes. +- Exit-42 ELF behavior matched native AArch64 and QEMU x86. All four actual + CUDA++ units (`bw_enc_sm121`, `cubin_elf`, `ampere_enc_sm86`, `amp_runtime`) + compiled for both targets; their bare ABI behavior is not established by + compilation. + +The full cross-target runner completed with verdict **FAIL**: 7,537 PASS, +152 FAIL, 399 NOT_RUN, five MISSING_IMPLEMENTATION, 570 EXCLUDED and +257 MISSING_INPUT records. Both encoding mutants were caught. Exact pins, +command, counts and unresolved cases are recorded in +`seed/qualification/x86-linux/20261028.json`; the unchanged complete JSONL +is preserved at the path and SHA256 recorded there. This is not stage-C PASS. + +Failures include contract `forfinal`/`forcontinue` refusal, x86 output capacity +on C2 case 05712, four bare-unit direct-branch boundary failures, structured +diagnostic positions, explicit-refusal oracle mismatches and device fixtures. +Uncomposed bare callers, unreviewed host drivers and missing SHA fixture inputs +also remain. These are not silently excluded from the overall failing verdict. + +For the invalid-fd `devcall` discrepancy, a minimal trace returned EBADF (9) +on AArch64, while QEMU translated the same x86 +`ioctl(-1,0xc020462b,...)` to ENOTTY (25). No backend errno shim or weakened +gate was introduced. This dated baseline did not satisfy full stage-C +acceptance; the resumed run must retain the original cases and explain each +remaining deviation. +Native x86 execution and a native x86 seed0 chain are **NOT_RUN**. + +Word-count bookkeeping was checked through WolframLanguageEvaluator: +`(473348-176)/4 -> 118293`. QEMU version was 8.2.2 +(`1:8.2.2+ds-0ubuntu1.18`); Python was 3.12.3. These are verification +oracles only, not production dependencies of the emitted static programs. + +## Resumed differential and operator wrap-up + +The complete resumed run at `66807b62914461b88df5ac73b827a8c809a854b4` +used QEMU 10.0.14 and the original/private/bridge callers. It remained **FAIL**: +8,243 PASS, 476 FAIL, 211 EXCLUDED, six NOT_RUN and one +MISSING_IMPLEMENTATION. These counts are not directly comparable as a fixed +denominator: previously excluded metadata/conductor arms and missing inputs +were expanded into exercised cases. All 570 original exclusions and all +remaining exclusions are individually recorded in +`seed/qualification/x86-linux/20261028-resumed.json`, alongside unresolved +records, hashes, commands and the exact counting rule. The historical baseline +has 152 top-level FAIL records; its summary is not another failing case. + +At `4f14b2d8f1eeb470836fcd2adf1e6ad5b7608c16`, the source additionally repaired +OM-2 constant-index temporary allocation and missing x86 trap-site diagnostics. +The SHA unit compiled for both targets +and the contract diagnostic fixture emits matching source-site records after +target-prefix line translation. The seed ladder rebuilds to compiler SHA256 +`7d1739cc46c04bb8b585c5a255690ae58e30e9ffaa329defa19da3375c5fa316`. +Additional entryless callers and trap authorities are implemented in the oracle. +The full differential after those changes was **NOT_RUN** at that operator +wrap-up. Do not attribute the earlier counts or host gates to that unrerun patch. + +The recovered source `efd15c234afc584e1e67492e736cbb42806c2a7d` (source +SHA256 `e9d70e7cbe1b7026b2fcac5bbf61a64bde931b50a632c954355ba5299954a61c`, +AArch64 compiler `f7752bc5c800e85c2393a08153786d0a6bc4516c9cea955fe27624228d6d1409`) +passed `sh seed/host/check.sh` and `sh seed/omc/gate5.sh` on the AArch64 host. +Its complete differential exited 1: **14,930 PASS, 60 FAIL, 10 NOT_RUN, +216 EXCLUDED**. Verdict **FAIL**. The remaining failures are structured +diagnostic mismatches, unclean expansion-growth refusals, OM-2 fold/unroll +mutant oracle mismatches, A5 bare-unit fixture exits, and frozen C2 mismatches +`c2-00015`, `c2-00033`, `c2-00304`, `c2-00306`, `c2-00675`, `c2-00728` and +`c2-05713` through `c2-05719` except `c2-05718`. Two QEMU ioctl +EMULATOR_ARTIFACT cases and eight entryless callers remain NOT_RUN. Exact case +names and receipts are in `seed/qualification/x86-linux/20261028-recovered-corpus.json` +and `20261028-recovered-host.json`. + +Two invalid-fd ioctl cases in the resumed run have concrete emulator evidence: +QEMU's own trace records request `0xc020462b`, fd `-1`, errno ENOTTY, while the +native fixture requires EBADF. QEMU 10.0.14 +[`linux-user/syscall.c:5713–5717`](https://github.com/qemu/qemu/blob/v10.0.14/linux-user/syscall.c#L5713-L5717) +returns `-TARGET_ENOTTY` for an unknown request before checking the descriptor. +The receipt pins the source, source archive, emulator binary and trace. These +are NOT_RUN/EMULATOR_ARTIFACT records, not backend PASS or native-x86 evidence. + +## Corpus authority and compatibility + +The runner distinguishes current-candidate checks from historical authorities: + +- Frozen `sec/*/pinned.cases` assertions execute through the original Omega + conductor with the independently checked compiler SHA256 + `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`. + Separate current-candidate differential records do not replace those assertions. +- C2 still requires the current candidate to reproduce its frozen compile bytes + and diagnostics. A separate `:frozen-provenance` replay checks the historical + authority; its PASS cannot satisfy a failing current-candidate C2 row. +- Historical candidate manifests receive the compiler source at their recorded + stage revision. Compiler substitutions, builds, controls and mutant executions + run through their original conductor, rather than testing a healthy compiler + against a mutant-only expected output. +- Standalone mutant specifications must map to executable mutation blocks. + Actual build/control/kill transcripts are filed once in the JSONL as + `original-conductor-evidence`; per-row records reference their hashes. + Adequacy controls must fail specifically because the mutant survived, not + because its compiler failed to build. + +The original C2 compatibility contract conflicts with intentional later native +changes, including corrected `getppid`, the socket-option safety allowlist and +expanded name/function capacities. Those failures remain visible. Revising the +contract requires an explicit decision; neither reverting safety fixes nor +silently replacing current-candidate checks with historical replay is allowed. + +### Recovered OM-2 growth bound + +The recovered x86 byte emitter now enforces the same per-function emitted-storage +budget as the AArch64 word emitter: 262144 bytes in an OM-2 function, including +unrolled and inlined output. This is a storage bound, not an x86 instruction +count. The total output-pool ceiling and expansion-fuel bounds remain unchanged. +The existing growth fixtures must refuse with error 14 and empty stdout; +their diagnostic twins must retain `obligation=growth`. Rolled and OM-1 controls +remain accepted. Removing only the new guard is the negative control. + +Different instruction sizes reach that storage ceiling at different source +locations. The corpus deliberately retains its literal cross-target refusal +and diagnostic equality assertions: a clean refusal does not turn a different +source location into PASS. Likewise, x86 bare-unit stack checks retain every +`omc-site` record required by the recovery ABI; they are not suppressed to +imitate AArch64's program-mode-only stack checks. + +The interrupted current-compiler mutant repairs re-anchor the S2 cycle and S3 +error-16 substitutions to their intended guards and distinguish the x86 +constant-index guard from the unchanged AArch64 occurrence. Historical mutant +sources and frozen receipts remain unchanged. A5 kept-constructor and rotate +bare-unit callers use the independently recorded exits in +`candidates/s4/export/sec5.cases`, rather than incorrectly requiring exit zero. + +Source `3e66b6744590cc72c623d8e09413b9072bcab36e` (compiler source SHA256 +`4b5392fffd25a3a37844ad8bb5138fbaada690be7dae95132614524bdb78a1e0`) +rebuilds to seeded compiler +`badedbb0c6287887641fcd7e97301b43b5f82f2d7a2838bbe0d17547873108be`. +The seed ladder, `sh seed/host/check.sh` and `sh seed/omc/gate5.sh` passed. +The complete corpus exited 1: **14,936 PASS, 54 FAIL, 10 NOT_RUN, +216 EXCLUDED**, verdict **FAIL**. All 15,216 outcome-row case names and their +multiplicities match the preceding complete corpus; no failing case was removed. +Both independent encoding mutants were caught. + +The 54 remaining FAIL records are 17 literal successful-diagnostic mismatches, +8 growth-refusal coordinate mismatches, 16 historical S2 mutant obligations, +12 frozen current-C2 obligations, and one pre-OM-2 refusal expectation in +`leak.cases`. Eight formerly failing mutation-anchor/A5 caller records now pass. +Two formerly passing S2 growth records now fail literal coordinate parity: +both targets cleanly refuse error 14, but their emitted-storage ceilings cross +at different source tokens. These are not relabelled PASS. + +The ten NOT_RUN records remain two concrete QEMU ioctl artifacts and eight +entryless diagnostic-site callers. Native x86 execution remains NOT_RUN. +The source-bound guide examples ran on both targets: FNV input `abc` emitted +`0be9471a` with exit 0, narrowing trapped with exit 105, and removing only the +unmasked store changed that exit to 44. x86 execution is EMULATED; AArch64 +execution is HOST_TESTED. + +Additive receipts are `seed/qualification/x86-linux/20261028-orphan-host.json` +and `20261028-orphan-corpus.json`. They record exact commands, binary/source +digests, the guard-removal negative control, every remaining obligation, and the +complete JSONL SHA256. Earlier failed and interrupted receipts are preserved. +Literal parity, current-C2 compatibility and historical kill assertions remain +unchanged; an explicit contract decision is required before any revised gate +scope. This repair is IMPLEMENTED and EXERCISED, not QUALIFIED, MERGED or DEPLOYED. + +Disassembly uses bounded chunks starting at decoded instruction boundaries, +with lookahead for crossing instructions. Every code byte and direct-branch +target is still checked, including large generated images; the child output +file limit is not treated as malformed compiler output or waived. + +## Standalone qualification oracle + +### Current acceptance contracts (2026-10-28 integration) + +At source `7ab5fdd067884fd3044155084b39163da1be5c8a`, the complete runner +reported 15179 PASS, 4 NOT_RUN and 222 EXCLUDED, with no FAIL cases. Its aggregate +verdict remains FAIL because NOT_RUN is not PASS. All three original large-input +SHA cases passed. Source `00ebdee8461467f26e7ec7b56289ab6549f2c0a2` then added +only the reviewed text-write driver: both previously unrun text-write cases and +the exit/encoding controls passed (5 PASS). The remaining unrun cases are the +two invalid-fd ioctl fixtures affected by QEMU's ENOTTY versus native EBADF. +The compiler binary is identical for both runs. Native x86 qualification and +independent review remain outstanding. The additive acceptance receipt records +both revisions and the original full-run verdict. + +The current integration preserves every frozen manifest and historical receipt. +Current acceptance applies the already declared `manifest-c2-capacity.txt` and +`manifest-c2-batch2.txt` deltas to their named rows, while separately replaying +the original rows against their pinned historical compiler. The old OM-1 +`s1-rot-refused` assertion likewise remains a historical replay; the current +assertion comes from `leak/candidate.cases` and requires OM-2 acceptance. + +`seed/omc/x86-diagnostic-contracts.json` declares exact diagnostics for specific, +source-hash-pinned inputs on each target. It retains all stack checks, source +coordinates and unrolled iteration records. Changed, missing or extra records +fail. Growth refusals require the declared error and empty output. For the +frozen branch-range cases that x86 accepts, the checker additionally decodes the +artifact and requires an explicit execution result; a default-target refusal +alone cannot qualify that target artifact. Inputs outside this table retain +the exact translated diagnostic comparison. + +The historical S2 mutant experiments include failed kills. Their original +expected PASS and observed FAIL remain in the replay record, with the exact +failure line. A successful reproduction means only that the old failed +experiment was reproduced; it is never evidence of a successful mutant kill or +current compiler acceptance. The current S1-S4 mutant suites remain separate. + +Repeated conductor decoding may reuse a result only for identical artifact +and source hashes. It does not cache case verdicts or skip conductor execution. +Empty text emits no literal bytes, so the decoder does not carve out an empty +data region. Native x86 execution remains a separate qualification requirement. + +`seed/omc/qualify-x86.py` is a read-only host verification oracle, not backend +implementation or a build/runtime dependency. The coordinator command +on AArch64 Linux is: + +```sh +python3 seed/omc/qualify-x86.py --compiler /absolute/path/to/candidate/omc --objdump /usr/bin/x86_64-linux-gnu-objdump +``` + +It requires Python 3, `qemu-x86_64` and an x86-capable objdump. `--inventory` +categorizes source files and `.cases` rows without invoking the compiler. +The inventory also includes the frozen `seed/qualification/om2/manifest-c2*.txt` +corpus alongside live fixture roots and composed `.cases` inputs. A frozen +manifest is not a substitute for accounting for new fixture files. +Results go to JSONL stdout and isolated temporary storage, not historical +receipts. Mode snippets, conductor self-tests and alternate-compiler arms are +accounted for separately. Reviewed, SHA-pinned host fixtures have dedicated +drivers for temporary files, normalized clock/random results, invalid-fd device +calls, private Unix sockets and ephemeral loopback sockets. The two executions +use separate architecture-local directories with identical argv0/environment. +Unreviewed host effects remain NOT_RUN, not automatic PASS; unresolved +implementation/input/driver gaps must fail the overall verdict. Resource limits +and a temporary working directory are not a security sandbox, so only trusted +fixture sources belong in the runner. + +Coverage distinctions must accompany any result: + +- `directories` and `fchdir` adapt their pinned `O_DIRECTORY` literal for the + target, with separate hashes; this is not identical-source parity. +- Entryless units are compiled/refused and fully decoded, but runtime is + NOT_RUN without an explicit composed caller. Existing wasm `cases.tsv` and + SPIR-V demo/regression tables supply full-width native wrapper callers. +- Embedded memory-check refusals and pread/pwrite view controls are included. +- The process fixture executes a native AArch64 child helper in both runs; + it does not establish exec of an x86 child. `genlimit` uses an explicitly + recorded fixture-only compiler variant with the fixture-required generation + ceiling 3 on both targets; the production compiler's ceiling is unchanged. +- `psync` invokes syncfs on the scratch descriptor and therefore flushes its + filesystem; a temporary directory does not isolate that kernel effect. + +The disassembly check linearly decodes code bytes, including unreachable code, +while carving source-matched jump-protected literal spans. A mnemonic inventory +is not exhaustive instruction-template proof. The oracle includes an invalid +opcode control and a valid-but-wrong-immediate control; they must be rejected, +not merely disassembled. Both controls were exercised and caught. The complete +differential verdict was FAIL, not a qualification claim. diff --git a/docs/one_layer/OMEGESE.md b/docs/one_layer/OMEGESE.md index 1a5d94909..90fa5d0c3 100644 --- a/docs/one_layer/OMEGESE.md +++ b/docs/one_layer/OMEGESE.md @@ -412,6 +412,19 @@ gate that tests it (`seed/rung4/gate4.sh`, section numbers of that script). Deci - A trap in program mode ends the program with exit status 100 + the trap code; in function mode it calls OscRt.trap as the C path does. (s.6 t_*, s.4-5) +An initial line `target x86linux` selects the candidate FR-9 native x86-64 Linux backend. +Without it, the existing AArch64 output remains unchanged. Whole-program output is a +static ELF64 image with Linux x86-64 syscalls. A bare x86 unit has six-byte +`JMP rel32`/`NOP` entry slots and uses omc's private frame ABI; it is not a SysV +C-callable object. In bare mode, physical R14 points to an immutable runtime +entry table: a trap places its code in ESI and jumps through entry 2, whose +landing pad recovers the wrapper stack through R12 without storing a result. +This is not the AArch64 register ABI. Whole-program traps still terminate with +`100 + code`. Explicit raw AArch64 `emit` is refused on x86 (error 25). +OS flag values remain target-native. +See [the backend design and evidence](../X86-LINUX.md) for the register map, +syscall adaptation, seed-chain boundaries and qualification status. + ### 9.2 Functions and calls - `fn` may appear many times. A names pass reads every signature before any code is written, so a call @@ -505,6 +518,10 @@ blocks. A function that needs more than the 16 registers it hands out is error 1 input, output, nesting, trap-site and block limits but holds 8192 names in scope, 4096 functions and 524288 call sites per unit (`seed/omc/gate12.sh`, `gate15.sh`), so whole programs such as an interpreter fit in one unit; om4 itself keeps its own smaller tables. +The candidate `target x86linux` backend has a 16 MiB output pool because native +x86 instruction sequences can require more bytes than their AArch64 counterparts. +The AArch64 output ceiling remains 8 MiB; input and frontend limits are unchanged. +An exhausted target output pool still refuses with error 14. ### 9.7 Structs (omc only, rung 6) diff --git a/docs/one_layer/OM_COMPLETION.md b/docs/one_layer/OM_COMPLETION.md index 25efc4f73..aedc87cb0 100644 --- a/docs/one_layer/OM_COMPLETION.md +++ b/docs/one_layer/OM_COMPLETION.md @@ -69,12 +69,12 @@ cannot emit them, so there is no reference unit to verify against. | FR-6 threads/atomics | absent | decision 37 (disjoint threads) has no chosen design | | FR-7 shared objects/C ABI | absent | needs an ABI contract (calling convention, symbols, relocation) | | FR-8 kernel words | absent | needs a target kernel interface, not a compiler change | -| FR-9 x86-64 | absent | second backend; no decision to fund it | +| FR-9 x86-64 | DRAFT integration pending implementation/evidence, based on historical backend `7eca2ac3f` and canonical base `6999fa9e6`; see [design and unsupported paths](../X86-LINUX.md) | full existing fixture differential, default AArch64 byte preservation, objdump oracle and wrong-encoding mutants NOT_RUN; no completion or qualification claim | | decision 24 | no heap, no free | Drake's rule; any allocation model would reverse it | | decision 37 | no shared-state threads | design decision pending | ## 4. Next concrete step No self-contained compiler feature remains for the supported scalar subset. Next work requires a -decision (FR-2/3/5/6/7/8/9, decisions 24/37) or a shared target-extension model (IR arrays, -structs, floats); host-surface polish is optional. +decision (FR-2/3/5/6/7/8, decisions 24/37) or a shared target-extension model (IR arrays, +structs, floats); FR-9 has a draft integration described above, not a completed second target. diff --git a/evidence/x86_current_acceptance.1db7902db393b0e4e56e93af8f136133b05663cac58e712c219d84c43fc120b1.json b/evidence/x86_current_acceptance.1db7902db393b0e4e56e93af8f136133b05663cac58e712c219d84c43fc120b1.json new file mode 100644 index 000000000..805e650e5 --- /dev/null +++ b/evidence/x86_current_acceptance.1db7902db393b0e4e56e93af8f136133b05663cac58e712c219d84c43fc120b1.json @@ -0,0 +1,1364 @@ +{ + "schema": 1, + "date": "2026-10-28", + "status": "EXERCISED_NOT_QUALIFIED", + "compiler_sha256": "62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b", + "compiler_source_sha256": "96d51b63c8f451661ac715395078e04f39195e50c9e8fe37746cda121e4d7a1e", + "full_suite": { + "source_commit": "7ab5fdd067884fd3044155084b39163da1be5c8a", + "command": "python3 seed/omc/qualify-x86.py --compiler seed/out/omc --qemu QEMU_10_0_14 --bridge BRIDGE/tools/native --bridge-baseline-compiler BASELINE_734F --objdump x86_64-linux-gnu-objdump", + "exit": 1, + "raw_log_sha256": "f57bbad346dd18bc10e6b4506268681c546bda71f850391f8b92bb85503dd152", + "observations": [ + { + "status": "NOT_RUN", + "case": "seed/host/tests/devcall.om", + "reason": "EMULATOR_ARTIFACT: exact invalid-fd ioctl returned QEMU ENOTTY instead of native EBADF", + "source_sha256": "ca76010ea6cf2ab7acd8b8fab36234dcaad8f2cede057e01a52e840842a2e8ed", + "evidence": { + "stdin_bytes": 0, + "stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "args": [], + "original_case": "seed/host/tests/devcall.om", + "runtime_args": [], + "runtime_stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "emulator_artifact": { + "classification": "EMULATOR_ARTIFACT", + "syscall": "ioctl", + "fd": -1, + "request": 3223340587, + "native_required_errno": "EBADF", + "qemu_observed_errno": "ENOTTY", + "qemu_trace_line": "3588460 ioctl(-1,0xc020462b,0x107ffdd0) = -1 errno=25 (Inappropriate ioctl for device)", + "qemu_trace_sha256": "fb4fc297fe1cdd926586b25e98f135049bc00a4102f7d53c933f3c439ae795b5", + "upstream_source": "https://github.com/qemu/qemu/blob/v10.0.14/linux-user/syscall.c#L5713-L5717", + "upstream_source_sha256": "0d6212a547d456f47612a4c297e093dd60fe59ad021f44e3f21e5c6bb9be0cf7", + "upstream_checked_source_path": "/home/drakestapleton/work/bridge-x86/build/qemu-oracle/qemu-10.0.14/linux-user/syscall.c", + "upstream_source_archive": "https://download.qemu.org/qemu-10.0.14.tar.xz", + "upstream_source_archive_sha256": "c7230968906fdb5540d803e2af1f515e77590a414f2a4dbd3ec9ada3c47083d0", + "qemu_binary_sha256": "fd7ae7768c1d698d387893688d28abde90512f1f445d171a1389110eb7c237ee", + "upstream_excerpt": " if (ie->target_cmd == 0) {\n qemu_log_mask(\n LOG_UNIMP, \"Unsupported ioctl: cmd=0x%04lx\\n\", (long)cmd);\n return -TARGET_ENOTTY;\n }\n", + "upstream_excerpt_sha256": "f3eab9ff7ef300cb0c45892c5bfb11bf9cdca7a5c08cb7f4eb61b9639125584b" + }, + "diagnostics": { + "default_compile": { + "exit": 0, + "stdout_bytes": 5432, + "stdout_sha256": "4e91a65c6550a1d297b8315a9e7ff7c3810824cfc3075f2aafb047e3847251a1", + "stdout_prefix": "b'\\x7fELF\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\xb7\\x00\\x01\\x00\\x00\\x00\\xb0\\x00@\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x008\\x00\\x02\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x05\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x008\\x15\\x00\\x00\\x00\\x00\\x00\\x008\\x15\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x06\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "x86_compile": { + "exit": 0, + "stdout_bytes": 28089, + "stdout_sha256": "c772940e5464b92b40d7aade2449415eb03574c373e46d6c90d70629d1c937bd", + "stdout_prefix": "b'\\x7fELF\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00>\\x00\\x01\\x00\\x00\\x00\\x84m@\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x008\\x00\\x02\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x05\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\xb9m\\x00\\x00\\x00\\x00\\x00\\x00\\xb9m\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x06\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "default_run": { + "exit": 0, + "stdout_bytes": 37, + "stdout_sha256": "5eddae088a707439e6fc9ce21371c5ead9c1715bef37f5ce77a5be734d6b682f", + "stdout_prefix": "b'PASS native device parameter binding\\n'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "x86_run": { + "exit": 80, + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_prefix": "b''", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "default_filesystem": {}, + "x86_filesystem": {} + }, + "oracle_instructions": 4083 + }, + { + "status": "NOT_RUN", + "case": "seed/host/tests/uvmctl.om", + "reason": "EMULATOR_ARTIFACT: exact invalid-fd ioctl returned QEMU ENOTTY instead of native EBADF", + "source_sha256": "1e7b46b9d0fb44f5c97768f92daa7599e9b36e6d5cbc6553ac755a7c02047b5f", + "evidence": { + "stdin_bytes": 0, + "stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "args": [], + "original_case": "seed/host/tests/uvmctl.om", + "runtime_args": [], + "runtime_stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "emulator_artifact": { + "classification": "EMULATOR_ARTIFACT", + "syscall": "ioctl", + "fd": -1, + "request": 805306369, + "native_required_errno": "EBADF", + "qemu_observed_errno": "ENOTTY", + "qemu_trace_line": "3590912 ioctl(-1,0x30000001,0x10800008) = -1 errno=25 (Inappropriate ioctl for device)", + "qemu_trace_sha256": "36ed146cabb6bf975f2017d42275401d7a1f1cd72bb13e72f1c7ebec081976d6", + "upstream_source": "https://github.com/qemu/qemu/blob/v10.0.14/linux-user/syscall.c#L5713-L5717", + "upstream_source_sha256": "0d6212a547d456f47612a4c297e093dd60fe59ad021f44e3f21e5c6bb9be0cf7", + "upstream_checked_source_path": "/home/drakestapleton/work/bridge-x86/build/qemu-oracle/qemu-10.0.14/linux-user/syscall.c", + "upstream_source_archive": "https://download.qemu.org/qemu-10.0.14.tar.xz", + "upstream_source_archive_sha256": "c7230968906fdb5540d803e2af1f515e77590a414f2a4dbd3ec9ada3c47083d0", + "qemu_binary_sha256": "fd7ae7768c1d698d387893688d28abde90512f1f445d171a1389110eb7c237ee", + "upstream_excerpt": " if (ie->target_cmd == 0) {\n qemu_log_mask(\n LOG_UNIMP, \"Unsupported ioctl: cmd=0x%04lx\\n\", (long)cmd);\n return -TARGET_ENOTTY;\n }\n", + "upstream_excerpt_sha256": "f3eab9ff7ef300cb0c45892c5bfb11bf9cdca7a5c08cb7f4eb61b9639125584b" + }, + "diagnostics": { + "default_compile": { + "exit": 0, + "stdout_bytes": 3988, + "stdout_sha256": "a1c40ff274fb4dfe3e3b51a4a8a8cb56f516191f6841ce2cd0ca54263ba50692", + "stdout_prefix": "b'\\x7fELF\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\xb7\\x00\\x01\\x00\\x00\\x00\\xb0\\x00@\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x008\\x00\\x02\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x05\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x94\\x0f\\x00\\x00\\x00\\x00\\x00\\x00\\x94\\x0f\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x06\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "x86_compile": { + "exit": 0, + "stdout_bytes": 30345, + "stdout_sha256": "96c59dc4644397dc3010214a1e1b6673d728e7155c0d6e26783ed9fc0c745330", + "stdout_prefix": "b'\\x7fELF\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00>\\x00\\x01\\x00\\x00\\x00Tv@\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x008\\x00\\x02\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x05\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x00\\x00@\\x00\\x00\\x00\\x00\\x00\\x89v\\x00\\x00\\x00\\x00\\x00\\x00\\x89v\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x06\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "default_run": { + "exit": 0, + "stdout_bytes": 33, + "stdout_sha256": "d3db277e2313aaa844fe47b83741d313dab5d4ea5955d27996520695ed41a705", + "stdout_prefix": "b'PASS bounded native UVM requests\\n'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "x86_run": { + "exit": 80, + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_prefix": "b''", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "default_filesystem": {}, + "x86_filesystem": {} + }, + "oracle_instructions": 4309 + }, + { + "status": "NOT_RUN", + "case": "seed/omc/om2/s4/s4.cases:22:s4-v-pwrite-text", + "reason": "source e08ec033bd7d2e71ae272488029354eb447d8f7eed49d0f89d9d4eaf55518cfb requires unreviewed effects: pwrite", + "source_sha256": "e08ec033bd7d2e71ae272488029354eb447d8f7eed49d0f89d9d4eaf55518cfb", + "evidence": { + "conductor_row": "s4-v-pwrite-text run seed/omc/om2/s4/v-pwrite-text.om - file:seed/omc/om2/s4/v-pwrite-text.out - 0", + "source_spec": "seed/omc/om2/s4/v-pwrite-text.om", + "conductor_deadline_seconds": 30, + "stdin_bytes": 0, + "stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "args": [], + "original_case": "seed/omc/om2/s4/s4.cases:22:s4-v-pwrite-text" + }, + "host_words": [ + "pwrite" + ], + "oracle_instructions": 406, + "data_carveouts": [ + [ + 518, + 524 + ] + ] + }, + { + "status": "NOT_RUN", + "case": "seed/omc/om2/s4/v-pwrite-text.om", + "reason": "source e08ec033bd7d2e71ae272488029354eb447d8f7eed49d0f89d9d4eaf55518cfb requires unreviewed effects: pwrite", + "source_sha256": "e08ec033bd7d2e71ae272488029354eb447d8f7eed49d0f89d9d4eaf55518cfb", + "evidence": { + "stdin_bytes": 0, + "stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "args": [], + "original_case": "seed/omc/om2/s4/v-pwrite-text.om" + }, + "host_words": [ + "pwrite" + ], + "oracle_instructions": 406, + "data_carveouts": [ + [ + 518, + 524 + ] + ] + }, + { + "status": "PASS", + "case": "seed/qualification/om2/sec/s5s7/candidate.cases:276:sha-big-1", + "reason": "original C-boundary/gate obligation, actual reviewed driver", + "source_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "evidence": { + "conductor_row": "sha-big-1 notrun needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case", + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "reason": "needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case", + "requirement": "contract 214: one update of 2^32+3 bytes", + "manifest_sha256": "d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4", + "review_revision": "becf5c817", + "boundary": "actual generated SysV C bridge; private-body coverage remains separate", + "effects": "caller-local arrays, stdout; big mode additionally read-only anonymous MAP_NORESERVE 4294967299-byte zero mapping, released with munmap; no file/device/network", + "oracle": "original sha_driver.c and pinned expected.h; no rewritten digest expectations", + "stdin_bytes": 0, + "stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "args": [ + "big" + ], + "original_case": "seed/qualification/om2/sec/s5s7/candidate.cases:276:sha-big-1" + }, + "bridge_result": { + "exit": 0, + "stdout": "PASS sha-empty init, final = sha256(\"\")\nPASS sha-abc abc\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\nPASS sha-split3-zero three-way splits with length-0 updates between them\nPASS sha-bytewise 1000 one-byte updates\nPASS sha-update-null0 update(NULL, 0) is an empty update (ABI: len 0 any pointer)\nPASS sha-hash-overlap0 sha256_hash(buf, 64, buf)\nPASS sha-hash-overlap16 sha256_hash(buf, 64, buf + 16)\nPASS sha-hash-overlap-before digest [8,40) overlapping data [32,96)\nPASS sha-post-final init, update, final after a final == fresh context\nPASS sha-no-init-safe update, final without init returned (digest unspecified; memory safety only)\nPASS sha-hash-eq-stream hash(n) == init, update(n), final == python, n in {0,1,55,56,63,64,65,119,120,1000}\nPASS sha-ctx-copy byte copy after k updates, both continued: equal digests (E3)\nPASS sha-big-1 one update of 2^32+3 zero bytes\nPASS sha-big-split updates of 2^32-1 and 4 zero bytes\nPASS sha-big-hash hash of 2^32+3 zero bytes\nPASS SHA driver: 0 failure(s)\n", + "stderr": "", + "operation": "c-driver", + "observations": [ + { + "architecture": "aarch64", + "compiler_sha256": "62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b", + "args": [ + "big" + ], + "stdin_hex": "", + "deadline_seconds": 3600, + "caller_resources": [ + { + "path": "seed/qualification/om2/oracle/s5s7/sha/sha_driver.c", + "sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48" + }, + { + "path": "seed/qualification/om2/oracle/s5s7/sha/expected.h", + "sha256": "26771c6e1033babb8736dad7751e3a7bd69161779462486e623d91166b4a6495" + } + ], + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "baseline_compiler_sha256": "734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61", + "bridge_tool_sha256": "1d62607e131dfa603a97aec5dbc1a9d82d76fb71df8f6015d706e59071c2ae7b", + "bridge_generator_sha256": "6cdd7f05f02f776bcc04cdf827af4cb45d7107254c3b3a88780a4c8bfda1ea52", + "cc": "/usr/bin/cc", + "cc_version": "cc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0\nCopyright (C) 2023 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", + "generated_c_sha256": "dfd1a100f3ac333bc6850573b26b291516fc83566045151a4387c8375a5f9c99", + "generated_library_sha256": "03e3fae70a0efb2f8d138b674ccba8cdece45d7175ee3632f4725b44392f09eb", + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "driver_binary_sha256": "4663ee2d28914acdb23b9362b7410cac24d4cdcdd0b5c69b86552541b4c7df48", + "mutation": null, + "link": { + "exit": 0, + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_prefix": "b''", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "symbol_names": [ + "omega2_ident_sha256_om2", + "omega2_sha256_final", + "omega2_sha256_hash", + "omega2_sha256_init", + "omega2_sha256_update" + ], + "symbol_observation": { + "exit": 0, + "stdout_bytes": 198, + "stdout_sha256": "17a1b54de5fed4753ab238ce61a5eb289a3906c7feb85bef01ebad0a81a9efe7", + "stdout_prefix": "b'0000000000001124 T omega2_ident_sha256_om2\\n0000000000001390 T omega2_sha256_final\\n00000000000014d0 T omega2_sha256_hash\\n0000000000001130 T omega2_sha256_init\\n00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "observed": { + "exit": 0, + "stdout_bytes": 1017, + "stdout_sha256": "10bef560acf53c25197e3a7a0eb66e4684a00feb83bf537515430db669bb57ef", + "stdout_prefix": "b'PASS sha-empty init, final = sha256(\"\")\\nPASS sha-abc abc\\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\\nPASS sha-split3-zero three-way splits with '", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + } + }, + { + "architecture": "x86_64", + "compiler_sha256": "62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b", + "args": [ + "big" + ], + "stdin_hex": "", + "deadline_seconds": 3600, + "caller_resources": [ + { + "path": "seed/qualification/om2/oracle/s5s7/sha/sha_driver.c", + "sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48" + }, + { + "path": "seed/qualification/om2/oracle/s5s7/sha/expected.h", + "sha256": "26771c6e1033babb8736dad7751e3a7bd69161779462486e623d91166b4a6495" + } + ], + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "baseline_compiler_sha256": "734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61", + "bridge_tool_sha256": "1d62607e131dfa603a97aec5dbc1a9d82d76fb71df8f6015d706e59071c2ae7b", + "bridge_generator_sha256": "6cdd7f05f02f776bcc04cdf827af4cb45d7107254c3b3a88780a4c8bfda1ea52", + "cc": "/usr/bin/x86_64-linux-gnu-gcc", + "cc_version": "x86_64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0\nCopyright (C) 2023 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", + "generated_c_sha256": "71e8d35ed1c59df35bae5386d82d5b9ce13a3aa381b17e3d2f005da21b0f62ec", + "generated_library_sha256": "b063e77a8e3c1fa8dd8d33f4a3b849c8956150d7c0579381a97c86f38e98a524", + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "driver_binary_sha256": "59a187e7e6c5c58dc23790cc10936b7a63588fe102e792f1f3443b86c139bf69", + "mutation": null, + "link": { + "exit": 0, + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_prefix": "b''", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "symbol_names": [ + "omega2_ident_sha256_om2", + "omega2_sha256_final", + "omega2_sha256_hash", + "omega2_sha256_init", + "omega2_sha256_update" + ], + "symbol_observation": { + "exit": 0, + "stdout_bytes": 198, + "stdout_sha256": "b548670c684471336b9e4359896c17a723fd22c01a1b84975f4591060324689b", + "stdout_prefix": "b'00000000000015f0 T omega2_ident_sha256_om2\\n00000000000018b0 T omega2_sha256_final\\n0000000000001a30 T omega2_sha256_hash\\n0000000000001600 T omega2_sha256_init\\n00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "observed": { + "exit": 0, + "stdout_bytes": 1017, + "stdout_sha256": "10bef560acf53c25197e3a7a0eb66e4684a00feb83bf537515430db669bb57ef", + "stdout_prefix": "b'PASS sha-empty init, final = sha256(\"\")\\nPASS sha-abc abc\\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\\nPASS sha-split3-zero three-way splits with '", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + } + } + ], + "runtime_filesystem_changes": [ + {}, + {} + ], + "comparison": "actual C/SysV native-AArch64 versus EMULATED x86_64" + }, + "control_kind": "c-driver", + "evidence_kind": "original explicit oracle", + "contract_status": "original fixed obligation" + }, + { + "status": "PASS", + "case": "seed/qualification/om2/sec/s5s7/candidate.cases:278:sha-big-split", + "reason": "original C-boundary/gate obligation, actual reviewed driver", + "source_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "evidence": { + "conductor_row": "sha-big-split notrun needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case", + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "reason": "needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case", + "requirement": "contract 214: updates of 2^32-1 and 4 bytes", + "manifest_sha256": "d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4", + "review_revision": "becf5c817", + "boundary": "actual generated SysV C bridge; private-body coverage remains separate", + "effects": "caller-local arrays, stdout; big mode additionally read-only anonymous MAP_NORESERVE 4294967299-byte zero mapping, released with munmap; no file/device/network", + "oracle": "original sha_driver.c and pinned expected.h; no rewritten digest expectations", + "stdin_bytes": 0, + "stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "args": [ + "big" + ], + "original_case": "seed/qualification/om2/sec/s5s7/candidate.cases:278:sha-big-split" + }, + "bridge_result": { + "exit": 0, + "stdout": "PASS sha-empty init, final = sha256(\"\")\nPASS sha-abc abc\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\nPASS sha-split3-zero three-way splits with length-0 updates between them\nPASS sha-bytewise 1000 one-byte updates\nPASS sha-update-null0 update(NULL, 0) is an empty update (ABI: len 0 any pointer)\nPASS sha-hash-overlap0 sha256_hash(buf, 64, buf)\nPASS sha-hash-overlap16 sha256_hash(buf, 64, buf + 16)\nPASS sha-hash-overlap-before digest [8,40) overlapping data [32,96)\nPASS sha-post-final init, update, final after a final == fresh context\nPASS sha-no-init-safe update, final without init returned (digest unspecified; memory safety only)\nPASS sha-hash-eq-stream hash(n) == init, update(n), final == python, n in {0,1,55,56,63,64,65,119,120,1000}\nPASS sha-ctx-copy byte copy after k updates, both continued: equal digests (E3)\nPASS sha-big-1 one update of 2^32+3 zero bytes\nPASS sha-big-split updates of 2^32-1 and 4 zero bytes\nPASS sha-big-hash hash of 2^32+3 zero bytes\nPASS SHA driver: 0 failure(s)\n", + "stderr": "", + "operation": "c-driver", + "observations": [ + { + "architecture": "aarch64", + "compiler_sha256": "62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b", + "args": [ + "big" + ], + "stdin_hex": "", + "deadline_seconds": 3600, + "caller_resources": [ + { + "path": "seed/qualification/om2/oracle/s5s7/sha/sha_driver.c", + "sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48" + }, + { + "path": "seed/qualification/om2/oracle/s5s7/sha/expected.h", + "sha256": "26771c6e1033babb8736dad7751e3a7bd69161779462486e623d91166b4a6495" + } + ], + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "baseline_compiler_sha256": "734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61", + "bridge_tool_sha256": "1d62607e131dfa603a97aec5dbc1a9d82d76fb71df8f6015d706e59071c2ae7b", + "bridge_generator_sha256": "6cdd7f05f02f776bcc04cdf827af4cb45d7107254c3b3a88780a4c8bfda1ea52", + "cc": "/usr/bin/cc", + "cc_version": "cc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0\nCopyright (C) 2023 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", + "generated_c_sha256": "dfd1a100f3ac333bc6850573b26b291516fc83566045151a4387c8375a5f9c99", + "generated_library_sha256": "03e3fae70a0efb2f8d138b674ccba8cdece45d7175ee3632f4725b44392f09eb", + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "driver_binary_sha256": "4663ee2d28914acdb23b9362b7410cac24d4cdcdd0b5c69b86552541b4c7df48", + "mutation": null, + "link": { + "exit": 0, + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_prefix": "b''", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "symbol_names": [ + "omega2_ident_sha256_om2", + "omega2_sha256_final", + "omega2_sha256_hash", + "omega2_sha256_init", + "omega2_sha256_update" + ], + "symbol_observation": { + "exit": 0, + "stdout_bytes": 198, + "stdout_sha256": "17a1b54de5fed4753ab238ce61a5eb289a3906c7feb85bef01ebad0a81a9efe7", + "stdout_prefix": "b'0000000000001124 T omega2_ident_sha256_om2\\n0000000000001390 T omega2_sha256_final\\n00000000000014d0 T omega2_sha256_hash\\n0000000000001130 T omega2_sha256_init\\n00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "observed": { + "exit": 0, + "stdout_bytes": 1017, + "stdout_sha256": "10bef560acf53c25197e3a7a0eb66e4684a00feb83bf537515430db669bb57ef", + "stdout_prefix": "b'PASS sha-empty init, final = sha256(\"\")\\nPASS sha-abc abc\\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\\nPASS sha-split3-zero three-way splits with '", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + } + }, + { + "architecture": "x86_64", + "compiler_sha256": "62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b", + "args": [ + "big" + ], + "stdin_hex": "", + "deadline_seconds": 3600, + "caller_resources": [ + { + "path": "seed/qualification/om2/oracle/s5s7/sha/sha_driver.c", + "sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48" + }, + { + "path": "seed/qualification/om2/oracle/s5s7/sha/expected.h", + "sha256": "26771c6e1033babb8736dad7751e3a7bd69161779462486e623d91166b4a6495" + } + ], + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "baseline_compiler_sha256": "734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61", + "bridge_tool_sha256": "1d62607e131dfa603a97aec5dbc1a9d82d76fb71df8f6015d706e59071c2ae7b", + "bridge_generator_sha256": "6cdd7f05f02f776bcc04cdf827af4cb45d7107254c3b3a88780a4c8bfda1ea52", + "cc": "/usr/bin/x86_64-linux-gnu-gcc", + "cc_version": "x86_64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0\nCopyright (C) 2023 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", + "generated_c_sha256": "71e8d35ed1c59df35bae5386d82d5b9ce13a3aa381b17e3d2f005da21b0f62ec", + "generated_library_sha256": "b063e77a8e3c1fa8dd8d33f4a3b849c8956150d7c0579381a97c86f38e98a524", + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "driver_binary_sha256": "59a187e7e6c5c58dc23790cc10936b7a63588fe102e792f1f3443b86c139bf69", + "mutation": null, + "link": { + "exit": 0, + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_prefix": "b''", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "symbol_names": [ + "omega2_ident_sha256_om2", + "omega2_sha256_final", + "omega2_sha256_hash", + "omega2_sha256_init", + "omega2_sha256_update" + ], + "symbol_observation": { + "exit": 0, + "stdout_bytes": 198, + "stdout_sha256": "b548670c684471336b9e4359896c17a723fd22c01a1b84975f4591060324689b", + "stdout_prefix": "b'00000000000015f0 T omega2_ident_sha256_om2\\n00000000000018b0 T omega2_sha256_final\\n0000000000001a30 T omega2_sha256_hash\\n0000000000001600 T omega2_sha256_init\\n00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "observed": { + "exit": 0, + "stdout_bytes": 1017, + "stdout_sha256": "10bef560acf53c25197e3a7a0eb66e4684a00feb83bf537515430db669bb57ef", + "stdout_prefix": "b'PASS sha-empty init, final = sha256(\"\")\\nPASS sha-abc abc\\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\\nPASS sha-split3-zero three-way splits with '", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + } + } + ], + "runtime_filesystem_changes": [ + {}, + {} + ], + "comparison": "actual C/SysV native-AArch64 versus EMULATED x86_64" + }, + "control_kind": "c-driver", + "evidence_kind": "original explicit oracle", + "contract_status": "original fixed obligation" + }, + { + "status": "PASS", + "case": "seed/qualification/om2/sec/s5s7/candidate.cases:280:sha-big-hash", + "reason": "original C-boundary/gate obligation, actual reviewed driver", + "source_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "evidence": { + "conductor_row": "sha-big-hash notrun needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case", + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "reason": "needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case", + "requirement": "contract 214, 223: hash of 2^32+3 bytes", + "manifest_sha256": "d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4", + "review_revision": "becf5c817", + "boundary": "actual generated SysV C bridge; private-body coverage remains separate", + "effects": "caller-local arrays, stdout; big mode additionally read-only anonymous MAP_NORESERVE 4294967299-byte zero mapping, released with munmap; no file/device/network", + "oracle": "original sha_driver.c and pinned expected.h; no rewritten digest expectations", + "stdin_bytes": 0, + "stdin_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "args": [ + "big" + ], + "original_case": "seed/qualification/om2/sec/s5s7/candidate.cases:280:sha-big-hash" + }, + "bridge_result": { + "exit": 0, + "stdout": "PASS sha-empty init, final = sha256(\"\")\nPASS sha-abc abc\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\nPASS sha-split3-zero three-way splits with length-0 updates between them\nPASS sha-bytewise 1000 one-byte updates\nPASS sha-update-null0 update(NULL, 0) is an empty update (ABI: len 0 any pointer)\nPASS sha-hash-overlap0 sha256_hash(buf, 64, buf)\nPASS sha-hash-overlap16 sha256_hash(buf, 64, buf + 16)\nPASS sha-hash-overlap-before digest [8,40) overlapping data [32,96)\nPASS sha-post-final init, update, final after a final == fresh context\nPASS sha-no-init-safe update, final without init returned (digest unspecified; memory safety only)\nPASS sha-hash-eq-stream hash(n) == init, update(n), final == python, n in {0,1,55,56,63,64,65,119,120,1000}\nPASS sha-ctx-copy byte copy after k updates, both continued: equal digests (E3)\nPASS sha-big-1 one update of 2^32+3 zero bytes\nPASS sha-big-split updates of 2^32-1 and 4 zero bytes\nPASS sha-big-hash hash of 2^32+3 zero bytes\nPASS SHA driver: 0 failure(s)\n", + "stderr": "", + "operation": "c-driver", + "observations": [ + { + "architecture": "aarch64", + "compiler_sha256": "62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b", + "args": [ + "big" + ], + "stdin_hex": "", + "deadline_seconds": 3600, + "caller_resources": [ + { + "path": "seed/qualification/om2/oracle/s5s7/sha/sha_driver.c", + "sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48" + }, + { + "path": "seed/qualification/om2/oracle/s5s7/sha/expected.h", + "sha256": "26771c6e1033babb8736dad7751e3a7bd69161779462486e623d91166b4a6495" + } + ], + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "baseline_compiler_sha256": "734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61", + "bridge_tool_sha256": "1d62607e131dfa603a97aec5dbc1a9d82d76fb71df8f6015d706e59071c2ae7b", + "bridge_generator_sha256": "6cdd7f05f02f776bcc04cdf827af4cb45d7107254c3b3a88780a4c8bfda1ea52", + "cc": "/usr/bin/cc", + "cc_version": "cc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0\nCopyright (C) 2023 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", + "generated_c_sha256": "dfd1a100f3ac333bc6850573b26b291516fc83566045151a4387c8375a5f9c99", + "generated_library_sha256": "03e3fae70a0efb2f8d138b674ccba8cdece45d7175ee3632f4725b44392f09eb", + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "driver_binary_sha256": "4663ee2d28914acdb23b9362b7410cac24d4cdcdd0b5c69b86552541b4c7df48", + "mutation": null, + "link": { + "exit": 0, + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_prefix": "b''", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "symbol_names": [ + "omega2_ident_sha256_om2", + "omega2_sha256_final", + "omega2_sha256_hash", + "omega2_sha256_init", + "omega2_sha256_update" + ], + "symbol_observation": { + "exit": 0, + "stdout_bytes": 198, + "stdout_sha256": "17a1b54de5fed4753ab238ce61a5eb289a3906c7feb85bef01ebad0a81a9efe7", + "stdout_prefix": "b'0000000000001124 T omega2_ident_sha256_om2\\n0000000000001390 T omega2_sha256_final\\n00000000000014d0 T omega2_sha256_hash\\n0000000000001130 T omega2_sha256_init\\n00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "observed": { + "exit": 0, + "stdout_bytes": 1017, + "stdout_sha256": "10bef560acf53c25197e3a7a0eb66e4684a00feb83bf537515430db669bb57ef", + "stdout_prefix": "b'PASS sha-empty init, final = sha256(\"\")\\nPASS sha-abc abc\\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\\nPASS sha-split3-zero three-way splits with '", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + } + }, + { + "architecture": "x86_64", + "compiler_sha256": "62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b", + "args": [ + "big" + ], + "stdin_hex": "", + "deadline_seconds": 3600, + "caller_resources": [ + { + "path": "seed/qualification/om2/oracle/s5s7/sha/sha_driver.c", + "sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48" + }, + { + "path": "seed/qualification/om2/oracle/s5s7/sha/expected.h", + "sha256": "26771c6e1033babb8736dad7751e3a7bd69161779462486e623d91166b4a6495" + } + ], + "unit_sources": [ + { + "path": "om/sha256/sha256-om2.om", + "sha256": "dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb" + } + ], + "baseline_compiler_sha256": "734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61", + "bridge_tool_sha256": "1d62607e131dfa603a97aec5dbc1a9d82d76fb71df8f6015d706e59071c2ae7b", + "bridge_generator_sha256": "6cdd7f05f02f776bcc04cdf827af4cb45d7107254c3b3a88780a4c8bfda1ea52", + "cc": "/usr/bin/x86_64-linux-gnu-gcc", + "cc_version": "x86_64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0\nCopyright (C) 2023 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", + "generated_c_sha256": "71e8d35ed1c59df35bae5386d82d5b9ce13a3aa381b17e3d2f005da21b0f62ec", + "generated_library_sha256": "b063e77a8e3c1fa8dd8d33f4a3b849c8956150d7c0579381a97c86f38e98a524", + "driver_sha256": "50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48", + "driver_binary_sha256": "59a187e7e6c5c58dc23790cc10936b7a63588fe102e792f1f3443b86c139bf69", + "mutation": null, + "link": { + "exit": 0, + "stdout_bytes": 0, + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stdout_prefix": "b''", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "symbol_names": [ + "omega2_ident_sha256_om2", + "omega2_sha256_final", + "omega2_sha256_hash", + "omega2_sha256_init", + "omega2_sha256_update" + ], + "symbol_observation": { + "exit": 0, + "stdout_bytes": 198, + "stdout_sha256": "b548670c684471336b9e4359896c17a723fd22c01a1b84975f4591060324689b", + "stdout_prefix": "b'00000000000015f0 T omega2_ident_sha256_om2\\n00000000000018b0 T omega2_sha256_final\\n0000000000001a30 T omega2_sha256_hash\\n0000000000001600 T omega2_sha256_init\\n00'", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + }, + "observed": { + "exit": 0, + "stdout_bytes": 1017, + "stdout_sha256": "10bef560acf53c25197e3a7a0eb66e4684a00feb83bf537515430db669bb57ef", + "stdout_prefix": "b'PASS sha-empty init, final = sha256(\"\")\\nPASS sha-abc abc\\nPASS sha-split2 every two-way split k = 0..1000 of seq:1000\\nPASS sha-split3-zero three-way splits with '", + "stderr_bytes": 0, + "stderr_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "stderr": "" + } + } + ], + "runtime_filesystem_changes": [ + {}, + {} + ], + "comparison": "actual C/SysV native-AArch64 versus EMULATED x86_64" + }, + "control_kind": "c-driver", + "evidence_kind": "original explicit oracle", + "contract_status": "original fixed obligation" + }, + { + "summary": { + "PASS": 15179, + "NOT_RUN": 4, + "EXCLUDED": 222 + }, + "reasons": [ + { + "status": "EXCLUDED", + "reason": "compiler-selection directive build/om2-qual/cand-s1/omc.om; subsequent rows retain this compiler identity", + "count": 11 + }, + { + "status": "EXCLUDED", + "reason": "compiler-selection directive build/om2-qual/cand-s2/omc.om; subsequent rows retain this compiler identity", + "count": 4 + }, + { + "status": "EXCLUDED", + "reason": "compiler-selection directive build/om2-qual/cand-s3/omc.om; subsequent rows retain this compiler identity", + "count": 5 + }, + { + "status": "EXCLUDED", + "reason": "compiler-selection directive build/om2-qual/cand-s4/omc.om; subsequent rows retain this compiler identity", + "count": 9 + }, + { + "status": "EXCLUDED", + "reason": "compiler-selection directive pinned; subsequent rows retain this compiler identity", + "count": 33 + }, + { + "status": "EXCLUDED", + "reason": "compiler-selection directive seed/omc/omc.om; subsequent rows retain this compiler identity", + "count": 50 + }, + { + "status": "EXCLUDED", + "reason": "conductor-only metadata: exact 1-second deadline attached to subsequent child arms", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "conductor-only metadata: exact 10-second deadline attached to subsequent child arms", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "conductor-only metadata: exact 120-second deadline attached to subsequent child arms", + "count": 3 + }, + { + "status": "EXCLUDED", + "reason": "conductor-only metadata: exact 2-second deadline attached to subsequent child arms", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "conductor-only metadata: exact 30-second deadline attached to subsequent child arms", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "conductor-only metadata: exact 60-second deadline attached to subsequent child arms", + "count": 6 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/contracts/mutant-from.txt seed/omc/contracts/mutant-to.txt; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/contracts/proof-mutant-from.txt seed/omc/contracts/proof-mutant-to.txt; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/hexU.from seed/omc/om2/s1/mut/hexU.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/hexd.from seed/omc/om2/s1/mut/hexd.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/kwlong.from seed/omc/om2/s1/mut/kwlong.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/optin.from seed/omc/om2/s1/mut/optin.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/paren.from seed/omc/om2/s1/mut/paren.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/rchk.from seed/omc/om2/s1/mut/rchk.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/rotl.from seed/omc/om2/s1/mut/rotl.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/tyunk.from seed/omc/om2/s1/mut/tyunk.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s1/mut/unk.from seed/omc/om2/s1/mut/unk.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s2/mut/brk.from seed/omc/om2/s2/mut/brk.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s2/mut/cyc.from seed/omc/om2/s2/mut/cyc.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s2/mut/depth.from seed/omc/om2/s2/mut/depth.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s2/mut/div0.from seed/omc/om2/s2/mut/div0.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s2/mut/idx.from seed/omc/om2/s2/mut/idx.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s2/mut/sovf.from seed/omc/om2/s2/mut/sovf.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s2/mut/ucount.from seed/omc/om2/s2/mut/ucount.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/act.from seed/omc/om2/s3/mut/act.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/aer.from seed/omc/om2/s3/mut/aer.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/aex.from seed/omc/om2/s3/mut/aex.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/aop.from seed/omc/om2/s3/mut/aop.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/araw.from seed/omc/om2/s3/mut/araw.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/e16.from seed/omc/om2/s3/mut/e16.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/fuel.from seed/omc/om2/s3/mut/fuel.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/fzc.from seed/omc/om2/s3/mut/fzc.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/fzl.from seed/omc/om2/s3/mut/fzl.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/fzn.from seed/omc/om2/s3/mut/fzn.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/fzr.from seed/omc/om2/s3/mut/fzr.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/fzu.from seed/omc/om2/s3/mut/fzu.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/lix.from seed/omc/om2/s3/mut/lix.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/ovl.from seed/omc/om2/s3/mut/ovl.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/past.from seed/omc/om2/s3/mut/past.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s3/mut/rev.from seed/omc/om2/s3/mut/rev.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s4/mut/p19.from seed/omc/om2/s4/mut/p19.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s4/mut/pfirst.from seed/omc/om2/s4/mut/pfirst.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s4/mut/preadwr.from seed/omc/om2/s4/mut/preadwr.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s4/mut/pwrap.from seed/omc/om2/s4/mut/pwrap.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s4/mut/slot.from seed/omc/om2/s4/mut/slot.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s4/mut/textlen.from seed/omc/om2/s4/mut/textlen.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s4/mut/tramp.from seed/omc/om2/s4/mut/tramp.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/omc/om2/s4/mut/uce.from seed/omc/om2/s4/mut/uce.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/baseline/mutants/iv.from seed/qualification/om2/baseline/mutants/iv.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/baseline/mutants/k0.from seed/qualification/om2/baseline/mutants/k0.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/baseline/mutants/nowrite.from seed/qualification/om2/baseline/mutants/nowrite.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/baseline/mutants/order.from seed/qualification/om2/baseline/mutants/order.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/baseline/mutants/rot.from seed/qualification/om2/baseline/mutants/rot.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/baseline/mutants/split.from seed/qualification/om2/baseline/mutants/split.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/diag-col0.from seed/qualification/om2/candidates/s1/mutants/diag-col0.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/fmt-note.from seed/qualification/om2/candidates/s1/mutants/fmt-note.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/fmt-text.from seed/qualification/om2/candidates/s1/mutants/fmt-text.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/hex-17.from seed/qualification/om2/candidates/s1/mutants/hex-17.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/hex-upper.from seed/qualification/om2/candidates/s1/mutants/hex-upper.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/rol-imm-as-ror.from seed/qualification/om2/candidates/s1/mutants/rol-imm-as-ror.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/rol-reg-as-ror.from seed/qualification/om2/candidates/s1/mutants/rol-reg-as-ror.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/rot-imm-plus1.from seed/qualification/om2/candidates/s1/mutants/rot-imm-plus1.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/rot-imm-wminusn.from seed/qualification/om2/candidates/s1/mutants/rot-imm-wminusn.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s1/mutants/rot-nocheck.from seed/qualification/om2/candidates/s1/mutants/rot-nocheck.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s2/mutants/fold-div0.from seed/qualification/om2/candidates/s2/mutants/fold-div0.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s2/mutants/unroll-kminus1.from seed/qualification/om2/candidates/s2/mutants/unroll-kminus1.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s2/mutants/unroll-kplus1.from seed/qualification/om2/candidates/s2/mutants/unroll-kplus1.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s3/mutants/check-erased.from seed/qualification/om2/candidates/s3/mutants/check-erased.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s3/mutants/ctor-bypass.from seed/qualification/om2/candidates/s3/mutants/ctor-bypass.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s3/mutants/fresh-noreset.from seed/qualification/om2/candidates/s3/mutants/fresh-noreset.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s3/mutants/fresh-union.from seed/qualification/om2/candidates/s3/mutants/fresh-union.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s4/mutants/part-nofirst.from seed/qualification/om2/candidates/s4/mutants/part-nofirst.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s4/mutants/part-nosecond.from seed/qualification/om2/candidates/s4/mutants/part-nosecond.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s4/mutants/part-order.from seed/qualification/om2/candidates/s4/mutants/part-order.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s4/mutants/part-wrapped.from seed/qualification/om2/candidates/s4/mutants/part-wrapped.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/candidates/s4/mutants/view-nocheck.from seed/qualification/om2/candidates/s4/mutants/view-nocheck.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/compiler-mutants/guard-wrapped.from seed/qualification/om2/compiler-mutants/guard-wrapped.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/compiler-mutants/shr-imm-plus1.from seed/qualification/om2/compiler-mutants/shr-imm-plus1.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/leak/mutants/callexit.from seed/qualification/om2/leak/mutants/callexit.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/leak/mutants/cbtaint.from seed/qualification/om2/leak/mutants/cbtaint.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/leak/mutants/flagsweak.from seed/qualification/om2/leak/mutants/flagsweak.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/leak/mutants/loadpub.from seed/qualification/om2/leak/mutants/loadpub.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/leak/mutants/norevoke.from seed/qualification/om2/leak/mutants/norevoke.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/leak/mutants/nostub.from seed/qualification/om2/leak/mutants/nostub.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/leak/mutants/pubrange.from seed/qualification/om2/leak/mutants/pubrange.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/leak/mutants/slotoff.from seed/qualification/om2/leak/mutants/slotoff.to; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/selftest/exit-from.txt seed/qualification/om2/selftest/exit-to.txt; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 2 + }, + { + "status": "EXCLUDED", + "reason": "stateful substitution seed/qualification/om2/selftest/none-from.txt seed/qualification/om2/selftest/exit-to.txt; not a standalone source; interpreted by the next arm or complete original selftest conductor", + "count": 1 + }, + { + "status": "NOT_RUN", + "reason": "EMULATOR_ARTIFACT: exact invalid-fd ioctl returned QEMU ENOTTY instead of native EBADF", + "count": 2 + }, + { + "status": "NOT_RUN", + "reason": "source e08ec033bd7d2e71ae272488029354eb447d8f7eed49d0f89d9d4eaf55518cfb requires unreviewed effects: pwrite", + "count": 2 + } + ], + "oracle_mnemonic_counts": { + "add": 11447395, + "addsd": 9, + "addss": 1, + "and": 249800, + "bswap": 25, + "call": 4089662, + "cmp": 13993626, + "cqo": 629, + "cvtsd2ss": 2, + "cvtss2sd": 12, + "cvttsd2si": 49, + "div": 55961, + "divsd": 11, + "idiv": 629, + "imul": 99667, + "ja": 625169, + "jae": 1909336, + "jb": 8948479, + "jbe": 113384, + "je": 1304970, + "jg": 13355, + "jge": 184638, + "jl": 33082, + "jle": 76, + "jmp": 801938, + "jne": 719409, + "jo": 26961, + "jp": 81, + "lea": 11839835, + "leave": 1783685, + "mfence": 88, + "mov": 396316786, + "movabs": 38195483, + "movd": 31, + "movq": 323, + "movsx": 5, + "movsxd": 55, + "movzx": 1065136, + "mul": 8, + "mulsd": 8, + "mulss": 2, + "neg": 895, + "nop": 800922, + "not": 73985, + "or": 355692, + "push": 732457, + "rep": 33197, + "ret": 1783685, + "rex": 86446, + "ror": 1143, + "sar": 16189, + "seta": 66615, + "setae": 26942, + "setb": 14205, + "setbe": 20163, + "sete": 303660, + "setg": 6918, + "setge": 26331, + "setl": 59374, + "setle": 13163, + "setne": 61500, + "shl": 3205179, + "shr": 927070, + "sqrtsd": 4, + "sqrtss": 2, + "sub": 5935025, + "subsd": 3, + "syscall": 11621108, + "test": 456953, + "ucomisd": 186, + "ucomiss": 2, + "xor": 491391 + }, + "coverage_limits": [ + "Every emitted code byte is linearly decoded, including unreachable functions; direct branches must target decoded instruction boundaries", + "Only source-matched JMP-protected literal/padding spans are carved out; ambiguous/missing data maps fail closed", + "Mnemonic counts are not exhaustive encoding-template, register, width, displacement or trap coverage", + "The default baseline may share frontend defects; invalid and valid-but-wrong encoding controls challenge separate oracles", + "Frozen C2 retains exact historical inputs; original frontend modes compare unchanged bytes through native/x86-hosted compilers, separately from cross-target code generation", + "Reviewed content-pinned host drivers run in separate architecture-local directories and compare persistent filesystem effects; other host effects remain NOT_RUN", + "Bare callers execute original unit bytes through architecture-specific ABI wrappers and observe full-width returns/arrays; missing callers remain individually NOT_RUN", + "process exec enters a native AArch64 helper in both runs, not an x86 child; generation retirement uses the original fixture's exact ceiling3 compiler variant on both targets", + "psync invokes syncfs on its scratch-file descriptor and therefore flushes the scratch filesystem; no service process is controlled", + "No hardware qualification" + ], + "verdict": "FAIL" + } + ] + }, + "followup": { + "source_commit": "00ebdee8461467f26e7ec7b56289ab6549f2c0a2", + "change": "Only reviewed fd1 text-write driver plus generated crumb; compiler bytes unchanged", + "command": "Existing qualification runner restricted to v-pwrite-text.om, its s4.cases row, t_exit.om and encoding negative controls", + "exit": 0, + "summary": { + "PASS": 5 + }, + "raw_log_sha256": "32b6b78c34fd0408a77dc3d8efcf730e7251eac045d2f77fe523ad5882e4e249" + }, + "other_checks": { + "seed_gate5": "PASS", + "om_units": "PASS", + "crumb": "PASS", + "evidence_immutable": "PASS", + "zero_disk_secrets": "PASS", + "exact_diagnostic_negative_controls": "PASS", + "historical_stale_binding_controls": "PASS", + "bridge_six_languages_and_failed_missing_toolchain_controls": "PASS" + }, + "remaining": [ + "devcall and uvmctl invalid-fd ioctl: QEMU reports ENOTTY rather than native EBADF", + "Native x86 execution NOT_RUN", + "Independent review and merge pending" + ], + "limits": [ + "Full-suite verdict remains FAIL because NOT_RUN is not PASS", + "Full suite ran before the isolated text-write driver addition; followup execution covers both formerly unrun text-write cases", + "Historical failed experiments retain their original FAIL verdicts; replay success does not qualify those historical mutations", + "No GPU, firmware, service or deployment qualification" + ] +} diff --git a/om/units.sh b/om/units.sh index 02c14c800..8b179a648 100755 --- a/om/units.sh +++ b/om/units.sh @@ -16,7 +16,7 @@ # unit also embeds its identity (omega2_ident_() in omega_om_units.c). # A unit, compiler or profile that changes without regenerating these files fails --check. set -eu -OMC_PIN=1811d4047f118440cc35e995261af6768b606148cb17e18c42158afd15fcad58 +OMC_PIN=62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b NATIVE_PIN=c77a5922f91d53d4a0bbd4e7b1c4703f7098263abc843be2918db1ece7496782 ROOT=$(cd "$(dirname "$0")/.." && pwd) # One generated library for all units: the bindings share one ABI runtime (ombr_enter). diff --git a/seed/json/.crumb b/seed/json/.crumb index ffe7aa6a1..731cc0cae 100644 --- a/seed/json/.crumb +++ b/seed/json/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-29T01:12:21Z", + "compiled_at": "2026-10-29T01:41:23Z", "compiler": "crumb-compile/1", - "digest": "sha256:480ce9c76b4d4dce37b9c2aaf2bd38369f8c0c20eef373538409ce5a89bd4428", + "digest": "sha256:64de1d1ba72bd069fc265430a6aa4ea18b544024e3aba296da94b85c062b7122", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 7, - "generated_at_commit": "d94a503f7aae57d09697046405da2e9a5895be6d", - "source_tree": "sha256:f70c697911437de7e74ef0bbf098e527541e91f4414962312efabbe9b3461ae2" + "generated_at_commit": "28a7b749a6da68407af60a7cccaf34dc2e5eab48", + "source_tree": "sha256:dea98012ac396d8bdb162015e5edb802188484f525c87d383046ca778a4c2ebf" } }, "layer": "seed", diff --git a/seed/json/tests/gate-json.sh b/seed/json/tests/gate-json.sh index d3e2e701d..6eafd334d 100755 --- a/seed/json/tests/gate-json.sh +++ b/seed/json/tests/gate-json.sh @@ -6,7 +6,7 @@ cd "$(dirname "$0")/../../.." B=${JSON_BUILD:-build/seed/json} OMC=${OMC:-seed/out/omc} # Compiler pin recorded independently before any reseed; update together with seed/out/omc. -PIN=${JSON_OMC_PIN:-1811d4047f118440cc35e995261af6768b606148cb17e18c42158afd15fcad58} +PIN=${JSON_OMC_PIN:-62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b} J=seed/json fail() { printf 'JSONGATE FAIL %s\n' "$*"; exit 1; } notrun() { printf 'JSONGATE NOT_RUN %s\n' "$*"; exit 3; } diff --git a/seed/omc/contracts/.crumb b/seed/omc/contracts/.crumb index 2a79189a6..3530eff05 100644 --- a/seed/omc/contracts/.crumb +++ b/seed/omc/contracts/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-26T16:57:15Z", + "compiled_at": "2026-10-28T17:20:03Z", "compiler": "crumb-compile/1", - "digest": "sha256:eb5a79df27493236e4d4272b5287adf4e672f7442ff6178d1296d62fdbc5afa6", + "digest": "sha256:b0bae13756b82a4d23b1ce23c3760adf8d0ed70e17ee1a7315acda78d8aa2d6b", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 55, - "generated_at_commit": "00031d2456b2fe1e6ecdee6a0245d4c27b6749d2", - "source_tree": "sha256:9b181dd699445d689525b46d182ccf6afc61e44a38e45ed24711bebc45afe07a" + "files": 57, + "generated_at_commit": "52f20256e790ced3fd41fe3193de1ff1e0f00d94", + "source_tree": "sha256:14ff0f549b964b6cf56ff3effb18ba163e71459696fbb0197a49648adf03f04b" } }, "name": "contracts", diff --git a/seed/omc/contracts/contracts.cases b/seed/omc/contracts/contracts.cases index 5c199cc9c..853b3c041 100644 --- a/seed/omc/contracts/contracts.cases +++ b/seed/omc/contracts/contracts.cases @@ -43,3 +43,5 @@ diag-final-head emit seed/omc/contracts/diagunroll.om any has:seed/omc/contracts diag-proof emit seed/omc/contracts/diagproof.om any has:seed/omc/contracts/diagproof.want 0 diag-release emit seed/omc/contracts/diagrelease.om any has:seed/omc/contracts/diagrelease.want 0 false-check run seed/omc/contracts/false.om - - - 109 +forvalfinal run seed/omc/contracts/forvalfinal.om - - - 110 +forvalcontinue run seed/omc/contracts/forvalcontinue.om - - - 110 diff --git a/seed/omc/contracts/forvalcontinue.om b/seed/omc/contracts/forvalcontinue.om new file mode 100644 index 000000000..4b27c6c67 --- /dev/null +++ b/seed/omc/contracts/forvalcontinue.om @@ -0,0 +1,10 @@ +om2 +note Continue increments the runtime-valued for counter before rechecking the head invariant. +fn main to int +n = uint 1 +for i uint n +invariant eq i 0 +continue +end +ret 0 +end diff --git a/seed/omc/contracts/forvalfinal.om b/seed/omc/contracts/forvalfinal.om new file mode 100644 index 000000000..5073e18d1 --- /dev/null +++ b/seed/omc/contracts/forvalfinal.om @@ -0,0 +1,9 @@ +om2 +note Runtime-valued for bounds must check invariants again at the final false head. +fn main to int +n = uint 2 +for i uint n +invariant lt i n +end +ret 0 +end diff --git a/seed/omc/omc.om b/seed/omc/omc.om index 171f00f37..7b522a4f4 100644 --- a/seed/omc/omc.om +++ b/seed/omc/omc.om @@ -16,7 +16,7 @@ global tw ulong 1 global tl ulong 1 global ts ulong 1 global tbig ulong 1 -global out uchar 8388608 +global out uchar 16777216 global oc ulong 1 note ---- OM-2 profile (spec/omegese-om2.md, OMEGESE.md 9.13). om2 is 1 in an OM-2 unit (its first line @@ -124,6 +124,12 @@ global fn_pl ulong 24576 global fn_pk uchar 24576 global fn_nmlen ulong 4096 global fn_off ulong 4096 +note x86 Linux retains the parser's sixteen logical slots in each native frame. +note No A64 instruction may pass emit once the explicit target is selected (error 25). +global xtarget ulong 1 +global xnaddr ulong 1 +global xasite ulong 65536 +global xavalue ulong 65536 global nf ulong 1 global lastfn ulong 1 global scanning ulong 1 @@ -545,17 +551,28 @@ w = write 2 msg 0 get mc 0 end note emitb / emit: one byte / one 32-bit word (little-endian) to the output; error 14 when it is full -note (om4 EMIT, EMITB: the 8 MiB output area) +note AArch64 retains its 8 MiB output ceiling; x86 byte sequences use the full output pool. fn emitb b uchar to void o = get oc 0 -if ge o 8388608 +if or ge o len out and eq get xtarget 0 0 ge o 8388608 fail 14 end +note Charge x86's variable-width encoding to the same OM-2 emitted-storage budget as emit. +if and ne get xtarget 0 0 ne get om2 0 0 +if ne get curret 0 0 +if ge sub o get fstart 0 262144 +fail 14 +end +end +end put out o b put oc 0 add o 1 end fn emit w ulong to void +if ne get xtarget 0 0 +fail 25 +end if ge get oc 0 8388608 fail 14 end @@ -2187,12 +2204,7 @@ off = ulong get sf_off sub f 1 vdone 3 mul off 8 5 end -note fconst: the float token just read, as bits of ty. fspan: a deferred literal stored as pos*64+len. -fn fconst ty ulong to ulong -fparse get ts 0 get tl 0 -ret fbits ty -end - +note fspan: a deferred literal stored as pos*64+len. fn fspan ty ulong packed ulong to ulong fparse div packed 64 rem packed 64 ret fbits ty @@ -2871,6 +2883,10 @@ end end fn trapc cc ulong code ulong to void +if ne get xtarget 0 0 +xtrap cc code +ret +end trapsite or 1409286144 cc code end @@ -2904,6 +2920,13 @@ end note patch19: the word distance from a B.cond / CBZ / CBNZ at `at` to `target`, into bits 5..23 fn patch19 at ulong target ulong to void +if ne get xtarget 0 0 +xpatch at target +if eq target get oc 0 +put tgoc 0 target +end +ret +end d = disp19 at target wrword at or rdword at shl d 5 if eq target get oc 0 @@ -2915,6 +2938,13 @@ note patch26: the word distance from a B at `at` to `target`, into bits 0..25. N note the output pool is 8 MiB = 2^23 bytes, below the 2^25-word reach, and every position in it is a note word boundary, so the displacement is aligned and inside the signed 26-bit field by construction. fn patch26 at ulong target ulong to void +if ne get xtarget 0 0 +xpatch at target +if eq target get oc 0 +put tgoc 0 target +end +ret +end d = and shr sub target at 2 67108863 wrword at or rdword at d if eq target get oc 0 @@ -2924,6 +2954,11 @@ end note back: emit B to an earlier place (C6.2.35) fn back addr ulong to void +if ne get xtarget 0 0 +p = xbranch 14 +xpatch p addr +ret +end emit or 335544320 and shr sub addr get oc 0 2 67108863 end @@ -2931,6 +2966,11 @@ note matconst: put a 64-bit value in register r: MOVZ (C6.2.285) or, for a value note MOVN (C6.2.284) with the first halfword that differs from the fill, then MOVK (C6.2.283) for each note other such halfword. om4 MATCONST. fn matconst r ulong v ulong to void +if ne get xtarget 0 0 +ximm 0 v +xstore 0 r +ret +end fill = ulong 0 mop = ulong 3531603968 if ne shr v 63 0 @@ -2963,6 +3003,12 @@ end note canonto: canon of Xn written to Xd (the same UBFM / SBFM with Rd = d, Rn = n) fn canonto d ulong n ulong t ulong to void +if ne get xtarget 0 0 +xload 0 n +xcanrax t +xstore 0 d +ret +end if lt t 2 ret end @@ -2981,6 +3027,10 @@ end note chkext: CMP Xr, Wr, SXTB/SXTH/SXTW (SUBS extended, C6.2.463), then B.NE trap code fn chkext r ulong t ulong code ulong to void +if ne get xtarget 0 0 +xext r t code +ret +end emit or or or 3944742943 shl sub t 2 13 shl r 16 shl r 5 trapc 1 code end @@ -3021,11 +3071,25 @@ end note cset: CSET Xr, cond = CSINC Xr, XZR, XZR, opposite cond (C6.2.141) fn cset r ulong cc ulong to void +if ne get xtarget 0 0 +xb 15 add 144 xcc cc 192 +xb 72 15 182 +emitb 192 +xstore 0 r +ret +end emit or or 2594113504 r shl xor cc 1 12 end note force: put a value (kind 1 register, 3 number, 4 flags) in register r; a bare number is error 11 fn force k ulong v ulong t ulong r ulong to void +if ne get xtarget 0 0 +if eq k 1 +xload 0 v +xstore 0 r +ret +end +end if eq k 1 if ne v r emit or or 2852127712 r shl v 16 @@ -3067,15 +3131,26 @@ end end fn spadd bytes ulong to void +if ne get xtarget 0 0 +xsp 0 bytes +ret +end spop 2432696320 bytes end fn spsub bytes ulong to void +if ne get xtarget 0 0 +xsp 1 bytes +ret +end spop 3506438144 bytes end note stkchk: program mode only: CMP SP, X28 (C6.2.463); B.LO trap 6 fn stkchk to void +if ne get xtarget 0 0 +ret +end if ne get progmode 0 0 emit 3946603519 trapc 3 6 @@ -3084,6 +3159,12 @@ end note epi: give back the stack of the local arrays, then RET (C6.2.338) fn epi to void +if ne get xtarget 0 0 +xload 0 0 +emitb 201 +emitb 195 +ret +end spadd get stkbytes 0 emit 3596551104 end @@ -3303,12 +3384,23 @@ end note bo_schk: a shift amount in a register must be below the width: CMP Xb, #w; B.HS trap 7 fn bo_schk ty ulong rb ulong to void +if ne get xtarget 0 0 +xload 0 rb +ximm 1 twid ty +xrr 57 0 1 +xtrap 2 7 +ret +end emit or or 4043309087 shl twid ty 10 shl rb 5 trapc 2 7 end note add, sub: u32 the 32-bit form; i64 ADDS/SUBS + B.VS trap 1; others 64-bit then bo_fix (om4 BO_ADD) fn bo_add op ulong ty ulong ra ulong rb ulong imm ulong rd ulong to void +if ne get xtarget 0 0 +xarith op ty ra rb imm rd +ret +end fx = ulong 2332033024 if eq op 34 fx = ulong 3405774848 @@ -3343,6 +3435,10 @@ end note mul: i64 SMULH t, MUL, CMP t, rd, ASR #63, B.NE trap 1 (om4 BO_MUL) fn bo_mul ty ulong ra ulong rb ulong rd ulong to void +if ne get xtarget 0 0 +xarith 35 ty ra rb 0 rd +ret +end if eq ty 9 t = alloc e3 2604694528 t ra rb @@ -3371,6 +3467,10 @@ note div, rem (om4 BO_DIV, BO_SDIV): CBZ Xb trap 2 unless fl bit 1 (b a number o note SDIV; rem: t = a / b, rd = a - t * b (MSUB); i64 div: CMN Xb, #1; B.NE +3; NEGS XZR, Xa; B.VS trap 1, note unless fl bit 2 (b a number other than -1) fn bo_div op ulong ty ulong ra ulong rb ulong rd ulong fl ulong to void +if ne get xtarget 0 0 +xdiv op ty ra rb rd fl +ret +end if eq and fl 1 0 trapsite or 3019898880 rb 2 end @@ -3404,6 +3504,10 @@ end note and, or, xor (om4 BO_LOG) fn bo_log op ulong ra ulong rb ulong rd ulong to void +if ne get xtarget 0 0 +xarith op 5 ra rb 0 rd +ret +end fx = ulong 2315255808 if eq op 39 fx = ulong 2852126720 @@ -3416,6 +3520,10 @@ end note bo_lsl: LSL Xd, Xn, #s as UBFM Xd, Xn, #(64-s) mod 64, #63-s fn bo_lsl ra ulong s ulong rd ulong to void +if ne get xtarget 0 0 +xshift 41 5 ra s 1 rd +ret +end r = shl and sub 64 s 63 16 r = or r shl sub 63 s 10 r = or r shl ra 5 @@ -3425,6 +3533,10 @@ end note shl (om4 BO_SHL, BS_64): by a number s: UBFM Xd, Xn, #(64-s) mod 64, #63-s; by a register: the amount note check, LSLV; i64: t = a << s, X16 = t >> s arithmetic, CMP X16, Xa, B.NE trap 1, MOV Xd, Xt fn bo_shl ty ulong ra ulong rb ulong imm ulong rd ulong to void +if ne get xtarget 0 0 +xshift 41 ty ra rb imm rd +ret +end if eq ty 9 t = alloc if ne imm 0 @@ -3457,6 +3569,10 @@ end note shr: unsigned LSR, signed ASR; by a number UBFM / SBFM Xd, Xn, #s, #63; by a register the amount check note then LSRV / ASRV (om4 BO_SHR) fn bo_shr ty ulong ra ulong rb ulong imm ulong rd ulong to void +if ne get xtarget 0 0 +xshift 42 ty ra rb imm rd +ret +end if ne imm 0 fi = ulong 3544251392 if ge ty 6 @@ -3475,11 +3591,15 @@ end note comparisons: CMP Xa, #imm or CMP Xa, Xb; the result is the flags and a condition (om4 BO_CMP) fn bo_cmp op ulong ty ulong ra ulong rb ulong imm ulong to void +if ne get xtarget 0 0 +xcmp ra rb imm +else if ne imm 0 emit or or 4043309087 shl rb 10 shl ra 5 else emit or or 3942645791 shl rb 16 shl ra 5 end +end i = mul sub op 43 2 if and ge ty 6 le ty 9 i = add i 1 @@ -3489,10 +3609,396 @@ put rv 0 conds i put rt 0 1 end +note Baseline SSE2, Intel SDM MOVD/MOVQ, scalar SS/SD, UCOMIS, CVTSI and CVTT instructions. +note WolframLanguageEvaluator: {2^31,2^63,2^22,2^51} -> {2147483648,9223372036854775808,4194304,2251799813685248}. +note WolframLanguageEvaluator: FromDigits[#,16]& /@ {"7F800000","7FF0000000000000","7FC00000","7FF8000000000000"} +note -> {2139095040,9218868437227405312,2143289344,9221120237041090560}. +fn xfmask ty ulong kind ulong to ulong +if eq ty 10 +if eq kind 0 +ret 2147483648 +end +if eq kind 1 +ret 2147483647 +end +if eq kind 2 +ret 4194304 +end +if eq kind 3 +ret 2139095040 +end +ret 2143289344 +end +if eq kind 0 +ret 9223372036854775808 +end +if eq kind 1 +ret 9223372036854775807 +end +if eq kind 2 +ret 2251799813685248 +end +if eq kind 3 +ret 9218868437227405312 +end +ret 9221120237041090560 +end + +note MOVD clears EAX's upper bits on extraction; no float sign extension. +fn xfmov ty ulong op ulong vr ulong to void +emitb 102 +if eq ty 11 +emitb 72 +end +xb 15 op add 192 shl vr 3 +end + +fn xfsse ty ulong op ulong mr ulong to void +if eq ty 10 +emitb 243 +else +emitb 242 +end +xb 15 op mr +end + +fn xfucom ty ulong mr ulong to void +if eq ty 11 +emitb 102 +end +xb 15 46 mr +end + +note Raw Intel condition for parity: existing xbranch takes the A64 condition vocabulary. +fn xfbranch cc ulong to ulong +p = get oc 0 +emitb 15 +emitb uchar add 128 cc +xword 0 +ret p +end + +note Leaves the raw value in RAX, magnitude in RCX, and unsigned magnitude-versus-infinity flags. +fn xfclass ty ulong r ulong to void +xload 0 r +ximm 1 xfmask ty 1 +xrr 33 1 0 +ximm 2 xfmask ty 3 +xrr 57 1 2 +end + +note Arm FPProcessNaNs priority: first signaling NaN, second signaling NaN, then first quiet NaN. +note minNum/maxNum additionally return the numeric argument when paired with one quiet NaN. +note Return the selected-result jump for the caller to patch past its normal arithmetic. +fn xfnans ty ulong a ulong b ulong num ulong d ulong to ulong +note Emit shared result stubs first so each case patches immediately instead of retaining its own fixup. +skip = xbranch 14 +quiet = get oc 0 +ximm 1 xfmask ty 2 +xrr 9 0 1 +store = get oc 0 +xstore 0 d +d = xbranch 14 +xpatch skip get oc 0 +xfclass ty a +skip = xbranch 8 +xfclass ty b +bn = xbranch 8 +none = xbranch 14 +xpatch skip get oc 0 +ximm 1 xfmask ty 2 +xrr 133 0 1 +p = xbranch 0 +xpatch p quiet +xfclass ty b +skip = xbranch 9 +ximm 1 xfmask ty 2 +xrr 133 0 1 +p = xbranch 0 +xpatch p quiet +xload 0 a +p = xbranch 14 +xpatch p store +xpatch skip get oc 0 +if ne num 0 +xload 0 b +else +xload 0 a +end +p = xbranch 14 +xpatch p store +xpatch bn get oc 0 +if ne num 0 +ximm 1 xfmask ty 2 +xrr 133 0 1 +p = xbranch 0 +xpatch p quiet +xload 0 a +p = xbranch 14 +xpatch p store +else +p = xbranch 14 +xpatch p quiet +end +xpatch none get oc 0 +ret d +end + +note SSE invalid arithmetic produces a negative indefinite NaN; Arm's default NaN is positive. +note Operand NaNs have already bypassed arithmetic, retaining their sign and payload. +fn xfdefnan ty ulong d ulong to void +xfclass ty d +ok = xbranch 9 +ximm 0 xfmask ty 4 +xstore 0 d +xpatch ok get oc 0 +end + +fn xfbin op ulong ty ulong a ulong b ulong d ulong to void +nanend = xfnans ty a b 0 d +f2v ty a 0 +f2v ty b 1 +code = ulong 89 +if eq op 33 +code = ulong 88 +end +if eq op 34 +code = ulong 92 +end +if eq op 36 +code = ulong 94 +end +xfsse ty code 193 +fv2x ty 0 d +xfdefnan ty d +xpatch nanend get oc 0 +end + +fn xfminmax c ulong ty ulong a ulong b ulong d ulong to void +nanend = xfnans ty a b 1 d +f2v ty a 0 +f2v ty b 1 +xfucom ty 193 +cc = ulong 3 +if eq c 94 +cc = ulong 8 +end +takea = xbranch cc +if eq c 94 +cc = ulong 3 +else +cc = ulong 8 +end +takeb = xbranch cc +note Equal finite operands have equal bits except signed zero: OR chooses -0, AND chooses +0. +xload 0 a +xload 1 b +if eq c 94 +xrr 33 0 1 +else +xrr 9 0 1 +end +xstore 0 d +equalend = xbranch 14 +xpatch takea get oc 0 +xload 0 a +xstore 0 d +aend = xbranch 14 +xpatch takeb get oc 0 +xload 0 b +xstore 0 d +xpatch equalend get oc 0 +xpatch aend get oc 0 +xpatch nanend get oc 0 +end + +note Normalize the predicate to TEST flags; callers retain the existing rk=4, rv=NE contract. +fn xfcmp op ulong ty ulong a ulong b ulong to void +f2v ty a 0 +f2v ty b 1 +xfucom ty 193 +unord = xfbranch 10 +cc = ulong 4 +if eq op 44 +cc = ulong 5 +end +if eq op 45 +cc = ulong 2 +end +if eq op 46 +cc = ulong 6 +end +if eq op 47 +cc = ulong 7 +end +if eq op 48 +cc = ulong 3 +end +xb 15 add 144 cc 192 +done = xbranch 14 +xpatch unord get oc 0 +if eq op 44 +ximm 0 1 +else +ximm 0 0 +end +xpatch done get oc 0 +xb 72 15 182 +emitb 192 +xrr 133 0 0 +put rk 0 4 +put rv 0 1 +put rt 0 1 +end + +fn xfsito ty ulong to void +if eq ty 10 +emitb 243 +else +emitb 242 +end +emitb 72 +xb 15 42 192 +end + +fn xfint ft ulong tt ulong a ulong d ulong to void +xload 0 a +if eq ft 5 +xrr 133 0 0 +small = xbranch 10 +note Sticky halve before signed conversion preserves nearest-even rounding for the unsigned high half. +xrr 137 2 0 +xb 72 209 234 +ximm 1 1 +xrr 33 0 1 +xrr 9 0 2 +xfsito tt +xfsse tt 88 192 +done = xbranch 14 +xpatch small get oc 0 +xfsito tt +xpatch done get oc 0 +else +xfsito tt +end +fv2x tt 0 d +end + +fn xfconst bits ulong to void +ximm 0 bits +xfmov 11 110 1 +end + +fn xfcvtt to void +emitb 242 +emitb 72 +xb 15 44 192 +end + +fn xftou64 to void +xfconst 4890909195324358656 +xfucom 11 193 +small = xbranch 3 +xfsse 11 92 193 +xfcvtt +ximm 1 9223372036854775808 +xrr 9 0 1 +done = xbranch 14 +xpatch small get oc 0 +xfcvtt +xpatch done get oc 0 +end + +note Widen f32 exactly, guard NaN and the destination's own bounds, then CVTT toward zero. +note WolframLanguageEvaluator: Table[BitShiftLeft[1023+k,52],{k,{7,8,15,16,31,32,63,64}}] +note -> {4638707616191610880,4643211215818981376,4674736413210574848,4679240012837945344,4746794007248502784,4751297606875873280,4890909195324358656,4895412794951729152}. +fn xftoint ft ulong tt ulong d ulong to void +n = twid tt +sg = and ge tt 6 le tt 9 +if eq ft 10 +xfsse 10 90 192 +end +xfucom 11 192 +nan = xfbranch 10 +if sg +n = sub n 1 +end +xfconst shl add ulong 1023 n 52 +xfucom 11 193 +above = xbranch 2 +if sg +xfconst or 9223372036854775808 shl add ulong 1023 n 52 +else +xfconst 0 +end +xfucom 11 193 +below = xbranch 9 +if and not sg eq n 64 +xftou64 +else +xfcvtt +end +done = xbranch 14 +xpatch nan get oc 0 +ximm 0 0 +nan = xbranch 14 +xpatch above get oc 0 +maxv = ulong 18446744073709551615 +if sg +maxv = sub shl ulong 1 n 1 +else +if lt n 64 +maxv = sub shl ulong 1 n 1 +end +end +ximm 0 maxv +above = xbranch 14 +xpatch below get oc 0 +if sg +ximm 0 sub ulong 0 shl ulong 1 n +else +ximm 0 0 +end +xpatch done get oc 0 +xpatch nan get oc 0 +xpatch above get oc 0 +xstore 0 d +end + +fn xfconv ft ulong tt ulong a ulong to ulong +if or eq ft 1 eq tt 1 +fail 9 +end +if or eq ft 13 eq tt 13 +fail 7 +end +if eq ft tt +ret a +end +d = alloc +if ge ft 10 +f2v ft a 0 +if ge tt 10 +xfsse ft 90 192 +fv2x tt 0 d +else +xftoint ft tt d +end +else +xfint ft tt a d +end +ret d +end + note ---- floating point. A float value is its IEEE bit pattern in an x register; arithmetic moves it to note v0/v1, runs one scalar FP instruction (round to nearest even, no fused op), and moves it back. note f32 uses the S form (low 32 bits), f64 the D form. fn f2v ty ulong xr ulong vr ulong to void +if ne get xtarget 0 0 +xload 0 xr +xfmov ty 110 vr +ret +end if eq ty 10 emit or or 505872384 shl xr 5 vr else @@ -3501,6 +4007,11 @@ end end fn fv2x ty ulong vr ulong xr ulong to void +if ne get xtarget 0 0 +xfmov ty 126 vr +xstore 0 xr +ret +end if eq ty 10 emit or or 505806848 shl vr 5 xr else @@ -3509,6 +4020,10 @@ end end fn fp_binop op ulong ty ulong ra ulong rb ulong rd ulong to void +if ne get xtarget 0 0 +xfbin op ty ra rb rd +ret +end f2v ty ra 0 f2v ty rb 1 base = ulong 509609984 @@ -3543,6 +4058,13 @@ fv2x ty 2 rd end fn fp_neg ty ulong ra ulong rd ulong to void +if ne get xtarget 0 0 +xload 0 ra +ximm 1 xfmask ty 0 +xrr 49 0 1 +xstore 0 rd +ret +end f2v ty ra 0 if eq ty 10 emit or ulong 505495552 1 @@ -3553,6 +4075,15 @@ fv2x ty 1 rd end fn fp_sqrt ty ulong ra ulong rd ulong to void +if ne get xtarget 0 0 +nanend = xfnans ty ra ra 0 rd +f2v ty ra 0 +xfsse ty 81 192 +fv2x ty 0 rd +xfdefnan ty rd +xpatch nanend get oc 0 +ret +end f2v ty ra 0 if eq ty 10 emit or ulong 505528320 1 @@ -3563,6 +4094,13 @@ fv2x ty 1 rd end fn fp_abs ty ulong ra ulong rd ulong to void +if ne get xtarget 0 0 +xload 0 ra +ximm 1 xfmask ty 1 +xrr 33 0 1 +xstore 0 rd +ret +end f2v ty ra 0 if eq ty 10 emit or ulong 505462784 1 @@ -3575,6 +4113,10 @@ end note fp_minmax: FMINNM/FMAXNM, the IEEE minNum/maxNum rule: one quiet NaN returns the other operand, note and -0.0 orders below +0.0. fn fp_minmax c ulong ty ulong ra ulong rb ulong rd ulong to void +if ne get xtarget 0 0 +xfminmax c ty ra rb rd +ret +end f2v ty ra 0 f2v ty rb 1 base = ulong 509638656 @@ -3675,6 +4217,10 @@ ret 10 end fn fp_cmp op ulong ty ulong ra ulong rb ulong to void +if ne get xtarget 0 0 +xfcmp op ty ra rb +ret +end f2v ty ra 0 f2v ty rb 1 if eq ty 10 @@ -3689,6 +4235,9 @@ end note fp_conv: one scalar conversion (int<->float, f32<->f64). Same type is a copy. Returns the register. fn fp_conv ft ulong tt ulong ra ulong to ulong +if ne get xtarget 0 0 +ret xfconv ft tt ra +end if eq ft tt ret ra end @@ -3757,6 +4306,10 @@ note to 0 (OMEGESE 9.9; spec/one-layer-format.md 10.3). 32/64-bit: FCVTZS/FCVTZU note signedness, int sign-extended (SXTW). 8/16-bit: the scalar SIMD FCVTZ[SU] in v0, then saturating note narrows (SQXTN/UQXTN, C7.2.311/C7.2.374) to the width, FMOV W (C7.2.130), then SXTB/SXTH for signed. fn fp_toint ft ulong tt ulong rd ulong to void +if ne get xtarget 0 0 +xftoint ft tt rd +ret +end w = twid tt sg = ge tt 6 if eq w 64 @@ -3848,6 +4401,10 @@ emit 705708560 end fn rotimm ty ulong ra ulong s ulong rd ulong to void +if ne get xtarget 0 0 +xrot ty ra s 1 rd +ret +end if eq ty 5 emit or or or 2478833664 shl ra 16 shl s 10 or shl ra 5 rd ret @@ -3862,6 +4419,10 @@ canon rd ty end fn rotreg ty ulong ra ulong rr ulong rd ulong to void +if ne get xtarget 0 0 +xrot ty ra rr 0 rd +ret +end if eq ty 5 emit or or 2596285440 shl rr 16 or shl ra 5 rd ret @@ -3904,8 +4465,14 @@ else rr = rb if eq op 60 rr = alloc +if ne get xtarget 0 0 +xload 0 rb +xb 72 247 216 +xstore 0 rr +else emit or or 3405775840 shl rb 16 rr end +end rotreg ty ra rr rd end put rk 0 1 @@ -4028,6 +4595,10 @@ note save: n = registers in use (parameters + pool slots), A = 8 (n + 1) rounded note (C6.2.457); the stack check; STR Xr, [SP, #8j] for each (C6.2.415); STR X30, [SP, #8n]. Out: svn n, note sva A. om4 SAVE. fn save to void +if ne get xtarget 0 0 +xsave +ret +end n = add get npar 0 get nslot 0 a = shl shr add n 2 1 4 put svn 0 n @@ -4045,6 +4616,10 @@ end note loadarg: register t from an argument: kind 1 or 5 a register v, read back from its save slot (LDR Xt, note [SP, #8 slot], C6.2.216); kind 3, 6 or 7 the number, address or float bits v. om4 LOADARG. fn loadarg t ulong k ulong v ulong to void +if ne get xtarget 0 0 +xarg t k v +ret +end if or or eq k 3 eq k 6 eq k 7 matconst t v ret @@ -4057,7 +4632,7 @@ note address. om4 BASEARG. fn basearg t ulong e ulong to void i = sub e 1 if ge get nm_kind i 4 -matconst t get nm_addr i +mataddr t get nm_addr i ret end loadarg t 1 ulong get nm_reg i @@ -4068,6 +4643,9 @@ note arguments, n saved count, a save bytes, res 1 if there is a result in X0. M note each register in use before the arguments except Xd (C6.2.216); LDR X30; ADD SP, SP, #A (C6.2.5). note Returns Xd (255 when no result). om4 RESTORE. fn restore d ulong slot ulong n ulong a ulong res ulong to ulong +if ne get xtarget 0 0 +ret xrestore d slot res +end put nslot 0 slot rd = ulong 255 if ne res 0 @@ -4104,8 +4682,13 @@ put callfrom n get curfn 0 put callto n f put ncalls 0 add n 1 +if ne get xtarget 0 0 +emitb 232 +xword 0 +else emit or 2483027968 and shr sub get fn_addr sub f 1 get oc 0 2 67108863 end +end note ======== element addresses and array arguments ======== global ea_b ulong 1 @@ -4130,6 +4713,10 @@ note (the array's register, or a new one holding its address), ea_i index regist note OM-2 unsized array (unsz): every index, a number too, is checked against its count register nm_lr note (CMP Xi, Xn; B.HS trap 3); none is eliminated (spec 4, 6). fn elemaddr e ulong k ulong v ulong t ulong to void +if ne get xtarget 0 0 +xelem e k v t +ret +end if or or eq t 1 eq t 10 eq t 11 fail 7 end @@ -4334,6 +4921,26 @@ if eq unsz i 0 rl = alloc matconst rl get nm_len i end +if ne get xtarget 0 0 +xcmp ro rl 0 +xtrap 8 3 +d = alloc +xarith 34 5 rl ro 0 d +xcmp rn d 0 +xtrap 8 3 +b = ulong get nm_reg i +if eq get nm_kind i 5 +b = alloc +mataddr b get nm_addr i +end +xload 0 ro +xb 72 193 224 +emitb uchar tlog ulong get nm_type i +xload 1 b +xrr 1 0 1 +xstore 0 d +ret d +end emit or or 3942645791 shl rl 16 shl ro 5 trapc 8 3 d = alloc @@ -4379,6 +4986,10 @@ ret end end end +if ne get xtarget 0 0 +xunary c dst +ret +end ty = get rt 0 if or eq ty 10 eq ty 11 if eq c 50 @@ -4439,6 +5050,10 @@ note vt_conv: the value in rk/rv/rt converted to type tt (neither bool, error 9) note at or above s is set: LSR Xt, Xa, #s (UBFM, C6.2.487); CBNZ Xt trap 5 (C6.2.77); signed to a narrower note signed type: the sign-extension check, trap 5. om4 VTT1 .. VC_OK. fn vt_conv tt ulong to void +if ne get xtarget 0 0 +xconv tt +ret +end ft = get rt 0 if or or or eq ft 10 eq ft 11 eq tt 10 eq tt 11 if or eq ft 13 eq tt 13 @@ -4504,6 +5119,11 @@ end note vt_get: get A i with the index value in rk/rv/rt: the element address, then the load of the element note type, register offset (LDOP table). om4 VT_GET. fn vt_get e ulong dst ulong to void +if ne get xtarget 0 0 +elemaddr e get rk 0 get rv 0 get rt 0 +st_ld get ea_b 0 get ea_i 0 ulong get nm_type sub e 1 dst +ret +end elemaddr e get rk 0 get rv 0 get rt 0 rd = destreg dst ty = ulong get nm_type sub e 1 @@ -4516,6 +5136,10 @@ end note vs_chk: read / write bounds: n <= len A and off <= len A - n, else trap 3 (CMP C6.2.97, B.HI C6.2.34, note SUB C6.2.458). om4 VT_SYS. fn vs_chk e ulong ro ulong rn ulong to void +if ne get xtarget 0 0 +xslice e ro rn +ret +end if ne get nm_type sub e 1 2 fail 7 end @@ -4535,6 +5159,10 @@ end note vs_call: save the registers in use, X0 = fd, X1 = A + off (ADD through X16, C6.2.6), X2 = n, X8 = 63 note (read) or 64 (write) (MOVZ C6.2.285), SVC #0 (C6.2.466). om4 VT_SYS. fn vs_call c ulong fk ulong fv ulong e ulong ro ulong rn ulong to void +if ne get xtarget 0 0 +xio c fk fv e ro rn +ret +end save loadarg 0 fk fv basearg 1 e @@ -5700,23 +6328,7 @@ note Same bounded ioctl contract as L605 src/device/omc.om at 0dee699. note Compose with native host words instead of maintaining a second compiler. note Only literal FIONREAD or encoded read/write NVRM F requests, exact writable bytes. fn hdevctl dst ulong x ulong to void -harg x 4 8 -harg x 2 4 -if ne get fr add x 12 3 -fail 9 -end -q = get fr add x 13 -n = ulong 4 -if ne q 21531 -if ne and q 3221290752 3221243392 -fail 9 -end -n = and shr q 16 16383 -if eq n 0 -fail 9 -end -end -put fr add x 23 n +put fr add x 23 xhreq 166 x e = harray x 1 t = alloc matconst t get fr add x 23 @@ -6032,15 +6644,7 @@ note NVRM NVOS21/NVOS54 parameter binding. The kernel sees one private header. note Pointer and length are derived from a checked byte span, never from user bytes. note Request is exactly the 32-byte RM_ALLOC or RM_CONTROL encoding. fn hdevcall dst ulong x ulong to void -harg x 4 8 -harg x 2 4 -if ne get fr add x 12 3 -fail 9 -end -q = get fr add x 13 -if and ne q 3223340586 ne q 3223340587 -fail 9 -end +n = xhreq 171 x e = harray x 1 put fr add x 23 e put fr add x 24 get fr add x 21 @@ -6106,57 +6710,20 @@ end note Linux UVM has unencoded commands. Exact allowlist and ABI580.173.02 byte sizes. fn huvmctl dst ulong x ulong to void -harg x 4 8 -harg x 2 4 -if ne get fr add x 12 3 -fail 9 -end -q = get fr add x 13 -n = ulong 0 -if eq q 805306369 -n = ulong 16 -end -if eq q 75 -n = ulong 8 -end -if eq q 37 -n = ulong 40 -end -if or eq q 38 eq q 26 -n = ulong 20 -end -if eq q 25 -n = ulong 32 -end -if eq q 27 -n = ulong 56 -end -if eq q 28 -n = ulong 28 -end -if eq q 33 -n = ulong 9264 -end -if or eq q 34 eq q 73 -n = ulong 24 -end -if eq n 0 -fail 9 -end -put fr add x 23 n -e = harray x 1 -t = alloc -matconst t get fr add x 23 -e3 3942645760 31 get fr add x 22 t -trapc 1 3 -save -hload x 4 0 -hload x 2 1 -basearg 2 e -loadarg 16 1 get fr add x 21 -e3 2332033024 2 2 16 -hsys 29 -hreturn dst x +put fr add x 23 xhreq 172 x +e = harray x 1 +t = alloc +matconst t get fr add x 23 +e3 3942645760 31 get fr add x 22 t +trapc 1 3 +save +hload x 4 0 +hload x 2 1 +basearg 2 e +loadarg 16 1 get fr add x 21 +e3 2332033024 2 2 16 +hsys 29 +hreturn dst x end note Mapped-address export for driver GPU VA serialization; no arbitrary-address access. @@ -6234,6 +6801,13 @@ end end fn hostval c ulong dst ulong to void +if eq get xtarget 0 1 +xhost c dst +ret +end +if ne get xtarget 0 0 +fail 25 +end if eq get progmode 0 0 fail 9 end @@ -6868,6 +7442,18 @@ end note cond: read a condition (a bool value); emit a branch taken when it is false: B.cond with the opposite note condition (C6.2.34), or CBZ Xr (C6.2.78). Returns that branch's place. om4 COND. fn cond to ulong +if ne get xtarget 0 0 +rdval 0 1 255 0 +if ne get rt 0 1 +fail 7 +end +if eq get rk 0 4 +ret xbranch xor get rv 0 1 +end +r = matreg get rk 0 get rv 0 get rt 0 +xcmp r 0 1 +ret xbranch 0 +end rdval 0 1 255 0 if ne get rt 0 1 fail 7 @@ -6925,6 +7511,11 @@ end note blo: B.LO back to an earlier place (C6.2.34) fn blo at ulong to void +if ne get xtarget 0 0 +p = xbranch 3 +xpatch p at +ret +end d = disp19 get oc 0 at emit or 1409286147 shl d 5 end @@ -6934,6 +7525,10 @@ note outermost block, so the stack held by local arrays is known at every ret. S note mode: the stack check; MOV Xb, SP (ADD immediate, C6.2.5); then the fill loop: STR v, [Xb, Xi, LSL]; note ADD Xi, Xi, #1; CMP Xi, #N or Xn; B.LO back (C6.2.34). om4 SA_ARR. fn sa_arr w ulong to void +if ne get xtarget 0 0 +xarray w +ret +end if ne get nb 0 0 fail 9 end @@ -7181,6 +7776,9 @@ put held 0 0 put nb 0 0 put nt 0 0 fn_tail f +if and ne get xtarget 0 0 eq get scanning 0 0 +xpro get psl 0 +end end note s_fn: fn name (param type | param view T N | param edit T N)* to type | void. om4 S_FN. @@ -7322,8 +7920,13 @@ if ne get rt 0 8 fail 7 end force get rk 0 get rv 0 get rt 0 0 +if ne get xtarget 0 0 +xload 0 0 +xleave +else emit 3531606952 emit 3556769793 +end dead1 eol end @@ -7355,7 +7958,11 @@ end put brkpos n get oc 0 put brkblk n bi put nbrk 0 add n 1 +if ne get xtarget 0 0 +p = xbranch 14 +else emit 1409286158 +end dead1 eol end @@ -7387,7 +7994,11 @@ end put cpos n get oc 0 put cblk n bi put ncont 0 add n 1 +if ne get xtarget 0 0 +p = xbranch 14 +else emit 1409286158 +end dead1 eol end @@ -7406,6 +8017,10 @@ end note stel: the checked store of v (type t) at ea_b / ea_i (the STOP table: register offset, scaled) fn stel t ulong v ulong to void +if ne get xtarget 0 0 +xmemval 1 get ea_b 0 get ea_i 0 t v +ret +end eaem stop t v end @@ -7518,6 +8133,10 @@ tok if ne get tk 0 4 fail 16 end +br = ulong 0 +if and ne get xtarget 0 0 ne get tl 0 0 +br = xbranch 14 +end a = add get oc 0 4194304 p = get tw 0 e = add p get tl 0 @@ -7552,9 +8171,15 @@ end m = add m 1 end end +note Empty text carries no data or padding; its zero count forbids every access. +if ne n 0 while ne and get oc 0 3 0 emitb 0 end +end +if ne br 0 +xpatch br get oc 0 +end addname w 0 2 n 5 a put nglob 0 get nn 0 eol @@ -7579,7 +8204,14 @@ if ne get bkind i 1 fail 15 end b = get oc 0 +if ne get xtarget 0 0 +note A terminated then-path needs no skip jump, particularly at a bare unit's final byte. +if eq get dead 0 0 +p = xbranch 14 +end +else emit 335544320 +end patch19 get bbr i get oc 0 put bkind i 2 put bbr i b @@ -7594,6 +8226,12 @@ end note lpcnt: the hidden counter check of a loop: CMP Xc, #N (C6.2.96) or CMP Xc, Xn (C6.2.97); B.HS trap note 4; ADD Xc, Xc, #1 (C6.2.5). om4 SW_NOB .. SW_G and the same in S_FOR. fn lpcnt c ulong n ulong to void +if ne get xtarget 0 0 +xcmp c n 1 +trapc 2 4 +xarith 33 5 c 1 1 c +ret +end if le n 4095 emit or or 4043309087 shl n 10 shl c 5 else @@ -7612,7 +8250,11 @@ sn = get nn 0 sh = get held 0 c = alloc put held 0 get nslot 0 +if ne get xtarget 0 0 +matconst c 0 +else emit or 3531603968 c +end hd = get oc 0 cp_head skipln get cur 0 add get line 0 1 br = cond @@ -7645,6 +8287,12 @@ end note sf_br: B.HS (unsigned) or B.GE (signed) to the loop exit, C6.2.34 (distance filled at end); returns note its place. om4 SF_BR. fn sf_br t ulong to ulong +if ne get xtarget 0 0 +if lt t 6 +ret xbranch 2 +end +ret xbranch 10 +end at = get oc 0 if lt t 6 emit 1409286146 @@ -7657,6 +8305,10 @@ end note sf_num: for i T K with K a number: i = 0 (MOVZ, C6.2.285); head: CMP Xi, #K or Xk; B.HS/B.GE exit. note om4 SF_NUM .. SF_PUSH. fn sf_num w ulong t ulong kk ulong sn ulong sh ulong to void +if ne get xtarget 0 0 +xfornum w t kk sn sh +ret +end eol i = alloc put held 0 get nslot 0 @@ -7680,6 +8332,10 @@ end note sf_val: for i T K with K a value of type T in register kr: i = 0; the hidden counter c = 0; head: CMP note Xi, Xk; B.HS/B.GE exit; the counter guard of a while with no bound. om4 SF_VAL. fn sf_val w ulong t ulong kr ulong sn ulong sh ulong to void +if ne get xtarget 0 0 +xforval w t kr sn sh +ret +end eol i = alloc put held 0 get nslot 0 @@ -8084,7 +8740,12 @@ fail 14 end put ilp n get oc 0 put nilp 0 add n 1 +if ne get xtarget 0 0 +p = xbranch 14 +put ilp n p +else emit 335544320 +end put lastb 0 get oc 0 end @@ -8551,6 +9212,10 @@ note one returns; then the trap stubs: shared tail, function mode MOV X0, X7; LD note (C6.2.282, C6.2.216, C6.2.46: OscRt.trap); program mode ADD X0, X1, #100; MOVZ X8, #93; SVC #0 (exit note 100 + code). Per trap code used: MOVZ X1, #code (C6.2.285); B tail. om4 FINISH. fn finish to void +if ne get xtarget 0 0 +xfinish +ret +end eol if eq get dead 0 0 if ne get curret 0 12 @@ -8662,7 +9327,9 @@ j = add j 1 end end if eq k 2 +if or eq get xtarget 0 0 eq get bdead i 0 patch26 get bbr i get oc 0 +end else patch19 get bbr i get oc 0 end @@ -8736,6 +9403,10 @@ note LSL 16; MOV SP, X16 (ADD immediate, C6.2.5); BL main (C6.2.43); [MOVZ X0, # note #93; SVC #0. The entry word after the header is a B to it; the header gets the file and pool sizes. note om4 EOF_PROG. fn eof_prog to void +if ne get xtarget 0 0 +xeof +ret +end f = findfn 1852399981 4 0 if eq f 0 fail 16 @@ -8775,7 +9446,11 @@ i = ulong 0 while lt i n s = get callsite i f = sub get callto i 1 +if ne get xtarget 0 0 +wrword add s 1 sub get fn_addr f add s 5 +else wrword s or 2483027968 and shr sub get fn_addr f s 2 67108863 +end i = add i 1 end if eq get progmode 0 0 @@ -8903,6 +9578,9 @@ end if eq get progmode 0 0 fnstore end +if ne get xtarget 0 0 +xunit +end if ne get nexp 0 0 expwords writeout 176 @@ -9517,6 +10195,16 @@ note st_ixreg: runtime element index iv, field length fl, cell offset off. CMP + note (elemaddr, C6.2.96 / C6.2.34), then ADD Xidx, Xiv, #off (C6.2.5, base word 2432696320) and note LSL by 3 - tlog (bo_lsl) so the STOP store lands on (off + i) * 8. fn st_ixreg idx ulong iv ulong off ulong fl ulong t ulong to void +if ne get xtarget 0 0 +xcmp iv fl 1 +trapc 2 3 +xarith 33 5 iv off 1 idx +sh = sub 3 tlog t +if ne sh 0 +bo_lsl idx sh idx +end +ret +end emit or or 4043309087 shl fl 10 shl iv 5 trapc 2 3 emit or or or 2432696320 idx shl iv 5 shl off 10 @@ -9529,8 +10217,12 @@ end note st_ld: LDR of type t from base + idx into dst (or a new register). LDOP table, as vt_get. fn st_ld base ulong idx ulong t ulong dst ulong to void rd = destreg dst +if ne get xtarget 0 0 +xmemval 0 base idx t rd +else w = or ldop t rd emit or or w shl base 5 shl idx 16 +end put rk 0 1 put rv 0 rd put rt 0 t @@ -9582,7 +10274,11 @@ put held 0 get nslot 0 st_read si spsub by stkchk +if ne get xtarget 0 0 +xmovsp r +else emit or 2432697312 r +end tmp = alloc idx = alloc st_write r tmp idx si @@ -9851,11 +10547,22 @@ ab_rec ex end if eq ex 0 t = alloc +if ne get xtarget 0 0 +xload 0 r +xload 1 r +emitb 137 +emitb 192 +xb 72 193 233 +emitb 32 +xrr 57 0 1 +xtrap 1 10 +else emit or or 3546348544 t shl r 5 emit or or 3944759327 shl r 16 shl t 5 trapc 1 10 end end +end note ab_rec: omc-check 1 kept|erased line=N rule=dup32|- (om2 diag, with the omc-site records) fn ab_rec ex ulong to void @@ -10556,6 +11263,25 @@ end note ly_rev: Rd = the bytes of Rs reversed at width t: REV16 Wd (C6.2.333), REV Wd, REV Xd (C6.2.331) fn ly_rev t ulong s ulong d ulong to void +if ne get xtarget 0 0 +xload 0 s +if or eq t 2 eq t 6 +xstore 0 d +ret +end +if or eq t 3 eq t 7 +emitb 102 +xb 193 200 8 +else +if or eq t 5 eq t 9 +emitb 72 +end +emitb 15 +emitb 200 +end +xstore 0 d +ret +end if or eq t 3 eq t 7 emit or or 1522533376 d shl s 5 end @@ -10585,6 +11311,17 @@ matconst x add get lf_off j shl v sh ret x end r = matreg k v t +if ne get xtarget 0 0 +xcmp r cnt 1 +xtrap 2 3 +xload 0 r +xb 72 193 224 +emitb uchar sh +ximm 1 get lf_off j +xrr 1 0 1 +xstore 0 x +ret x +end if le cnt 4095 emit or or 4043309087 shl cnt 10 shl r 5 else @@ -10615,7 +11352,11 @@ rdval 0 5 255 0 x = ly_ix j get rk 0 get rv 0 get rt 0 end rd = destreg dst +if ne get xtarget 0 0 +xlayout 0 ulong get nm_reg sub e 1 x ft rd +else emit or or or ldun ft rd shl ulong get nm_reg sub e 1 5 shl x 16 +end if ne get lf_big j 0 ly_rev ft rd rd end @@ -10668,8 +11409,12 @@ y = alloc ly_rev ft v y v = y end +if ne get xtarget 0 0 +xlayout 1 ulong get nm_reg sub e 1 x ft v +else emit or or or stun ft v shl ulong get nm_reg sub e 1 5 shl x 16 end +end note vt_fget_go: field j of struct name e. Scalar, or an index then the element. fn vt_fget_go e ulong dst ulong j ulong to void @@ -12546,6 +13291,7 @@ m = add m 1 end end put inlen 0 off +xlead chk_lead om2lead if eq get om2m 0 2 @@ -12562,6 +13308,16 @@ put oc 0 180 else put oc 0 add 176 shl get nexp 0 2 end +if ne get xtarget 0 0 +put oc 0 512 +if eq get progmode 0 0 +m = get nexp 0 +if eq m 0 +m = ulong 1 +end +put oc 0 add 512 mul m 6 +end +end put line 0 1 done = false while not done @@ -12575,3 +13331,2294 @@ end end ret 0 end + +note Linux x86-64 host ABI: Linux v6.17 arch/x86/entry/syscalls/syscall_64.tbl. +note R13 is the initial argument stack; R14 is the saved slot snapshot, private to lowering. +fn xhbegin to void +save +xrr 137 14 4 +end +fn xha x ulong i ulong r ulong to void +q = add add x 8 mul i 2 +k = get fr q +v = get fr add q 1 +if or eq k 3 eq k 7 +ximm r v +else +if eq k 6 +xaddr r v +else +xmem 139 r 14 mul v 8 +end +end +end +fn xhs r ulong s ulong to void +xmem 139 r 14 mul s 8 +end +fn xhb r ulong e ulong off ulong to void +if ge get nm_kind sub e 1 4 +xaddr r get nm_addr sub e 1 +else +xhs r ulong get nm_reg sub e 1 +end +xhs 0 off +xrr 1 r 0 +end +fn xhcall n ulong to void +ximm 0 n +emitb 15 +emitb 5 +end +fn xhdone dst ulong x ulong bytes ulong to void +xsp 0 bytes +hreturn dst x +end +fn xhcmp r ulong v ulong to void +ximm 11 v +xrr 57 r 11 +end +fn xhadd r ulong v ulong to void +ximm 11 v +xrr 1 r 11 +end +fn xhsub r ulong v ulong to void +ximm 11 v +xrr 41 r 11 +end +fn xhraw r ulong b ulong off ulong size ulong to void +emitb uchar add add 64 shl shr r 3 2 shr b 3 +if lt size 4 +emitb 15 +if eq size 1 +emitb 182 +else +emitb 183 +end +else +emitb 139 +end +emitb uchar add add 128 shl and r 7 3 and b 7 +if eq and b 7 4 +emitb 36 +end +xword off +end +fn xhput r ulong b ulong off ulong size ulong to void +if eq size 2 +emitb 102 +end +emitb uchar add add 64 shl shr r 3 2 shr b 3 +if eq size 1 +emitb 136 +else +emitb 137 +end +emitb uchar add add 128 shl and r 7 3 and b 7 +if eq and b 7 4 +emitb 36 +end +xword off +end +fn xhpath x ulong to void +xhb 6 get fr add x 20 get fr add x 21 +xhs 2 get fr add x 22 +xhcmp 2 4095 +xtrap 8 3 +xsp 1 4096 +xrr 137 7 4 +loop = get oc 0 +xrr 133 2 2 +done = xbranch 0 +xhraw 0 6 0 1 +xrr 133 0 0 +xtrap 0 3 +xhput 0 7 0 1 +xhadd 6 1 +xhadd 7 1 +xhsub 2 1 +p = xbranch 14 +xpatch p loop +xpatch done get oc 0 +ximm 0 0 +xhput 0 7 0 1 +end +fn xhscalar c ulong dst ulong x ulong to void +np = hargc c +for i ulong np +ty = ulong 8 +if or and eq c 103 eq i 1 and eq c 139 eq i 1 +ty = ulong 9 +end +harg x i ty +end +xhbegin +for i ulong np +r = ulong 7 +if eq i 1 +r = ulong 6 +end +if eq i 2 +r = ulong 2 +end +xha x i r +end +nr = ulong 292 +if eq c 100 +nr = ulong 3 +end +if eq c 101 +nr = ulong 74 +end +if eq c 102 +nr = ulong 91 +end +if eq c 103 +nr = ulong 8 +end +if eq c 104 +nr = ulong 41 +end +if eq c 105 +nr = ulong 50 +end +if eq c 106 +nr = ulong 288 +xha x 1 10 +ximm 6 0 +ximm 2 0 +end +if eq c 107 +nr = ulong 57 +end +if eq c 127 +nr = ulong 62 +end +if eq c 129 +nr = ulong 39 +end +if eq c 139 +nr = ulong 77 +end +if eq c 145 +nr = ulong 102 +end +if eq c 146 +nr = ulong 107 +end +if eq c 147 +nr = ulong 104 +end +if eq c 148 +nr = ulong 108 +end +if eq c 153 +nr = ulong 81 +end +if eq c 154 +nr = ulong 110 +end +if eq c 155 +nr = ulong 95 +end +if eq c 156 +nr = ulong 75 +end +if eq c 158 +nr = ulong 112 +end +if eq c 159 +nr = ulong 121 +end +if eq c 160 +nr = ulong 109 +end +if eq c 163 +nr = ulong 124 +end +if eq c 164 +nr = ulong 306 +end +if eq c 165 +nr = ulong 48 +end +if eq c 197 +nr = ulong 73 +end +xhcall nr +xhdone dst x 0 +end +fn xhpaths c ulong dst ulong x ulong to void +e = harray x 0 +if or eq c 110 eq c 151 +harg x 2 8 +harg x 3 8 +end +if or or or eq c 112 eq c 143 eq c 144 eq c 157 +harg x 2 8 +end +if eq c 150 +harg x 2 9 +end +xhbegin +xhpath x +ximm 7 18446744073709551516 +xrr 137 6 4 +nr = ulong 257 +if eq c 110 +xha x 2 2 +xha x 3 10 +end +if or eq c 111 eq c 126 +nr = ulong 263 +ximm 2 0 +if eq c 126 +ximm 2 512 +end +end +if eq c 112 +nr = ulong 258 +xha x 2 2 +end +if eq c 138 +nr = ulong 80 +xrr 137 7 6 +end +if or eq c 143 eq c 144 +nr = ulong 268 +if eq c 144 +nr = ulong 269 +end +xha x 2 2 +ximm 10 0 +end +if eq c 150 +nr = ulong 76 +xrr 137 7 6 +xha x 2 6 +end +if eq c 151 +nr = ulong 260 +xha x 2 2 +xha x 3 10 +ximm 8 0 +end +if eq c 157 +nr = ulong 319 +xrr 137 7 6 +xha x 2 6 +end +xhcall nr +xhdone dst x 4096 +end +note Native x86 struct stat is private; output remains Omega's 128-byte asm-generic ABI. +fn xhstatcv to void +xrr 133 0 0 +bad = xbranch 11 +ximm 2 0 +for j ulong 16 +xmem 137 2 12 mul j 8 +end +for j ulong 2 +xmem 139 2 4 mul j 8 +xmem 137 2 12 mul j 8 +end +xhraw 2 4 24 4 +xhput 2 12 16 4 +xhraw 2 4 16 4 +xhput 2 12 20 4 +xmem 139 2 4 28 +xmem 137 2 12 24 +xmem 139 2 4 40 +xmem 137 2 12 32 +xmem 139 2 4 48 +xmem 137 2 12 48 +xhraw 2 4 56 4 +xhput 2 12 56 4 +for j ulong 7 +xmem 139 2 4 add 64 mul j 8 +xmem 137 2 12 add 64 mul j 8 +end +ximm 0 0 +xpatch bad get oc 0 +end +fn xhbuffer c ulong dst ulong x ulong to void +harg x 4 8 +wr = ulong 0 +if or or or or or eq c 113 eq c 116 eq c 117 eq c 118 eq c 131 eq c 161 +wr = ulong 1 +end +e = harray x wr +if or or eq c 116 eq c 118 eq c 119 +harg x 2 8 +end +if or eq c 161 eq c 162 +harg x 3 9 +end +xhbegin +xha x 4 7 +xhb 6 e get fr add x 21 +xhs 2 get fr add x 22 +nr = ulong 217 +if or eq c 114 eq c 115 +nr = ulong 42 +if eq c 115 +nr = ulong 49 +end +end +if eq c 116 +xhcmp 2 4 +xtrap 3 3 +nr = ulong 61 +xha x 2 2 +ximm 10 0 +end +if eq c 117 +xhcmp 2 128 +xtrap 3 3 +xrr 137 12 6 +xsp 1 144 +xrr 137 6 4 +xhcall 5 +xhstatcv +xhdone dst x 144 +ret +end +if or eq c 118 eq c 119 +nr = ulong 45 +xha x 2 10 +ximm 8 0 +ximm 9 0 +if eq c 119 +nr = ulong 44 +ximm 0 16384 +xrr 9 10 0 +end +end +if eq c 131 +xsp 1 16 +xhput 2 4 0 4 +xrr 137 2 4 +xhcall 51 +xrr 133 0 0 +bad = xbranch 11 +xhraw 0 4 0 4 +xpatch bad get oc 0 +xhdone dst x 16 +ret +end +if or eq c 161 eq c 162 +nr = ulong 17 +if eq c 162 +nr = ulong 18 +end +xha x 3 10 +end +xhcall nr +xhdone dst x 0 +end +fn xhstats c ulong dst ulong x ulong to void +e = harray x 0 +put fr add x 23 e +put fr add x 24 get fr add x 21 +put fr add x 25 get fr add x 22 +e = harray x 1 +put fr add x 26 e +put fr add x 27 get fr add x 21 +put fr add x 28 get fr add x 22 +put fr add x 20 get fr add x 23 +put fr add x 21 get fr add x 24 +put fr add x 22 get fr add x 25 +xhbegin +xhs 2 get fr add x 22 +xrr 133 2 2 +xtrap 0 3 +xhpath x +xhb 12 e get fr add x 27 +xhs 2 get fr add x 28 +xhcmp 2 128 +xtrap 3 3 +ximm 7 18446744073709551516 +xrr 137 6 4 +xsp 1 144 +xrr 137 2 4 +ximm 10 0 +if eq c 149 +ximm 10 256 +end +xhcall 262 +xhstatcv +xhdone dst x 4240 +end +fn xhtime c ulong dst ulong x ulong to void +if eq c 120 +harg x 0 9 +end +xhbegin +xsp 1 16 +if eq c 120 +xha x 0 0 +xrr 133 0 0 +xtrap 11 3 +ximm 1 1000000000 +ximm 2 0 +xb 72 247 241 +xmem 137 0 4 0 +xmem 137 2 4 8 +xrr 137 7 4 +ximm 6 0 +xhcall 35 +else +ximm 7 1 +if eq c 130 +ximm 7 0 +end +xrr 137 6 4 +xhcall 228 +xrr 133 0 0 +bad = xbranch 11 +xmem 139 2 4 0 +xhcmp 2 9223372036 +xtrap 8 1 +ximm 0 1000000000 +xb 72 15 175 +emitb 194 +xmem 139 2 4 8 +xrr 1 0 2 +xtrap 6 1 +xpatch bad get oc 0 +end +xhdone dst x 16 +end + +fn xrot ty ulong ra ulong b ulong imm ulong rd ulong to void +xload 0 ra +if ne imm 0 +ximm 1 b +else +xload 1 b +end +if eq ty 3 +emitb 102 +end +if eq ty 5 +emitb 72 +end +if eq ty 2 +emitb 210 +else +emitb 211 +end +emitb 200 +xstore 0 rd +canon rd ty +end + +fn xhts off ulong to void +xrr 133 2 2 +forever = xbranch 11 +xrr 137 0 2 +ximm 1 1000000000 +ximm 2 0 +xb 72 247 241 +xmem 137 0 4 off +xmem 137 2 4 add off 8 +xmem 141 2 4 off +jump = xbranch 14 +xpatch forever get oc 0 +ximm 2 0 +xpatch jump get oc 0 +end +fn xhpoll c ulong dst ulong x ulong to void +if eq c 123 +harg x 0 8 +harg x 1 8 +harg x 2 9 +xhbegin +xha x 0 7 +xha x 1 6 +xha x 2 2 +xrr 133 6 6 +xtrap 11 3 +xhcmp 6 65535 +xtrap 8 3 +xsp 1 32 +ximm 0 0 +xmem 137 0 4 0 +xhput 7 4 0 4 +xhput 6 4 4 2 +xhts 16 +xrr 137 7 4 +ximm 6 1 +else +e = harray x 1 +harg x 2 9 +xhbegin +xhb 7 e get fr add x 21 +xhs 6 get fr add x 22 +xhcmp 6 8192 +xtrap 8 3 +xrr 137 0 6 +ximm 1 7 +xrr 33 0 1 +xrr 133 0 0 +xtrap 1 3 +xb 72 193 238 +emitb 3 +xha x 2 2 +xsp 1 32 +xhts 16 +end +ximm 10 0 +ximm 8 8 +xhcall 271 +if eq c 123 +xrr 133 0 0 +bad = xbranch 13 +xhraw 0 4 6 2 +xpatch bad get oc 0 +end +xhdone dst x 32 +end +fn xhargs c ulong dst ulong x ulong to void +put hostargs 0 1 +if or eq c 121 eq c 136 +xhbegin +xmem 139 0 13 0 +if eq c 136 +xmem 141 6 13 16 +xb 72 193 224 +emitb 3 +xrr 1 6 0 +ximm 0 0 +loop = get oc 0 +xmem 139 2 6 0 +xrr 133 2 2 +done = xbranch 0 +xhadd 6 8 +xhadd 0 1 +p = xbranch 14 +xpatch p loop +xpatch done get oc 0 +end +xhdone dst x 0 +ret +end +harg x 4 5 +e = harray x 1 +xhbegin +xha x 4 2 +xmem 139 1 13 0 +xmem 141 6 13 8 +if eq c 137 +xhadd 1 1 +xb 72 193 225 +emitb 3 +xrr 1 6 1 +loop = get oc 0 +xmem 139 0 6 0 +xrr 133 0 0 +xtrap 0 3 +xrr 133 2 2 +done = xbranch 0 +xhsub 2 1 +xhadd 6 8 +p = xbranch 14 +xpatch p loop +xpatch done get oc 0 +else +xrr 57 2 1 +xtrap 2 3 +xb 72 193 226 +emitb 3 +xrr 1 6 2 +end +xmem 139 6 6 0 +xrr 137 12 6 +ximm 2 0 +scan = get oc 0 +xhraw 0 6 0 1 +xrr 133 0 0 +found = xbranch 0 +xhadd 6 1 +xhadd 2 1 +xhcmp 2 1048576 +xtrap 2 3 +p = xbranch 14 +xpatch p scan +xpatch found get oc 0 +xhs 1 get fr add x 22 +xrr 57 2 1 +small = xbranch 8 +xhb 7 e get fr add x 21 +xrr 137 6 12 +xrr 137 1 2 +emitb 243 +emitb 164 +xrr 137 0 2 +tail = xbranch 14 +xpatch small get oc 0 +ximm 0 18446744073709551511 +xpatch tail get oc 0 +xhdone dst x 0 +end +fn xhsimple c ulong dst ulong x ulong to void +e = harray x 1 +if or eq c 128 eq c 135 +harg x 2 8 +end +xhbegin +xhb 7 e get fr add x 21 +xhs 6 get fr add x 22 +nr = ulong 79 +if eq c 128 +xhcmp 6 8 +xtrap 3 3 +xha x 2 6 +nr = ulong 293 +end +if eq c 135 +xha x 2 2 +nr = ulong 318 +end +xhcall nr +xhdone dst x 0 +end +fn xhreadln dst ulong x ulong to void +e = harray x 0 +put fr add x 23 e +put fr add x 24 get fr add x 21 +put fr add x 25 get fr add x 22 +e = harray x 1 +put fr add x 26 e +put fr add x 27 get fr add x 21 +put fr add x 28 get fr add x 22 +put fr add x 20 get fr add x 23 +put fr add x 21 get fr add x 24 +put fr add x 22 get fr add x 25 +xhbegin +xhs 2 get fr add x 22 +xrr 133 2 2 +xtrap 0 3 +xhpath x +xhb 2 e get fr add x 27 +xhs 10 get fr add x 28 +ximm 7 18446744073709551516 +xrr 137 6 4 +xhcall 267 +xhdone dst x 4096 +end +fn xhsock c ulong dst ulong x ulong to void +ok = new ulong 6 0 +if eq c 134 +harg x 2 8 +harg x 3 8 +harg x 4 8 +e = harray x 0 +xhbegin +xha x 2 7 +xha x 3 6 +xha x 4 2 +xhb 10 e get fr add x 21 +xhs 8 get fr add x 22 +xhcmp 6 1 +tcp = xbranch 1 +for j ulong 5 +v = add j 5 +if eq j 0 +v = ulong 2 +end +if eq j 1 +v = ulong 15 +end +xhcmp 2 v +put ok j xbranch 0 +end +badso = xbranch 14 +xpatch tcp get oc 0 +xhcmp 6 6 +badtcp = xbranch 1 +xhcmp 2 1 +put ok 5 xbranch 0 +xpatch badso get oc 0 +xpatch badtcp get oc 0 +ximm 0 sub ulong 0 92 +done = xbranch 14 +for j ulong 6 +xpatch get ok j get oc 0 +end +xhcmp 8 4 +sizeok = xbranch 0 +ximm 0 sub ulong 0 22 +badsize = xbranch 14 +xpatch sizeok get oc 0 +xhcall 54 +xpatch done get oc 0 +xpatch badsize get oc 0 +xhdone dst x 0 +ret +end +harg x 4 8 +if eq c 220 +e = harray x 1 +xhbegin +xha x 4 7 +xhb 10 e get fr add x 21 +xhs 8 get fr add x 22 +xhcmp 8 12 +xtrap 3 3 +ximm 6 1 +ximm 2 17 +xsp 1 16 +ximm 8 12 +xhput 8 4 0 4 +xrr 137 8 4 +xhcall 55 +xhdone dst x 16 +ret +end +e = harray x 0 +harg x 2 8 +xhbegin +xha x 4 7 +xha x 2 2 +ximm 0 16384 +xrr 9 2 0 +xhb 6 e get fr add x 21 +xhs 8 get fr add x 22 +xsp 1 80 +ximm 0 0 +for j ulong 10 +xmem 137 0 4 mul j 8 +end +xmem 137 6 4 64 +xmem 137 8 4 72 +xmem 141 6 4 64 +xmem 137 6 4 16 +ximm 6 1 +xmem 137 6 4 24 +xrr 137 6 4 +xhcall 46 +xhdone dst x 80 +end +fn xhpack c ulong dst ulong x ulong to void +e = harray x 0 +if eq c 125 +harg x 2 8 +end +xhbegin +xhb 6 e get fr add x 21 +xhs 2 get fr add x 22 +xhcmp 2 4096 +xtrap 8 3 +xhcmp 2 2 +xtrap 3 3 +xhraw 8 6 0 2 +xhadd 6 2 +xhsub 2 2 +xrr 133 8 8 +xtrap 0 3 +xhcmp 8 64 +xtrap 8 3 +if ne c 124 +xhcmp 8 2 +xtrap 1 3 +end +xsp 1 8192 +xrr 137 10 4 +xmem 141 12 4 4096 +ximm 9 0 +outer = get oc 0 +xrr 57 9 8 +done = xbranch 2 +xhcmp 2 2 +xtrap 3 3 +xhraw 1 6 0 2 +xhadd 6 2 +xhsub 2 2 +xrr 57 1 2 +xtrap 8 3 +if eq c 124 +xrr 133 9 9 +notfirst = xbranch 1 +xrr 133 1 1 +xtrap 0 3 +xpatch notfirst get oc 0 +else +xrr 133 1 1 +xtrap 0 3 +end +xmem 137 10 12 0 +xhadd 12 8 +xrr 41 2 1 +inner = get oc 0 +xrr 133 1 1 +endstr = xbranch 0 +xhraw 0 6 0 1 +xrr 133 0 0 +xtrap 0 3 +xhput 0 10 0 1 +xhadd 6 1 +xhadd 10 1 +xhsub 1 1 +p = xbranch 14 +xpatch p inner +xpatch endstr get oc 0 +ximm 0 0 +xhput 0 10 0 1 +xhadd 10 1 +xhadd 9 1 +p = xbranch 14 +xpatch p outer +xpatch done get oc 0 +xrr 133 2 2 +xtrap 1 3 +ximm 0 0 +xmem 137 0 12 0 +if eq c 124 +xmem 139 7 4 4096 +xmem 141 6 4 4096 +xrr 137 2 12 +xhcall 59 +else +xmem 139 6 4 4096 +xmem 139 10 4 4104 +ximm 7 18446744073709551516 +ximm 2 18446744073709551516 +ximm 8 0 +if eq c 125 +xha x 2 8 +xhcall 316 +else +if eq c 141 +xhcall 265 +else +xrr 137 7 6 +ximm 6 18446744073709551516 +xrr 137 2 10 +xhcall 266 +end +end +end +xhdone dst x 8192 +end +note Owned mapping handles keep the existing 128-slot generation/access table and ABI. +fn xhmcheck to void +xrr 137 12 10 +ximm 0 255 +xrr 33 12 0 +xhcmp 12 1 +xtrap 3 3 +xhcmp 12 128 +xtrap 8 3 +xhsub 12 1 +xb 73 193 228 +emitb 5 +xaddr 0 get maptab 0 +xrr 1 12 0 +xmem 139 9 12 16 +xrr 133 9 9 +xtrap 0 3 +xb 73 193 234 +emitb 8 +xrr 57 10 9 +xtrap 1 3 +xmem 139 8 12 0 +xrr 133 8 8 +xtrap 0 3 +xmem 139 9 12 8 +end +fn xhmnew c ulong dst ulong x ulong to void +acc = ulong 0 +mode = ulong 1048610 +if eq c 167 +harg x 0 8 +harg x 1 5 +harg x 2 5 +harg x 3 8 +harg x 4 8 +if or ne get fr add x 14 3 ne get fr add x 16 3 +fail 9 +end +acc = get fr add x 15 +mode = get fr add x 17 +if and ne acc 1 ne acc 3 +fail 9 +end +if and and and ne mode 1 ne mode 2 ne mode 33 ne mode 34 +fail 9 +end +else +harg x 1 5 +harg x 2 5 +end +xhbegin +xha x 2 6 +xrr 133 6 6 +xtrap 0 3 +xhcmp 6 68719476736 +xtrap 8 3 +if eq c 167 +xha x 0 8 +xha x 1 9 +if ge mode 32 +xhcmp 8 18446744073709551615 +xtrap 1 3 +xrr 133 9 9 +xtrap 1 3 +end +else +xha x 1 7 +xhcmp 7 65536 +xtrap 3 3 +ximm 0 1099511627776 +xrr 41 0 6 +xrr 57 7 0 +xtrap 8 3 +ximm 0 4095 +xrr 137 1 7 +xrr 33 1 0 +xrr 133 1 1 +xtrap 1 3 +xrr 137 1 6 +xrr 33 1 0 +xrr 133 1 1 +xtrap 1 3 +ximm 8 18446744073709551615 +ximm 9 0 +end +xaddr 12 get maptab 0 +ximm 2 1 +head = get oc 0 +xmem 139 0 12 0 +xrr 133 0 0 +used = xbranch 1 +xmem 139 10 12 16 +xhcmp 10 36028797018963967 +vacant = xbranch 3 +xpatch used get oc 0 +xhadd 12 32 +xhadd 2 1 +xhcmp 2 128 +again = xbranch 9 +xpatch again head +ximm 0 sub ulong 0 24 +full = xbranch 14 +xpatch vacant get oc 0 +xsp 1 32 +xmem 137 2 4 0 +xmem 137 6 4 8 +xmem 137 10 4 16 +if eq c 167 +ximm 7 0 +else +xha x 1 7 +end +ximm 2 acc +ximm 10 mode +xhcall 9 +xrr 133 0 0 +failed = xbranch 11 +wrong = ulong 0 +if eq c 176 +xha x 1 2 +xrr 57 0 2 +exact = xbranch 0 +xrr 137 7 0 +xmem 139 6 4 8 +xhcall 11 +xrr 133 0 0 +xtrap 1 3 +ximm 0 sub ulong 0 95 +wrong = xbranch 14 +xpatch exact get oc 0 +end +xmem 137 0 12 0 +xmem 139 2 4 8 +xmem 137 2 12 8 +xmem 139 2 4 16 +xhadd 2 1 +xmem 137 2 12 16 +ximm 0 acc +xmem 137 0 12 24 +xrr 137 0 2 +xb 72 193 224 +emitb 8 +xmem 139 2 4 0 +xrr 9 0 2 +xpatch failed get oc 0 +if ne wrong 0 +xpatch wrong get oc 0 +end +xsp 0 32 +xpatch full get oc 0 +xhdone dst x 0 +end +fn xhmbind dst ulong x ulong to void +harg x 0 9 +harg x 1 8 +harg x 2 5 +harg x 3 8 +if ne get fr add x 14 3 +fail 9 +end +acc = get fr add x 15 +if and ne acc 1 ne acc 3 +fail 9 +end +xhbegin +xha x 0 10 +xhmcheck +xmem 139 0 12 24 +xrr 133 0 0 +xtrap 1 3 +xsp 1 32 +xmem 137 8 4 0 +xmem 137 9 4 8 +xrr 137 7 8 +xrr 137 6 9 +xha x 1 8 +xha x 2 9 +ximm 2 acc +ximm 10 17 +xhcall 9 +xrr 133 0 0 +failed = xbranch 11 +xmem 139 2 4 0 +xrr 57 0 2 +xtrap 1 3 +ximm 0 acc +xmem 137 0 12 24 +ximm 0 0 +done = xbranch 14 +xpatch failed get oc 0 +xmem 137 0 4 16 +xmem 139 7 4 0 +xmem 139 6 4 8 +xhcall 11 +xrr 133 0 0 +xtrap 1 3 +ximm 0 0 +xmem 137 0 12 0 +xmem 137 0 12 8 +xmem 137 0 12 24 +xmem 139 0 4 16 +xpatch done get oc 0 +xhdone dst x 32 +end +fn xhmdrop dst ulong x ulong to void +harg x 0 9 +xhbegin +xha x 0 10 +xhmcheck +xrr 137 7 8 +xrr 137 6 9 +xhcall 11 +xrr 133 0 0 +failed = xbranch 1 +xmem 137 0 12 0 +xmem 137 0 12 8 +xmem 137 0 12 24 +xpatch failed get oc 0 +xhdone dst x 0 +end +fn xhmcopy c ulong dst ulong x ulong to void +harg x 4 9 +harg x 3 5 +wr = ulong 0 +if eq c 169 +wr = ulong 1 +end +e = harray x wr +xhbegin +xha x 4 10 +xhmcheck +xmem 139 0 12 24 +xrr 133 0 0 +xtrap 0 3 +xha x 3 2 +xrr 57 2 9 +xtrap 8 3 +xrr 41 9 2 +xhs 1 get fr add x 22 +xrr 57 1 9 +xtrap 8 3 +xrr 1 8 2 +xhb 7 e get fr add x 21 +xrr 137 6 8 +if eq c 170 +xmem 139 0 12 24 +xhcmp 0 3 +xtrap 1 3 +xrr 137 6 7 +xrr 137 7 8 +end +xrr 137 2 1 +emitb 243 +emitb 164 +xrr 137 0 2 +xhdone dst x 0 +end +fn xhmmio c ulong dst ulong x ulong to void +harg x 0 9 +if eq c 173 +xhbegin +xha x 0 10 +xhmcheck +xrr 137 0 8 +xhdone dst x 0 +put rt 0 5 +ret +end +harg x 1 5 +harg x 2 8 +if ne get fr add x 12 3 +fail 9 +end +w = get fr add x 13 +if and ne w 4 ne w 8 +fail 9 +end +if eq c 175 +harg x 3 5 +end +xhbegin +xha x 0 10 +xhmcheck +xha x 1 2 +xmem 139 0 12 24 +xrr 133 0 0 +xtrap 0 3 +xrr 57 2 9 +xtrap 8 3 +xrr 41 9 2 +xhcmp 9 w +xtrap 3 3 +xrr 137 0 2 +ximm 1 sub w 1 +xrr 33 0 1 +xrr 133 0 0 +xtrap 1 3 +xrr 1 8 2 +if eq c 175 +xmem 139 0 12 24 +xhcmp 0 3 +xtrap 1 3 +xha x 3 2 +if eq w 4 +xhcmp 2 4294967295 +xtrap 8 3 +end +xb 15 174 240 +if eq w 4 +xhput 2 8 0 4 +else +xmem 137 2 8 0 +end +xb 15 174 240 +ximm 0 0 +xhdone dst x 0 +else +xb 15 174 240 +if eq w 4 +xhraw 0 8 0 4 +else +xmem 139 0 8 0 +end +xb 15 174 240 +xhdone dst x 0 +put rt 0 5 +end +end +note One compile-time ioctl allowlist is shared by both native Linux backends. +fn xhreq c ulong x ulong to ulong +harg x 4 8 +harg x 2 4 +if ne get fr add x 12 3 +fail 9 +end +q = get fr add x 13 +n = ulong 4 +if eq c 166 +if ne q 21531 +if ne and q 3221290752 3221243392 +fail 9 +end +n = and shr q 16 16383 +if eq n 0 +fail 9 +end +end +end +if eq c 172 +n = ulong 0 +if eq q 805306369 +n = ulong 16 +end +if eq q 75 +n = ulong 8 +end +if eq q 37 +n = ulong 40 +end +if or eq q 38 eq q 26 +n = ulong 20 +end +if eq q 25 +n = ulong 32 +end +if eq q 27 +n = ulong 56 +end +if eq q 28 +n = ulong 28 +end +if eq q 33 +n = ulong 9264 +end +if or eq q 34 eq q 73 +n = ulong 24 +end +if eq n 0 +fail 9 +end +end +if eq c 171 +if and ne q 3223340586 ne q 3223340587 +fail 9 +end +n = ulong 32 +end +ret n +end +fn xhdev c ulong dst ulong x ulong to void +n = xhreq c x +put fr add x 23 n +e = harray x 1 +if ne c 171 +xhbegin +xhs 2 get fr add x 22 +xhcmp 2 get fr add x 23 +xtrap 1 3 +xha x 4 7 +xha x 2 6 +xhb 2 e get fr add x 21 +xhcall 16 +xhdone dst x 0 +ret +end +put fr add x 23 e +put fr add x 24 get fr add x 21 +put fr add x 25 get fr add x 22 +f = harray x 1 +if eq e f +fail 19 +end +xhbegin +xhs 2 get fr add x 25 +xhcmp 2 32 +xtrap 1 3 +xhs 9 get fr add x 22 +xhcmp 9 16383 +xtrap 8 3 +xhb 12 e get fr add x 24 +xhb 8 f get fr add x 21 +xrr 133 9 9 +empty = xbranch 0 +xrr 137 2 8 +xrr 1 2 9 +xrr 57 2 12 +before = xbranch 9 +xmem 141 2 12 32 +xrr 57 8 2 +xtrap 3 3 +xpatch before get oc 0 +xpatch empty get oc 0 +xmem 139 2 12 16 +xrr 133 2 2 +xtrap 1 3 +xrr 133 9 9 +nonzero = xbranch 1 +ximm 8 0 +xpatch nonzero get oc 0 +xsp 1 32 +for j ulong 4 +xmem 139 0 12 mul j 8 +xmem 137 0 4 mul j 8 +end +xmem 137 8 4 16 +xhput 9 4 24 4 +xha x 4 7 +xha x 2 6 +xrr 137 2 4 +xhcall 16 +for j ulong 4 +if ne j 2 +xmem 139 2 4 mul j 8 +xmem 137 2 12 mul j 8 +end +end +xhdone dst x 32 +end +fn xhost c ulong dst ulong to void +if ne get xtarget 0 1 +fail 25 +end +if eq get progmode 0 0 +fail 9 +end +x = mul get depth 0 32 +put fr add x 7 get nslot 0 +if or eq c 220 eq c 222 +xhsock c dst x +ret +end +if or eq c 123 eq c 221 +xhpoll c dst x +ret +end +if and ge c 167 le c 177 +if or eq c 171 eq c 172 +xhdev c dst x +ret +end +mtinit +if or eq c 167 eq c 176 +xhmnew c dst x +ret +end +if eq c 177 +xhmbind dst x +ret +end +if eq c 168 +xhmdrop dst x +ret +end +if or eq c 169 eq c 170 +xhmcopy c dst x +ret +end +xhmmio c dst x +ret +end +if eq c 166 +xhdev c dst x +ret +end +if or eq c 132 eq c 128 +xhsimple c dst x +ret +end +if eq c 135 +xhsimple c dst x +ret +end +if eq c 133 +xhreadln dst x +ret +end +if eq c 134 +xhsock c dst x +ret +end +if or or eq c 109 eq c 130 eq c 120 +xhtime c dst x +ret +end +if or or and ge c 113 le c 119 eq c 131 or eq c 161 eq c 162 +xhbuffer c dst x +ret +end +if or or or eq c 121 eq c 122 eq c 136 eq c 137 +xhargs c dst x +ret +end +if or or or eq c 124 eq c 125 eq c 141 eq c 142 +xhpack c dst x +ret +end +if or eq c 140 eq c 149 +xhstats c dst x +ret +end +if or or or or eq c 110 eq c 111 eq c 112 eq c 126 eq c 138 +xhpaths c dst x +ret +end +if or or or or eq c 143 eq c 144 eq c 150 eq c 151 eq c 157 +xhpaths c dst x +ret +end +xhscalar c dst x +end + +note ======== Native x86-64 semantic backend ======== +note Intel SDM volume 2 instruction entries MOV, LEA, CALL, RET, Jcc, SETcc, MOVSX, +note MOVZX, ADD, SUB, IMUL, DIV, IDIV, SHL, SHR, SAR, SYSCALL; volume 2 chapter 2 +note supplies REX, ModRM and SIB. No A64 word decoding occurs in this backend. +fn xb a ulong b ulong c ulong to void +emitb uchar a +emitb uchar b +emitb uchar c +end + +fn xword v ulong to void +emitb uchar and v 255 +emitb uchar and shr v 8 255 +emitb uchar and shr v 16 255 +emitb uchar and shr v 24 255 +end + +fn ximm r ulong v ulong to void +emitb uchar add 72 shr r 3 +emitb uchar add 184 and r 7 +xword v +xword shr v 32 +end + +note Hardware registers are private emitter operands. Language values are RBP slots. +fn xrr op ulong d ulong s ulong to void +emitb uchar add add 72 shl shr s 3 2 shr d 3 +emitb uchar op +emitb uchar add add 192 shl and s 7 3 and d 7 +end + +fn xmem op ulong r ulong b ulong off ulong to void +emitb uchar add add 72 shl shr r 3 2 shr b 3 +emitb uchar op +emitb uchar add add 128 shl and r 7 3 and b 7 +if eq and b 7 4 +emitb 36 +end +xword off +end + +fn xload r ulong s ulong to void +xmem 139 r 5 sub ulong 0 mul add s 1 8 +end + +fn xstore r ulong s ulong to void +xmem 137 r 5 sub ulong 0 mul add s 1 8 +end + +fn xcc cc ulong to ulong +if eq cc 0 +ret 4 +end +if eq cc 1 +ret 5 +end +if eq cc 2 +ret 3 +end +if eq cc 3 +ret 2 +end +if eq cc 6 +ret 0 +end +if eq cc 7 +ret 1 +end +if eq cc 8 +ret 7 +end +if eq cc 9 +ret 6 +end +if eq cc 10 +ret 13 +end +if eq cc 11 +ret 12 +end +if eq cc 12 +ret 15 +end +if eq cc 13 +ret 14 +end +fail 25 +ret 0 +end + +note Every branch reserves six bytes; all targets are byte offsets, not word offsets. +fn xbranch cc ulong to ulong +p = get oc 0 +if eq cc 14 +emitb 233 +xword 0 +emitb 144 +else +emitb 15 +emitb uchar add 128 xcc cc +xword 0 +end +ret p +end + +fn xpatch p ulong dest ulong to void +if eq get out p 233 +wrword add p 1 sub dest add p 5 +else +wrword add p 2 sub dest add p 6 +end +end + +fn xtrap cc ulong code ulong to void +n = get nt 0 +if ge n 8192 +fail 14 +end +put tcode n code +put tsite n xbranch cc +put nt 0 add n 1 +if eq get om2m 0 1 +siterec +end +end + +fn xcmp a ulong b ulong imm ulong to void +xload 0 a +if ne imm 0 +ximm 1 b +else +xload 1 b +end +xrr 57 0 1 +end + +note Canonicalization uses shifts, preserving the checked language's signed widths. +fn xcanrax t ulong to void +if eq t 10 +emitb 137 +emitb 192 +ret +end +w = twid t +if eq w 64 +ret +end +xb 72 193 224 +emitb uchar sub 64 w +xb 72 193 232 +if ge t 6 +put out sub get oc 0 1 248 +end +emitb uchar sub 64 w +end + +fn xext r ulong t ulong code ulong to void +xload 0 r +xrr 137 2 0 +xcanrax t +xrr 57 0 2 +xtrap 1 code +end + +fn xarith op ulong ty ulong a ulong b ulong imm ulong d ulong to void +if or eq ty 10 eq ty 11 +if or lt op 33 gt op 35 +fail 7 +end +if ne imm 0 +matconst 16 b +b = ulong 16 +end +fp_binop op ty a b d +ret +end +xload 0 a +if ne imm 0 +ximm 1 b +else +xload 1 b +end +if eq op 33 +xrr 1 0 1 +if eq ty 13 +xtrap 3 1 +end +end +if eq op 34 +xrr 41 0 1 +if eq ty 13 +xtrap 3 1 +end +end +if eq op 35 +if eq ty 13 +xb 72 247 225 +xrr 133 2 2 +xtrap 1 1 +else +xb 72 15 175 +emitb 193 +end +end +if eq op 38 +xrr 33 0 1 +end +if eq op 39 +xrr 9 0 1 +end +if eq op 40 +xrr 49 0 1 +end +if and eq ty 9 le op 35 +xtrap 6 1 +end +xstore 0 d +if le op 35 +bo_fix d ty +end +end + +fn xdiv op ulong ty ulong a ulong b ulong d ulong fl ulong to void +if or eq ty 10 eq ty 11 +if ne op 36 +fail 7 +end +fp_binop op ty a b d +ret +end +xload 0 a +xload 1 b +note Match bo_div's constant-divisor proofs and source trap sites. +if eq and fl 1 0 +xrr 133 1 1 +xtrap 0 2 +end +done = ulong 0 +if and ge ty 6 le ty 9 +if and eq ty 9 eq and fl 2 0 +note Only 64-bit IDIV can fault on MIN/-1; remainder must bypass with zero. +ximm 2 18446744073709551615 +xrr 57 1 2 +other = xbranch 1 +if eq op 37 +ximm 0 0 +done = xbranch 14 +else +xb 72 247 216 +xtrap 6 1 +done = xbranch 14 +end +xpatch other get oc 0 +end +xb 72 153 144 +xb 72 247 249 +else +xrr 49 2 2 +xb 72 247 241 +end +if eq op 37 +xrr 137 0 2 +end +if ne done 0 +xpatch done get oc 0 +end +xstore 0 d +note Narrow signed quotients can overflow; remainders and unsigned quotients cannot. +if and eq op 36 and ge ty 6 lt ty 9 +bo_fix d ty +end +end + +fn xshift op ulong ty ulong a ulong b ulong imm ulong d ulong to void +xload 0 a +if ne imm 0 +ximm 1 b +else +xload 1 b +end +note imm is set only for a statically valid shift amount, as in bo_shl/bo_shr. +if eq imm 0 +ximm 2 twid ty +xrr 57 1 2 +xtrap 2 7 +end +xrr 137 2 0 +if eq op 41 +xb 72 211 224 +if eq ty 9 +xrr 137 8 0 +xb 73 211 248 +xrr 57 8 2 +xtrap 1 1 +end +else +if ge ty 6 +xb 72 211 248 +else +xb 72 211 232 +end +end +xstore 0 d +if eq op 41 +bo_fix d ty +end +end + +fn xunary op ulong dst ulong to void +ty = get rt 0 +if eq ty 13 +fail 7 +end +if or eq ty 10 eq ty 11 +if eq op 50 +fail 7 +end +fa = matreg get rk 0 get rv 0 ty +fd = destreg dst +fp_neg ty fa fd +put rk 0 1 +put rv 0 fd +put rt 0 ty +ret +end +a = matreg get rk 0 get rv 0 ty +d = destreg dst +xload 0 a +if eq op 50 +if eq ty 1 +ximm 1 1 +xrr 49 0 1 +else +xb 72 247 208 +end +else +if eq ty 1 +fail 7 +end +xb 72 247 216 +if eq ty 9 +xtrap 6 1 +end +end +xstore 0 d +if eq op 50 +canon d ty +else +bo_fix d ty +end +put rk 0 1 +put rv 0 d +put rt 0 ty +end + +fn xconv tt ulong to void +ft = get rt 0 +if or or or eq ft 10 eq ft 11 eq tt 10 eq tt 11 +if or eq ft 13 eq tt 13 +fail 7 +end +if or eq ft 1 eq tt 1 +fail 9 +end +fa = matreg get rk 0 get rv 0 ft +fd = fp_conv ft tt fa +put rk 0 1 +put rv 0 fd +put rt 0 tt +ret +end +if or eq ft 1 eq tt 1 +fail 9 +end +r = matreg get rk 0 get rv 0 ft +wf = twid ft +wt = twid tt +s = ulong 99 +if not and ge ft 6 le ft 9 +if and ge tt 6 le tt 9 +if ge wf wt +s = sub wt 1 +end +else +if gt wf wt +s = wt +end +end +else +if not and ge tt 6 le tt 9 +s = wt +if gt s 63 +s = ulong 63 +end +else +if gt wf wt +xext r tt 5 +end +end +end +if ne s 99 +xload 0 r +xb 72 193 232 +emitb uchar s +xrr 133 0 0 +xtrap 1 5 +end +put rk 0 1 +put rv 0 r +put rt 0 tt +end + +note Reserve checked stack BEFORE stores, CALL return addresses, or PUSH. +fn xcheck bytes ulong to void +xmem 141 0 4 sub ulong 0 bytes +xrr 57 0 15 +xtrap 3 6 +end + +fn xsp down ulong bytes ulong to void +if eq bytes 0 +ret +end +if ne down 0 +xcheck bytes +xb 72 129 236 +else +xb 72 129 196 +end +xword bytes +end + +fn xmovsp r ulong to void +xrr 137 0 4 +xstore 0 r +end + +fn xpro np ulong to void +xrr 137 11 5 +emitb 85 +xrr 137 5 4 +xb 72 129 236 +xword 256 +j = ulong 0 +while lt j np +xmem 139 0 11 sub ulong 0 mul add j 1 8 +xstore 0 j +j = add j 1 +end +end + +fn xsave to void +put svn 0 add get npar 0 get nslot 0 +put sva 0 256 +xsp 1 256 +j = ulong 0 +while lt j 18 +xload 0 j +xmem 137 0 4 mul j 8 +j = add j 1 +end +note Reserve the callee's return address, frame pointer and slot area before CALL. +xcheck 272 +end + +fn xarg t ulong k ulong v ulong to void +if eq k 6 +mataddr t v +ret +end +if or eq k 3 eq k 7 +matconst t v +ret +end +xmem 139 0 4 mul v 8 +xstore 0 t +end + +fn xrestore d ulong slot ulong res ulong to ulong +put nslot 0 slot +rd = ulong 255 +if ne res 0 +rd = destreg d +xstore 0 rd +end +j = ulong 0 +while lt j 18 +if ne j rd +xmem 139 0 4 mul j 8 +xstore 0 j +end +j = add j 1 +end +xsp 0 256 +ret rd +end + +note Typed addresses carry origin through fixup records. Numeric constants never relocate. +fn mataddr r ulong v ulong to void +if eq get xtarget 0 0 +matconst r v +ret +end +xaddr 0 v +xstore 0 r +end + +fn xaddr r ulong v ulong to void +n = get xnaddr 0 +if ge n 65536 +fail 14 +end +emitb uchar add 72 shl shr r 3 2 +emitb 141 +emitb uchar add 5 shl and r 7 3 +put xasite n get oc 0 +put xavalue n v +put xnaddr 0 add n 1 +xword 0 +end + +fn xelem e ulong k ulong v ulong t ulong to void +if or or eq t 1 eq t 10 eq t 11 +fail 7 +end +i = sub e 1 +ln = get nm_len i +x = v +if ne unsz i 0 +x = matreg k v t +xcmp x ulong get nm_lr i 0 +xtrap 2 3 +else +if eq k 3 +if le ln v +fail 21 +end +if and ne get om2 0 0 le v 4095 +x = ulong 255 +put ea_k 0 v +else +x = alloc +matconst x v +end +else +xcmp v ln 1 +xtrap 2 3 +end +end +put ea_i 0 x +if ge get nm_kind i 4 +b = alloc +mataddr b get nm_addr i +put ea_b 0 b +else +put ea_b 0 ulong get nm_reg i +end +end + +note Indexed load/store uses RDX=base+index*element-size; pointers never enter source scalars. +fn xmemval store ulong base ulong idx ulong ty ulong val ulong to void +xload 2 base +if eq idx 255 +ximm 1 get ea_k 0 +else +xload 1 idx +end +xb 72 193 225 +emitb uchar tlog ty +xrr 1 2 1 +xmemraw store ty val +end + +note RDX is a checked aggregate address; layout byte offsets do not scale by the field width. +fn xlayout store ulong base ulong idx ulong ty ulong val ulong to void +xload 2 base +xload 1 idx +xrr 1 2 1 +xmemraw store ty val +end + +fn xmemraw store ulong ty ulong val ulong to void +if ne store 0 +xload 0 val +if eq twid ty 16 +emitb 102 +end +if eq twid ty 64 +emitb 72 +end +if le twid ty 8 +emitb 136 +else +emitb 137 +end +emitb 2 +else +if eq twid ty 64 +xb 72 139 2 +else +if eq twid ty 32 +if and ge ty 6 le ty 9 +xb 72 99 2 +else +emitb 139 +emitb 2 +end +else +emitb 72 +emitb 15 +op = ulong 182 +if eq twid ty 16 +op = ulong 183 +end +if and ge ty 6 le ty 9 +op = add op 8 +end +emitb uchar op +emitb 2 +end +end +xstore 0 val +end +end + +fn xslice e ulong ro ulong rn ulong to void +if ne get nm_type sub e 1 2 +fail 7 +end +xload 1 rn +if ne unsz sub e 1 0 +xload 0 ulong get nm_lr sub e 1 +else +ximm 0 get nm_len sub e 1 +end +xrr 57 1 0 +xtrap 8 3 +xrr 41 0 1 +xload 1 ro +xrr 57 1 0 +xtrap 8 3 +end + +fn xio c ulong fk ulong fv ulong e ulong ro ulong rn ulong to void +if ne get xtarget 0 1 +fail 25 +end +save +i = sub e 1 +if ge get nm_kind i 4 +xaddr 6 get nm_addr i +else +xload 6 ulong get nm_reg i +end +xmem 139 0 4 mul ro 8 +xrr 1 6 0 +if eq fk 3 +ximm 7 fv +else +xmem 139 7 4 mul fv 8 +end +xmem 139 2 4 mul rn 8 +ximm 0 sub c 53 +emitb 15 +emitb 5 +end + +fn xarray w ulong to void +if ne get nb 0 0 +fail 9 +end +t = typeword +elemtype t +n = lenval 16 +arrlen n +by = shl shr add shl n tlog t 15 4 4 +if gt add get stkbytes 0 by 4194304 +fail 23 +end +put stkbytes 0 add get stkbytes 0 by +r = alloc +put held 0 get nslot 0 +rdval 0 t 255 0 +if ne get rt 0 t +fail 7 +end +v = matreg get rk 0 get rv 0 t +xsp 1 by +xmovsp r +i = alloc +matconst i 0 +lp = get oc 0 +xmemval 1 r i t v +xarith 33 5 i 1 1 i +xcmp i n 1 +blo lp +addname w r t n 1 0 +end + +fn xfornum w ulong t ulong k ulong sn ulong sh ulong to void +eol +i = alloc +put held 0 get nslot 0 +addname w i t 0 0 0 +matconst i 0 +hd = get oc 0 +cp_head get cur 0 get line 0 +xcmp i k 1 +br = sf_br t +pushb br 4 hd i t +pushnh sn sh +cp_skip +end + +fn xforval w ulong t ulong kr ulong sn ulong sh ulong to void +eol +i = alloc +put held 0 get nslot 0 +addname w i t 0 0 0 +matconst i 0 +c = alloc +put held 0 get nslot 0 +matconst c 0 +hd = get oc 0 +cp_head get cur 0 get line 0 +xcmp i kr 0 +br = sf_br t +lpcnt c 1000000 +pushb br 4 hd i t +pushnh sn sh +cp_skip +end + +fn xleave to void +xrr 137 7 0 +ximm 0 60 +emitb 15 +emitb 5 +end + +fn xfinish to void +eol +if eq get dead 0 0 +if ne get curret 0 12 +fail 18 +end +cp_post 0 0 12 +epi +end +j = ulong 0 +n = get nt 0 +while lt j n +xpatch get tsite j get oc 0 +if eq get progmode 0 0 +note Bare units reserve physical R12/R14: recovery stack and immutable runtime table. +note Host helpers clobber these registers and must remain forbidden in bare units. +emitb 190 +xword get tcode j +xb 65 255 102 +emitb 16 +else +ximm 0 add 100 get tcode j +xleave +end +j = add j 1 +end +put curret 0 0 +put nn 0 get nglob 0 +put curfn 0 0 +put nbrk 0 0 +put ncont 0 0 +end + +fn xlead to void +note Only the exact bytes "target " at offset zero select x86. Default parsing is untouched. +if lt get inlen 0 8 +ret +end +if or ne get inp 0 116 ne get inp 1 97 +ret +end +if or ne get inp 2 114 ne get inp 3 103 +ret +end +if or ne get inp 4 101 ne get inp 5 116 +ret +end +if ne get inp 6 32 +ret +end +put cur 0 0 +put line 0 1 +tok +tok +if or ne get tw 0 8679965255892613240 ne get tl 0 8 +fail 25 +end +put xtarget 0 1 +eol +p = ulong 0 +while lt p get cur 0 +if ne get inp p 10 +put inp p 32 +end +p = add p 1 +end +put cur 0 0 +put line 0 1 +end + + +fn xeof to void +f = findfn 1852399981 4 0 +if eq f 0 +fail 16 +end +if ne get fn_np sub f 1 0 +fail 9 +end +entry = get oc 0 +xrr 137 13 4 +ximm 15 268435456 +ximm 4 276824064 +ximm 5 0 +emitb 232 +p = get oc 0 +xword sub get fn_addr sub f 1 add p 4 +if eq get fn_ret sub f 1 12 +ximm 0 0 +end +xleave +elfhdr +wrword 16 4063234 +wrword 24 add 4194304 entry +wrword 96 get oc 0 +wrword 104 get oc 0 +wrword 160 add get poolb 0 8388608 +i = ulong 0 +while lt i get xnaddr 0 +p = get xasite i +v = get xavalue i +v = sub v 4194304 +wrword get xasite i sub v add p 4 +i = add i 1 +end +writeout 0 +end + + +note Bare x86 units use the same private frame ABI as calls, never the SysV C ABI. +note Each entry is a six-byte JMP/NOP slot; a unit without exports enters its last function. +fn xunit to void +n = get nexp 0 +p = ulong 512 +f = ulong 0 +while lt f get nf 0 +take = ne get fn_exp f 0 +if eq n 0 +take = eq f sub get lastfn 0 1 +end +if take +put out p 233 +wrword add p 1 sub get fn_addr f add p 5 +put out add p 5 144 +p = add p 6 +end +f = add f 1 +end +writeout 512 +end diff --git a/seed/omc/qualify-x86.py b/seed/omc/qualify-x86.py new file mode 100755 index 000000000..94364606b --- /dev/null +++ b/seed/omc/qualify-x86.py @@ -0,0 +1,1958 @@ +#!/usr/bin/env python3 +"""Read-only FR-9 qualification oracle, not a compiler/backend/build dependency. + +Run on Linux AArch64, from any directory: + python3 seed/omc/qualify-x86.py --compiler /absolute/path/to/omc +Requires Python 3.10+, qemu-x86_64 and GNU x86-64 objdump or llvm-objdump. +Use --inventory for corpus categorization without compiling/running anything. + +All outputs go to stdout and a new TemporaryDirectory, removed on exit. Existing +receipts, compiler binaries, sources and gate manifests are never rewritten. +A fresh cwd and resource limits are NOT a security sandbox. Only trusted fixture +sources belong here. Reviewed, content-pinned host tests normalize their own +clock/random/process results and run in separate architecture-local directories. +Unreviewed host effects remain NOT_RUN and make the verdict nonzero. + +The fixture inventory includes every .om/.omegese under tests/, every seed/*/tests, +seed/omc/{om2,contracts}, seed/qualification, unit .om files and wasm/SPIRV case tables. +Frozen .cases and C2 rows retain their pinned historical assertions and exact +inputs. Current C2 compatibility assertions remain mandatory and separate from +their frozen provenance replay. Mutant specifications link to actual compiler +mutation executions with build/control verdicts; healthy compiler output is not +treated as a mutant. Current cross-target comparisons remain additional coverage. +""" +from __future__ import annotations + +import argparse +from collections import Counter, OrderedDict +from dataclasses import dataclass, field, replace +import hashlib +from functools import lru_cache +import json +import os +from pathlib import Path +import platform +import re +import resource +import shutil +import signal +import stat +import struct +import subprocess +import tempfile + +from x86_corpus_drivers import bare_calls, bridge_plan, bridge_positive_plan, directive_plan, plan_case, prepare_case, select_a64_entry, wrap_bare + +ROOT = Path(__file__).resolve().parents[2] +MAIN = re.compile(rb"(?m)^[ \t]*(?:export[ \t]+)?fn[ \t]+main(?:[ \t]|$)") +MODE = re.compile(rb"^(?:ir(?:[ \t\r\n]|$)|check(?:[ \t\r\n]|$)|next(?:[ \t\r\n]|$)|om2 fmt(?:[ \t\r\n]|$)|target(?:[ \t\r\n]|$))") +TEXT = re.compile(rb'(?m)^[ \t]*text[ \t]+\w+[ \t]+"((?:[^"\\]|\\.)*)"[^\n]*$') +UNSAFE = set(""" +devctl devcall uvmctl mapnew mapdrop mapget mapset mapread mapwrite mapaddr maphold mapbind +efi socket socknew bind sockbind connect listen accept send recv sockname sockopt shutdown +fork exec execprog waitpid kill killpid clock realns monons sleep sleepns random cwd +chdir fchdir envcnt envlen envread open openat fopen fclose fseek fsync fdsync fchmod +chmod chown umask unlink rename renames link symlnk mkdir makedir rmdir stat lstat +fstat getdnts faccess readlnk memfd ftrunc truncate pread pwrite ioctl flock syncfs +setpgid setsid +""".split()) +INSTRUCTION = re.compile(r"^\s*([0-9a-fA-F]+):\s+((?:[0-9a-fA-F]{2}[ \t]+)+)(.*?)\s*$") +DIAG = re.compile(rb"line ([0-9]+): error ([0-9]+)") +TARGET_PREFIX = b"target x86linux\n" +QEMU_IOCTL_URL = "https://github.com/qemu/qemu/blob/v10.0.14/linux-user/syscall.c#L5713-L5717" +QEMU_SYSCALL_SHA256 = "0d6212a547d456f47612a4c297e093dd60fe59ad021f44e3f21e5c6bb9be0cf7" +QEMU_ORACLE_SHA256 = "fd7ae7768c1d698d387893688d28abde90512f1f445d171a1389110eb7c237ee" +QEMU_SOURCE_ARCHIVE_SHA256 = "c7230968906fdb5540d803e2af1f515e77590a414f2a4dbd3ec9ada3c47083d0" +QEMU_IOCTL_EXCERPT = b""" if (ie->target_cmd == 0) { + qemu_log_mask( + LOG_UNIMP, "Unsupported ioctl: cmd=0x%04lx\\n", (long)cmd); + return -TARGET_ENOTTY; + } +""" + +# Inspected host fixtures at the source revision below. These are not authority +# to run a changed fixture: hashes pin exact reviewed effects. Drivers use local +# scratch paths, anonymous mappings, private children, invalid-fd ioctls and +# /dev/zero reads, never GPU nodes. Pinned sockets use relative Unix paths or +# OS-assigned loopback ports, not fixed ports/outbound endpoints/live services. +# Original gate.sh supplies the arguments/environment/expected statuses below. +HOST_PINS = """ +args 0e6bdbfb63ef9e52028682ddbecb1e9b4d81a3326b2e63848be570a775c31e6e +chdir 33f64d79ae5655a020d795f8f31b7e4cff9f8c176534e4474216a2709b04f759 +chmod 21ee5f82d67f2b286cbcd3c5e1242199f0b7b66f020caa98f5a53212d4245532 +chown 9e5d8e7f2fd5678c63ed95bbde66f9d6f753b42791701d45311bfe20dd7f4d17 +devcall ca76010ea6cf2ab7acd8b8fab36234dcaad8f2cede057e01a52e840842a2e8ed +directories c25fcaeb5e6fc0331b31d7f4af5aa5d00c87c5df6d99c8d2fa42456268e0124c +environment d798e64c66d39fa9cf6df29ed67026e747a8cff2e4c4f95f84ccc2ea8d01bff6 +environment_trap 93043b312007ee2dedce62d8a7a5d4601c34c80a4f142ce471270b585ce7dc66 +errors a6fcf6e1ede30da15f4ad75ea11173cd4d5001613ae424cd0b30eff62f96898a +faccess e4aec179deea0ab97c88ab0a274bba8fab2f1f0ca6d54b9829d8b724967e4087 +fchdir d647e8917878fc9e9b42b2d65102d302710e0592055bb84fa9fc67ce4b1d1c26 +fdsync 4a7bc7d82979b05511a5ea2cd8a7c51ebce6e36a52a3fc929b0e9db1f99e3733 +files 7599eaaa3936a7342b4825965f6fd0a0a2517075f12168b5bc54d4d06ddc5a4b +flock cb1c63d6738e4923018d3014be4358ef1d80b60f7c406db677b36b8684066fd1 +genlimit ea4f544b49878f5532f75b0ac7e8fa42e6926d5b57ea002e748679922859ad48 +links 9fa1710075bf9ce64bf57d3f0c6ffe8deac39a294bb8242c64ba185e8cb7cd3a +links_short 5cf587ad20927ccf7c2873f58d332623f1a2e60adac8efa2e3877d74647cdc98 +location 691bc9c2903c9c269ded9a55596ce1cb08adc693fe3e08ffcbf274b3e523a944 +lstat 544cf17cf26ab54eb71e42030027a6a171faccc084294e235c76c8df419a8a6f +mapio f657ff3daa44b070608178834b46f1f83ade03e65b73c00e05a1c2e2a9356267 +mapping b42c477a43862018dc0cb1f1c4f06374d1413130eeb112b6fd6b81132360c607 +pgroup 97cee434be0cc7dc8c27b2786747e2ecdd9dc31a33c558e5c54c20f787a19ece +pio d36aec6170344d4c3126212a092bc021e671c24ab3bc31871562847429767c80 +random cf1eff4a9e12ff42141d76dd0a2eb136ca345e9cbf9f4e3ee73d70abdd7e16fb +reserve 8498b995e3ee7a2d9ac86085af1674af7c14b57da5778051fc5e7a15406768dc +stat 6ff1b76d4fd35599e67684e706a5d66eec84584f51326c74a1fc35bec023ab60 +stat_short 628c9696acb656943ad68a4137a81fbfafdc1a1aafb59e0fe4a09332957b2600 +structfile 8a861930643b73590772a575f62985389eb6c1daf77820d37e88a8c648171505 +trunc 6a48633d31aa718ca9bd543a3c0ec134318d74005b31e6424bd4b0f920963764 +truncate 53dab870239429150e88616fe5173a0ad8637719cc15eac7bbf955f0e5662b3d +uvmctl 1e7b46b9d0fb44f5c97768f92daa7599e9b36e6d5cbc6553ac755a7c02047b5f +network a8b16320610b79bd0a3e96e303d631c1a9a00b6464d963f3d79c5b4e1ff2d514 +sockopt 0ee354c31e3e33c63da7cd8ade18cdf3f98d6d742adeedbffa506d746b5ff0c1 +netdata 6762de311b8b1cb4f1f9220bc3837b29733fcf382ac3c2cd19e8096c02789f88 +netpeer ed93e15648c6fe304cc28590065fab6d36887db448c253813b8a762ca9c61193 +process 0c1292a905cb1263a733e26f2e026a2915089d6d6959d16b617c05f446452964 +memcheck 652a4bc9455251bb51d01a75fc5be0ad008ae5e022e4835e43959f073c82413d +device 375898c6ac071af5ab50bb41fce6aa93ee5796302916cac65df70831c52d3d67 +psync 8355680fe35976dc5fd3621c3dc9b2ff8f6cc8b210ec90915d2044a4de133473 +""" +HOST_DRIVERS = {sha: name for name, sha in (row.split() for row in HOST_PINS.splitlines() if row)} + +# Explicit reviewed verdicts, not a name-prefix heuristic. The first comments +# of these manifests fix ctl PASS / mutant FAIL in advance; the lexical list's +# RESULTS.txt:38-43 describes exactly the listed refusals/format/diag failures. +CONDUCTOR_FAILURES = { + "seed/omc/contracts/mutant.cases": "mutant-requires mutant-proof", + "seed/omc/om2/s1/s1-mutants.cases": "m-rotl m-rchk m-hexd m-hexU m-optin m-paren m-unk m-tyunk m-kwlong", + "seed/omc/om2/s2/s2-mutants.cases": "m-div0 m-sovf m-ucount m-brk m-idx m-depth m-cyc", + "seed/omc/om2/s3/s3-mutants.cases": "m-l-ovl m-l-rev m-l-lix m-l-past m-fuel m-e16-d3 m-e16-inl m-fzu m-fzl m-fzc m-fzr m-fzn m-aer m-aex m-act m-aop m-araw", + "seed/omc/om2/s4/s4-mutants.cases": "m-uce m-slot m-pwrap m-pfirst m-p19 m-tramp m-preadwr m-textlen", + "seed/qualification/om2/candidates/s1/s1-lexmutants.cases": + "hex-upper-s1-d-hexupper hex-upper-s1-d-hexupper-plain hex-upper-s2-r6-upper hex-upper-s2-r6-mixed hex-upper-s2-r6-upper-ulong " + "hex-17-s2-r6-17small hex-17-s2-r6-17big diag-col0-s1-d-left diag-col0-s1-d-eof-left diag-col0-s1-d-hexrange diag-col0-s1-d-unknown-fn " + "fmt-note-s2-fmt-x1 fmt-note-s2-fmt-x3 fmt-text-s2-fmt-x1 fmt-text-s2-fmt-x5", + "seed/qualification/om2/candidates/s1/s1-mutants.cases": "", + "seed/qualification/om2/candidates/s2/s2-mutants.cases": "", + "seed/qualification/om2/candidates/s3/s3-mutants.cases": "", + "seed/qualification/om2/candidates/s4/s4-mutants.cases": "", + "seed/qualification/om2/candidates/s4/s4-part-mutants.cases": "", + "seed/qualification/om2/baseline/guard.cases": "", + "seed/qualification/om2/baseline/transform.cases": "", +} +HISTORICAL_COMPILERS = { + "build/om2-qual/cand-s1/omc.om": ("a5927895c02a5abe6b5c3a455f5d54303962ebe8", "3d7bcf9afdaa36fc42b862e0af39c524a14e85204bd5f40ee74107db40ce6a1d"), + "build/om2-qual/cand-s2/omc.om": ("7fb62f3a87104f48bb1317ab05333c5805ce5340", "1f41c7dc4f27324c2595c60f601e74548cd1bb4aeca8d4d367056ee803e7de72"), + "build/om2-qual/cand-s3/omc.om": ("ad220c054b2e018a985384a33bf09b9f0d612787", "656d4e25f503d38ae7523c758b37734b191ecc064d370ac7928011f25c02a3d6"), + "build/om2-qual/cand-s4/omc.om": ("f6a6492fd1a3b608f0413a75685ddbb712075a73", "c792b401193d8477d38965d6ddb0fd0cb8fd5ac24fcb92fae9af52037a765f1c"), +} +ORIGINAL_SOURCE = { + "path": "seed/omc/omc.om", + "git_revision": "acb3f15cdc691b1b046b48b0dad0f9255a12ba4b", + "git_path": "seed/omc/omc.om", + "sha256": "2e35db7d6c2066fb4a20d19b8a9579c44caca9c9937b0594a89422010b673637", +} +PINNED_COMPILER_SHA256 = "734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61" +MUTANT_SPECIFICATIONS = { + "seed/qualification/om2/sec/s3s4/mutant-kills.cases", + "seed/qualification/om2/sec/s5s7/mutant-side.cases", +} + + +def frozen_manifest(rel): + return rel.startswith("seed/qualification/om2/sec/") and rel.endswith("/pinned.cases") + + +def conductor_identity(rel): + if rel.startswith("seed/qualification/om2/candidates/"): + stage = rel.split("/")[4] + return "build/om2-qual/cand-" + stage + "/omc.om" + if frozen_manifest(rel) or rel.startswith("seed/qualification/om2/baseline/") or rel.endswith("/manifest-c2.txt"): + return "pinned" + return "current" +SELFTEST_MANIFESTS = { + "seed/qualification/om2/selftest/" + name + ".cases" + for name in ("controls", "emit", "fail", "pass") +} +DELIBERATELY_ABSENT = { + "seed/qualification/om2/selftest/does-not-exist", + "seed/qualification/om2/selftest/does-not-exist.om", +} + + +@dataclass +class Case: + name: str + source: bytes + stdin: bytes = b"" + args: tuple[str, ...] = () + expected_exit: int | None = None + expected_compile: str | None = None + operation: str = "differential" + stdout_oracle: str | None = None + stderr_oracle: str | None = None + same_source: bytes | None = None + driver: str | None = None + blocker: str | None = None + evidence: dict = field(default_factory=dict) + deadline: int | None = None + bridge: dict | None = None + + +class Failure(Exception): + pass + + +def digest(data): + return hashlib.sha256(data).hexdigest() + + +def fixture_files(): + roots = [ROOT / "tests", ROOT / "seed/qualification", ROOT / "seed/omc/om2", + ROOT / "seed/omc/contracts", ROOT / "tools/exp445/arms/examples"] + roots += sorted((ROOT / "seed").glob("*/tests")) + files = {p for root in roots if root.is_dir() for p in root.rglob("*") + if p.is_file() and (p.suffix in (".om", ".omegese", ".cases") or + (p.name.startswith("manifest-c2") and p.suffix == ".txt"))} + files.update((ROOT / "seed").glob("*/*.unit.om")) + files.add(ROOT / "seed/wasm/cases.tsv") + files.update((ROOT / "seed/spirv/demo.tsv", ROOT / "seed/spirv/regression.tsv")) + return sorted(files) + + +def contained(path): + p = (ROOT / path).resolve() + if not p.is_relative_to(ROOT): + raise Failure("fixture path escapes repository: " + path) + return p + + +def source_bytes(spec): + parts = [] + for part in spec.split("+"): + if part.startswith("pack:"): + path, off, length = part[5:].rsplit(":", 2) + off, length = int(off), int(length) + data = contained(path).read_bytes() + if off < 0 or length < 0 or off + length > len(data): + raise Failure("invalid pack range: " + part) + parts.append(data[off:off + length]) + elif part.startswith("cyc:"): + path, length = part[4:].rsplit(":", 1) + length = int(length) + data = contained(path).read_bytes() + if not data or length < 0: + raise Failure("invalid cyclic input: " + part) + parts.append((data * (length // len(data) + 1))[:length]) + elif part == "om/sha256/sha256.om" and not contained(part).exists(): + # Removed by the OM-2 cutover. The old caller uses omsha, not the + # current API: recover its EXACT frozen source, never alias APIs. + frozen = source_bytes("pack:seed/qualification/om2/c2/corpus.pack:12540:35333") + expected = "7f034814303a8a40b4bc56383ddd55ab2ae8460291f80793340bc3b0ac024e21" + if digest(frozen) != expected: + raise Failure("historical SHA source differs from independent c2/index.tsv pin") + parts.append(frozen) + else: + parts.append(contained(part).read_bytes()) + return b"".join(parts) + + +def stdin_bytes(spec): + if spec == "-": + return b"" + if spec.startswith("file:"): + return contained(spec[5:]).read_bytes() + if spec.startswith("rep:"): + _, byte, length = spec.split(":") + return bytes([int(byte)]) * int(length) + if spec.startswith("seq:"): + return bytes(i % 251 for i in range(int(spec[4:]))) + if spec.startswith("rnd:"): + _, seed, length = spec.split(":") + state, length, out = int(seed), int(length), bytearray() + mask = (1 << 64) - 1 + while len(out) < length: + state = (state + 0x9e3779b97f4a7c15) & mask + z = ((state ^ (state >> 30)) * 0xbf58476d1ce4e5b9) & mask + z = ((z ^ (z >> 27)) * 0x94d049bb133111eb) & mask + out.extend((z ^ (z >> 31)).to_bytes(8, "little")) + return bytes(out[:length]) + raise Failure("unknown stdin grammar: " + spec) + + +def host_words(source): + source = re.sub(rb'"(?:[^"\\]|\\.)*"', b'""', source) + source = re.sub(rb"(?m)^[ \t]*note[^\n]*", b"", source) + return sorted(set(re.findall(r"\b\w+\b", source.decode("utf-8", "replace"))) & UNSAFE) + + +def target_source(case, driver): + if driver not in ("directories", "fchdir"): + return case.source, None + # These exact pinned fixtures use the Linux AArch64 O_DIRECTORY literal. + # This is target-adapted ABI coverage, explicitly NOT identical-source parity. + old = b"len dir 16384 0" if driver == "directories" else b"len subd 16384 0" + if case.source.count(old) != 1: + raise Failure("reviewed O_DIRECTORY adaptation anchor changed") + return case.source.replace(old, old.replace(b"16384", b"65536")), "O_DIRECTORY: AArch64 16384 -> x86-64 65536" + + +def unit_cases(path): + # Same full-bit dumper as seed/wasm/gate-irwasm.sh, not a status-byte proxy. + dumper = b"""global dumpbuf uchar 8 +fn ir_dump x ulong to void +for j ulong 8 +put dumpbuf j uchar and shr x mul j 8 255 +end +p = ulong 0 +while lt p 8 bound 8 +k = write 1 dumpbuf p sub ulong 8 p +if le k 0 +exit 90 +end +p = add p ulong k +end +end +fn main to int +""" + for number, row in enumerate(path.read_text().splitlines(), 1): + if not row.strip() or row.startswith("#"): + continue + unit, function, result, typed, status = row.split() + if not re.fullmatch(r"\w+", unit) or not re.fullmatch(r"\w+", function): + raise Failure("invalid unit/function name in cases.tsv") + source_path = ROOT / ("seed/wasm/" + unit + ".unit.om") + if not source_path.is_file(): + source_path = ROOT / ("seed/spirv/" + unit + ".unit.om") + if not source_path.is_file(): + source_path = contained("tests/one_layer/omegese/dev/" + unit + ".omegese") + actual = [] + for item in (() if typed == "-" else typed.split(",")): + kind, value = item.split(":") + if kind == "bool" and value in ("true", "false"): + actual.append(value) + elif kind in ("byte", "uchar", "short", "ushort", "int", "uint", "long", "ulong") and re.fullmatch(r"-?\d+", value): + actual.append(kind + " " + value) + else: + raise Failure("unknown typed unit argument: " + item) + call = function + " " + " ".join(actual) + if result == "bool": + body = "if " + call + "\nir_dump ulong 1\nelse\nir_dump ulong 0\nend\n" + elif result == "void": + body = call + "\nir_dump ulong 0\n" + elif result in ("byte", "short", "int", "long"): + body = "ir_dump bitcast ulong long " + call + "\n" + elif result in ("uchar", "ushort", "uint", "ulong"): + body = "ir_dump ulong " + call + "\n" + else: + raise Failure("unknown unit result type: " + result) + source = source_path.read_bytes() + b"\n" + dumper + body.encode() + b"ret 0\nend\n" + yield Case(f"{path.relative_to(ROOT).as_posix()}:{number}:{unit}.{function}", source, + expected_exit=int(status), expected_compile="accept") + + +def positional_view_cases(): + # Mutability controls for the pread/pwrite writable-destination distinction. + # Invalid fd -1 makes accepted cases deterministic without filesystem effects. + for word, qualifier, accepted in (("pread", "view", False), + ("pread", "edit", True), + ("pwrite", "view", True), + ("pwrite", "edit", False)): + source = ( + "text ro \"abcd\"\n" + f"fn probe b {qualifier} uchar 4 to long\n" + f"ret {word} neg int 1 b 0 4 0\nend\nfn main to int\nrw = new uchar 4 0\n" + f"if ne probe {'rw' if word == 'pread' else 'ro'} neg long 9\n" + "ret 1\nend\nret 0\nend\n").encode() + yield Case(f"oracle-positional-{word}-{qualifier}", source, + expected_exit=0 if accepted else None, + expected_compile="accept" if accepted else "20") + + +def expanded_cases(files, record): + for case in cases(files, record): + plan = {} if case.operation in ("conductor", "bridge") else plan_case(ROOT, case.name.split(":", 1)[0], case.source) + if plan: + for key in ("source", "stdin", "args", "expected_exit", "driver", "blocker"): + if key in plan and (case.operation == "differential" or key in ("driver", "blocker")): + setattr(case, key, plan[key]) + case.evidence.update(plan.get("evidence", {})) + if "effects" in plan: + case.evidence["reviewed_effects"] = plan["effects"] + case.evidence.update(stdin_bytes=len(case.stdin), stdin_sha256=digest(case.stdin), + args=list(case.args), original_case=case.name) + yield case + driver = case.driver or HOST_DRIVERS.get(digest(case.source)) + if driver == "network" and not case.args: + yield Case(case.name + ":gate-host-tcp-loopback", case.source, args=("tcp",), expected_exit=0) + elif driver == "netdata" and not case.args: + for argument in ("1", "2", "3"): + yield Case(case.name + ":gate-host-bounds-" + argument, case.source, + args=(argument,), expected_exit=103) + elif driver == "memcheck": + # Read the conductor's literal-name and want assignments together. + # Literal ordering is not the case index (letters i/l/o/r are absent). + texts = {m[1]: literal_bytes(m[0])[0] for m in re.finditer( + rb'(?m)^[ \t]*text[ \t]+(\w+)[ \t]+"(?:[^"\\]|\\.)*"[^\n]*$', case.source)} + default = re.search(rb"(?m)^want = int (\d+)$", case.source) + arms = list(re.finditer( + rb"(?m)^if eq num (\d+)\nr = write fd (\w+) 0 len \2\n(?:want = (\d+)\n)?end$", case.source)) + if default is None or len(arms) != 36: + record("INVALID", case.name + ":embedded-refusals", + "memcheck conductor grammar changed; cannot infer expectations", + source_sha256=digest(case.source)) + continue + for arm in arms: + number, literal, code = arm.groups() + yield Case(case.name + ":embedded-refusal-" + number.decode(), texts[literal], + expected_compile=(code or default[1]).decode()) + yield from positional_view_cases() + current_sha = contained("om/sha256/sha256-om2.om").read_bytes() + yield Case("oracle-current-sha256-private-api", current_sha, driver="bare-private-abi", + expected_compile="accept", evidence={ + "source_spec": "om/sha256/sha256-om2.om", "source_sha256": digest(current_sha), + "scope": "current API, separate from frozen historical omsha composition and leak scanner"}) + + +@lru_cache(maxsize=None) +def conductor_resources(path): + """Exact transitive file allowlist for an original-conductor replay.""" + resources = {} + + def add(name): + if name in resources: + return + contained(name) + if path.relative_to(ROOT).as_posix() in SELFTEST_MANIFESTS and name in DELIBERATELY_ABSENT: + if contained(name).exists(): + raise Failure("original absent-input control unexpectedly exists: " + name) + return + if name in HISTORICAL_COMPILERS: + revision, sha = HISTORICAL_COMPILERS[name] + resources[name] = {"path": name, "sha256": sha, + "git_revision": revision, "git_path": "seed/omc/omc.om"} + elif name == "seed/omc/omc.om" and path.relative_to(ROOT).as_posix().startswith("seed/qualification/om2/baseline/"): + resources[name] = dict(ORIGINAL_SOURCE) + elif name == "om/sha256/sha256.om": + resources[name] = {"path": name, "sha256": "7f034814303a8a40b4bc56383ddd55ab2ae8460291f80793340bc3b0ac024e21", + "pack_path": "seed/qualification/om2/c2/corpus.pack", "offset": 12540, "length": 35333} + else: + resources[name] = {"path": name, "sha256": digest(contained(name).read_bytes())} + + def source(spec, review=False): + for segment in spec.split("+"): + if segment.startswith(("pack:", "cyc:")): + add(segment.split(":")[1]) + else: + add(segment) + if review: + if spec in DELIBERATELY_ABSENT and path.relative_to(ROOT).as_posix() in SELFTEST_MANIFESTS: + return + data = source_bytes(spec) + words = host_words(data) + if words and digest(data) not in HOST_DRIVERS and not plan_case(ROOT, spec, data): + raise Failure(f"original conductor source {spec} has unreviewed effects: {words}") + + add(path.relative_to(ROOT).as_posix()) + for constant in ("sha256-k", "sha256-iv"): + add("seed/qualification/om2/fixtures/" + constant + ".dec") + for line in path.read_text().splitlines(): + row = line.split() + if not row or row[0].startswith("#"): + continue + if path.relative_to(ROOT).as_posix() in SELFTEST_MANIFESTS and row[0] == "malformed": + continue # This exact reviewed control has no syntactically valid source field. + if row[0] == "subst": + for name in row[1:]: + add(name) + elif row[0] == "cc": + if row[1:] != ["pinned"]: + source("+".join(row[1:])) + elif len(row) > 2 and row[1] != "notrun": + source(row[2], review=row[1] in ("run", "kill")) + if row[1] == "same": + source(row[3]) + for spec in row[3:]: + if spec.startswith(("file:", "has:", "tok:")): + add(spec.split(":", 1)[1]) + return list(resources.values()) + + +@lru_cache(maxsize=None) +def selftest_expectations(path): + """Parse the original selftest's explicit comment groups, not case indices.""" + verdicts, group, overall = {}, None, None + for line in path.read_text().splitlines(): + if line.startswith("#"): + match = re.search(r"(?:expected|Expected)(?::\s+([\w-]+))?\s+(PASS|FAIL|INVALID|NOT_RUN)\b", line) + if match: + if match[1]: + verdicts[match[1]] = match[2] + else: + group = match[2] + elif "every case must PASS" in line: + group = "PASS" + exit_match = re.search(r"\bexit ([0-3])\b", line) + if exit_match: + overall = int(exit_match[1]) + continue + fields = line.split() + if not fields or fields[0] in ("subst", "cc", "deadline"): + continue + if fields[0] not in verdicts: + if group is None: + raise Failure("selftest case has no explicit comment verdict: " + line) + verdicts[fields[0]] = group + return verdicts, overall + + +def conductor_case(path, name, line, alternate, compiler_subst): + rel = path.relative_to(ROOT).as_posix() + selftest = rel in SELFTEST_MANIFESTS + old_om2_refusal = (rel == "seed/qualification/om2/leak/leak.cases" + and line.split()[0] == "s1-rot-refused") + historical = frozen_manifest(rel) or rel.endswith("/manifest-c2.txt") or old_om2_refusal + adequacy = rel == "seed/qualification/om2/baseline/adequacy.cases" + if not selftest and not historical and not adequacy and rel not in CONDUCTOR_FAILURES: + raise Failure(f"alternate compiler manifest has no reviewed original-verdict authority: {rel}") + resources = conductor_resources(path) + original_name = line.split()[0] + expected = (selftest_expectations(path)[0][original_name] if selftest else + ("FAIL" if adequacy or original_name in CONDUCTOR_FAILURES.get(rel, "").split() else "PASS")) + historical_failure = None + if rel == "seed/qualification/om2/candidates/s2/s2-mutants.cases": + failures = {"unroll-kplus1-kill-unroll-nest": "compile exit=21 expected=0"} + for arm, code in (("B", 101), ("C", 105), ("D", 107), ("E", 101), + ("F", 101), ("H", 105), ("I", 102)): + failures["fold-div0-kill-fold-trap-" + arm] = ( + f"run exit={code} expected=0 mutant survived: stdout equals the oracle " + "stderr=match; not a meaningful kill") + if original_name in failures: + if digest(path.read_bytes()) != "0ac554e4497232cc1ba99caca4e07cb12c62b5e3dd1c4af027864a31b29fbc64": + raise Failure("historical S2 failure contract manifest changed") + historical_failure = { + "original_expected": expected, "original_observed": "FAIL", + "exact_verdict": f"VERDICT {original_name} FAIL {failures[original_name]}", + "scope": "historical failed experiment; reproduction is not a successful mutant kill"} + authority = "\n".join(row for row in path.read_text().splitlines() if row.startswith("#")) + authority_path = rel + if rel.endswith("s1-lexmutants.cases"): + authority_path = "seed/qualification/om2/candidates/s1/RESULTS.txt" + authority = "\n".join(contained(authority_path).read_text().splitlines()[37:43]) + return Case(name, contained("seed/qualification/om2/gate.om").read_bytes(), + driver="corpus-gate", operation="conductor", + expected_compile="accept", evidence={ + "manifest": rel, "resources": resources, "conductor_row": line, + "alternate_compiler": alternate, "compiler_substitution": compiler_subst, + "child_compiler_identity": "pinned" if old_om2_refusal else conductor_identity(rel), + "expected_failure_reason": "mutant survived" if adequacy else None, + "control_kind": "supervisor_verdict_control" if selftest else ("compiler_mutant" if expected == "FAIL" else "compiler_control"), + "expected_overall_exit": selftest_expectations(path)[1] if selftest else None, + "expected_original_conductor": expected, "original_case_name": original_name, + "historical_failure": historical_failure, + "authority": {"path": authority_path, "sha256": digest(contained(authority_path).read_bytes()), + "quote": authority}}) + + +def current_c2_contract(fields): + """Use the already accepted deltas, retaining the frozen replay separately.""" + for relative in ("seed/qualification/om2/manifest-c2-capacity.txt", + "seed/qualification/om2/manifest-c2-batch2.txt"): + path = ROOT / relative + for line in path.read_text().splitlines(): + replacement = line.split() + if not replacement or replacement[0].startswith("#") or replacement[0] != fields[0]: + continue + if replacement[1:3] != fields[1:3]: + raise Failure("current C2 delta changed the frozen operation or input") + return replacement, {"path": relative, "sha256": digest(path.read_bytes()), + "frozen_row": " ".join(fields), "current_row": line} + return fields, None + + +def cases(files, record): + for path in files: + rel = path.relative_to(ROOT).as_posix() + if path.suffix == ".tsv": + try: + yield from unit_cases(path) + except (OSError, ValueError, Failure) as error: + record("MISSING_INPUT", rel, str(error)) + continue + if path.suffix in (".om", ".omegese"): + source = path.read_bytes() + # Conductors are real compiler inputs too. Their effects are gated + # by reviewed drivers, not dropped just because they test a checker. + yield Case(rel, source) + if rel in ("seed/rung4/tests/echo.om", "seed/rung4/tests/bytecopy.om"): + yield Case(rel + ":gate4-nonempty", source, stdin_bytes("seq:50000")) + continue + alternate, compiler_subst, subst = None, None, None + deadline = 30 # Original gate.om's documented default, seconds. + for number, line in enumerate(path.read_text().splitlines(), 1): + fields = line.split() + if not fields or fields[0].startswith("#"): + continue + name = f"{rel}:{number}:{fields[0]}" + if fields[0] == "cc": + alternate = None if fields[1:] == ["pinned"] else "+".join(fields[1:]) + compiler_subst, subst = subst, None + record("EXCLUDED", name, + f"compiler-selection directive {' '.join(fields[1:])}; subsequent rows retain this compiler identity", + conductor_row=line, compiler_substitution=compiler_subst) + continue + if fields[0] == "deadline": + if len(fields) != 2 or not fields[1].isdigit() or not 1 <= int(fields[1]) <= 900: + record("INVALID", name, "deadline requires original conductor's integer seconds 1..900", conductor_row=line) + continue + deadline = int(fields[1]) + record("EXCLUDED", name, + f"conductor-only metadata: exact {deadline}-second deadline attached to subsequent child arms", + conductor_row=line, manifest_sha256=digest(path.read_bytes())) + continue + if fields[0] == "subst": + subst = fields[1:] + record("EXCLUDED", name, + f"stateful substitution {' '.join(fields[1:])}; not a standalone source; interpreted by the next arm or complete original selftest conductor", + conductor_row=line, manifest_sha256=digest(path.read_bytes()), substitution_paths=fields[1:]) + continue + if len(fields) < 2: + record("INVALID", name, "malformed conductor row", conductor_row=line) + continue + mode = fields[1] + if rel == "seed/qualification/om2/leak/leak.cases" and fields[0] == "s1-rot-refused": + yield conductor_case(path, name + ":frozen-provenance", line, None, None) + current_path = ROOT / "seed/qualification/om2/leak/candidate.cases" + current = next(row for row in current_path.read_text().splitlines() + if row.startswith("s1-rot-build ")) + replacement = current.split() + if replacement[1:] != ["emit", fields[2], "any", "-", "0"]: + raise Failure("current OM-2 acceptance contract changed") + yield Case(name + ":current", source_bytes(fields[2]), expected_compile="accept", + operation="emit", stdout_oracle="any", stderr_oracle="-", + evidence={"historical_obligation": name, "accepted_current_contract": { + "path": current_path.relative_to(ROOT).as_posix(), + "sha256": digest(current_path.read_bytes()), "row": current}}) + continue + if frozen_manifest(rel): + yield conductor_case(path, name, line, None, None) + # The old compiler's oracle remains a separate, mandatory replay. + # Current code generation is additionally compared, not substituted. + source = source_bytes(fields[2]) + yield Case(name + ":current-differential", source, + stdin=stdin_bytes(fields[3]) if fields[1] == "run" else b"", + args=tuple(fields[7:]) if fields[1] == "run" else (), + evidence={"historical_obligation": name, "conductor_row": line}) + continue + if rel == "seed/qualification/om2/baseline/adequacy.cases": + yield conductor_case(path, name, line, None, None) + subst = None + continue + if rel in MUTANT_SPECIFICATIONS and mode != "notrun": + matches = [] + for candidate in sorted((ROOT / "seed/qualification/om2/candidates").rglob("*mutants.cases")): + for candidate_line in candidate.read_text().splitlines(): + candidate_fields = candidate_line.split() + if candidate_fields and candidate_fields[1:] == fields[1:]: + matches.append(conductor_case(candidate, name, candidate_line, None, None)) + if not matches: + record("FAIL", name, "mutant specification has no executable compiler mutation", conductor_row=line) + else: + obligation = matches[0] + replays = [dict(item.evidence) for item in matches] + obligation.evidence["mutant_specification"] = {"path": rel, "line": number, "row": line} + obligation.evidence["required_mutant_replays"] = replays + yield obligation + continue + if rel in SELFTEST_MANIFESTS: + try: + yield conductor_case(path, name, line, alternate, compiler_subst) + except (OSError, ValueError, Failure) as error: + record("FAIL", name, str(error), conductor_row=line) + subst = None + continue + if mode == "notrun": + try: + binding = bridge_plan(ROOT, name) + except (OSError, ValueError, Failure) as error: + record("FAIL", name, "reviewed bridge plan: " + str(error), conductor_row=line) + continue + if binding: + if binding["operation"] == "units-check": + source = contained(binding["script"]).read_bytes() + elif "driver_source" in binding: + source = binding["driver_source"] + else: + source = contained(binding["driver"]).read_bytes() + yield Case(name, source, driver="external-c-boundary", operation="bridge", bridge=binding, + args=tuple(binding["args"]), expected_exit=binding["expected_exit"], + evidence={"conductor_row": line, "unit_sources": binding["units"], + "driver_sha256": binding["driver_sha256"], **binding["evidence"]}) + continue + plan = directive_plan(ROOT, name) + evidence = {"conductor_row": line, **(plan.get("evidence", {}) if plan else {})} + if plan and "source" in plan: + yield Case(name, plan["source"], stdin=plan.get("stdin", b""), + args=tuple(plan.get("args", ())), driver=plan.get("driver"), + expected_exit=plan.get("expected_exit"), + expected_compile=plan.get("expected_compile", "accept"), + operation=plan.get("operation", "differential"), evidence=evidence, deadline=deadline, + stdout_oracle=plan.get("stdout_oracle"), stderr_oracle=plan.get("stderr_oracle")) + else: + reason = plan.get("blocker", " ".join(fields[2:])) if plan else " ".join(fields[2:]) + record("BLOCKED" if reason.startswith("BLOCKED_ON ") else "NOT_RUN", + name, reason, evidence=evidence, conductor_row=line) + continue + if alternate: + try: + yield conductor_case(path, name, line, alternate, compiler_subst) + except (OSError, ValueError, Failure) as error: + record("BLOCKED", name, str(error), conductor_row=line, + alternate_compiler=alternate, compiler_substitution=compiler_subst) + subst = None + continue + try: + source = source_bytes(fields[2]) + if rel.endswith("/manifest-c2.txt"): + frozen = conductor_case(path, name + ":frozen-provenance", line, None, None) + yield frozen + evidence = {"conductor_row": line, "source_spec": fields[2], "conductor_deadline_seconds": deadline} + if rel.endswith("/manifest-c2.txt"): + fields, replacement = current_c2_contract(fields) + if replacement: + evidence["accepted_current_contract"] = replacement + if "om/sha256/sha256.om" in fields[2]: + evidence["historical_source"] = { + "path": "om/sha256/sha256.om", "revision": "acb3f15", + "packed_spec": "pack:seed/qualification/om2/c2/corpus.pack:12540:35333", + "sha256": "7f034814303a8a40b4bc56383ddd55ab2ae8460291f80793340bc3b0ac024e21", + "provenance": "seed/qualification/om2/c2/index.tsv:c2-00003"} + if subst is not None: + if mode == "same": + raise Failure("original conductor forbids substitution before same") + if len(subst) != 2: + raise Failure("malformed subst directive") + old, new = (source_bytes(part) for part in subst) + if not old or source.count(old) != 1: + raise Failure("subst source must contain FROMFILE exactly once") + source = source.replace(old, new) + evidence["source_substitution"] = subst + subst = None + if mode in ("run", "kill") and len(fields) >= 7: + yield Case(name, source, stdin_bytes(fields[3]), tuple(fields[7:]), + expected_exit=int(fields[6]), expected_compile="accept", + operation=mode, stdout_oracle=fields[4], stderr_oracle=fields[5], evidence=evidence, deadline=deadline) + elif mode == "emit" and len(fields) == 6: + code = int(fields[5]) + yield Case(name, source, expected_exit=code, + expected_compile="accept" if code == 0 else str(code), + operation=mode, stdout_oracle=fields[3], stderr_oracle=fields[4], evidence=evidence, deadline=deadline) + elif mode == "refuse" and len(fields) == 4: + yield Case(name, source, expected_compile=fields[3], operation=mode, evidence=evidence, deadline=deadline) + elif mode == "same" and len(fields) == 4: + yield Case(name, source, expected_compile="accept", operation=mode, + same_source=source_bytes(fields[3]), evidence=evidence, deadline=deadline) + else: + record("INVALID", name, "unknown/malformed conductor operation " + mode, conductor_row=line) + except (OSError, ValueError, Failure) as error: + record("MISSING_INPUT", name, str(error), conductor_row=line) + + +def limits(): + resource.setrlimit(resource.RLIMIT_CORE, (0, 0)) + resource.setrlimit(resource.RLIMIT_FSIZE, (64 * 1024 * 1024, 64 * 1024 * 1024)) + resource.setrlimit(resource.RLIMIT_NOFILE, (256, 256)) + + +def run(command, data, cwd, timeout, *, extra_env=None): + # Regular-file stdin matches seekable-input fixtures; no shell interpolation. + with tempfile.TemporaryFile() as inp, tempfile.TemporaryFile() as out, tempfile.TemporaryFile() as err: + inp.write(data) + inp.seek(0) + process = subprocess.Popen(command, stdin=inp, stdout=out, stderr=err, cwd=cwd, + env={"LC_ALL": "C", "PATH": os.defpath, "HOME": ".", "OMTEST": "hello", **(extra_env or {})}, + start_new_session=True, preexec_fn=limits) + try: + process.wait(timeout=timeout) + except subprocess.TimeoutExpired: + os.killpg(process.pid, signal.SIGKILL) + process.wait() + out.seek(0, os.SEEK_END) + out.seek(max(0, out.tell() - 4096)) + err.seek(0, os.SEEK_END) + err.seek(max(0, err.tell() - 4096)) + raise Failure(f"child timeout after {timeout}s: {command!r}; stdout_tail={out.read()!r}; stderr_tail={err.read()!r}") + finally: + # Also remove descendants of a child which exited before its children. + try: + os.killpg(process.pid, signal.SIGKILL) + except ProcessLookupError: + pass + out.seek(0) + err.seek(0) + return process.returncode, out.read(), err.read() + + +def elf_range(image): + if len(image) < 64 or image[:6] != b"\x7fELF\x02\x01": + raise Failure("not ELF64 little endian") + if struct.unpack_from(" len(image): + raise Failure("truncated ELF program headers") + kind, flags, offset, address, _, length, _, _ = struct.unpack_from("= end or image[p + 5] != 0x90: + continue + data_start = p + 6 + data_end = data_start + len(literal) + if (data_end <= after <= data_end + 3 and after <= end and + image[data_start:data_end] == literal and + image[data_end:after] == b"\0" * (after - data_end)): + candidates.append((p, data_start, after)) + locations[literal] = candidates + earliest, latest = [], [] + lower = start + for literal in literals: + candidate = next((c for c in locations[literal] if c[0] >= lower), None) + if candidate is None: + raise Failure("ORACLE_COVERAGE_MISSING no ordered branch-around location for source literal") + earliest.append(candidate) + lower = candidate[2] + upper = end + for literal in reversed(literals): + candidate = next((c for c in reversed(locations[literal]) if c[2] <= upper), None) + if candidate is None: + raise Failure("ORACLE_COVERAGE_MISSING no reverse ordered literal mapping") + latest.append(candidate) + upper = candidate[0] + if earliest != list(reversed(latest)): + raise Failure("ORACLE_COVERAGE_MISSING ambiguous ordered literal mapping") + for p, data_start, after in earliest: + spans.append((cursor, data_start)) + carveouts.append((data_start, after)) + cursor = after + spans.append((cursor, end)) + return [(a, b, address) for a, b in spans if b > a], carveouts + + +def oracle_elf(code, address): + # An oracle-only ELF wrapper exposes a code span to either disassembler. It + # does not transform or implement the candidate instructions. + names = b"\0.text\0.shstrtab\0" + names_at = 64 + len(code) + sections_at = (names_at + len(names) + 7) & ~7 + header = struct.pack("<16sHHIQQQIHHHHHH", b"\x7fELF\x02\x01\x01" + bytes(9), + 1, 62, 1, 0, 0, sections_at, 0, 64, 0, 0, 64, 3, 2) + text = struct.pack("|\.byte|\.word|\.short|\.long|\.quad", asm): + raise Failure("invalid instruction: " + line) + mnemonic = asm.split()[0] + if mnemonic in ("rex", "rex.W", "data16", "addr32", "rep", "repz", "repnz", "lock") and len(asm.split()) == 1: + raise Failure("orphan instruction prefix: " + line) + mnemonics[mnemonic] += 1 + instructions.append((offset, raw, asm)) + cursor += len(raw) + if cursor >= base + chunk_end: + break + if cursor < base + chunk_end or cursor > base + end: + raise Failure(f"disassembler did not cover every code byte: stopped {cursor:x}, expected chunk {base + chunk_end:x}") + boundaries = {base + offset for offset, _, _ in instructions} + for offset, raw, asm in instructions: + branch = re.match(r"(?:j\w+|callq?)\s+(?:0x)?([0-9a-fA-F]+)(?:\s|$)", asm) + if branch and int(branch[1], 16) not in boundaries: + raise Failure("direct control-flow target is not a decoded instruction boundary: " + asm) + return mnemonics, instructions, carveouts + + +def normalized_diagnostics(error, shift): + """Undo ONLY the known selector's source-coordinate translation. + + xlead replaces the 14 selector characters by spaces but keeps its LF. + Human and structured line fields move by one, absolute spans by 15 bytes. + Columns, codes, token bytes, obligations and all other text stay exact. + """ + if not shift: + return error + translated = [] + for line in error.splitlines(keepends=True): + if line.startswith(b"omc: line "): + line = re.sub(rb"(?<=line )\d+(?=: error )", + lambda m: str(int(m[0]) - shift if int(m[0]) else 0).encode(), line) + elif re.match(rb"omc-(?:diag|site|check) 1 ", line): + line = re.sub(rb"(?<=line=)\d+", + lambda m: str(int(m[0]) - shift if int(m[0]) else 0).encode(), line) + line = re.sub(rb"(?<=span=)(\d+)-(\d+)", + lambda m: f"{int(m[1]) - shift * len(TARGET_PREFIX)}-{int(m[2]) - shift * len(TARGET_PREFIX)}".encode(), + line) + translated.append(line) + return b"".join(translated) + + +def source_site_diagnostics(native, target, source_lines): + """Compare reviewed source sites, retaining architecture-specific stub tables.""" + allowed = set(source_lines) + + def parse(data): + other, all_sites, source_sites, seen = [], [], [], set() + for line in data.splitlines(keepends=True): + if not line.startswith(b"omc-site "): + other.append(line) + continue + match = re.fullmatch(rb"omc-site 1 line=(\d+) iter=(-|\d+(?:\.\d+)*)\n", line) + if not match: + raise Failure("malformed compiler site record: " + repr(line)) + site = int(match[1]), match[2].decode() + all_sites.append(site) + if site[0] in allowed and site not in seen: + source_sites.append(site) + seen.add(site) + return b"".join(other), all_sites, source_sites + + left, right = parse(native), parse(target) + observation = {"native_sites": left[1], "x86_normalized_sites": right[1], + "native_source_sites": left[2], "x86_source_sites": right[2], + "reviewed_source_lines": source_lines, + "comparison": "ordered first-occurrence (source line, unrolled iteration); all non-site diagnostic bytes exact"} + if not left[2] or left[0] != right[0] or left[2] != right[2]: + raise Failure("source-level site/non-site compiler diagnostic differential: " + str(observation)) + return observation + + +@lru_cache(maxsize=1) +def diagnostic_contracts(): + path = ROOT / "seed/omc/x86-diagnostic-contracts.json" + document = json.loads(path.read_text()) + if document["schema"] != 1: + raise Failure("unsupported target diagnostic contract schema") + contracts = {} + for entry in document["contracts"]: + key = entry["source_sha256"] + if key in contracts or digest(source_bytes(entry["source_spec"])) != key: + raise Failure("duplicate or stale target diagnostic contract: " + entry["source_spec"]) + contracts[key] = entry + return contracts + + +def target_diagnostic_contract(source, native, target): + """Assert exact records, never discard target-specific safety checks.""" + contract = diagnostic_contracts().get(digest(source)) + if contract is None: + return None + for architecture, actual in (("aarch64", native), ("x86_64", target)): + expected = contract[architecture] + if actual[0] != expected["exit"] or actual[2] != expected["stderr"].encode(): + raise Failure("exact target diagnostic contract differs: " + architecture) + if expected["exit"]: + refusal(actual, 0) # Refusals must still be clean, with no artifact. + return {"path": "seed/omc/x86-diagnostic-contracts.json", + "sha256": digest((ROOT / "seed/omc/x86-diagnostic-contracts.json").read_bytes()), + "source_spec": contract["source_spec"], "reason": contract["reason"], + "x86_execution": contract.get("x86_execution")} + + +def refusal(result, shift): + rc, output, error = result + match = DIAG.search(error) + if rc <= 0 or output or not match or int(match[2]) != rc: + raise Failure("not a clean compiler refusal") + return rc, output, normalized_diagnostics(error, shift) + + +def matches_oracle(actual, spec): + if spec is None or spec == "any": + return True + if spec == "-": + return actual == b"" + if spec.startswith("sha:"): + return digest(actual) == spec[4:] + if spec.startswith("file:"): + return actual == contained(spec[5:]).read_bytes() + if spec.startswith("line:"): + return actual == spec[5:].encode() + b"\n" + if spec.startswith("err:"): + _, line, code = spec.split(":") + return actual == f"omc: line {line}: error {code}\n".encode() + if spec.startswith(("has:", "tok:")): + kind, path = spec.split(":", 1) + expected = contained(path).read_bytes().splitlines() + observed = actual.splitlines() + if kind == "has": + return all(line in observed for line in expected) + return all(any(all(word in line.split() for word in wanted.split()) + for line in observed) for wanted in expected) + raise Failure("unknown output oracle grammar: " + spec) + + +def assert_oracle(actual, spec, label, different=False): + matched = matches_oracle(actual, spec) + if matched == different: + raise Failure(f"{label} {'mutant survived (equals)' if different else 'differs from'} " + f"oracle {spec}: bytes={len(actual)} sha256={digest(actual)} " + f"prefix={actual[:160]!r}") + + +def result_details(result): + return {"exit": result[0], "stdout_bytes": len(result[1]), + "stdout_sha256": digest(result[1]), "stdout_prefix": repr(result[1][:160]), + "stderr_bytes": len(result[2]), "stderr_sha256": digest(result[2]), + "stderr": result[2][:8192].decode("utf-8", "backslashreplace")} + + +def ioctl_emulator_artifact(case, driver, arun, xrun, qemu, argv0, args, cwd, timeout): + # Not a PASS or an errno waiver: challenge the exact failed syscall under + # QEMU's own tracer, after the pinned native fixture has passed its EBADF + # assertions. Unknown ioctls are rejected before host ioctl(fd,cmd,arg). + request = {"devcall": 3223340587, "uvmctl": 805306369}.get(driver) + if digest(Path(qemu).read_bytes()) != QEMU_ORACLE_SHA256: + return None # No source attribution for an unreviewed QEMU executable. + if request is None or arun[0] != 0 or xrun != (80, b"", b""): + return None + trace = run([qemu, "-strace", "-0", argv0, argv0, *args], case.stdin, cwd, timeout) + if trace[:2] != xrun[:2]: + return None + for line in trace[2].splitlines(): + match = re.search(rb"ioctl\(-1,([^,]+),.*\)\s*=\s*-1 errno=25\b", line) + if match: + try: + observed = int(match[1], 0) & 0xffffffff + except ValueError: + continue + if observed == request: + return {"classification": "EMULATOR_ARTIFACT", "syscall": "ioctl", "fd": -1, + "request": request, "native_required_errno": "EBADF", + "qemu_observed_errno": "ENOTTY", "qemu_trace_line": line.decode(), + "qemu_trace_sha256": digest(trace[2]), + "upstream_source": QEMU_IOCTL_URL, + "upstream_source_sha256": QEMU_SYSCALL_SHA256, + "upstream_checked_source_path": "/home/drakestapleton/work/bridge-x86/build/qemu-oracle/qemu-10.0.14/linux-user/syscall.c", + "upstream_source_archive": "https://download.qemu.org/qemu-10.0.14.tar.xz", + "upstream_source_archive_sha256": QEMU_SOURCE_ARCHIVE_SHA256, + "qemu_binary_sha256": QEMU_ORACLE_SHA256, + "upstream_excerpt": QEMU_IOCTL_EXCERPT.decode(), + "upstream_excerpt_sha256": digest(QEMU_IOCTL_EXCERPT)} + return None + + +def filesystem_snapshot(directory, excluded): + """Compare persistent effects, not inode/timestamp/owner allocation noise.""" + snapshot = {} + for path in sorted(directory.rglob("*")): + rel = path.relative_to(directory).as_posix() + if rel in excluded: + continue + info = path.lstat() + entry = {"mode": stat.S_IMODE(info.st_mode)} + if stat.S_ISLNK(info.st_mode): + entry.update(type="symlink", target=os.readlink(path)) + elif stat.S_ISREG(info.st_mode): + entry.update(type="file", bytes=info.st_size, sha256=digest(path.read_bytes())) + elif stat.S_ISDIR(info.st_mode): + entry.update(type="directory") + else: + entry.update(type=stat.S_IFMT(info.st_mode)) + snapshot[rel] = entry + return snapshot + + +def exercise_bare(case, default, x86, qemu, cwd, timeout): + specs = bare_calls(ROOT, case.name.split(":", 1)[0], case.source) + outcomes = [] + for number, spec in enumerate(specs): + runs, wrappers = [], [] + for arch, image in (("aarch64", default), ("x86_64", x86)): + work = cwd / f"caller-{number}-{arch}" + work.mkdir() + wrapped = wrap_bare(image, case.source, arch, spec) + binary = work / "caller" + binary.write_bytes(wrapped) + binary.chmod(0o700) + wrappers.append(digest(wrapped)) + command = ["./caller"] if arch == "aarch64" else [qemu, "-0", "./caller", "./caller"] + runs.append(run(command, case.stdin, work, timeout)) + if runs[0][0] < 0 or runs[1][0] < 0 or runs[0] != runs[1]: + raise Failure(f"bare caller {spec['name']} differs: default={result_details(runs[0])}; x86={result_details(runs[1])}") + expected_exit = spec.get("expected_exit", 0) + if expected_exit is not None and runs[0][0] != expected_exit: + raise Failure(f"bare caller {spec['name']} exit {runs[0][0]}, expected {expected_exit}") + if "expected_stdout" in spec and runs[0][1] != spec["expected_stdout"]: + raise Failure(f"bare caller {spec['name']} full-width return/array oracle differs: " + f"expected={spec['expected_stdout']!r}; actual={runs[0][1]!r}") + outcomes.append({"name": spec["name"], "evidence": spec.get("evidence", {}), + "caller_inputs": {"slots": spec.get("slots", []), + "calls": spec.get("calls", []), + "arrays": [{key: value for key, value in array.items() if key != "data"} | + {"initial_bytes": len(array.get("data", b"")), + "initial_sha256": digest(array.get("data", b""))} + for array in spec["arrays"]]}, + "expected_exit": expected_exit, "observed": result_details(runs[0]), + "oracle": "independent full-width/array oracle" if "expected_stdout" in spec else "native differential", + "wrapper_sha256": dict(zip(("aarch64", "x86_64"), wrappers))}) + return outcomes + + +def exercise_conductor(case, default, x86, compiler, qemu, cwd, timeout): + runs, effects = [], [] + # The original conductor itself enforces each directive's child deadline. + # Its enclosing process must have time for all declared compile/run arms. + lines = contained(case.evidence["manifest"]).read_text().splitlines() + outer_timeout = max(timeout, 60) * max(1, len(lines)) + for arch, image in (("aarch64", default), ("x86_64", x86)): + work = cwd / ("conductor-" + arch) + work.mkdir() + binary = work / "conductor" + binary.write_bytes(image) + binary.chmod(0o700) + args = prepare_case(ROOT, work, "corpus-gate", compiler, case=case.evidence) + command = ["./conductor", *args] if arch == "aarch64" else [qemu, "-0", "./conductor", "./conductor", *args] + runs.append(run(command, b"", work, outer_timeout)) + effects.append(filesystem_snapshot(work, {"conductor"})) + if runs[0] != runs[1] or effects[0] != effects[1]: + raise Failure(f"original conductor architecture differential: native={result_details(runs[0])}; x86={result_details(runs[1])}; filesystem_equal={effects[0] == effects[1]}; native_log={runs[0][1]!r}; x86_log={runs[1][1]!r}") + if runs[0][0] not in (0, 1, 2, 3) or b"OM2GATE " not in runs[0][1]: + raise Failure(f"original conductor invalid/setup failure: {result_details(runs[0])}; original_log={runs[0][1]!r}") + verdicts, directives = {}, [] + for match in re.finditer(rb"(?m)^VERDICT ([^ \n]+) (PASS|FAIL|INVALID|NOT_RUN)([^\n]*)$", runs[0][1]): + name = match[1].decode() + verdict = {"status": match[2].decode(), "line": match[0].decode()} + if name in ("cc", "subst", "deadline"): + directives.append(verdict) + continue + if name in verdicts: + raise Failure("original conductor emitted duplicate case name: " + name) + verdicts[name] = verdict + return {"exit": runs[0][0], "stdout": runs[0][1].decode(), "stdout_sha256": digest(runs[0][1]), "stderr": runs[0][2].decode(), + "verdicts": verdicts, "directive_verdicts": directives, + "filesystem_sha256": digest(json.dumps(effects[0], sort_keys=True).encode())} + +def exercise_bridge(plan, compiler, qemu, options, scratch, state): + key = plan["cache_key"] + if key in state["errors"]: + raise Failure(state["errors"][key]) + try: + return _exercise_bridge(plan, compiler, qemu, options, scratch, state) + except (OSError, ValueError, Failure) as error: + state["errors"][key] = str(error) + raise Failure(str(error)) from error + + +def _exercise_bridge(plan, compiler, qemu, options, scratch, state): + """Use original reviewed callers and generated native bindings, never raw-ABI substitutes.""" + if plan["cache_key"] in state["results"]: + return state["results"][plan["cache_key"]] + if not options.bridge or not options.bridge.is_file(): + raise Failure("BLOCKED_ON BridgeX86: --bridge must name its reviewed tools/native executable") + bridge = options.bridge.resolve() + bridge_root = bridge.parents[1] + work = scratch / ("bridge-" + plan["cache_key"]) + work.mkdir() + + def copy_resources(items, directory): + for item in items: + data = (git_resource(ROOT, item) if "git_revision" in item + else contained(item["path"]).read_bytes()) + if digest(data) != item["sha256"]: + raise Failure("reviewed bridge input changed: " + item["path"]) + dest = directory / item["path"] + dest.parent.mkdir(parents=True, exist_ok=True) + dest.write_bytes(data) + + def git_resource(repository, item): + result = run(["git", "-C", str(repository), "show", + item["git_revision"] + ":" + item["git_path"]], b"", work, options.timeout) + if result[0] or digest(result[1]) != item["sha256"]: + raise Failure(f"pinned bridge resource unavailable/mismatched: {repository} {item}: {result_details(result)}") + return result[1] + + def mutate(path, mutation): + data = path.read_bytes() + if "append" in mutation: + data += mutation["append"] + else: + count = data.count(mutation["old"]) + if count != mutation["count"]: + raise Failure(f"reviewed mutation {path} expected {mutation['count']} matches, found {count}; " + f"source_sha256={digest(data)} old_hex={mutation['old'].hex()} new_hex={mutation['new'].hex()}") + data = data.replace(mutation["old"], mutation["new"]) + path.write_bytes(data) + return {"path": str(path.relative_to(work)), "sha256": digest(data), + "old_hex": mutation.get("old", b"").hex(), "new_hex": mutation.get("new", mutation.get("append", b"")).hex()} + + if plan["operation"] == "units-check": + tree = work / "tree" + tree.mkdir() + copy_resources(plan["resources"], tree) + old_compiler = work / "pinned-omc" + old_compiler.write_bytes(git_resource(ROOT, plan["strict_compiler"])) + old_compiler.chmod(0o700) + old_bridge = work / "pinned-bridge" + (old_bridge / "src").mkdir(parents=True) + (old_bridge / "src/native.om").write_bytes(git_resource(bridge_root, plan["strict_generator"])) + temp = work / "tmp" + temp.mkdir() + environment = {"OMEGA_OMC": str(old_compiler), "OMEGA_BRIDGE": str(old_bridge), "TMPDIR": str(temp)} + command = ["sh", str(tree / plan["script"]), *plan["args"]] + before = filesystem_snapshot(tree, set()) + positive = run(command, b"", tree, options.timeout, extra_env=environment) + if positive[0] != plan["positive_control_expected_exit"] or filesystem_snapshot(tree, set()) != before: + raise Failure(f"original strict gate positive control failed or wrote source: {result_details(positive)}") + mutation = mutate(tree / plan["mutation"]["path"], plan["mutation"]) + before = filesystem_snapshot(tree, set()) + negative = run(command, b"", tree, options.timeout, extra_env=environment) + if negative[0] != plan["expected_exit"] or filesystem_snapshot(tree, set()) != before: + raise Failure(f"original strict gate did not reject exact stale metadata without writes: {result_details(negative)}") + result = {"exit": negative[0], "stdout": negative[1].decode(), "stderr": negative[2].decode(), + "positive_control": result_details(positive), "negative_control": result_details(negative), + "mutation": mutation, "scope": "original host regeneration gate, not x86 device/runtime evidence", + "compiler": plan["strict_compiler"], "generator": plan["strict_generator"]} + state["results"][plan["cache_key"]] = result + return result + + if "positive_control" in plan: + positive = exercise_bridge(bridge_positive_plan(ROOT, plan), compiler, qemu, options, scratch, state) + if positive["exit"] != 0: + raise Failure("original C-boundary positive control did not pass before negative control") + baseline = options.bridge_baseline_compiler.resolve() + selected = (options.bridge_compiler or Path(compiler)).resolve() + if not baseline.is_file() or not selected.is_file(): + raise Failure("BLOCKED_ON BridgeX86: pinned baseline/candidate compiler artifact missing") + selected_sha = digest(selected.read_bytes()) + if digest(baseline.read_bytes()) != "734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61": + raise Failure("BLOCKED_ON BridgeX86: baseline compiler hash does not match its exact seeded generator pin") + if selected_sha != digest(Path(compiler).read_bytes()): + raise Failure("BLOCKED_ON BridgeX86: bridge compiler does not match selected qualification candidate") + native_cc, x86_cc = shutil.which("cc"), shutil.which("x86_64-linux-gnu-gcc") + nm = shutil.which("nm") + if not native_cc or not x86_cc or not nm: + raise Failure("BLOCKED_ON BridgeX86: native cc, x86_64-linux-gnu-gcc and nm are required") + observations, runs, effects = [], [], [] + driver_timeout = options.timeout + if plan["cache_key"] == "sha-original-driver-big" and plan["args"] == ("big",): + driver_timeout = max(driver_timeout, options.bridge_big_timeout) + for arch, cc in (("aarch64", native_cc), ("x86_64", x86_cc)): + library_key = arch, tuple((unit["path"], unit["sha256"]) for unit in plan["units"]), selected_sha + if library_key not in state["libraries"]: + libwork = Path(tempfile.mkdtemp(prefix="bridge-library-", dir=scratch)) + copy_resources(plan["units"], libwork) + output = libwork / "generated" + command = [str(bridge)] + if arch == "x86_64": + command += ["--target", "x86linux"] + command += [str(output), *(str(libwork / unit["path"]) for unit in plan["units"])] + environment = {"OMEGA_NATIVE_OMC": str(baseline), "OMEGA_NATIVE_OMC2": str(selected), + "OMEGA_NATIVE_X86_OMC": str(selected), "CC": cc} + built = run(command, b"", libwork, options.timeout, extra_env=environment) + if built[0]: + raise Failure(f"actual {arch} bridge generation failed: {result_details(built)}") + state["libraries"][library_key] = output + library = state["libraries"][library_key] + local = work / arch + local.mkdir() + copy_resources(plan["resources"], local) + generated = local / "generated" + shutil.copytree(library, generated) + mutation = None + if plan["operation"] == "bridge-mutant": + mutation = mutate(generated / "omega_native.c", plan["mutation"]) + symbols_result = run([nm, "-D", "--defined-only", str(generated / "libomega_native.so")], + b"", local, options.timeout) + if symbols_result[0]: + raise Failure("cannot inspect generated bridge symbols: " + str(result_details(symbols_result))) + symbols = sorted({line.split()[-1].decode() for line in symbols_result[1].splitlines() if line.split()}) + for symbol in plan.get("required_symbols", ()): + if symbol not in symbols: + raise Failure("required native binding symbol absent: " + symbol) + for symbol in plan.get("forbidden_symbols", ()): + if symbol in symbols: + raise Failure("forbidden binding symbol exported: " + symbol) + linked, binary_sha = None, None + args = () + if plan["operation"] == "symbols": + observed = symbols_result + else: + if plan.get("driver") is None: + driver = local / "original-driver.c" + driver.write_bytes(plan["driver_source"]) + else: + driver = local / plan["driver"] + if digest(driver.read_bytes()) != plan["driver_sha256"]: + raise Failure("original C driver pin mismatch") + executable = local / "original-driver" + command = [cc, *plan["cflags"], "-static", "-I", str(generated), + str(driver), str(generated / "omega_native.c"), "-o", str(executable)] + linked = run(command, b"", local, options.timeout) + if plan["operation"] == "negative-link": + symbol = plan["undefined_symbol"].encode() + if linked[0] != plan["expected_exit"] or b"undefined reference" not in linked[2] or symbol not in linked[2]: + raise Failure(f"negative-link failed for wrong reason or survived: {result_details(linked)}") + observed = linked + else: + if linked[0]: + raise Failure("original C driver build failed: " + str(result_details(linked))) + binary_sha = digest(executable.read_bytes()) + args = tuple(selected_sha if arg == "$COMPILER_SHA256" else arg for arg in plan["args"]) + before = filesystem_snapshot(local, set()) + command = ["./original-driver", *args] if arch == "aarch64" else [ + qemu, "-0", "./original-driver", "./original-driver", *args] + observed = run(command, b"", local, driver_timeout) + after = filesystem_snapshot(local, set()) + changes = {name: after.get(name) for name in before.keys() | after.keys() + if before.get(name) != after.get(name)} + effects.append(changes) + if changes: + raise Failure("read-only C-boundary caller changed its scratch filesystem: " + str(changes)) + if observed[0] != plan["expected_exit"]: + raise Failure(f"original {arch} C-boundary caller expected {plan['expected_exit']}: {result_details(observed)}; stdout={observed[1]!r}; stderr={observed[2]!r}") + observations.append({"architecture": arch, "compiler_sha256": selected_sha, + "args": list(args), "stdin_hex": "", "deadline_seconds": driver_timeout, + "caller_resources": plan["resources"], "unit_sources": plan["units"], + "baseline_compiler_sha256": digest(baseline.read_bytes()), + "bridge_tool_sha256": digest(bridge.read_bytes()), + "bridge_generator_sha256": digest((bridge_root / "src/native.om").read_bytes()), + "cc": cc, "cc_version": run([cc, "--version"], b"", local, options.timeout)[1].decode(), + "generated_c_sha256": digest((generated / "omega_native.c").read_bytes()), + "generated_library_sha256": digest((generated / "libomega_native.so").read_bytes()), + "driver_sha256": plan.get("driver_sha256"), "driver_binary_sha256": binary_sha, + "mutation": mutation, "link": result_details(linked) if linked else None, + "symbol_names": symbols, "symbol_observation": result_details(symbols_result), + "observed": result_details(observed)}) + runs.append(observed) + if plan["operation"] not in ("symbols", "negative-link") and runs[0] != runs[1]: + raise Failure(f"original C-boundary architecture differential: native={result_details(runs[0])}; x86={result_details(runs[1])}") + result = {"exit": runs[0][0], "stdout": runs[0][1].decode(), "stderr": runs[0][2].decode(), + "operation": plan["operation"], "observations": observations, "runtime_filesystem_changes": effects, + "comparison": ("independent original required/forbidden symbol obligations, not runtime" + if plan["operation"] == "symbols" else + "independent original absent-symbol link obligation; complete linker diagnostics retained, not runtime" + if plan["operation"] == "negative-link" else + "actual C/SysV native-AArch64 versus EMULATED x86_64")} + state["results"][plan["cache_key"]] = result + return result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument("--compiler", type=Path) + parser.add_argument("--x86-compiler", type=Path, help="optional x86-hosted paired compiler; otherwise built once from exact current seeded source") + parser.add_argument("--qemu", default="qemu-x86_64") + parser.add_argument("--bridge", type=Path, help="reviewed x86-capable omega-bridge executable for external ABI drivers") + parser.add_argument("--bridge-baseline-compiler", type=Path, default=Path("/tmp/bridge-x86-baseline-omc"), + help="exact 734f0a39 seeded compiler required by the bridge generator") + parser.add_argument("--bridge-compiler", type=Path, + help="bridge candidate artifact, required to hash-match --compiler (default: --compiler)") + parser.add_argument("--bridge-big-timeout", type=float, default=3600, + help="per-architecture deadline for unchanged original SHA big mode (all original 2^32+3-byte cases)") + parser.add_argument("--objdump", help="GNU x86-64 objdump or llvm-objdump executable") + parser.add_argument("--timeout", type=float, default=30) + parser.add_argument("--inventory", action="store_true") + options = parser.parse_args() + totals, reasons, templates = Counter(), Counter(), Counter() + + if options.timeout <= 0: + parser.error("--timeout must be positive") + def record(status, name, reason, **details): + totals[status] += 1 + if status != "PASS": + reasons[(status, reason)] += 1 + if details.get("evidence", {}).get("evidence_kind") == "differential_only": + details.update(scope="differential_only", conformance_status="UNASSERTED", + original_not_run_reason=details["evidence"].get("original_not_run_reason", details["evidence"].get("reason"))) + print(json.dumps(dict(status=status, case=name, reason=reason, **details)), flush=True) + + files = fixture_files() + revision = run(["git", "rev-parse", "HEAD"], b"", ROOT, options.timeout) + if revision[0] or not re.fullmatch(rb"[0-9a-f]{40}\n", revision[1]): + parser.error("cannot record actual repository HEAD: " + str(result_details(revision))) + compiler_source = contained("seed/omc/omc.om").read_bytes() + print(json.dumps({"inventory_files": len(files), + "roots": "tests; seed/*/tests; seed/omc/{om2,contracts}; seed/qualification; tools/exp445/arms/examples", + "source_revision_contract": revision[1].decode().strip(), + "baseline_revision": "becf5c817bcb7e0846d12ebfc2be91042d8ad89a", + "compiler_source_sha256": digest(compiler_source), + "checker_sha256": digest(Path(__file__).read_bytes()), + "driver_sha256": digest(Path(__file__).with_name("x86_corpus_drivers.py").read_bytes()), + "bridge": str(options.bridge) if options.bridge else None})) + if not options.inventory: + if not options.compiler or not options.compiler.is_file(): + parser.error("--compiler must name an existing compiler") + if platform.system() != "Linux" or platform.machine() not in ("aarch64", "arm64"): + parser.error("native default baseline requires Linux AArch64") + compiler = str(options.compiler.resolve()) + qemu = shutil.which(options.qemu) + objdump = shutil.which(options.objdump) if options.objdump else next( + (p for name in ("x86_64-linux-gnu-objdump", "llvm-objdump", "objdump") if (p := shutil.which(name))), None) + if not qemu or not objdump: + parser.error("qemu-x86_64 and an x86-64-capable GNU/LLVM objdump are required") + llvm = "llvm" in Path(objdump).name + print(json.dumps({"compiler": compiler, "compiler_sha256": digest(Path(compiler).read_bytes()), + "qemu": qemu, "qemu_sha256": digest(Path(qemu).read_bytes()), + "qemu_version": run([qemu, "--version"], b"", ROOT, options.timeout)[1].decode().strip(), + "objdump": objdump, "platform": platform.platform(), "timeout_seconds": options.timeout, + "bridge_big_timeout_seconds": options.bridge_big_timeout})) + cache = OrderedDict() + conductor_cache = {} + conductor_decode_cache = OrderedDict() + bridge_state = {"results": {}, "errors": {}, "libraries": {}} + controls = None + helper_image = None + frontend_compiler = None + frontend_evidence = {} + generation_variant = None + with tempfile.TemporaryDirectory(prefix="omega-fr9-oracle-") as scratch: + scratch = Path(scratch) + original_compilers = {} + + def original_compiler(identity): + if identity == "current": + return compiler + baseline = options.bridge_baseline_compiler.resolve() + if not baseline.is_file() or digest(baseline.read_bytes()) != PINNED_COMPILER_SHA256: + raise Failure("original conductor requires exact independently pinned OM1 compiler " + PINNED_COMPILER_SHA256) + if identity == "pinned": + return str(baseline) + if identity not in original_compilers: + revision, sha = HISTORICAL_COMPILERS[identity] + fetched = run(["git", "show", revision + ":seed/omc/omc.om"], b"", ROOT, options.timeout) + if fetched[0] or digest(fetched[1]) != sha: + raise Failure("historical compiler source identity mismatch: " + identity) + built = run([str(baseline)], fetched[1], scratch, options.timeout) + if built[0] or built[2] or not built[1]: + raise Failure("historical compiler bootstrap failed: " + identity + ": " + str(result_details(built))) + binary = scratch / ("original-" + sha) + binary.write_bytes(built[1]) + binary.chmod(0o700) + original_compilers[identity] = str(binary) + return original_compilers[identity] + + def generation_compiler(): + nonlocal generation_variant + if generation_variant is None: + source = compiler_source + substitutions = [] + for old, new in ( + (b"matconst 15 36028797018963967\n", b"matconst 15 3\n"), + (b"xhcmp 10 36028797018963967\n", b"xhcmp 10 3\n"), + ): + if source.count(old) != 1: + raise Failure("generation-ceiling whitebox setup no longer matches exact current emitter: " + repr(old)) + source = source.replace(old, new) + substitutions.append({"old_hex": old.hex(), "new_hex": new.hex(), "count": 1}) + built = run([compiler], source, scratch, options.timeout) + if built[0] or built[2] or not built[1]: + raise Failure("generation-ceiling compiler build failed: " + str(result_details(built))) + binary = scratch / "generation-limit-compiler" + binary.write_bytes(built[1]) + binary.chmod(0o700) + generation_variant = str(binary), { + "authority_path": "seed/host/tests/genlimit.om", + "authority_sha256": "ea4f544b49878f5532f75b0ac7e8fa42e6926d5b57ea002e748679922859ad48", + "authority_quote": "White-box boundary fixture: compiler's generation ceiling replaced with 3 for this test only.", + "original_compiler_source_sha256": digest(compiler_source), + "variant_source_sha256": digest(source), "variant_compiler_sha256": digest(built[1]), + "substitutions": substitutions, "scope": "fixture-only, both target generation ceilings; production source unchanged"} + return generation_variant + + def paired_frontend_compiler(): + nonlocal frontend_compiler, frontend_evidence + if frontend_compiler is None: + binary = scratch / "x86-hosted-compiler" + if options.x86_compiler: + image = options.x86_compiler.read_bytes() + frontend_evidence = {"provenance": "explicit external --x86-compiler", + "path": str(options.x86_compiler.resolve())} + else: + source = compiler_source + built = run([compiler], TARGET_PREFIX + source, scratch, options.timeout) + if built[0] or built[2] or not built[1]: + raise Failure(f"x86-hosted compiler bootstrap failed: {result_details(built)}") + disassemble(built[1], source, objdump, llvm, scratch, options.timeout) + image = built[1] + frontend_evidence = {"provenance": "exact current seeded source compiled by selected native compiler", + "source": "seed/omc/omc.om", "source_sha256": digest(source)} + binary.write_bytes(image) + binary.chmod(0o700) + frontend_compiler = str(binary) + frontend_evidence.update(x86_compiler_sha256=digest(image), + native_compiler_sha256=digest(Path(compiler).read_bytes())) + return frontend_compiler + + for index, case in enumerate(expanded_cases(files, record)): + frontend_mode = bool(MODE.match(case.source)) + key = digest(case.source) + driver = case.driver or HOST_DRIVERS.get(key) + if case.name.startswith("oracle-positional-"): + driver = "positional-view" + target, adaptation = (case.source, None) if case.bridge else target_source(case, driver) + if options.inventory: + words = host_words(case.source) + kind = "INVENTORY_HOST" if case.bridge else ("INVENTORY_UNIT" if not MAIN.search(case.source) else ( + "INVENTORY_HOST" if words else "INVENTORY_PROGRAM")) + record(kind, case.name, "reviewed host driver" if driver else ( + "unreviewed host driver missing" if words else "compile/runtime differential input"), + host_words=words, host_driver=driver, source_sha256=key, + target_adaptation=adaptation, expected_compile=case.expected_compile, + operation=case.operation, evidence=case.evidence, blocker=case.blocker) + continue + cwd = scratch / str(index) + cwd.mkdir() + diagnostics = {} + child_timeout = case.deadline if case.deadline is not None else options.timeout + try: + if case.bridge: + replay = exercise_bridge(case.bridge, compiler, qemu, options, scratch, bridge_state) + prefix = case.bridge.get("required_line_prefix") + if prefix and not any(line.startswith(prefix) for line in replay["stdout"].splitlines()): + raise Failure("original C driver did not report required exact case: " + prefix) + record("PASS", case.name, "original C-boundary/gate obligation, actual reviewed driver", + source_sha256=key, evidence=case.evidence, bridge_result=replay, + control_kind=case.bridge["operation"], + evidence_kind=case.evidence.get("evidence_kind", "original explicit oracle"), + contract_status=case.evidence.get("contract_status", "original fixed obligation")) + continue + case_compiler = compiler + if driver == "genlimit" and case.operation != "emit": + case_compiler, case.evidence["generation_ceiling_whitebox"] = generation_compiler() + case.stdout_oracle = "sha:" + digest(literal_bytes(case.source)[0]) + compilekey = key, digest(target), frontend_mode, child_timeout, case_compiler + if compilekey not in cache: + default = run([case_compiler], case.source, cwd, child_timeout) + if frontend_mode: + x86 = run([qemu, "-0", "./omc", paired_frontend_compiler()], + case.source, cwd, child_timeout) + else: + x86 = run([case_compiler], TARGET_PREFIX + target, cwd, child_timeout) + cache[compilekey] = default, x86 + if len(cache) > 32: + cache.popitem(last=False) + default, x86 = cache[compilekey] + diagnostics = {"default_compile": result_details(default), "x86_compile": result_details(x86)} + diagnostic_contract = None + if not frontend_mode and target == case.source: + diagnostic_contract = target_diagnostic_contract(case.source, default, x86) + if diagnostic_contract: + case.evidence["target_diagnostic_contract"] = diagnostic_contract + if frontend_mode: + case.evidence.update(frontend_compiler=frontend_evidence, + comparison="crossHOST native-AArch64 versus EMULATED x86 compiler, exact original mode bytes") + if case.operation == "emit": + assert_oracle(default[1], case.stdout_oracle, "compiler stdout") + assert_oracle(default[2], case.stderr_oracle, "compiler stderr") + if default[0]: + if case.expected_compile == "accept": + raise Failure(f"fixture required acceptance but default compiler refused with {default[0]}") + if case.expected_compile and default[0] != int(case.expected_compile): + raise Failure(f"fixture default refusal code {default[0]} differs from explicit oracle {case.expected_compile}") + if diagnostic_contract and diagnostic_contract["x86_execution"]: + expected = diagnostic_contract["x86_execution"] + mnemonics, instructions, carveouts = disassemble( + x86[1], target, objdump, llvm, cwd, child_timeout) + binary = cwd / "target-limit-control" + binary.write_bytes(x86[1]) + binary.chmod(0o700) + observed = run([qemu, str(binary)], b"", cwd, child_timeout) + if observed != (expected["exit"], expected["stdout"].encode(), expected["stderr"].encode()): + raise Failure("target-specific limit execution oracle differs: " + str(result_details(observed))) + templates.update(mnemonics) + record("PASS", case.name, "exact per-target limit contract and independent x86 execution oracle", + source_sha256=key, evidence=case.evidence, + default_compile=result_details(default), x86_compile=result_details(x86), + x86_execution=result_details(observed), instructions=len(instructions)) + continue + if not diagnostic_contract and refusal(default, 0) != refusal(x86, 0 if frontend_mode else 1): + raise Failure("compile refusal differs after exact source-coordinate translation") + record("PASS", case.name, "compile-refusal differential + explicit conductor oracle", + compile_exit=default[0], source_sha256=key, + target_adaptation=adaptation, evidence=case.evidence, + comparison="crossHOST exact frontend mode" if frontend_mode else "crossTARGET") + continue + if case.expected_compile not in (None, "accept"): + raise Failure("refusal control was incorrectly accepted by default compiler") + if x86[0]: + record("MISSING_IMPLEMENTATION", case.name, "default accepts; x86 compiler refuses", + compile_exit=x86[0], diagnostic=x86[2].decode("utf-8", "replace"), + source_sha256=key, evidence=case.evidence) + continue + translated_stderr = normalized_diagnostics(x86[2], 0 if frontend_mode else 1) + if case.evidence.get("compiler_stderr_comparison") == "source-site-records": + case.evidence["raw_compiler_stderr"] = {"native_hex": default[2].hex(), "x86_hex": x86[2].hex()} + case.evidence["site_comparison"] = source_site_diagnostics( + default[2], translated_stderr, case.evidence["site_source_lines"]) + elif not diagnostic_contract and default[2] != translated_stderr: + raise Failure("successful compiler diagnostics differ after exact source-coordinate translation") + if frontend_mode: + if default[1] != x86[1]: + raise Failure("exact-mode output differs between native and x86-hosted compiler") + if case.operation == "same": + left = run([compiler], case.same_source, cwd, options.timeout) + right = run([qemu, "-0", "./omc", paired_frontend_compiler()], + case.same_source, cwd, options.timeout) + if left[0] or right[0] or default[1] != left[1] or x86[1] != right[1]: + raise Failure("exact frontend same-artifact oracle differs") + record("PASS", case.name, "exact-mode frontend crossHOST differential, original conductor oracles preserved", + source_sha256=key, evidence=case.evidence, compile_exit=default[0], + stdout_sha256=digest(default[1]), comparison="crossHOST EMULATED, not backend crossTARGET") + continue + if MAIN.search(case.source) and ( + default[1][:6] != b"\x7fELF\x02\x01" or + struct.unpack_from(" 4: + conductor_decode_cache.popitem(last=False) + mnemonics, instructions, carveouts = decoded + templates.update(mnemonics) + if case.operation == "conductor": + observations = [] + required = case.evidence.get("required_mutant_replays", [case.evidence]) + for replay_number, requirement in enumerate(required): + manifest = requirement["manifest"] + identity = requirement["child_compiler_identity"] + cachekey = manifest, identity, digest(json.dumps(requirement["resources"], sort_keys=True).encode()) + if cachekey not in conductor_cache: + try: + replaydir = cwd / ("replay-" + str(replay_number)) + replaydir.mkdir() + replay_case = replace(case, evidence=requirement) + child_compiler = original_compiler(identity) + conductor_cache[cachekey] = exercise_conductor( + replay_case, default[1], x86[1], child_compiler, qemu, replaydir, options.timeout) + # File the actual build/control/kill transcript + # once, independently of per-row verdicts. A + # successful mutation assertion is not merely + # an expected output attached to healthy code. + print(json.dumps({"kind": "original-conductor-evidence", + "manifest": manifest, "child_compiler_identity": identity, + "child_compiler_sha256": digest(Path(child_compiler).read_bytes()), + "resources": requirement["resources"], + "replay": conductor_cache[cachekey]}, sort_keys=True)) + except (OSError, ValueError, Failure) as error: + conductor_cache[cachekey] = {"error": str(error)} + replay = conductor_cache[cachekey] + if "error" in replay: + raise Failure(replay["error"]) + overall = requirement.get("expected_overall_exit") + if overall is not None and replay["exit"] != overall: + raise Failure(f"original conductor expected whole-manifest exit {overall}, observed {replay['exit']}; original_log={replay['stdout']}") + observed = replay["verdicts"].get(requirement["original_case_name"]) + expected = requirement["expected_original_conductor"] + historical_failure = requirement.get("historical_failure") + if historical_failure: + if observed is None or observed["status"] != "FAIL" or observed["line"] != historical_failure["exact_verdict"]: + raise Failure("historical failure replay changed: " + str(observed)) + elif observed is None or observed["status"] != expected: + raise Failure(f"original conductor oracle: expected {expected}, observed {observed}; log_sha256={replay['stdout_sha256']}; original_log={replay['stdout']}") + reason = requirement.get("expected_failure_reason") + if reason and reason not in observed["line"]: + raise Failure("original negative control failed for the wrong reason: " + observed["line"]) + if requirement.get("required_mutant_replays") is not None: + raise Failure("recursive mutant replay plan") + if "mutant_specification" in case.evidence: + bad_controls = {name: verdict for name, verdict in replay["verdicts"].items() + if ("ctl" in name) and verdict["status"] != "PASS"} + if bad_controls or replay["directive_verdicts"]: + raise Failure(f"mutant replay build/control failed: {bad_controls}; {replay['directive_verdicts']}") + observations.append({"manifest": manifest, "child_compiler_identity": identity, + "expected": expected, "observed": observed, + "historical_failure": historical_failure, + "conductor_exit": replay["exit"], + "conductor_stdout_sha256": replay["stdout_sha256"], + "filesystem_sha256": replay["filesystem_sha256"], + "directive_verdicts": replay["directive_verdicts"]}) + historical_failures = [item for item in observations if item["historical_failure"]] + record("PASS", case.name, ("historical FAIL reproduced exactly; not current acceptance or a successful mutant kill" + if historical_failures else "original conductor oracle proved on native/x86 hosts with explicit child compiler identity"), + source_sha256=key, evidence=case.evidence, replays=observations, + control_kind=case.evidence["control_kind"], oracle_instructions=len(instructions), + child_compiler_architecture="native AArch64 in both conductor runs") + continue + if case.operation == "structural": + minimum = case.evidence["structural"]["minimum_calls"] + calls = sum(count for mnemonic, count in mnemonics.items() if mnemonic in ("call", "callq")) + if calls < minimum: + raise Failure(f"explicit structural call obligation: decoded {calls}, requires at least {minimum}") + if case.operation == "same": + left = run([compiler], case.same_source, cwd, options.timeout) + right = run([compiler], TARGET_PREFIX + case.same_source, cwd, options.timeout) + if left[0] or right[0] or default[1] != left[1] or x86[1] != right[1]: + diagnostics.update(default_same=result_details(left), x86_same=result_details(right)) + raise Failure("same oracle failed: each architecture must compile both sources to byte-identical artifacts") + record("PASS", case.name, "same-artifact oracle independently satisfied on both architectures + decoded x86", + source_sha256=key, evidence=case.evidence, oracle_instructions=len(instructions)) + continue + if case.operation == "emit": + record("PASS", case.name, "explicit compiler exit/stdout/stderr oracle + x86 differential/decode", + source_sha256=key, evidence=case.evidence, oracle_instructions=len(instructions)) + continue + if case.blocker: + record("BLOCKED" if case.blocker.startswith("BLOCKED_ON ") else "NOT_RUN", + case.name, case.blocker, source_sha256=key, + evidence=case.evidence, oracle_instructions=len(instructions), + bridge=str(options.bridge) if options.bridge else None) + continue + if not MAIN.search(case.source): + callers = exercise_bare(case, default[1], x86[1], qemu, cwd, options.timeout) + if callers: + record("PASS", case.name, "original bare artifact decoded + reviewed full-width private-ABI callers exercised", + source_sha256=key, evidence=case.evidence, callers=callers, + oracle_instructions=len(instructions), data_carveouts=carveouts) + continue + record("NOT_RUN", case.name, f"entryless source {key} has no reviewed private-ABI caller for its exported/last entry", + source_sha256=key, evidence=case.evidence, + oracle_instructions=len(instructions), data_carveouts=carveouts) + continue + words = host_words(case.source) + if words and not driver: + record("NOT_RUN", case.name, f"source {key} requires unreviewed effects: {', '.join(words)}", + source_sha256=key, evidence=case.evidence, host_words=words, + oracle_instructions=len(instructions), data_carveouts=carveouts) + continue + native, emulated = cwd / "native", cwd / "emulated" + native.mkdir(); emulated.mkdir() + basename = driver if driver and driver != "positional-view" else "program" + for directory, image in ((native, default[1]), (emulated, x86[1])): + binary = directory / basename + binary.write_bytes(image); binary.chmod(0o700) + args = case.args + if driver == "args" and not args: + args = ("", "two words", "π") + elif driver == "memcheck": + args = (compiler,) + elif driver == "process": + if helper_image is None: + helper = run([compiler], (ROOT / "seed/host/tests/args.om").read_bytes(), cwd, options.timeout) + if helper[0]: + raise Failure("native exec-child helper compilation refused") + helper_image = helper[1] + # execve intentionally enters a native host ELF in both runs. + # qemu-user is not assumed registered as a system binfmt. + for directory in (native, emulated): + child = directory / "exec-child" + child.write_bytes(helper_image); child.chmod(0o700) + prepared = [prepare_case(ROOT, directory, driver, compiler, case=case.evidence) + for directory in (native, emulated)] + if prepared[0] != prepared[1]: + raise Failure("reviewed prepare_case produced architecture-dependent argv") + if prepared[0]: + args = tuple(prepared[0]) + if "stdin_compiled_source" in case.evidence: + source_path = case.evidence["stdin_compiled_source"] + stdin_source = contained(source_path).read_bytes() + if digest(stdin_source) != case.evidence["stdin_source_sha256"]: + raise Failure("reviewed scanner input source changed: " + source_path) + compiled_input = run([compiler], stdin_source, cwd, options.timeout) + if compiled_input[0] or compiled_input[2]: + raise Failure(f"scanner input compilation failed: {result_details(compiled_input)}") + case.evidence["stdin_original_artifact_sha256"] = digest(compiled_input[1]) + case.stdin = select_a64_entry(compiled_input[1], case.evidence["stdin_export_index"]) + case.evidence["stdin_selected_entry_artifact_sha256"] = digest(case.stdin) + case.evidence["runtime_args"] = list(args) + case.evidence["runtime_stdin_sha256"] = digest(case.stdin) + expected = case.expected_exit + if expected is None and driver: + expected = 103 if driver in ("environment_trap", "stat_short", "links_short") else 0 + # Both argv[0] strings and initial environments are byte-identical; + # filesystem mutations cannot leak between architectures. + argv0 = "./" + basename + arun = run([argv0, *args], case.stdin, native, child_timeout) + xrun = run([qemu, "-0", argv0, argv0, *args], case.stdin, emulated, child_timeout) + diagnostics.update(default_run=result_details(arun), x86_run=result_details(xrun)) + if "required_verdict" in case.evidence: + required = ("VERDICT " + case.evidence["required_verdict"]).encode() + if required not in arun[1].splitlines() or required not in xrun[1].splitlines(): + raise Failure(f"original scanner did not prove required verdict {required!r}") + native_files = filesystem_snapshot(native, {basename, "exec-child"}) + x86_files = filesystem_snapshot(emulated, {basename, "exec-child"}) + diagnostics.update(default_filesystem=native_files, x86_filesystem=x86_files) + if native_files != x86_files: + raise Failure("persistent scratch filesystem effects differ (type/mode/contents/symlink target)") + if arun[0] < 0 or xrun[0] < 0: + if not (driver == "supervisor-self-signal" and case.operation == "differential" and + case.evidence.get("required_conductor_verdict") == "INVALID signal" and + arun[0] == xrun[0] == case.expected_exit == -9): + raise Failure(f"runtime signal: default={arun[0]} x86={xrun[0]}") + if arun != xrun: + artifact = ioctl_emulator_artifact(case, driver, arun, xrun, qemu, argv0, + args, emulated, options.timeout) + if artifact: + record("NOT_RUN", case.name, "EMULATOR_ARTIFACT: exact invalid-fd ioctl returned QEMU ENOTTY instead of native EBADF", + source_sha256=key, evidence=case.evidence, emulator_artifact=artifact, + diagnostics=diagnostics, oracle_instructions=len(instructions)) + continue + raise Failure(f"runtime differential: default={arun[0]} x86={xrun[0]}, stdout={arun[1] == xrun[1]}, stderr={arun[2] == xrun[2]}") + if expected is not None and arun[0] != expected: + raise Failure(f"fixture oracle exit {expected}, observed {arun[0]}") + assert_oracle(arun[1], case.stdout_oracle, "runtime stdout", different=case.operation == "kill") + assert_oracle(arun[2], case.stderr_oracle, "runtime stderr") + reason = "target-adapted ABI differential" if adaptation else "identical-source native-AArch64/qemu-x86 differential" + if driver == "supervisor-self-signal": + reason = "supervisor negative-input control: both children observed SIGKILL, never an ordinary mutant kill" + record("PASS", case.name, reason + " + every code byte decoded", run_exit=arun[0], + stdout_sha256=digest(arun[1]), source_sha256=key, x86_source_sha256=digest(target), + x86_sha256=digest(x86[1]), oracle_instructions=len(instructions), + data_carveouts=carveouts, host_driver=driver, target_adaptation=adaptation, + exec_child_architecture="native AArch64" if driver == "process" else None, + generation_ceiling_whitebox=driver == "genlimit", evidence=case.evidence, + conductor_operation=case.operation, + control_kind=("generation_ceiling_whitebox" if driver == "genlimit" else + "supervisor_negative_input" if driver in ("supervisor-self-signal", "supervisor-self-sleep") else None), + filesystem_sha256=digest(json.dumps(native_files, sort_keys=True).encode()), + filesystem_entries=len(native_files)) + if case.name == "seed/rung4/tests/t_exit.om": + expected = int((ROOT / "seed/rung4/tests/t_exit.want").read_text()) + if arun != (expected, b"", b""): + raise Failure("exit control disagrees with existing .want oracle") + controls = (case.source, x86[1], arun) + except (OSError, ValueError, struct.error, Failure) as error: + record("BLOCKED" if str(error).startswith("BLOCKED_ON ") else "FAIL", case.name, str(error), source_sha256=key, + evidence=case.evidence, diagnostics=diagnostics) + if not options.inventory: + if controls is None: + record("FAIL", "negative-controls", "required t_exit.om did not qualify") + else: + source, image, baseline = controls + cwd = scratch / "negative-controls" + cwd.mkdir() + try: + _, instructions, _ = disassemble(image, source, objdump, llvm, cwd, options.timeout) + bad = bytearray(image) + first = instructions[0][0] + bad[first:first + 2] = b"\x0f\x04" # unassigned x86 opcode, not UD2 (which is valid). + try: + disassemble(bytes(bad), source, objdump, llvm, cwd, options.timeout) + except Failure: + record("PASS", "negative-invalid-encoding", "independent disassembler rejected deliberately invalid emitted opcode") + else: + raise Failure("invalid-opcode mutant survived disassembler") + candidates = [(offset, raw) for offset, raw, _ in instructions + if len(raw) == 10 and raw[:2] == b"\x48\xb8" and raw[2:] == (42).to_bytes(8, "little")] + if len(candidates) != 1: + raise Failure("expected unique MOVABS RAX,42 in exit fixture for wrong-immediate control") + offset, raw = candidates[0] + wrong = bytearray(image) + wrong[offset + 2] = 43 + disassemble(bytes(wrong), source, objdump, llvm, cwd, options.timeout) + mutant = cwd / "wrong-immediate" + mutant.write_bytes(wrong); mutant.chmod(0o700) + observed = run([qemu, str(mutant)], b"", cwd, options.timeout) + if observed[0] < 0 or observed == baseline: + raise Failure("valid-but-wrong encoding mutant not caught by behavior differential") + record("PASS", "negative-valid-wrong-encoding", "disassembler accepts valid changed immediate; behavior oracle rejects it", expected_exit=baseline[0], observed_exit=observed[0]) + except (OSError, Failure) as error: + record("FAIL", "negative-controls", str(error)) + missing = sum(count for status, count in totals.items() if status not in ("PASS", "EXCLUDED", "INVENTORY_PROGRAM", "INVENTORY_HOST", "INVENTORY_UNIT")) + print(json.dumps({ + "summary": dict(totals), + "reasons": [{"status": status, "reason": reason, "count": count} + for (status, reason), count in sorted(reasons.items())], + "oracle_mnemonic_counts": dict(sorted(templates.items())), + "coverage_limits": [ + "Every emitted code byte is linearly decoded, including unreachable functions; direct branches must target decoded instruction boundaries", + "Only source-matched JMP-protected literal/padding spans are carved out; ambiguous/missing data maps fail closed", + "Mnemonic counts are not exhaustive encoding-template, register, width, displacement or trap coverage", + "The default baseline may share frontend defects; invalid and valid-but-wrong encoding controls challenge separate oracles", + "Frozen C2 retains exact historical inputs; original frontend modes compare unchanged bytes through native/x86-hosted compilers, separately from cross-target code generation", + "Reviewed content-pinned host drivers run in separate architecture-local directories and compare persistent filesystem effects; other host effects remain NOT_RUN", + "Bare callers execute original unit bytes through architecture-specific ABI wrappers and observe full-width returns/arrays; missing callers remain individually NOT_RUN", + "process exec enters a native AArch64 helper in both runs, not an x86 child; generation retirement uses the original fixture's exact ceiling3 compiler variant on both targets", + "psync invokes syncfs on its scratch-file descriptor and therefore flushes the scratch filesystem; no service process is controlled", + "No hardware qualification"], + "verdict": "INVENTORY_ONLY" if options.inventory else ("FAIL" if missing else "PASS")})) + return 0 if options.inventory else int(bool(missing)) + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/seed/omc/size-history.tsv b/seed/omc/size-history.tsv index 9bb14462d..b6ac2bef0 100644 --- a/seed/omc/size-history.tsv +++ b/seed/omc/size-history.tsv @@ -12,3 +12,11 @@ RM-diag-query check and next directives: omega-diag v1 records and omega-query v RM-qty-diag-audit exact float/qty classification and checked ingress; contract diagnostic categories, streamed query records and checked writes (#909, #911 audit) 12545 416 85041 0ab18500a68dfaff21c1e6eb74ef3c329cae6aac3d10d7310643c980dcefb9a3 RM-batch3 batch 3: integer bitcast canonicalization (#896), sized empty text (#897), keyword-prefix function names (#898), pread writable check (#903) 12072 407 81583 397346de169d78e8a5ce53dce6cf9f0ca56a8f527128165bbfb4fb62a335f93e RM-batch3-current batch 3 integrated with qty and diagnostic audit; Wolfram (341324 - 176)/4 = 85287 words 12577 418 85287 1811d4047f118440cc35e995261af6768b606148cb17e18c42158afd15fcad58 +FR9-x86 x86-64 Linux semantic backend, private bare entries, SSE2 floats and native host syscall lowering; seed function table unchanged 15525 512 118293 5f0faab7cd4fc12158cf8e099418098d278df644efc10e4e7e2e5ca6141fca86 +FR9-x86-repair checked numeric/value-loop contracts; target-specific output pool; dead-branch boundary repair; returnable private-unit traps 15543 512 118524 1f0fdef06574ffec782c164941114edcf51f36f9f9cd1e79bc0452dbcebb3322 +FR9-x86-index-diag OM-2 constant-index addressing without extra virtual registers; retain trap-site diagnostic records 15555 512 118588 7d1739cc46c04bb8b585c5a255690ae58e30e9ffaa329defa19da3375c5fa316 +FR9-x86-proof-sites division/remainder/shift lowering retains shared constant proofs and only required source trap sites 15566 512 118654 f7752bc5c800e85c2393a08153786d0a6bc4516c9cea955fe27624228d6d1409 +FR9-x86-mutant-repair x86 constant index check distinct; re-anchor mutant s2/s3 drift; pure-name control exit authority 15566 512 118654 a4162d529b2d8d1e2ef8121a16ac61fa3d23c4919ac97202fe50cb4566a4ea6b +FR9-x86-growth-bound OM-2 x86 byte emission enforces the existing per-function emitted-storage ceiling; literal diagnostic/refusal parity retained 15574 512 118694 badedbb0c6287887641fcd7e97301b43b5f82f2d7a2838bbe0d17547873108be +FR9-batch3-current FR9 on current batch3 and qty/diagnostic audit; Wolfram (477524 - 176)/4 = 119337 words 15618 512 119337 2190b5a37cc4cc73362657766cccd67d65d9eff951c8a3ba9507669af97ac36b +FR9-acceptance-fixes FR9 quantity unary refusals and empty text; Wolfram (477612 - 176)/4 = 119359 words 15624 512 119359 62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b diff --git a/seed/omc/x86-diagnostic-contracts.json b/seed/omc/x86-diagnostic-contracts.json new file mode 100644 index 000000000..441ce1a33 --- /dev/null +++ b/seed/omc/x86-diagnostic-contracts.json @@ -0,0 +1,265 @@ +{ + "schema": 1, + "scope": "Exact current diagnostics for byte-pinned fixtures; historical assertions remain separate. x86 records include the target selector line.", + "contracts": [ + { + "source_spec": "seed/omc/om2/s3/a-exact-diag.om", + "source_sha256": "af6c2faa6087359c0c51bcd5d61d973143f45d4719eb98278370bfb03284a79e", + "aarch64": { + "exit": 0, + "stderr": "omc-check 1 erased line=6 rule=dup32\n" + }, + "x86_64": { + "exit": 0, + "stderr": "omc-check 1 erased line=7 rule=dup32\nomc-site 1 line=10 iter=-\nomc-site 1 line=10 iter=-\n" + }, + "reason": "Exact target-specific runtime trap sites, including call-stack guards." + }, + { + "source_spec": "seed/omc/om2/s3/a-kept-diag.om", + "source_sha256": "8e1b8605e8d77c792a2aaf6adeb2167a38a538d0857792b006eeafd408d78e94", + "aarch64": { + "exit": 0, + "stderr": "omc-check 1 kept line=6 rule=-\nomc-site 1 line=6 iter=-\n" + }, + "x86_64": { + "exit": 0, + "stderr": "omc-check 1 kept line=7 rule=-\nomc-site 1 line=7 iter=-\nomc-site 1 line=10 iter=-\nomc-site 1 line=10 iter=-\n" + }, + "reason": "Exact target-specific runtime trap sites, including call-stack guards." + }, + { + "source_spec": "seed/qualification/om2/sec/s5s7/a5-exact-diag.om", + "source_sha256": "2702ef2f9bcf2fbadd6c9ced8382a13f1939378c024a5c5706d167d98798be13", + "aarch64": { + "exit": 0, + "stderr": "omc-check 1 erased line=9 rule=dup32\n" + }, + "x86_64": { + "exit": 0, + "stderr": "omc-check 1 erased line=10 rule=dup32\nomc-site 1 line=13 iter=-\nomc-site 1 line=13 iter=-\n" + }, + "reason": "Exact target-specific runtime trap sites, including call-stack guards." + }, + { + "source_spec": "seed/qualification/om2/sec/s5s7/a5-kept-diag.om", + "source_sha256": "79d2da33312969e14d9cdefe34b19306cce03471d91add08aa1e0285af22cf9c", + "aarch64": { + "exit": 0, + "stderr": "omc-check 1 kept line=8 rule=-\nomc-site 1 line=8 iter=-\n" + }, + "x86_64": { + "exit": 0, + "stderr": "omc-check 1 kept line=9 rule=-\nomc-site 1 line=9 iter=-\nomc-site 1 line=12 iter=-\nomc-site 1 line=12 iter=-\n" + }, + "reason": "Exact target-specific runtime trap sites, including call-stack guards." + }, + { + "source_spec": "seed/qualification/om2/sec/s5s7/a5-swap-diag.om", + "source_sha256": "20773907e95cbc9b1e157be91b099dc1ad13ab6ca79d2966e4259a93a8625eff", + "aarch64": { + "exit": 0, + "stderr": "omc-check 1 kept line=8 rule=-\nomc-site 1 line=8 iter=-\n" + }, + "x86_64": { + "exit": 0, + "stderr": "omc-check 1 kept line=9 rule=-\nomc-site 1 line=9 iter=-\nomc-site 1 line=12 iter=-\nomc-site 1 line=12 iter=-\n" + }, + "reason": "Exact target-specific runtime trap sites, including call-stack guards." + }, + { + "source_spec": "seed/qualification/om2/sec/s3s4/unroll-sum-diag.om+seed/qualification/om2/sec/s3s4/lib-pu.om", + "source_sha256": "a0b4e8837c742a4acc3cd7abe93d5ba8d90cf772ff85d36fa6f1027fd07db826", + "aarch64": { + "exit": 0, + "stderr": "omc-site 1 line=15 iter=-\nomc-site 1 line=20 iter=-\nomc-site 1 line=21 iter=-\nomc-site 1 line=27 iter=0\nomc-site 1 line=27 iter=1\nomc-site 1 line=27 iter=2\nomc-site 1 line=27 iter=3\nomc-site 1 line=27 iter=4\nomc-site 1 line=27 iter=5\nomc-site 1 line=27 iter=6\nomc-site 1 line=27 iter=7\nomc-site 1 line=27 iter=8\nomc-site 1 line=27 iter=9\nomc-site 1 line=27 iter=10\nomc-site 1 line=27 iter=11\nomc-site 1 line=27 iter=12\nomc-site 1 line=27 iter=13\nomc-site 1 line=27 iter=14\nomc-site 1 line=27 iter=15\nomc-site 1 line=27 iter=16\nomc-site 1 line=27 iter=17\nomc-site 1 line=27 iter=18\nomc-site 1 line=27 iter=19\nomc-site 1 line=27 iter=20\nomc-site 1 line=27 iter=21\nomc-site 1 line=27 iter=22\nomc-site 1 line=27 iter=23\nomc-site 1 line=27 iter=24\nomc-site 1 line=27 iter=25\nomc-site 1 line=27 iter=26\nomc-site 1 line=27 iter=27\nomc-site 1 line=27 iter=28\nomc-site 1 line=27 iter=29\nomc-site 1 line=27 iter=30\nomc-site 1 line=27 iter=31\nomc-site 1 line=27 iter=32\nomc-site 1 line=27 iter=33\nomc-site 1 line=27 iter=34\nomc-site 1 line=27 iter=35\nomc-site 1 line=27 iter=36\nomc-site 1 line=27 iter=37\nomc-site 1 line=27 iter=38\nomc-site 1 line=27 iter=39\nomc-site 1 line=27 iter=40\nomc-site 1 line=27 iter=41\nomc-site 1 line=27 iter=42\nomc-site 1 line=27 iter=43\nomc-site 1 line=27 iter=44\nomc-site 1 line=27 iter=45\nomc-site 1 line=27 iter=46\nomc-site 1 line=27 iter=47\nomc-site 1 line=27 iter=48\nomc-site 1 line=27 iter=49\nomc-site 1 line=27 iter=50\nomc-site 1 line=27 iter=51\nomc-site 1 line=27 iter=52\nomc-site 1 line=27 iter=53\nomc-site 1 line=27 iter=54\nomc-site 1 line=27 iter=55\nomc-site 1 line=27 iter=56\nomc-site 1 line=27 iter=57\nomc-site 1 line=27 iter=58\nomc-site 1 line=27 iter=59\nomc-site 1 line=27 iter=60\nomc-site 1 line=27 iter=61\nomc-site 1 line=27 iter=62\nomc-site 1 line=27 iter=63\nomc-site 1 line=29 iter=-\nomc-site 1 line=30 iter=-\nomc-site 1 line=33 iter=-\nomc-site 1 line=35 iter=-\nomc-site 1 line=43 iter=-\nomc-site 1 line=48 iter=-\nomc-site 1 line=49 iter=-\nomc-site 1 line=49 iter=-\nomc-site 1 line=55 iter=-\nomc-site 1 line=55 iter=-\nomc-site 1 line=55 iter=-\n" + }, + "x86_64": { + "exit": 0, + "stderr": "omc-site 1 line=16 iter=-\nomc-site 1 line=16 iter=-\nomc-site 1 line=21 iter=-\nomc-site 1 line=21 iter=-\nomc-site 1 line=22 iter=-\nomc-site 1 line=28 iter=0\nomc-site 1 line=28 iter=1\nomc-site 1 line=28 iter=2\nomc-site 1 line=28 iter=3\nomc-site 1 line=28 iter=4\nomc-site 1 line=28 iter=5\nomc-site 1 line=28 iter=6\nomc-site 1 line=28 iter=7\nomc-site 1 line=28 iter=8\nomc-site 1 line=28 iter=9\nomc-site 1 line=28 iter=10\nomc-site 1 line=28 iter=11\nomc-site 1 line=28 iter=12\nomc-site 1 line=28 iter=13\nomc-site 1 line=28 iter=14\nomc-site 1 line=28 iter=15\nomc-site 1 line=28 iter=16\nomc-site 1 line=28 iter=17\nomc-site 1 line=28 iter=18\nomc-site 1 line=28 iter=19\nomc-site 1 line=28 iter=20\nomc-site 1 line=28 iter=21\nomc-site 1 line=28 iter=22\nomc-site 1 line=28 iter=23\nomc-site 1 line=28 iter=24\nomc-site 1 line=28 iter=25\nomc-site 1 line=28 iter=26\nomc-site 1 line=28 iter=27\nomc-site 1 line=28 iter=28\nomc-site 1 line=28 iter=29\nomc-site 1 line=28 iter=30\nomc-site 1 line=28 iter=31\nomc-site 1 line=28 iter=32\nomc-site 1 line=28 iter=33\nomc-site 1 line=28 iter=34\nomc-site 1 line=28 iter=35\nomc-site 1 line=28 iter=36\nomc-site 1 line=28 iter=37\nomc-site 1 line=28 iter=38\nomc-site 1 line=28 iter=39\nomc-site 1 line=28 iter=40\nomc-site 1 line=28 iter=41\nomc-site 1 line=28 iter=42\nomc-site 1 line=28 iter=43\nomc-site 1 line=28 iter=44\nomc-site 1 line=28 iter=45\nomc-site 1 line=28 iter=46\nomc-site 1 line=28 iter=47\nomc-site 1 line=28 iter=48\nomc-site 1 line=28 iter=49\nomc-site 1 line=28 iter=50\nomc-site 1 line=28 iter=51\nomc-site 1 line=28 iter=52\nomc-site 1 line=28 iter=53\nomc-site 1 line=28 iter=54\nomc-site 1 line=28 iter=55\nomc-site 1 line=28 iter=56\nomc-site 1 line=28 iter=57\nomc-site 1 line=28 iter=58\nomc-site 1 line=28 iter=59\nomc-site 1 line=28 iter=60\nomc-site 1 line=28 iter=61\nomc-site 1 line=28 iter=62\nomc-site 1 line=28 iter=63\nomc-site 1 line=30 iter=-\nomc-site 1 line=30 iter=-\nomc-site 1 line=31 iter=-\nomc-site 1 line=31 iter=-\nomc-site 1 line=34 iter=-\nomc-site 1 line=36 iter=-\nomc-site 1 line=36 iter=-\nomc-site 1 line=44 iter=-\nomc-site 1 line=49 iter=-\nomc-site 1 line=50 iter=-\nomc-site 1 line=50 iter=-\nomc-site 1 line=56 iter=-\nomc-site 1 line=56 iter=-\nomc-site 1 line=56 iter=-\nomc-site 1 line=56 iter=-\n" + }, + "reason": "Exact target-specific runtime trap sites, including call-stack guards." + }, + { + "source_spec": "seed/qualification/om2/sec/s3s4/fold-trap-diag.om+seed/qualification/om2/sec/s3s4/lib-pu.om", + "source_sha256": "d631015818345853519b160ff387e33a91a899ec5c8917dd963982cd5de55ddc", + "aarch64": { + "exit": 0, + "stderr": "omc-site 1 line=20 iter=-\nomc-site 1 line=23 iter=-\nomc-site 1 line=27 iter=-\nomc-site 1 line=29 iter=-\nomc-site 1 line=29 iter=-\nomc-site 1 line=33 iter=-\nomc-site 1 line=34 iter=-\nomc-site 1 line=34 iter=-\nomc-site 1 line=34 iter=-\nomc-site 1 line=37 iter=-\nomc-site 1 line=39 iter=0\nomc-site 1 line=39 iter=0\nomc-site 1 line=39 iter=1\nomc-site 1 line=39 iter=2\nomc-site 1 line=39 iter=3\nomc-site 1 line=44 iter=0\nomc-site 1 line=44 iter=1\nomc-site 1 line=44 iter=2\nomc-site 1 line=44 iter=2\nomc-site 1 line=44 iter=3\nomc-site 1 line=44 iter=3\nomc-site 1 line=49 iter=0\nomc-site 1 line=49 iter=0\nomc-site 1 line=49 iter=1\nomc-site 1 line=49 iter=1\nomc-site 1 line=49 iter=2\nomc-site 1 line=49 iter=2\nomc-site 1 line=49 iter=3\nomc-site 1 line=49 iter=3\nomc-site 1 line=54 iter=0\nomc-site 1 line=54 iter=1\nomc-site 1 line=54 iter=2\nomc-site 1 line=54 iter=2\nomc-site 1 line=54 iter=3\nomc-site 1 line=54 iter=3\nomc-site 1 line=59 iter=0\nomc-site 1 line=59 iter=1\nomc-site 1 line=59 iter=1\nomc-site 1 line=59 iter=2\nomc-site 1 line=59 iter=2\nomc-site 1 line=59 iter=3\nomc-site 1 line=59 iter=3\nomc-site 1 line=64 iter=0\nomc-site 1 line=64 iter=0\nomc-site 1 line=64 iter=0\nomc-site 1 line=64 iter=1\nomc-site 1 line=64 iter=1\nomc-site 1 line=64 iter=1\nomc-site 1 line=64 iter=1\nomc-site 1 line=64 iter=2\nomc-site 1 line=64 iter=3\nomc-site 1 line=68 iter=-\nomc-site 1 line=70 iter=0\nomc-site 1 line=70 iter=0\nomc-site 1 line=70 iter=1\nomc-site 1 line=70 iter=2\nomc-site 1 line=70 iter=3\nomc-site 1 line=20 iter=-\nomc-site 1 line=74 iter=-\nomc-site 1 line=20 iter=-\nomc-site 1 line=75 iter=-\nomc-site 1 line=23 iter=-\nomc-site 1 line=78 iter=-\nomc-site 1 line=23 iter=-\nomc-site 1 line=79 iter=-\nomc-site 1 line=88 iter=-\nomc-site 1 line=93 iter=-\nomc-site 1 line=94 iter=-\nomc-site 1 line=94 iter=-\nomc-site 1 line=100 iter=-\nomc-site 1 line=100 iter=-\nomc-site 1 line=100 iter=-\n" + }, + "x86_64": { + "exit": 0, + "stderr": "omc-site 1 line=21 iter=-\nomc-site 1 line=24 iter=-\nomc-site 1 line=28 iter=-\nomc-site 1 line=28 iter=-\nomc-site 1 line=30 iter=-\nomc-site 1 line=30 iter=-\nomc-site 1 line=30 iter=-\nomc-site 1 line=34 iter=-\nomc-site 1 line=35 iter=-\nomc-site 1 line=35 iter=-\nomc-site 1 line=35 iter=-\nomc-site 1 line=35 iter=-\nomc-site 1 line=38 iter=-\nomc-site 1 line=38 iter=-\nomc-site 1 line=40 iter=0\nomc-site 1 line=40 iter=0\nomc-site 1 line=40 iter=0\nomc-site 1 line=40 iter=1\nomc-site 1 line=40 iter=1\nomc-site 1 line=40 iter=2\nomc-site 1 line=40 iter=2\nomc-site 1 line=40 iter=3\nomc-site 1 line=40 iter=3\nomc-site 1 line=45 iter=0\nomc-site 1 line=45 iter=0\nomc-site 1 line=45 iter=1\nomc-site 1 line=45 iter=1\nomc-site 1 line=45 iter=2\nomc-site 1 line=45 iter=2\nomc-site 1 line=45 iter=2\nomc-site 1 line=45 iter=3\nomc-site 1 line=45 iter=3\nomc-site 1 line=45 iter=3\nomc-site 1 line=50 iter=0\nomc-site 1 line=50 iter=0\nomc-site 1 line=50 iter=0\nomc-site 1 line=50 iter=1\nomc-site 1 line=50 iter=1\nomc-site 1 line=50 iter=1\nomc-site 1 line=50 iter=2\nomc-site 1 line=50 iter=2\nomc-site 1 line=50 iter=2\nomc-site 1 line=50 iter=3\nomc-site 1 line=50 iter=3\nomc-site 1 line=50 iter=3\nomc-site 1 line=55 iter=0\nomc-site 1 line=55 iter=0\nomc-site 1 line=55 iter=1\nomc-site 1 line=55 iter=1\nomc-site 1 line=55 iter=2\nomc-site 1 line=55 iter=2\nomc-site 1 line=55 iter=2\nomc-site 1 line=55 iter=3\nomc-site 1 line=55 iter=3\nomc-site 1 line=55 iter=3\nomc-site 1 line=60 iter=0\nomc-site 1 line=60 iter=0\nomc-site 1 line=60 iter=1\nomc-site 1 line=60 iter=1\nomc-site 1 line=60 iter=1\nomc-site 1 line=60 iter=2\nomc-site 1 line=60 iter=2\nomc-site 1 line=60 iter=2\nomc-site 1 line=60 iter=3\nomc-site 1 line=60 iter=3\nomc-site 1 line=60 iter=3\nomc-site 1 line=65 iter=0\nomc-site 1 line=65 iter=0\nomc-site 1 line=65 iter=0\nomc-site 1 line=65 iter=0\nomc-site 1 line=65 iter=1\nomc-site 1 line=65 iter=1\nomc-site 1 line=65 iter=1\nomc-site 1 line=65 iter=1\nomc-site 1 line=65 iter=1\nomc-site 1 line=65 iter=2\nomc-site 1 line=65 iter=2\nomc-site 1 line=65 iter=3\nomc-site 1 line=65 iter=3\nomc-site 1 line=69 iter=-\nomc-site 1 line=69 iter=-\nomc-site 1 line=71 iter=0\nomc-site 1 line=71 iter=0\nomc-site 1 line=71 iter=0\nomc-site 1 line=71 iter=1\nomc-site 1 line=71 iter=1\nomc-site 1 line=71 iter=2\nomc-site 1 line=71 iter=2\nomc-site 1 line=71 iter=3\nomc-site 1 line=71 iter=3\nomc-site 1 line=21 iter=-\nomc-site 1 line=75 iter=-\nomc-site 1 line=75 iter=-\nomc-site 1 line=21 iter=-\nomc-site 1 line=76 iter=-\nomc-site 1 line=76 iter=-\nomc-site 1 line=24 iter=-\nomc-site 1 line=79 iter=-\nomc-site 1 line=79 iter=-\nomc-site 1 line=24 iter=-\nomc-site 1 line=80 iter=-\nomc-site 1 line=80 iter=-\nomc-site 1 line=89 iter=-\nomc-site 1 line=94 iter=-\nomc-site 1 line=95 iter=-\nomc-site 1 line=95 iter=-\nomc-site 1 line=101 iter=-\nomc-site 1 line=101 iter=-\nomc-site 1 line=101 iter=-\nomc-site 1 line=101 iter=-\n" + }, + "reason": "Exact target-specific runtime trap sites, including call-stack guards." + }, + { + "source_spec": "seed/omc/om2/s2/bad-growth.om", + "source_sha256": "107518abdf93e4a6d07b2f6d96342e0d91d14a222da2a56f8a27c248280c8829", + "aarch64": { + "exit": 14, + "stderr": "omc: line 6: error 14\n" + }, + "x86_64": { + "exit": 14, + "stderr": "omc: line 8: error 14\n" + }, + "reason": "Same emitted-storage ceiling; target instruction sizes reach it at different source tokens." + }, + { + "source_spec": "seed/qualification/om2/sec/s3s4/unroll-growth.om", + "source_sha256": "57e296be9ce8a4bb059e057192829f4efe7172d7ed26401e300c188e73e3c2b1", + "aarch64": { + "exit": 14, + "stderr": "omc: line 23: error 14\n" + }, + "x86_64": { + "exit": 14, + "stderr": "omc: line 22: error 14\n" + }, + "reason": "Same emitted-storage ceiling; target instruction sizes reach it at different source tokens." + }, + { + "source_spec": "seed/qualification/om2/sec/s3s4/unroll-growth-diag.om", + "source_sha256": "49fba097cfb5aa54d2ce8001f561bf6c5f2caa29fbaa42a31374e43e1f4e3c5f", + "aarch64": { + "exit": 14, + "stderr": "omc: line 23: error 14\nomc-diag 1 code=14 sev=error line=23 col=17 span=813-814 expect=value found=73 obligation=growth profile=OM-2\n" + }, + "x86_64": { + "exit": 14, + "stderr": "omc: line 22: error 14\nomc-diag 1 code=14 sev=error line=22 col=17 span=792-794 expect=value found=3131 obligation=growth profile=OM-2\n" + }, + "reason": "Same emitted-storage ceiling; target instruction sizes reach it at different source tokens." + }, + { + "source_spec": "pack:seed/qualification/om2/c2/corpus.pack:3254042:49+cyc:seed/qualification/om2/c2/cyc-stmt.txt:3145716+pack:seed/qualification/om2/c2/corpus.pack:3254190:34", + "source_sha256": "05d0ee5977dc7991191f0e4fbc35dcc9cc7ec6b7aa321c7703256685884eda65", + "reason": "Frozen AArch64 branch-range refusal; x86 has its own checked branch/output limits. Accepted x86 programs require decoded instructions and an explicit execution oracle.", + "aarch64": { + "exit": 24, + "stderr": "omc: line 262148: error 24\n" + }, + "x86_64": { + "exit": 0, + "stderr": "" + }, + "x86_execution": { + "exit": 0, + "stdout": "", + "stderr": "" + } + }, + { + "source_spec": "pack:seed/qualification/om2/c2/corpus.pack:3254323:49+cyc:seed/qualification/om2/c2/cyc-stmt.txt:6291444+pack:seed/qualification/om2/c2/corpus.pack:3254471:34", + "source_sha256": "982ec370ef18a3a5ce391624e2a93073614fbab58df798585d3af8f21fbaa1ad", + "reason": "Frozen AArch64 branch-range refusal; x86 has its own checked branch/output limits. Accepted x86 programs require decoded instructions and an explicit execution oracle.", + "aarch64": { + "exit": 24, + "stderr": "omc: line 524292: error 24\n" + }, + "x86_64": { + "exit": 14, + "stderr": "omc: line 305035: error 14\n" + } + }, + { + "source_spec": "pack:seed/qualification/om2/c2/corpus.pack:3254604:59+cyc:seed/qualification/om2/c2/cyc-stmt.txt:3600000+pack:seed/qualification/om2/c2/corpus.pack:3254762:38", + "source_sha256": "3bacfe18c6a44b1b8909a5119d1ffba1b9b892b3d18c2eeb5673d8d427ca051b", + "reason": "Frozen AArch64 branch-range refusal; x86 has its own checked branch/output limits. Accepted x86 programs require decoded instructions and an explicit execution oracle.", + "aarch64": { + "exit": 24, + "stderr": "omc: line 300006: error 24\n" + }, + "x86_64": { + "exit": 0, + "stderr": "" + }, + "x86_execution": { + "exit": 0, + "stdout": "", + "stderr": "" + } + }, + { + "source_spec": "pack:seed/qualification/om2/c2/corpus.pack:3254899:52+cyc:seed/qualification/om2/c2/cyc-stmt.txt:3600000+pack:seed/qualification/om2/c2/corpus.pack:3255050:34", + "source_sha256": "7d7d35a0bc6f8ff99ead211b5253df42114d08e1856bd630576e64cf600b11d9", + "reason": "Frozen AArch64 branch-range refusal; x86 has its own checked branch/output limits. Accepted x86 programs require decoded instructions and an explicit execution oracle.", + "aarch64": { + "exit": 24, + "stderr": "omc: line 300005: error 24\n" + }, + "x86_64": { + "exit": 0, + "stderr": "" + }, + "x86_execution": { + "exit": 0, + "stdout": "", + "stderr": "" + } + }, + { + "source_spec": "pack:seed/qualification/om2/c2/corpus.pack:3255183:51+cyc:seed/qualification/om2/c2/cyc-stmt.txt:3600000+pack:seed/qualification/om2/c2/corpus.pack:3255333:30", + "source_sha256": "581b5e09b325a89b32ffb704a5719d90333d9dcbd24d891aa2385b43dd6effac", + "reason": "Frozen AArch64 branch-range refusal; x86 has its own checked branch/output limits. Accepted x86 programs require decoded instructions and an explicit execution oracle.", + "aarch64": { + "exit": 24, + "stderr": "omc: line 300008: error 24\n" + }, + "x86_64": { + "exit": 0, + "stderr": "" + }, + "x86_execution": { + "exit": 102, + "stdout": "", + "stderr": "" + } + }, + { + "source_spec": "pack:seed/qualification/om2/c2/corpus.pack:3386578:49+cyc:seed/qualification/om2/c2/cyc-stmt.txt:3145728+pack:seed/qualification/om2/c2/corpus.pack:3386726:34", + "source_sha256": "89d80a4da80fbc5a2d0086ad391caea8207c666edac860ff71e93d5ca595ddea", + "reason": "Frozen AArch64 branch-range refusal; x86 has its own checked branch/output limits. Accepted x86 programs require decoded instructions and an explicit execution oracle.", + "aarch64": { + "exit": 24, + "stderr": "omc: line 262149: error 24\n" + }, + "x86_64": { + "exit": 0, + "stderr": "" + }, + "x86_execution": { + "exit": 0, + "stdout": "", + "stderr": "" + } + }, + { + "source_spec": "seed/qualification/om2/sec/s3s4/unroll-growth.om+seed/qualification/om2/sec/s3s4/lib-pu.om", + "source_sha256": "805349f4597932c31aac59c7985d947c191d8906d9195fead2c0e4bbfa95da2f", + "aarch64": { + "exit": 14, + "stderr": "omc: line 23: error 14\n" + }, + "x86_64": { + "exit": 14, + "stderr": "omc: line 22: error 14\n" + }, + "reason": "Same emitted-storage ceiling; target instruction sizes reach it at different source tokens." + }, + { + "source_spec": "seed/qualification/om2/sec/s3s4/unroll-growth-diag.om+seed/qualification/om2/sec/s3s4/lib-pu.om", + "source_sha256": "aa923b4c0dfab331d3e664fc3fe4c13751597b0d56201e7fd92552a3a11a2610", + "aarch64": { + "exit": 14, + "stderr": "omc: line 23: error 14\nomc-diag 1 code=14 sev=error line=23 col=17 span=813-814 expect=value found=73 obligation=growth profile=OM-2\n" + }, + "x86_64": { + "exit": 14, + "stderr": "omc: line 22: error 14\nomc-diag 1 code=14 sev=error line=22 col=17 span=792-794 expect=value found=3131 obligation=growth profile=OM-2\n" + }, + "reason": "Same emitted-storage ceiling; target instruction sizes reach it at different source tokens." + } + ] +} diff --git a/seed/omc/x86_corpus_drivers.py b/seed/omc/x86_corpus_drivers.py new file mode 100755 index 000000000..97efc53ef --- /dev/null +++ b/seed/omc/x86_corpus_drivers.py @@ -0,0 +1,1166 @@ +#!/usr/bin/env python3 +"""Read-only, content-pinned FR-9 callers and scratch drivers. + +This is a verification oracle, never a compiler/backend dependency. Bare images +are embedded verbatim and CALLed through the compiler's documented private ABI; +no appended main substitutes for the image being qualified. Return observations +include all 64 bits and every caller-declared observable array (including edits). +Kernel exit codes 100+trap retain their meaning. A corrupt-result wrapper is the negative control. +No candidate is executed here. The only subprocess is read-only git object lookup +for explicitly pinned historical resources; no device or service is accessed. +""" +from __future__ import annotations + +import hashlib +from pathlib import Path +import re +import shutil +import struct + +REVIEW_REVISION = "becf5c817" +# Exact raw/composed/frozen source bytes reviewed against the original conductors. +# A changed source does not inherit execution authority from its filename. +REVIEWED_SOURCES = dict(row.split(" ", 1) for row in """ +5e8a16d6c4fa8bf8581986ad4c3e35091a5a5574a6cada882b078f6c00f12159 seed/omc/contracts/bridge.om +0fbd9c605528135bf7edd6cc6642655c2b99fc2847049a1860acaf9da25df28c seed/omc/contracts/parity.om +88671904983dda8dc483dda9f98683e86d4448494d79c9cf1020e3d12f8aa7bf seed/omc/contracts/parity.omegese +e1109db40b1ab3f8b7c5b847bb9032810fc3dcf836ec58a0caf5459033636764 seed/omc/om2/s3/a-kept.om +e6e04d5f60f921be058b89ab369735e6b8aa9d398d836f713bbc8c688c95c513 seed/omc/om2/s3/a-ok.om +92c7813513f2bb511bbacc53e1a351a417cabc10139134e477bfb61483005c92 seed/omc/om2/s3/a-om1.om +1de96237beb1b2d7d76fb226cd930036d8cc1d8c82faf4114f3309a1396365a5 seed/omc/om2/s4/o-out.om +400babb171c1703b3abf1676529b483d8ba2f89fb76d6fbc0acc16b181cc5565 seed/omc/om2/s4/o-slots6.om +e2661535df50624a00f801322c397bf9f4699096fa90f2c556127c0f4fd13c0f seed/omc/om2/s4/v-fm-entry.om +3490824f6e8cb82e661c7a408e8e4264790875e9e0147914ad4b0571dde0fc79 seed/omc/om2/s4/v-slots6.om +f49369293ec1b01421084328e0629077f819d541422b59330b8c2d8e9fd16e13 seed/omc/om2/s4/x-two.om +e240ea92917b12b114204020a1e247c1cec43be423745f4c2a48e0bd7ca6fc95 seed/omc/om2/s4/x-one.om +24f7a41a210eb140669e957cd7f4f7c895e2637907a6e139888b384edc4fc0de seed/omc/om2/s4/x-noexport.om +1ca53826b7c4c2e544ea0954847c48f45fd171247b96cf80919c3391712e5010 seed/omc/om2/s4/x-32.om +3975d71de54566c04bf0331b230f598b9f3cf794cb37bae1a2d874bfea49adb7 seed/omc/om2/s4/x-abs-private.om +2fe76d4c44b3e3faf6bfd250ebec794ba5b3d11b6b9199366549b664d219cc38 seed/qualification/om2/baseline/slice-witness.om +1552ce25751cc7bcff786cc85022c31eeafc62451701248b56e32fb6b4cff46c seed/qualification/om2/leak/fixtures/s1-rot.om +22320be74b7ee939c78374cb4fe0b8e4f91d7ca266cc3b1e2dcb3477295991bd seed/qualification/om2/leak/fixtures/call-data.om +dc183284c582312a57530b2ae42090195a3e5c209e7d34c1f414887c65e7fa47 seed/qualification/om2/leak/fixtures/call-public.om +cfa1fad50465318fd6277cd87f78291914f02d3ef2eb6af16fa02c200cc05356 seed/qualification/om2/leak/fixtures/data-branch.om +bd318c0eecc7c01e29fa7e90113829937e509640cd4812a3fa509a960a572282 seed/qualification/om2/leak/fixtures/data-index.om +42d7e3ddc4be8d482cb625152b210f8c2cb002dfe8f02e23bc984d0c4d547e67 seed/qualification/om2/leak/fixtures/flags.om +24f1d2131c2d36cc810623d68c8ea2f8cdcccef29c111a71231b63a08eca1f2b seed/qualification/om2/leak/fixtures/len-loop.om +a73a75ff3bb10b96af698293190a96c804ca332461f37a067cb3c77fd43b5cfe seed/qualification/om2/leak/fixtures/local.om +c48dffbf50d65691e3d1d624c3e6944c225b2335c6b1fbb595c1b05e8e4452dc seed/qualification/om2/leak/fixtures/pub-unknown.om +f3b813530dec10b0d99f17ae29c981620c28e9d3f3dea4b16d97010a2247d830 seed/qualification/om2/leak/fixtures/public-in.om +18e969dffb1c8fcf826c1bb6078df00bd81e49d8403f1bf664a2a964be72ef51 seed/qualification/om2/leak/fixtures/public-out.om +21e366be6ad718395e5018186a3915d57ea02147a54b247ef1f69f001960f642 seed/qualification/om2/leak/fixtures/reachable-trap.om +d65dd8eefd07ecb2e6fa2498fbedb1ad4919681632e2bf99b5b0fffe6f3c56b5 seed/qualification/om2/leak/fixtures/svc.om +27423284f3ce99b7f00a5497456a697d83445427c4f5c5ba639db8d06165bfe5 seed/qualification/om2/leak/fixtures/trap-check.om +7bce001ac35fee18b0205df59aeeaea62b1d2eea68e336c0262ad3741f40028e pack:seed/qualification/om2/c2/corpus.pack:57323:784 +124c19e6343133d45146e565eeb9307bbe7350a07fca01a736d6da8c3e5d4863 pack:seed/qualification/om2/c2/corpus.pack:96:6318 +79857ee82002d11d3df4c0c2a99523aa3419d18c5fc188a41efc778887b4baa3 pack:seed/qualification/om2/c2/corpus.pack:6510:5933 +7f034814303a8a40b4bc56383ddd55ab2ae8460291f80793340bc3b0ac024e21 pack:seed/qualification/om2/c2/corpus.pack:12540:35333 +459a60da8e660ee1f433a9679bb41467074fda45997e5168e23e92ebad0d570b pack:seed/qualification/om2/c2/corpus.pack:195375:291 +07bc11a69f0d629e0c262056061789114d8710505a308e3e2a5ac42ae73dee94 pack:seed/qualification/om2/c2/corpus.pack:195762:7593 +5ff3b6cddb9f66971ecb7b58da2d2f07e3df9e7176dd1ba50a2c3a36f2447e81 pack:seed/qualification/om2/c2/corpus.pack:206091:80 +02b9d845454e7379d4d55f3c78af7e9ddd9f87f15d196765b338ee5ae6416965 pack:seed/qualification/om2/c2/corpus.pack:206265:66 +3323f23ff905d4915ced5c83d97d772c5b4e4e1347ba738ae3752ef74d99cc0e pack:seed/qualification/om2/c2/corpus.pack:206425:44 +06149063fb825604227f54d226fbce04afe48b755f6ccbe2690ef35afe1c5a65 pack:seed/qualification/om2/c2/corpus.pack:206563:68 +3b0acd8ea8b0a46d3131378ae447ffd337e15e0b92da1c45ba2c1a2383dc4b54 pack:seed/qualification/om2/c2/corpus.pack:206726:120 +cf0a8200ec4341d1c4634bceb6bab5e7cca15bae510ca4d6f41982fe1ad70a9c pack:seed/qualification/om2/c2/corpus.pack:206940:72 +e9548779048e3d97b48f7d9904fa832aa47c8a6158c9355d2b88eefa50c87589 pack:seed/qualification/om2/c2/corpus.pack:207565:82 +6c703b6f9362707125bf2304ef2aa2688dc82fce304d36ad7ee8876528c233a6 pack:seed/qualification/om2/c2/corpus.pack:208183:80 +f744e3ec012deac392e62d6a8d4133efb7681887d31675d6ff516d4aead07e64 pack:seed/qualification/om2/c2/corpus.pack:212407:116 +fe772bcf3433b1ea0daa0fda78b877790bbf2eacf251ce05f64f0f77dede0e51 pack:seed/qualification/om2/c2/corpus.pack:212617:99 +e0382bdae6aabd733c7eb4ba314c9feca55242a8fa25360a6442cde40820a8f0 pack:seed/qualification/om2/c2/corpus.pack:212811:119 +0481442ea45287b9a1a2c5b9116aea6b36dafd0a2d7d89019aa923b3a7d4a356 pack:seed/qualification/om2/c2/corpus.pack:213024:90 +9b6e72361efce2dbdf209e05a74b89d3a0bf2491818db684d6aa110f3159243c pack:seed/qualification/om2/c2/corpus.pack:213208:56 +5b09682d993bbb9afb96fdbc0f7a75c8e2cf14fc094b5b6c6e1ecf7fcd6ee374 pack:seed/qualification/om2/c2/corpus.pack:213358:50 +93d8728c52bfad927150d0e08d74a1eca29256489dd3f3acc48c1ad4034f6823 pack:seed/qualification/om2/c2/corpus.pack:213503:158 +3c78cf83258748b829d8248670f7b46d69351f8e389b9ddecb3ccbfb6548e1da pack:seed/qualification/om2/c2/corpus.pack:213756:188 +93fa5e1cce0ea59252fbb8203d1a7fe15b40ebcb82cf7d4090d62fa1abe4d477 pack:seed/qualification/om2/c2/corpus.pack:214039:114 +2efe0c6e3663a40562589b98f4229f0ac2a43ab264c53b4fbca40d11c76edbfd pack:seed/qualification/om2/c2/corpus.pack:214247:38 +b078ae26e824ad0cb671108a896862ee033c90c6f4394637684b15bd90e95322 pack:seed/qualification/om2/c2/corpus.pack:214379:87 +52a9a88352cc3e9c60832187586fafe0d05748693ce55141844a9d5030229a6e pack:seed/qualification/om2/c2/corpus.pack:214561:105 +ac0eb5306b4233a8c49dc9db8d503ec343b76c0bac0b3681c22b3d0d866a99f3 pack:seed/qualification/om2/c2/corpus.pack:214761:120 +aca09a84add052ccf4416bc8f7b0d01a71d9fe0b6de8957322b90a88a3597f88 pack:seed/qualification/om2/c2/corpus.pack:214976:132 +4260833a70ad7a0a858a0b7910b0364a426580e9aba1c622565fc140a42b58ae pack:seed/qualification/om2/c2/corpus.pack:215203:176 +38d8b37e5878695b29d5308a8b43ac2dc9877908106528515104423027cff52b pack:seed/qualification/om2/c2/corpus.pack:215473:97 +55b567b2c43c115ec5cfafd9ec7d0085feef7ca688da5a63c34203224b27e35e pack:seed/qualification/om2/c2/corpus.pack:215665:113 +6a56da67212db3956af91e36a2b680b9c78f98bb8d9f0e76a49eaac7ee8cffd1 pack:seed/qualification/om2/c2/corpus.pack:215873:136 +184e9efad7fccc9b147f4813b2434ae1a5cb9122a0ce423b3b7356be18849874 pack:seed/qualification/om2/c2/corpus.pack:216104:129 +4098c21c8e3ef82a9d6bc61012537a3b30ef89568cb1bbe3b2cf3f33cad6595a pack:seed/qualification/om2/c2/corpus.pack:216523:184 +895c35cbfdfc9d94103790214e47f5409af1b0d87788b4925b25fccb59d4e02c pack:seed/qualification/om2/c2/corpus.pack:216802:109 +b5624972ed3b4394027eca96d94b670f7a8846af51d3083940e63c079c8649e4 pack:seed/qualification/om2/c2/corpus.pack:217005:71 +14439646d9db8ec1c40b7646b3ec177d21ce8178a1e7c6c001134339cd8fab76 pack:seed/qualification/om2/c2/corpus.pack:217520:107 +95a41a420eb97cac77023a066936cc4c9673e3224489d118834edd076232ab59 pack:seed/qualification/om2/c2/corpus.pack:218423:145 +bd88c1daeb2c9f2bde005d46172b7b7e0b4ed2c95081ea106dd62f8caafb16a0 pack:seed/qualification/om2/c2/corpus.pack:218663:157 +fe9f95b097d0137a3ddb4a62246c5e6875fbc19aded228c2f23c4679b84c2ccf pack:seed/qualification/om2/c2/corpus.pack:218914:64 +4335f62c4d839f7a7d0addd992208b6107249d7620d840080a81076b3800bc26 pack:seed/qualification/om2/c2/corpus.pack:219072:59 +23026d2191616675acd10e798835bcb290ecd259c1e17935019bb2f97021d9fd pack:seed/qualification/om2/c2/corpus.pack:219226:124 +a55747b9894b8a8c07f33e6678b8f5482eee35096c97ff686be7ec7b7784d9c1 pack:seed/qualification/om2/c2/corpus.pack:219445:258 +d8196e4bdfe690afeed43f7a52aefbb76f13ca42a6caa51fc61e70a585165213 pack:seed/qualification/om2/c2/corpus.pack:219797:99 +9acda5f3fd9ddc1dc01923fa76a30a4667f2d0e8d460ba2a60c5d6d5fc27807c pack:seed/qualification/om2/c2/corpus.pack:219991:123 +17b76ece94d8d691b3339b4d3f58443814c81d897a6e3f746981263674d32257 pack:seed/qualification/om2/c2/corpus.pack:220208:89 +8ecfa30de1ec78883a3c4c40fc5a11aeb2646a38df403a8bf61da47d99017e1d pack:seed/qualification/om2/c2/corpus.pack:220392:230 +a50c02817f492a2390f613aa5f7554ef6ef08b9a41d6ce73fa1eb1fa53191af1 pack:seed/qualification/om2/c2/corpus.pack:220717:341 +efe5b555293ac23f0f3a6ece186f26a1cf1e85e0e007051dc7bff6d4ff9efa25 pack:seed/qualification/om2/c2/corpus.pack:304924:132 +ab8ac8a7cd6129c802a46e93d9d74ff3998b5673e61929b2be23f945ec80cb87 pack:seed/qualification/om2/c2/corpus.pack:305151:194 +38a27f10bed8c3efcbb1b5cf7f5b8aadcef92d3bc4b472655cffe513f5254886 pack:seed/qualification/om2/c2/corpus.pack:305440:402 +bdf0f55318ab9b9e85a93c1a4d0722912542233b40fdb930cbd2848d5be92a51 pack:seed/qualification/om2/c2/corpus.pack:305937:136 +f0f644177343e1a62312ce5c1fdb4ad5cfb2f76cd97650306661ffc7a68f6702 pack:seed/qualification/om2/c2/corpus.pack:306168:158 +eb0aad938117ea324c5a90362261d08b5d325822ff71ad2274ff9ee9bb523038 pack:seed/qualification/om2/c2/corpus.pack:306421:123 +472eddef7d2520b8b12f67468ca98e0ab01f0dc9468a8f9d767b54980da12f27 pack:seed/qualification/om2/c2/corpus.pack:306639:159 +facc6323098519224f4f6b86fa26e86a4859097dd23e111d56d084fc81b4e083 pack:seed/qualification/om2/c2/corpus.pack:535426:187 +67eaf5747e821c7c86c4d1bdaa4eeebaf3b41d70d8a998bc6a19509bc7d4b91e pack:seed/qualification/om2/c2/corpus.pack:535707:69 +c6a5d45a10812d40dc81227e9afe52d25547f7fca8d4b7193e6f2016214251f5 pack:seed/qualification/om2/c2/corpus.pack:831934:490 +5879c65c06c7099c95dc3d05ab0c3fc87b9506c5b868b577a23355d1fea58216 pack:seed/qualification/om2/c2/corpus.pack:844746:489 +ffbe6e67cb3288050ebb8bc7bdff12cb08748b30f32adc27aee9a838f6c14fc4 pack:seed/qualification/om2/c2/corpus.pack:854503:211 +71d7b9655470cddd00e2ea1d6607a3693ac8add4291d1b31274bad80953414d4 pack:seed/qualification/om2/c2/corpus.pack:861552:284 +b706f5af251818d95bdaccfd29f754a85bd426c607cf654cd9438cdde5848b34 pack:seed/qualification/om2/c2/corpus.pack:874651:488 +f49cd869b69efaff7eba8f483ad6e80b5cac2b964944cad5ae4300b6dd345d1b pack:seed/qualification/om2/c2/corpus.pack:881684:488 +f175a5f86d183fa1fbc1d0952fc206f2caaec554cdec7c6047158b1baefdb831 pack:seed/qualification/om2/c2/corpus.pack:882851:492 +114342a696e777f694ec56aa34f6bef277972b955e16257e7b3ca77b52706e01 pack:seed/qualification/om2/c2/corpus.pack:883438:491 +f953762234d6f6d0755da130cb67202bb4c77515b58a4f9b02876a7fe24068af pack:seed/qualification/om2/c2/corpus.pack:891049:490 +01ab9d2d4bd4b40ecbb184451713ba4b362491cb6ac1cefd6e46cd607a0d3103 pack:seed/qualification/om2/c2/corpus.pack:900992:492 +3c3fece47ba700829719ca925f78c403ceecdadbf1205828f37b377f83e26243 pack:seed/qualification/om2/c2/corpus.pack:901579:491 +4e0734c842150045b235814e0092da2359b4915ffbffc38fe7b905bc7db224f3 pack:seed/qualification/om2/c2/corpus.pack:909779:492 +67a72da083033c035e9aafcfb4ce990a35e23491708d3c3f32962fb345314ccd pack:seed/qualification/om2/c2/corpus.pack:910366:492 +0d3dfc65d5cdc76b7bdc3f8b1959ce7b7a6eccacab087e52a51040c75c7e5c41 pack:seed/qualification/om2/c2/corpus.pack:913293:490 +e4847e6a337e7e28e95c871f2c5dfe60676a042b5ff62305ad76f457bb899d2a pack:seed/qualification/om2/c2/corpus.pack:932052:491 +681fde125c39a896a431f9f4811c8e068d96b68bb4175dd6cfc73ebc6126d2a8 pack:seed/qualification/om2/c2/corpus.pack:944331:489 +ce66b95e83083633c167acfa5221033ce3b864ba08ec8c56870611bcd4b28d41 pack:seed/qualification/om2/c2/corpus.pack:1543668:245 +ecf2b472725535c92c07ebe753015bc37babd7f400c08ff32542f826b37ab296 pack:seed/qualification/om2/c2/corpus.pack:1546871:98 +9985b767f544272064a1f9a4eb5c15a0748f523778211cace20924150801755d pack:seed/qualification/om2/c2/corpus.pack:1557428:244 +82884e201f63f38bee3f590cbca258ef14bb1179664f288d1073b39a0e3c1497 pack:seed/qualification/om2/c2/corpus.pack:1558811:245 +2e73fba9a6ef545a77c1f59d38e9df8ae5abf7713045fae9b363f2421c26c5c4 pack:seed/qualification/om2/c2/corpus.pack:1563255:244 +e8988da4e074161ec2b337679da602be58562ff944649c52356f7d26a57874c7 pack:seed/qualification/om2/c2/corpus.pack:1564272:247 +d1083e1cde3fc7424125a610da7262677cf66c0a1a3e4a75263defa378aae783 pack:seed/qualification/om2/c2/corpus.pack:1564614:247 +7542ab65bc9c66f1d67ef7994bc0df545030918e9c530d2fc90406dc3dc3fa36 pack:seed/qualification/om2/c2/corpus.pack:1573817:243 +defcde4c8039988786db6a0f9fce9d8fed93ae630cbe35418bae961dc6e70972 pack:seed/qualification/om2/c2/corpus.pack:1574833:263 +21f1e8809792a8fc935cebed2ef42614df8bfaa142e175384ff6f285a84fb8aa pack:seed/qualification/om2/c2/corpus.pack:1575191:247 +933054ca6f67bcfb407bd9771ed90820aac96ef7d8e4b31b738a72c67ad885ab pack:seed/qualification/om2/c2/corpus.pack:1575873:246 +1379a69ab169b6fe9740e19771483ea2255ec3184b37dc26c6fc87607242592c pack:seed/qualification/om2/c2/corpus.pack:1576214:247 +4b0d702b91a70d8c0b2f3939034083bae6a1fd8bd215331f345a09e803741252 pack:seed/qualification/om2/c2/corpus.pack:2282626:583 +1cc53eca436923c42a5c1b5d9653cf955ed110e65c52015db5b7ee820588b419 pack:seed/qualification/om2/c2/corpus.pack:2312908:582 +99f14641d129ff058e073ebb5860b1878e40b52c6d686b2f5509c65c830ef183 pack:seed/qualification/om2/c2/corpus.pack:2337699:361 +a47b08518f60139ad7c6227a1f4b8a2121317e4d62f948048ae51f06f07d510b pack:seed/qualification/om2/c2/corpus.pack:2341160:585 +f332321ea24ce957337cba446bdf451ef110e8cd9dd3bf83db0075f40bf2f626 pack:seed/qualification/om2/c2/corpus.pack:2348629:584 +59972aab2ad6d3c7f924410e1f126ba9a5b7f312064cfa15a9ac1b696039f501 pack:seed/qualification/om2/c2/corpus.pack:2352021:586 +46e33117fe665460bfa0b3988d069c982796a93a2b792824f43c24e03ad00b4c pack:seed/qualification/om2/c2/corpus.pack:2357446:582 +d1fcf5dfb660d17797084f0fd4c3f085622cc75f60598b23648cb73f0418df3d pack:seed/qualification/om2/c2/corpus.pack:2403570:579 +ae6c5d488d187b032ec176451502a54a815596ea50e90bf63fe1b034464b2bb1 pack:seed/qualification/om2/c2/corpus.pack:2407627:585 +6c60cd43bd3d78530e0b769804155804ab46c0a5da50bf1fca6ecac4d104ac3d pack:seed/qualification/om2/c2/corpus.pack:2408307:586 +3db75feb105dcea58d4280d31af836fb321ffc186b3cf938c4a5a8fb1c114708 pack:seed/qualification/om2/c2/corpus.pack:2417122:586 +7b1110417f21b3f750322a85f3a40ece1f6ce1a891858b8ac527649ca223b42e pack:seed/qualification/om2/c2/corpus.pack:2417803:585 +99690402fb3c371085b0a8a5ea8e77a0b534ddc9d9ab692c0e811fba3bc03c93 pack:seed/qualification/om2/c2/corpus.pack:2421872:584 +63fc2697e34dea011d57320a5771f70185e47dfe6f19c0ec3dcdd133e2400034 pack:seed/qualification/om2/c2/corpus.pack:2422551:584 +df520f8724c914e39b8f418e3100963dc1738c9a68a73047a1c16a4ae94e3124 pack:seed/qualification/om2/c2/corpus.pack:2440904:584 +3c446741e2cbd9febeb3506588f4eb54d70de218c67f9b8496191f8f58d75c0a pack:seed/qualification/om2/c2/corpus.pack:2442261:568 +959b6da3977b08db23cc1dc6a0494a8f620d763754194aeb7ecd96bdec1ed4e7 pack:seed/qualification/om2/c2/corpus.pack:2457530:499 +49fc5ac7807eb14571db4017268d976de25aae1d26e0e3531a11d9095ec9f5ee pack:seed/qualification/om2/c2/corpus.pack:2468439:567 +9475ad4fbee4ec2d66015d166240d549fc32c933c6566c4973e6795e635770cc pack:seed/qualification/om2/c2/corpus.pack:2483728:280 +b89e46e462d7c21fd5d1323e279d3c08aa25fafcac0f744e95349905c01e4bf7 pack:seed/qualification/om2/c2/corpus.pack:2519558:568 +ddf75f3347af715f8c67a7ed6c6fa6e2bf1b11c149d80a884969709023d054f2 pack:seed/qualification/om2/c2/corpus.pack:2521545:571 +d6e4761d4135360016a816f33d7957227c60eecbdf2117b017bc55a5b8f1a9e5 pack:seed/qualification/om2/c2/corpus.pack:2522211:570 +72c537b7bfea6a6d6c0c74537592e391d88358507faecd5d16c5aac7e90bff97 pack:seed/qualification/om2/c2/corpus.pack:2528857:586 +b04e99e05e863709d15a802270eed60544476379c822dd7b48dc4455413a12f7 pack:seed/qualification/om2/c2/corpus.pack:2534217:568 +65db3df333e9c9653977e2f958ee2a92356f9bd1c175bfa1a05ed5483de8017a pack:seed/qualification/om2/c2/corpus.pack:2542193:569 +64b9b4c9a5a931084813bb3a00e4ddee88f3669c00fb50ad7865aa72b307e7aa pack:seed/qualification/om2/c2/corpus.pack:2542857:567 +8d61ecf860da3472aba1fc1718354799463f0b9af5fdffd488370c68e3a92e35 pack:seed/qualification/om2/c2/corpus.pack:2733481:208 +7e3b46c25031f0304f8fa769df461e191264185ac8f4a8242d302b67d74127ec pack:seed/qualification/om2/c2/corpus.pack:2735987:94 +a2a7bc6c11af6728dd4220b8787ea49625e486dd435435f8cb95840a931a81e4 pack:seed/qualification/om2/c2/corpus.pack:2743364:207 +9e660c3db31e9199730624b17cab807cbc71b078cd7cebac92cc91c063f584ca pack:seed/qualification/om2/c2/corpus.pack:2746275:210 +d0304b0da3c4768d710b88e640e5b325ced4d6d909e5b24d2df9b00115dce928 pack:seed/qualification/om2/c2/corpus.pack:2746580:213 +944339d8548b4cec73ed0da6b9a731e70aa9fcbdd955cb46fc8e14d7750a2d4d pack:seed/qualification/om2/c2/corpus.pack:2753538:213 +b0bcc6c32c0a0aa3d7be755583f7ef4032289d9ec420632aefab95a87781e856 pack:seed/qualification/om2/c2/corpus.pack:2767127:152 +981347dac653a9cab7c66fd8f1c6a283184658e2e78b563421ddec7d50db6dca pack:seed/qualification/om2/c2/corpus.pack:3120057:30 +250361be99ced1246405b2e4a2e2de71373a90d0a0569fb43821ed8b106e045f pack:seed/qualification/om2/c2/corpus.pack:3386857:36494 +4e8d5d5c536c2703abb0b85fd086fedca6841d53d4592a8c2c7c5491dd1697c1 pack:seed/qualification/om2/c2/corpus.pack:3490048:339 +982fd12d6376e8d60ad1e8d2b2c2abc51a47a598543b058ecced8522a756a0d9 pack:seed/qualification/om2/c2/corpus.pack:3490482:356 +3da4a848e9d1c1665c2f8a5047a731a60b48533253253b5cfc56cb562381dc06 pack:seed/qualification/om2/c2/corpus.pack:3492055:390 +5867b20666409f323c83d9017cea126bc9ddaa0a4f4d5411e7553e90d40e710c pack:seed/qualification/om2/c2/corpus.pack:3492540:574 +28932d16844b094298e10b2ddbd3e21499668ec5877d67dca19339100a04363f pack:seed/qualification/om2/c2/corpus.pack:3493732:311 +cfccbeb34d3bfb051e01977b9acb2b6166c41bbfaba85a26c85c123643e8012a pack:seed/qualification/om2/c2/corpus.pack:3495087:1831 +e7ea21711b45c957a6264e373e66f597c091b67809bd0c785113d2ea601e71d7 pack:seed/qualification/om2/c2/corpus.pack:3497014:1462 +313b425a4e6b779633e06c0ed3dd6906730f39d230834b2921e4abffe9428a41 pack:seed/qualification/om2/c2/corpus.pack:3515537:428 +2e011318d020bd5e0283bde413b74335b4e4b3c5b417e34b03caa832f5efcf66 pack:seed/qualification/om2/c2/corpus.pack:3516061:1403 +63eab87101f8c71645b26023d422fb910c8d6ce603504608bfb395fc5a7a0cb0 pack:seed/qualification/om2/c2/corpus.pack:3517560:1034 +4a6798fec8b13ca31dc5a7f6223956297e7285b94cd0d4757c269a120efe0bcb pack:seed/qualification/om2/c2/corpus.pack:3558924:366 +28883f52212233aa4bc76182dec3733ad550f209a109a7bd57f5c4227a373e10 pack:seed/qualification/om2/c2/corpus.pack:3573443:533 +767fc04dd38d62a2f1f700366a641a2a7ea7b5429e0341dcffb97bcc8558029b pack:seed/qualification/om2/c2/corpus.pack:3596649:1500 +af68bd088bc58ce973cf53fcc96743dba41a489fe56a4a9dd4f3ecc3c0e3aea0 pack:seed/qualification/om2/c2/corpus.pack:3605118:230 +4ae68017b93e47a9ddc638ef9d0f3e950c9639346102c510c36909e728f28dec pack:seed/qualification/om2/c2/corpus.pack:3609196:824 +01fb867723854f43838a814a8571107e6fea2afba12444f57f35c9012741111d pack:seed/qualification/om2/c2/corpus.pack:3616121:145 +716c1dc3004d55178e09e7c40fa0995f993eea8611e09a70a1f74b9c7a0cf644 pack:seed/qualification/om2/c2/corpus.pack:3616361:146 +31ead9b2a44ca4b10fd637b0fd9ee339005d33b48a731795e71f57d8189628a5 seed/qualification/om2/sec/s3s4/slots-3v.om +175ca1647cb649ddb91bcb47fae4bd6823a86d43d3d22c5235d642de8457c423 seed/qualification/om2/sec/s3s4/slots-2v2s.om +b0bf509e7383e3532db4a548406f37bc6c8000e4ba0023c3f239eca724eea032 seed/qualification/om2/sec/s3s4/slots-1v4x.om +729054dd66a64449b34d9db594b7e2babc2c396d982a0da8a9cc6af03dc96668 seed/qualification/om2/sec/s3s4/slots-6s.om +278556501859427e66202c6a685f4af8d737aa395932463f633eb564193d83b3 seed/qualification/om2/sec/s3s4/slots-out6.om +f578c1f645e8a7e6112b2f45028fa8a018f73fad2149d0de16141607b0969ccc seed/qualification/om2/sec/s3s4/diag-site-plain.om +1ab250b1d4e7d2f437ee680cce5a8918752cf0ef8efe1d89b490270005ceb294 seed/qualification/om2/sec/s3s4/diag-site.om +06c137ece7a94b3e6f5e19043bd6045fbe5208019b4366a43de9cb7558cee587 seed/qualification/om2/sec/s3s4/diag-site-rolled.om +035d21b803806853451dc2f408cc29c3490714b7b73081dd8cfe4b283abb2f85 seed/qualification/om2/sec/s3s4/diag-site-unroll.om +f4c545da9cfed4a6884b39634a371c09353139992f0be377dcea2f4e65e9187d seed/qualification/om2/sec/s3s4/diag-site-nest.om +781ba1bf2768974166c10a3724acbf766080db732bee8d195fa3d872a5ab05c9 seed/qualification/om2/sec/s3s4/diag-site-rolled-plain.om +050c286588e3066c396697c397c999a6ac8aa98334cc9c3bb3fcb43a6d8c084f seed/qualification/om2/sec/s3s4/diag-site-unroll-plain.om +432b642f9b3f5a0502705ef06d61502f4312e82c85adb58b64e5791a5d553e49 seed/qualification/om2/sec/s3s4/diag-site-nest-plain.om +3bd0be5b72fc92825742422dc7157196d85d57891b81c8ce89a6df8969584a82 seed/qualification/om2/sec/s5s7/a5-allops.om +9cb0393b2c6c8f99ad93e5af2db0ae4bbf17de884767de162f9737c20717f369 seed/qualification/om2/sec/s5s7/a5-exact.om +0ec2b5eb427d759eb7563f9dbf8cd1a921a23b9e80c9d7f779315490b23f274c seed/qualification/om2/sec/s5s7/a5-kept.om +1e0a5f4c22cee6170a7f6787fb6c1cc215e1ff9aa0e997bc8f7450c06b3a072b seed/qualification/om2/sec/s5s7/a5-rot64.om +373509e26a12a1c579bf4021d1c275929da7c534812ecdf62c9d0486f11d3eff seed/qualification/om2/sec/s5s7/a5-swap.om +ef1b3dc9f12deef3e2536b6689e79f529f216bff87c8c7b8dd5d5f259b7f3703 seed/qualification/om2/sec/s5s7/abi/abiv.om +743fb07c03061177ce5133926dc442d21d3ba1b74d133f661a2de9ccec1ace92 seed/qualification/om2/sec/s5s7/abi/abiw.om +b21d8c82a5a3648011325261bac9481e9e3147dd29e17b491e04008bda289295 seed/qualification/om2/sec/s5s7/a5-exact.om+seed/qualification/om2/sec/s5s7/pr.om +56fbd35bc5e262553585cdd18a54524622c638fff89d9bf0f84d9c42884c8366 seed/qualification/om2/sec/s5s7/a5-allops.om+seed/qualification/om2/sec/s5s7/pr.om +d7df44a4f803645594ec1e758201d8e1c672c4ebe94c553ed9b4cdca98bb4607 seed/qualification/om2/sec/s5s7/a5-rot64.om+seed/qualification/om2/sec/s5s7/pr.om +c0c8cd2d3c8c9fe4e1cb8f9cfebb5af8d5c625368db1d9af713b0acb33504b24 seed/qualification/om2/sec/s5s7/a5-kept.om+seed/qualification/om2/sec/s5s7/pr.om +c7ceccff2f370d5c82df978399a82372f6d354703d9ff263de8d560df13d3481 seed/qualification/om2/sec/s5s7/a5-swap.om+seed/qualification/om2/sec/s5s7/pr.om +db0101e23ea90154be1f42688a82a5fa96c0f994436a7abf76df7ee8b6586b5e seed/qualification/om2/sec/s5s7/v6-slots6.om +610f69b9b45830f926ebb9c4df2d358a366920eaacd3c5ce8f5ec03da6ea8014 seed/qualification/om2/sec/s5s7/v6-fm-e2.om +e1b60bc4c240e03be0c0fbdb630066f295ff7a53b73a380dab52fa8509f498d6 seed/qualification/om2/sec/s5s7/v6-out.om +4034913df2f245dda9527510129e3d442c61a2b431b40a0650d0348f40270339 seed/qualification/om2/sec/s5s7/m6-export2.om +dd88a128445533d88444c7a6a38687413b2dc3462cf361adb1685ccb162f6c0e seed/qualification/om2/sec/s5s7/m6-noexport.om +c579c57cd55d5ae2e9206bac7a278f3ee56bdbff594d0fb46d2c9f2f03603a69 seed/qualification/om2/sec/s5s7/m6-export-layout.om +932ba37772b3f50046908ed558c84bd3752dec4f619dbb8469ab68dc43a4c097 seed/qualification/om2/sec/s5s7/m6-export32.om +e90ac20ccef2c24e7e0c912a7c768610fb2791c393c9ef239b0108d2cee470c0 seed/spirv/demo.unit.om +0419a9380955e1199e9927412cdbde107b081243da2345f0cc77900ce641554e seed/spirv/traps.unit.om +94c38bc25d64c36a7e0cebc1e7fe0cfef51517507322a3f526cb31e1e0553444 seed/wasm/control.unit.om +ebfa2f5c672805ab1cf48f30a94b1bae14767a78a76e637d31e69241ae95748b seed/wasm/integers.unit.om +eb16f331ad57fcae0eba99ddfedc9874120733eaa0ae487e57f26d3beda619d5 seed/wasm/mutant.unit.om +""".strip().splitlines()) + +# Entryless diagnostic and leak fixtures retain their actual last-function ABI. +REVIEWED_SOURCES.update({ + "8e1b8605e8d77c792a2aaf6adeb2167a38a538d0857792b006eeafd408d78e94": + "seed/omc/om2/s3/a-kept-diag.om", + "79d2da33312969e14d9cdefe34b19306cce03471d91add08aa1e0285af22cf9c": + "seed/qualification/om2/sec/s5s7/a5-kept-diag.om", + "20773907e95cbc9b1e157be91b099dc1ad13ab6ca79d2966e4259a93a8625eff": + "seed/qualification/om2/sec/s5s7/a5-swap-diag.om", + "af6c2faa6087359c0c51bcd5d61d973143f45d4719eb98278370bfb03284a79e": + "seed/omc/om2/s3/a-exact-diag.om", + "2702ef2f9bcf2fbadd6c9ced8382a13f1939378c024a5c5706d167d98798be13": + "seed/qualification/om2/sec/s5s7/a5-exact-diag.om", + "a7682122ef8f6707e48f8d6cf76459aca4ebab53ab3245dd51b88d8067fad948": + "seed/qualification/om2/leak/fixtures/pub-outside-store.om", + "03fba96f85d365cec80d11c1f10400d6f1874c924e3e824458fb812c023f267c": + "seed/qualification/om2/leak/fixtures/pub-secret.om", +}) + +REVIEWED_SOURCES['dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb'] = 'om/sha256/sha256-om2.om' + +RECORDED_INPUTS = {'5ff3b6cddb9f66971ecb7b58da2d2f07e3df9e7176dd1ba50a2c3a36f2447e81': {'path': 'seed/rung4/tests/fm1.inputs', 'sha256': '3b521473ebf69009db11ed5af2e393c452f65a479796c3e872de4c876301abb6', 'values': [(7, 2), (-7, 2), (7, -2), (-7, -2), (5, 0), (-9223372036854775808, -1), (-9223372036854775808, 1), (9223372036854775807, -1), (0, 5), (-9223372036854775807, -1), (123456789, -1000)]}, '02b9d845454e7379d4d55f3c78af7e9ddd9f87f15d196765b338ee5ae6416965': {'path': 'seed/rung4/tests/fm2.inputs', 'sha256': '18342c0716c373eb7d01da95e11a4bb0f88148bf601817d24c79e5118394ae89', 'values': [(7, 2), (-7, 2), (-2147483648, -1), (-2147483648, 1), (2147483647, -1), (9, 0), (-9, 4), (100, -7)]}, '3323f23ff905d4915ced5c83d97d772c5b4e4e1347ba738ae3752ef74d99cc0e': {'path': 'seed/rung4/tests/fm3.inputs', 'sha256': '1f2c517d98c0c1a2f6cc18965d758dfa52a1099e8209dc0ad0c2692d2536c99f', 'values': [(1, 62), (1, 63), (-1, 63), (3, 62), (-5, 2), (5, 64), (0, 63), (-4611686018427387904, 1), (-4611686018427387905, 1), (7, 0)]}, '06149063fb825604227f54d226fbce04afe48b755f6ccbe2690ef35afe1c5a65': {'path': 'seed/rung4/tests/fm4.inputs', 'sha256': 'f44900dbe6897acaecff1fc0f585902f404197069338a90cef18ecfe317a3bce', 'values': [(1, 30), (1, 31), (-1, 31), (3, 29), (-5, 2), (5, 32), (536870911, 2), (536870912, 2), (-536870912, 2), (-536870913, 2)]}, '3b0acd8ea8b0a46d3131378ae447ffd337e15e0b92da1c45ba2c1a2383dc4b54': {'path': 'seed/rung4/tests/fm5.inputs', 'sha256': 'c79c7bf9df3333862da681fefcc2b6fdab887a25740cdb76594a9bdd1ae9c0e8', 'values': [(3, 4), (0, 0), (1, 1), (4294967296, 1), (18446744073709551615, 2), (1000, 2000)]}, 'cf0a8200ec4341d1c4634bceb6bab5e7cca15bae510ca4d6f41982fe1ad70a9c': {'path': 'seed/rung4/tests/fm6.inputs', 'sha256': '60983787c391a667e6b4198c75c09aa5f75681e882d112334562987fdf280a55', 'values': [(0,), (1,), (5,), (100,), (1000,), (1000000,), (1000001,)]}, 'ccbdc5fd0b1005df6bbd17dee7d8679f7d5fbc0355ca1cca9a5c4e32cc1c352a': {'path': 'seed/rung4/tests/fm7.inputs', 'sha256': 'df36cfb0562e591237602b1fe12f5c5403c3af941ca6aece8faaa77c2c7c2aa5', 'values': [(1, 2), (0, 0), (4294967295, 1), (100, 200)]}, '1cb48989143498ec44e1cbc9ed9bfd11082b9426d937c1ebae5ac02a2c171f93': {'path': 'seed/rung4/tests/fm8.inputs', 'sha256': 'cecbd6b5657af7a9f8bf119aa34bfc11e0ac300fca584435d63f86f60e2d88fb', 'values': [(0,), (1,), (2,), (3,), (4,), (5,), (4294967295,)]}, 'e9548779048e3d97b48f7d9904fa832aa47c8a6158c9355d2b88eefa50c87589': {'path': 'seed/rung4/tests/fm9.inputs', 'sha256': 'dcb7b50d378bbd78226e3c4423cb9b353f292d65dbb66124546be0c92ea0c102', 'values': [(100, 7), (-100, 7), (-32768, -1), (-32768, 2), (32767, 0), (-7, -7)]}, 'b5624972ed3b4394027eca96d94b670f7a8846af51d3083940e63c079c8649e4': {'path': 'tools/exp445/arms/examples/clamp_sub/inputs', 'sha256': 'fdd78820e3fe41bb5c427b72044ae709eabc4b4c1ed9d99493052135f3358da8', 'values': [(5, 3), (3, 5), (0, 0), (7, 7), (4294967295, 0), (4294967295, 1), (1, 4294967295), (100, 99)], 'expected': ['2', '0', '0', '0', '4294967295', '4294967294', '0', '1'], 'expected_path': 'tools/exp445/arms/examples/clamp_sub/expected', 'expected_sha256': '2d8f2492e08fb5a4408d11dfb94011723dcec64fb9e20d406044b6c0203b954d'}, '0bfe80ea229071421efd1418bbf09db219acf1c303d4c8a80025d1033744759d': {'path': 'tools/exp445/arms/examples/count_above/inputs', 'sha256': '188675879873c3484e770bd793be8e5395d1b96575e0031f710edfc610918b3a', 'values': [(1, 2, 3, 4, 2), (0, 0, 0, 0, 0), (5, 5, 5, 5, 4), (-1, -2, -3, -4, -5), (2147483647, -2147483648, 0, 1, 0), (10, 20, 30, 40, 25), (7, 8, 9, 10, 10), (1, 1, 1, 1, -2147483648)], 'expected': ['2', '0', '4', '4', '2', '2', '0', '4'], 'expected_path': 'tools/exp445/arms/examples/count_above/expected', 'expected_sha256': 'ff0be81ecc695f3046237b3157c420f58c65e6439720489e0aa948583452e892'}, '14439646d9db8ec1c40b7646b3ec177d21ce8178a1e7c6c001134339cd8fab76': {'path': 'tools/exp445/arms/examples/count_digits/inputs', 'sha256': '6383af745b837f467812b692ddad3de333f6f6799dfaee7c210628ef2cd4f534', 'values': [(0,), (9,), (10,), (99,), (100,), (12345,), (18446744073709551615,), (10000000000000000000,), (9999999999999999999,)], 'expected': ['1', '1', '2', '2', '3', '5', '20', '20', '19'], 'expected_path': 'tools/exp445/arms/examples/count_digits/expected', 'expected_sha256': '66e82cbe8e78af1ef919a48a526efb2b48ce024c5e8322e89b828854f30a90a7'}, '83b4aad4f657f489ac7a7b9eee847118bc8d37c452a83efd3d5135af4f2e69dd': {'path': 'tools/exp445/arms/examples/cube_xor_pair/inputs', 'sha256': 'fe1cac4cf9dd56c91bc70907af7a0a21e9cee1990617bed1c5dc3b03a1a4aae6', 'values': [(0,), (1,), (2,), (7,), (13,), (14,), (15,), (16,), (200,), (255,)], 'expected': ['1', '9', '19', '855', '557', '1943', 'TRAP 3', 'TRAP 3', 'TRAP 3', 'TRAP 3'], 'expected_path': 'tools/exp445/arms/examples/cube_xor_pair/expected', 'expected_sha256': '06a16d3f2fdc6dc5bc5b7d3bcc4af1f18c2e18c177c3d2df1a6f6ce0b4a9b9ef'}, '1974598d956017c608019ebd9a8b5af42dc34c5eae20809b47940337c14f2349': {'path': 'tools/exp445/arms/examples/dot3/inputs', 'sha256': 'bca0c3df5f4ba03ffd6fd50d74654b51a34120e13266ab3100f7ebd8ffb95b70', 'values': [(1, 2, 3, 4, 5, 6), (0, 0, 0, 0, 0, 0), (-32768, -32768, -32768, -32768, -32768, -32768), (32767, 32767, 32767, 32767, 32767, 32767), (-32768, 32767, 1, 32767, -32768, -1), (1, -1, 1, 1, 1, -1), (100, 200, 300, -3, -2, -1), (5, 0, 0, 7, 9, 11)], 'expected': ['32', '0', '3221225472', '3221028867', '-2147418113', '-1', '-1000', '35'], 'expected_path': 'tools/exp445/arms/examples/dot3/expected', 'expected_sha256': 'bb0f1153516a1e224305057797fa99a392bd137ba2ad1936fd775c9061054cbc'}, '95a41a420eb97cac77023a066936cc4c9673e3224489d118834edd076232ab59': {'path': 'tools/exp445/arms/examples/halve_or_dec_steps/inputs', 'sha256': '81203c47f140c7767b6d831e0cd4c68d0995d674fc5b19b22a0e27b0c3f2b27f', 'values': [(0,), (1,), (2,), (3,), (7,), (8,), (15,), (1000,), (4294967295,), (2147483648,)], 'expected': ['0', '0', '1', '2', '4', '3', '6', '14', '62', '31'], 'expected_path': 'tools/exp445/arms/examples/halve_or_dec_steps/expected', 'expected_sha256': '03cadfc2b73c4cb64ec9878acdb24f73ce82c863934c4de7b74ad3da1296157a'}, 'bd88c1daeb2c9f2bde005d46172b7b7e0b4ed2c95081ea106dd62f8caafb16a0': {'path': 'tools/exp445/arms/examples/has_digit/inputs', 'sha256': '5e3f2fc4b3b9b962f883861183906f399596eee331b65d71195dba4d2a4b2088', 'values': [(0, 0), (0, 1), (12345, 3), (12345, 6), (4294967295, 9), (4294967295, 8), (1000, 0), (7, 7), (5, 10), (5, 255)], 'expected': ['1', '0', '1', '0', '1', '0', '1', '1', '0', '0'], 'expected_path': 'tools/exp445/arms/examples/has_digit/expected', 'expected_sha256': 'a848801f579c98ca8fc9e6a90ed5bfe8659cc9b7a85e2afc471e1c44343eb21f'}, 'fe9f95b097d0137a3ddb4a62246c5e6875fbc19aded228c2f23c4679b84c2ccf': {'path': 'tools/exp445/arms/examples/hash_step/inputs', 'sha256': '129fd09a51d0ecd85174e69c98f0fd700340be2335d35241dee90ec1de459e95', 'values': [(0, 0), (1, 1), (0, 255), (4294967295, 255), (138547332, 1), (123456789, 65), (4294967295, 0), (2, 0)], 'expected': ['0', '32', '255', '224', '4294967293', '3827160524', '4294967265', '62'], 'expected_path': 'tools/exp445/arms/examples/hash_step/expected', 'expected_sha256': '867df00b00610ee5374b95425f9c199cc078fa9e98c5d32478ee9bad993ca41f'}, '4335f62c4d839f7a7d0addd992208b6107249d7620d840080a81076b3800bc26': {'path': 'tools/exp445/arms/examples/narrow_sum/inputs', 'sha256': '3257617c170c938ee5bbd4741016a4f6eb77de48a280944475ba3ab695bc83ca', 'values': [(1, 2), (100, 27), (100, 28), (-100, -28), (-100, -29), (32767, 1), (-32768, -1), (-128, 0), (200, -100), (0, 0)], 'expected': ['3', '127', 'TRAP 5', '-128', 'TRAP 5', 'TRAP 1', 'TRAP 1', '-128', '100', '0'], 'expected_path': 'tools/exp445/arms/examples/narrow_sum/expected', 'expected_sha256': '3aa8e311d290b7f34575a0f23d4657abecadcfe73d106853cf4abfe4cf5140ef'}, '23026d2191616675acd10e798835bcb290ecd259c1e17935019bb2f97021d9fd': {'path': 'tools/exp445/arms/examples/nibble_mirror/inputs', 'sha256': 'dee5944c3255af19088c8b7938aef0a47fa8a65df83786afbeefe265d28c982b', 'values': [(0,), (4660,), (4385,), (43690,), (65535,), (1,), (4096,), (37129,), (23205,), (17185,)], 'expected': ['1', '0', '0', '1', '1', '0', '0', '0', '1', '0'], 'expected_path': 'tools/exp445/arms/examples/nibble_mirror/expected', 'expected_sha256': '36a8593ee441c6ac3381a58d2dc09a26373d3c07187d08df138c4e22f1e1d583'}, 'a55747b9894b8a8c07f33e6678b8f5482eee35096c97ff686be7ec7b7784d9c1': {'path': 'tools/exp445/arms/examples/power_mod/inputs', 'sha256': '5c16767626808d1bbfce04c745237d43d694b31cd2acdc49c3b5c9491805df34', 'values': [(2, 10, 1000), (3, 0, 7), (0, 0, 5), (5, 3, 1), (4294967295, 4294967295, 4294967291), (7, 13, 0), (0, 0, 0), (123456789, 987654321, 1000000007), (2, 31, 4294967295), (10, 2, 0)], 'expected': ['24', '1', '1', '0', '1024', 'TRAP 2', 'TRAP 2', '652541198', '2147483648', 'TRAP 2'], 'expected_path': 'tools/exp445/arms/examples/power_mod/expected', 'expected_sha256': '47b9c5eb1d9d6b0729ed484e8bea8b32aae12c83658870e69ea2d14fe0da2825'}, 'd8196e4bdfe690afeed43f7a52aefbb76f13ca42a6caa51fc61e70a585165213': {'path': 'tools/exp445/arms/examples/rotl8/inputs', 'sha256': 'ec5b74aca087a19be46cb8530bc4cf3a03914e87890ceabcb7250368b1c51ea2', 'values': [(1, 1), (128, 1), (1, 0), (1, 8), (165, 4), (15, 3), (255, 7), (6, 9), (129, 255), (0, 5)], 'expected': ['2', '1', '1', '1', '90', '120', '255', '12', '192', '0'], 'expected_path': 'tools/exp445/arms/examples/rotl8/expected', 'expected_sha256': 'cb04e913e46bcbc9ea2c9831080733e166396faf8edf6a510e2b4f53eb210534'}, '9acda5f3fd9ddc1dc01923fa76a30a4667f2d0e8d460ba2a60c5d6d5fc27807c': {'path': 'tools/exp445/arms/examples/sum_range/inputs', 'sha256': '40ea4e80ec323db346cdaa019887c692792b29802ede84ff3a4cc79199fb067c', 'values': [(1, 10), (5, 5), (6, 5), (-3, 3), (-100000, 100000), (0, 100000), (-10, -1), (100000, -100000)], 'expected': ['55', '5', '0', '0', '0', '5000050000', '-55', '0'], 'expected_path': 'tools/exp445/arms/examples/sum_range/expected', 'expected_sha256': '07eed9ef40f75e42d50f6cdf9b3ba780cb6b0998c47439e0b53f36c33145fb4d'}, '17b76ece94d8d691b3339b4d3f58443814c81d897a6e3f746981263674d32257': {'path': 'tools/exp445/arms/examples/sum_squares3/inputs', 'sha256': '37b9505a9528cda2f2598c72c60528812adecba24d9f859875f1482e4ee7efac', 'values': [(1, 2, 3), (0, 0, 0), (-3, 4, 0), (181, 0, 0), (182, 0, 0), (100, 100, 100), (-100, -100, -50), (-32768, 0, 0), (128, 128, 0), (128, 127, 0)], 'expected': ['14', '0', '25', '32761', 'TRAP 1', '30000', '22500', 'TRAP 1', 'TRAP 1', '32513'], 'expected_path': 'tools/exp445/arms/examples/sum_squares3/expected', 'expected_sha256': '04d8dc4400f7096d6c95956a54712a07073aabef624c97296a15f9ca493316bc'}, '8ecfa30de1ec78883a3c4c40fc5a11aeb2646a38df403a8bf61da47d99017e1d': {'path': 'tools/exp445/arms/examples/tri_kind/inputs', 'sha256': '12deb164b789ad554af56d30c59339772ab16022f405a9be1d026074c442acbb', 'values': [(3, 3, 3), (3, 4, 5), (2, 2, 3), (1, 2, 3), (0, 5, 5), (65535, 65535, 65535), (65535, 65535, 1), (1, 65535, 65535), (5, 1, 1), (10, 6, 5)], 'expected': ['1', '3', '2', '0', '0', '1', '2', '2', '0', '3'], 'expected_path': 'tools/exp445/arms/examples/tri_kind/expected', 'expected_sha256': 'afec9abbb1c91597ce7a1c73a7e254dd10e83cd16d435a4f2475037bc969a81d'}} + ``` The diff is longer than this page shows; the raw diff has all of it.