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
GitHub aien-dev/omega-mv#364 (code only)
Apply it
git checkout -b patch-bf177947ec35808d f0bac17c14639dbfbe4759f80caf41246f2f81b6 curl -fsSL https://interplane.io/drakestapleton/omega-mv/patches/bf177947ec35808d.patch | git am
Provenance
github-import 1
aien-dev/omega-mv
364
1322bfcae9e1c6e26704aa6e274c8b9f71a83ce0
{"kind":"github-import","owner":"aien-dev","repo":"omega-mv","number":364,"url":"https://github.com/aien-dev/omega-mv/pull/364","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:37:32Z","metadata":"unavailable","state_derived":true}
Changes
diff --git a/.crumb b/.crumb index fd1ed0b4d..4d9ac04a8 100644 --- a/.crumb +++ b/.crumb @@ -75,8 +75,8 @@ "purpose": "Directory polyglot. Purpose not yet described by a human." }, { - "digest": "ea3a37031e91270e15960dcf18564f6dd00c04e0a244e9438d2086688d05ada5", - "last_commit": "39c3503", + "digest": "c1892a602f7a49d16c0b68a0601b6331e60011466d082523c68e13c2e047b663", + "last_commit": "9b74392", "name": "research", "purpose": "Directory research. Purpose not yet described by a human." }, @@ -105,15 +105,15 @@ "purpose": "Directory tools. Purpose not yet described by a human." } ], - "children_root": "sha256:20776129d93d04954bbcc933b522374929db226ecf6fb7451f2e283eb5bfb191", - "compiled_at": "2026-10-10T00:09:03Z", + "children_root": "sha256:0e41b8f711ae9b4abe0014e110ac9c1e3b20570458214e2a09a952d192e0b22c", + "compiled_at": "2026-10-10T00:12:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:c365f43bb366a5313c16abd7d635d5f4e4ceecca8ecb3c7e505c55b2de8d57f4", + "digest": "sha256:866401d367844ec213817ba05860ee1f56773bb0b5c178e4007ee49673ac6e5c", "evidence_files": 5073, "evidence_root": "sha256:bb99548e90817b99c9dec34420512eea42356dde58aac5b0235f63431f73831e", - "files": 7253, - "generated_at_commit": "39c350332866605ee01491c70580b54b07ef8b45", - "source_tree": "sha256:8f3c1564d3923ba279a0f46f1d5796b901ed5b88b97d1f9a6b73d599aa0cdae3" + "files": 7255, + "generated_at_commit": "9b74392c8a09ff50c9e1056a958bbee8f817dedd", + "source_tree": "sha256:ad8085bdbfac959fe54bedc6e2431f1265f6b0c6c21e78c3a391e282cca8098b" }, "owner_lane": "", "provenance": { diff --git a/research/.crumb b/research/.crumb index 163f4fbb8..64bf98d5f 100644 --- a/research/.crumb +++ b/research/.crumb @@ -21,8 +21,8 @@ "generated": { "children": [ { - "digest": "6208f2a08a8fdbfead5db85e5d8bd7d2bae563f87493e31c1627866389c4e2f8", - "last_commit": "39c3503", + "digest": "1b517f13afb6a594740905e1a5a47c479137e1653ddd7637cea0242a2a8e985d", + "last_commit": "9b74392", "name": "atemporal", "purpose": "AT-0 Clock-Free Universe research program: relational (Page-Wootters) quantum models with no ext" }, @@ -33,15 +33,15 @@ "purpose": "Directory research/dirac-oracle. Purpose not yet described by a human." } ], - "children_root": "sha256:cf93af95572d0f136cd27ed1b79fa35acdfd4fa72d7d7db2b5eea4d466869516", - "compiled_at": "2026-10-10T00:09:03Z", + "children_root": "sha256:e8a478d0197add1c9742e65bdd2a9aae7f806f7cfc307e15ea61bb29100cbea6", + "compiled_at": "2026-10-10T00:12:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:ea3a37031e91270e15960dcf18564f6dd00c04e0a244e9438d2086688d05ada5", + "digest": "sha256:c1892a602f7a49d16c0b68a0601b6331e60011466d082523c68e13c2e047b663", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 314, - "generated_at_commit": "39c350332866605ee01491c70580b54b07ef8b45", - "source_tree": "sha256:319c187afbe3d0bb370d530be5558e273139255ee2d3b872d84de3b8bd152f5b" + "files": 316, + "generated_at_commit": "9b74392c8a09ff50c9e1056a958bbee8f817dedd", + "source_tree": "sha256:a822038f0f7ee2959c6d86d09fda0453f7a0f23e90b1b534e459af3c086ded55" }, "owner_lane": "", "provenance": { diff --git a/research/atemporal/.crumb b/research/atemporal/.crumb index 54361e7ea..31b233ed1 100644 --- a/research/atemporal/.crumb +++ b/research/atemporal/.crumb @@ -3,21 +3,21 @@ "generated": { "children": [ { - "digest": "257419dd786e25e4a7ee16a0f5c2d6201ae949fa5b181baf5937f89019a7108a", - "last_commit": "39c3503", + "digest": "667ee4f01ea105c463161bb9243e4faee93ac3d6c73f1b92069889b3aa952493", + "last_commit": "9b74392", "name": "at0", "purpose": "AT-0 V1: finite clock plus one qubit under the AT0_CASE_V1 / AT0_RESULT_V1 contracts" } ], - "children_root": "sha256:835d008833885a7959df3afb610decf6308263d8c9ebbf2bf762f45ce106883d", - "compiled_at": "2026-10-10T00:09:03Z", + "children_root": "sha256:5b9f8f5eaac64149d3f2319934574f600b007ca79cfa2640e45f75a308a472a5", + "compiled_at": "2026-10-10T00:12:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:6208f2a08a8fdbfead5db85e5d8bd7d2bae563f87493e31c1627866389c4e2f8", + "digest": "sha256:1b517f13afb6a594740905e1a5a47c479137e1653ddd7637cea0242a2a8e985d", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 168, - "generated_at_commit": "39c350332866605ee01491c70580b54b07ef8b45", - "source_tree": "sha256:ab99529f9f0913fb6def248129e2b6b2d7471c0a04750d979707f085930cb94b" + "files": 170, + "generated_at_commit": "9b74392c8a09ff50c9e1056a958bbee8f817dedd", + "source_tree": "sha256:990af2160e9e208d534cd7b5db391813ab51218da6839d32eb598947c35d53fe" } }, "name": "atemporal", diff --git a/research/atemporal/at0/.crumb b/research/atemporal/at0/.crumb index c324c2c1e..9284df9be 100644 --- a/research/atemporal/at0/.crumb +++ b/research/atemporal/at0/.crumb @@ -4,7 +4,7 @@ "children": [ { "digest": "7095b71ea2f1ecd9bbb9e8be207e4e6311eeb7f701f5b631575dcbcdb8075881", - "last_commit": "39c3503", + "last_commit": "f0bac17", "name": "evaluator", "purpose": "Agent 4 independent adversarial evaluator for AT-0: independent AT0_CASE_V1 codec, exact-arithme" }, @@ -21,21 +21,21 @@ "purpose": "Agent 3 candidate relational quantum engine in portable C11: state, Hamiltonians, constraint ker" }, { - "digest": "f210d0c620bca32c38a0a62c888bd82cdc020e8da40269b050199dcc34a886be", - "last_commit": "f08faa4", + "digest": "24340ae691dce9743ee4d3eedf80ae0d362dd707cac0b6bae6ebbb562dafcf39", + "last_commit": "9b74392", "name": "oracle", "purpose": "AT-0 reference oracle (Rust, standard library only, built by rustc directly; research cross-chec" } ], - "children_root": "sha256:15245bbd2fc936ede92056d8f36379ff65af928ffda2f8ca324849ce45d1c704", - "compiled_at": "2026-10-10T00:09:03Z", + "children_root": "sha256:a16b37c4005002d52fd7ff41d8e6a5019cff9e7aaf3ddbd7bd9952691d12309d", + "compiled_at": "2026-10-10T00:12:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:257419dd786e25e4a7ee16a0f5c2d6201ae949fa5b181baf5937f89019a7108a", + "digest": "sha256:667ee4f01ea105c463161bb9243e4faee93ac3d6c73f1b92069889b3aa952493", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 168, - "generated_at_commit": "39c350332866605ee01491c70580b54b07ef8b45", - "source_tree": "sha256:ab99529f9f0913fb6def248129e2b6b2d7471c0a04750d979707f085930cb94b" + "files": 170, + "generated_at_commit": "9b74392c8a09ff50c9e1056a958bbee8f817dedd", + "source_tree": "sha256:990af2160e9e208d534cd7b5db391813ab51218da6839d32eb598947c35d53fe" } }, "name": "at0", diff --git a/research/atemporal/at0/oracle/.crumb b/research/atemporal/at0/oracle/.crumb index cbe9842c8..352c6cbad 100644 --- a/research/atemporal/at0/oracle/.crumb +++ b/research/atemporal/at0/oracle/.crumb @@ -3,21 +3,21 @@ "generated": { "children": [ { - "digest": "34e48910c68fa6e767c6f054b865af1be8ab4482f42baec5de00561f31a5ed20", - "last_commit": "9e10d61", + "digest": "e8ffe146a962a5f83ae451493137edeb61aa801e5db79ba6494e36148317dabf", + "last_commit": "13b5a12", "name": "fixtures", "purpose": "Deterministic AT-0 oracle calibration fixtures: case files, computed values/verdict blocks, CALI" } ], - "children_root": "sha256:8b48d10c3058cfc94212b896439d5b49c787a861767ee556a7cb06f0d48310b7", - "compiled_at": "2026-10-09T22:54:25Z", + "children_root": "sha256:d1b049cf56079c332a7ff86f09e30225dfa91e01bbf6e598e481d521d9b72977", + "compiled_at": "2026-10-10T00:12:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:f210d0c620bca32c38a0a62c888bd82cdc020e8da40269b050199dcc34a886be", + "digest": "sha256:24340ae691dce9743ee4d3eedf80ae0d362dd707cac0b6bae6ebbb562dafcf39", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 60, - "generated_at_commit": "98624882f542a3ad77b6edbd5e431af08fb4b625", - "source_tree": "sha256:16344701b9d010aec27afacd8ac78f4f911077eb483f1831d8dba79b42c78411" + "files": 62, + "generated_at_commit": "9b74392c8a09ff50c9e1056a958bbee8f817dedd", + "source_tree": "sha256:18bf6d7f84db029544f90befe6321628d9525f06f67825889076a0033e2a9f44" } }, "name": "oracle", diff --git a/research/atemporal/at0/oracle/NUMERICAL_ERROR.md b/research/atemporal/at0/oracle/NUMERICAL_ERROR.md index 6a115323e..812092563 100644 --- a/research/atemporal/at0/oracle/NUMERICAL_ERROR.md +++ b/research/atemporal/at0/oracle/NUMERICAL_ERROR.md @@ -47,7 +47,7 @@ At the contract maximum `N = 64`, `M = 256` the matrix bound is `8 * 320 * eps`, | Measurement | Value | Where | |---|---|---| -| Largest deviation of any matrix-path or analytic-path Pauli probability from its hand-derived exact rational, over the 11 fixtures that carry expectations (N in 3..8, offsets, phases, draft spec) | `2.2e-16` | `fixtures/CALIBRATION.md` | +| Largest deviation of any matrix-path or analytic-path Pauli probability from its hand-derived exact rational, over the 12 fixtures that carry expectations (N in 3..8, offsets, phases, spec section 13 tables incl. the tilted-field P2 table) | `2.2e-16` | `fixtures/CALIBRATION.md` | | Same for the clock probabilities `1/N` | `<= 2.2e-16` | same | | `constraint_residual`, ideal cases | exactly `0` | `*.values` | | `constraint_residual`, tilted field (`p2-tilted-3-10-2-5`, `p2-h0-shift`) | `9.8e-18` | `*.values` | @@ -55,7 +55,7 @@ At the contract maximum `N = 64`, `M = 256` the matrix bound is `8 * 320 * eps`, | `povm_residual`, `N = 8` | `1.8e-15` | `*.values` | | Agreement between the three independent routes (matrix, Schrodinger closed form, Bloch rotation) | `<= 1e-12` asserted, `~1e-16` observed | tests | | Agreement between the vector route and the density-matrix route inside the matrix path | `<= 1e-12` asserted | tests | -| Bit-for-bit agreement of every `f64:` value token with the earlier Python/CPython 3.12 version of this oracle on the same machine | all 21 fixtures identical | checked with `cmp` before that version was removed | +| Bit-for-bit agreement of every `f64:` value token with the earlier Python/CPython 3.12 version of this oracle on the same machine | all 21 fixtures of the first release identical | checked with `cmp` before that version was removed | Observed errors sit one to two orders of magnitude below the stated bounds and three to four below the `1@12` tolerances. The margin is intentional: ESTIMATED bounds must not be diff --git a/research/atemporal/at0/oracle/README.md b/research/atemporal/at0/oracle/README.md index 5ecc90734..fb1f718e4 100644 --- a/research/atemporal/at0/oracle/README.md +++ b/research/atemporal/at0/oracle/README.md @@ -29,11 +29,14 @@ directory share no source, no parser, no arithmetic and no build step. wrapper format of its own: the whole file is one `AT0_RESULT_V2` record. Any future wrapper line would be versioned here and would need Agent 5 re-review. -Contracts: `AT0_CASE_V1` and `AT0_RESULT_V1/V2` frozen at `aien-architecture` -`044c9d11256d8642f80eedd42cbae8763faf63f5` (`contract_commit` in every record). The -hand-table tests also target the draft mathematical spec `AT0_SPEC` at -`aien-architecture` pull request 176, commit `0efd1a14cbdf117bc694b556bb61d031cf80c8f9` -(`SPEC_DRAFT_COMMIT` in `src/at0/mod.rs`); that draft is not merged and the tests say so. +Contracts: `AT0_CASE_V1` frozen at `aien-architecture` `044c9d1` (`CASE_CONTRACT_COMMIT`), +`AT0_RESULT_V2` added at `c7a7181` and recorded in `AT0_FREEZE` at +`fe86e43aae63370b3084f78e971a33b81ce75a9d`, which is the `contract_commit` every record +writes (`CONTRACT_COMMIT`; Agent 5 finding D7, evaluator allowlist). The hand-table tests +and the `spec-*` fixtures target the mathematical contract `AT0_SPEC.md`, merged as +`68f47e26764a9f0b46d91194bf073824d04333bb` (`SPEC_COMMIT` in `src/at0/mod.rs`; Agent 5 +finding D8). Re-verified against that commit on 2026-10-09: section 13.2 P1 and P1c, and +13.3 N1 to N5 agree with the fixtures below, and 13.2 P2 was added as a fixture. ## Layout @@ -43,7 +46,7 @@ isolation.sh symbol-isolation gate for the compute crate (source rule + n rust-toolchain.toml rustc 1.98.1 pin (informational; build.sh records the real version) src/main.rs the only file that touches files, git, the process table or the wall clock; CLI (emit | fixtures | check) and the test suite -src/at0/mod.rs compute crate root; SPEC_DRAFT_COMMIT +src/at0/mod.rs compute crate root; SPEC_COMMIT src/at0/rational.rs i128 rationals (exact spectrum, kernel pairs, identities) src/at0/sha256.rs own SHA-256 (case_id, acceptance_id, verdict_id, evidence_digest) src/at0/exact.rs fixed-point big integers: exact comparison of f64 tokens with scaled decimals @@ -52,7 +55,7 @@ src/at0/case.rs AT0_CASE_V1 parser/validator in contract order, case builder src/at0/matrix_path.rs H_C, H_S, H_total, kernel projector, Psi, POVM, conditioning, rho_k, Pauli src/at0/reference.rs analytic paths: Schrodinger closed form and Bloch/Rodrigues rotation src/at0/result.rs values block, exact judge, verdict block, AT0_RESULT_V2 writer and values parser -src/at0/fixtures.rs the 21 calibration fixtures and their hand-derived expectations +src/at0/fixtures.rs the 22 calibration fixtures and their hand-derived expectations fixtures/ <name>.case, <name>.values, CALIBRATION.md (all generated, deterministic) NUMERICAL_ERROR.md stated bounds, measured errors, limitations ``` @@ -95,7 +98,7 @@ library links itself. ./isolation.sh # ISOLATION PASS expected target/at0-oracle check <case> # validate; prints case_id, acceptance_id, file sha256 target/at0-oracle emit <case> [--dephased] [-o out] # AT0_RESULT_V2 record -target/at0-oracle fixtures <dir> # regenerate fixtures/ (43 files) +target/at0-oracle fixtures <dir> # regenerate fixtures/ (45 files) ``` A refused case prints exactly `AT0_CASE_REFUSED <code>` on stderr, writes nothing and exits @@ -127,7 +130,10 @@ agree on `verdict_id` and differ in `evidence_digest` (tested). threads, network or randomness. `isolation.sh` enforces this in three steps: a source rule (grep for the forbidden facilities), an object rule (`nm -u` on the compute rlib for `clock_gettime`, `getrandom`, `pthread_create`, `socket`, `open64`, `getenv`, ... ), and a - negative control that plants a clock read in a copy and checks it is caught. + negative control that plants a `std::time` read in a copy and checks that the source rule + and the object rule each catch it on their own. The object rule bans two symbol families: + libc entry points and mangled Rust std paths (`3std4time`, `3std2fs`, ...), because a + `std::time` call leaves no libc symbol in the rlib (Agent 5 finding D5). - Exact judging: every check compares the written `f64:` token, converted exactly, against the exact scaled-decimal tolerance. No float comparison decides a verdict. @@ -148,7 +154,7 @@ plus unit tests for SHA-256 (FIPS vectors), rationals, complex algebra and exact ## Fixtures and how their expectations were derived -`fixtures/` holds 21 cases, their `.values` (values block, verdict block, `verdict_id`) and +`fixtures/` holds 22 cases, their `.values` (values block, verdict block, `verdict_id`) and `CALIBRATION.md`. All of it is written by `target/at0-oracle fixtures fixtures/` with no wall clock, so re-running it reproduces the files byte for byte. The `.case` files are identical to the ones first published on this branch (checked with `cmp`). @@ -167,6 +173,11 @@ Expectations are hand-derived exact rationals, not numbers copied from a run: `w = 1/2`): the spec's own table; `hz = -1/2` flips the sign of `sin`, so `P(Y+) = (1 - sin theta)/2`. T4 (`psi_0 = |0>`): `P(Z+) = 1`, X and Y `1/2` at every label. T5 (`psi_0 = (1, i)`): the table shifted one label backwards, i.e. `theta -> theta - pi/2`. +- Spec section 13.2 P2 (`spec-p2-tilted-h0`: `h0 = 1/10`, `h = (3/10, 0, 2/5)`, clock + `E = -3/5, 2/5`, `psi_0 = |0>`, `w = 1/2`): the Bloch vector `(0, 0, 1)` rotated about + `n = (3/5, 0, 4/5)` by `k pi / 2` gives `(12/25, -3/5, 16/25)`, `(24/25, 0, 7/25)`, + `(12/25, 3/5, 16/25)`, so `P(X+) = 1/2, 37/50, 49/50, 37/50`, `P(Y+) = 1/2, 1/5, 1/2, 4/5`, + `P(Z+) = 1, 41/50, 16/25, 41/50`, `p(k) = 1/4`. Fully rational, so all 16 values are checked. - Negative controls carry no rational expectations; their expectation is the failure code set declared in the case's own acceptance block, and `expectation_met YES` means the oracle produced exactly those codes. @@ -183,7 +194,11 @@ deviation seen; the worst is `2.2e-16` (one unit in the last place of `1/2`). closed form and the matrix path agree, so any disagreement with another implementation is a convention error, not numerics. 3. The relational phase `(1, i)` shifts the pattern one label backwards, not forwards. -4. Dephasing the kernel branches keeps `p(k) = 1/N` and Hermitian unit-trace `rho_k` but +4. On a trivial kernel (fixture `n1-uncovered`) V2 section 4 fixes check 3 `FAIL` and checks + 4, 6, 7, 8, 9, 10 `NOT_EVALUATED` even though the `reference` lines are still written; + the first release of this oracle evaluated check 7 on those lines (Agent 5 finding D4), + fixed and tested since. +5. Dephasing the kernel branches keeps `p(k) = 1/N` and Hermitian unit-trace `rho_k` but flattens every X and Y probability to `1/2`: the clock correlation survives, the interference pattern does not. This is the `nc-dephased-control` fixture. diff --git a/research/atemporal/at0/oracle/fixtures/.crumb b/research/atemporal/at0/oracle/fixtures/.crumb index b6629c095..96c09705a 100644 --- a/research/atemporal/at0/oracle/fixtures/.crumb +++ b/research/atemporal/at0/oracle/fixtures/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-09T22:50:50Z", + "compiled_at": "2026-10-10T00:12:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:34e48910c68fa6e767c6f054b865af1be8ab4482f42baec5de00561f31a5ed20", + "digest": "sha256:e8ffe146a962a5f83ae451493137edeb61aa801e5db79ba6494e36148317dabf", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 43, - "generated_at_commit": "9e10d61488f571083d2d2cc7b9b5b893ab0534ca", - "source_tree": "sha256:09e4b23bf31ed2aabe57762e1667dad51d26a3f800399b073ed3556a636fc6e7" + "files": 45, + "generated_at_commit": "9b74392c8a09ff50c9e1056a958bbee8f817dedd", + "source_tree": "sha256:bba0b2d01debc1c9c1b1400929e8af770a0c91b09c2ca1d8ef4ddc8c4585dcdf" } }, "name": "fixtures", diff --git a/research/atemporal/at0/oracle/fixtures/CALIBRATION.md b/research/atemporal/at0/oracle/fixtures/CALIBRATION.md index 43a54c09c..ccaf1c861 100644 --- a/research/atemporal/at0/oracle/fixtures/CALIBRATION.md +++ b/research/atemporal/at0/oracle/fixtures/CALIBRATION.md @@ -17,7 +17,7 @@ against them (matrix path and reference path), in absolute probability units. | p1-unnormalized-2 | pure | 2 | PASS | none | YES | 28 | 2.220e-16 | `92d215231b6132f3f3877f4c631446d4ca07e175ee7799e659495f367a1f46a6` | | p2-tilted-3-10-2-5 | pure | 2 | PASS | none | YES | 0 | 0.000e0 | `3d2d11e9a20fa950566b48a22421d2a165728c10f7e7adceb4f8ab8f3b6a4f32` | | p2-h0-shift | pure | 2 | PASS | none | YES | 0 | 0.000e0 | `5e2d2fbe4a8c13fec7eb0f3a7db2bca94b0ecc2227817bc0c1858a219189c034` | -| n1-uncovered | pure | 0 | FAIL | TRIVIAL_PHYSICAL_STATE | YES | 0 | 0.000e0 | `9d5d757ce34242b8b737ebaf11aea8d592671f8b3e7ac60c58f4727b7fb75f71` | +| n1-uncovered | pure | 0 | FAIL | TRIVIAL_PHYSICAL_STATE | YES | 0 | 0.000e0 | `a5cbe130af7e2b1c81cd356e866286f9fa15cdbd124b783dc0bee182d3965ab8` | | n2-half-covered | pure | 1 | FAIL | SCHRODINGER_DEVIATION_EXCEEDED | YES | 0 | 0.000e0 | `577c0ed350f62b7df313b569f63087c359d0ddf5cae086dc1fce7cf6e2cbe3cf` | | n4-wrong-weight | pure | 2 | FAIL | POVM_NORMALIZATION_EXCEEDED,PROBABILITY_SUM_EXCEEDED | YES | 0 | 0.000e0 | `3d1b3beb7374055af1ab1c4ea385a65212d2de5c9eb0e73134af0e62d3129836` | | n3-broken-clock-tau-1-3 | pure | 2 | FAIL | POVM_NORMALIZATION_EXCEEDED | YES | 0 | 0.000e0 | `471d325ed6b6f7362f1ccc7c75bcc7d0e43f2330c63eb4239f62a810bc3020b4` | @@ -25,6 +25,7 @@ against them (matrix path and reference path), in absolute probability units. | spec-ref-model-n4 | pure | 2 | PASS | none | YES | 28 | 2.220e-16 | `0472c9c93ccb61e4375e3ce3b5aa2bdbd48f2165adf74e9d19042f0c4bd91514` | | spec-t4-eigenstate-00 | pure | 2 | PASS | none | YES | 28 | 5.551e-17 | `78224941fd9084a57faa778af485532c345749b2a22396432797b03c2c4c7d10` | | spec-t5-relational-phase | pure | 2 | PASS | none | YES | 28 | 2.220e-16 | `407fbb62ccd7180b0abbcdb8ad59399ca29c19a61d6132bb21d68a58ae9d6384` | +| spec-p2-tilted-h0 | pure | 2 | PASS | none | YES | 28 | 2.220e-16 | `754094bd4ff835859cd62a94e56852a1989cd8aa781c9d442326b484c130714a` | | spec-n3-wrong-weight | pure | 2 | FAIL | POVM_NORMALIZATION_EXCEEDED,PROBABILITY_SUM_EXCEEDED | YES | 0 | 0.000e0 | `1cfcb09a64ad6aa1042d2c67ebfdcf3f77c4ef77d6c1a3616516e4bc4b0fd150` | | spec-n4-dropped-effect | pure | 2 | FAIL | POVM_NORMALIZATION_EXCEEDED,PROBABILITY_SUM_EXCEEDED | YES | 0 | 0.000e0 | `88e01e412c8b6e750dc91e6fec54eacd4ddfae337a286fbddcc1748a2623de10` | | nc-dephased-control | dephased | 2 | FAIL | SCHRODINGER_DEVIATION_EXCEEDED | YES | 28 | 0.000e0 | `eec3e050cf5e0a509d6121dd22b8b1dfe80529ded33384a65558b1dec53e0a64` | diff --git a/research/atemporal/at0/oracle/fixtures/n1-uncovered.values b/research/atemporal/at0/oracle/fixtures/n1-uncovered.values index 709c7b755..23caa448a 100644 --- a/research/atemporal/at0/oracle/fixtures/n1-uncovered.values +++ b/research/atemporal/at0/oracle/fixtures/n1-uncovered.values @@ -66,7 +66,7 @@ check physical_state_nontrivial FAIL check constraint_residual NOT_EVALUATED check povm_normalization PASS check clock_probability_sum NOT_EVALUATED -check probability_range PASS +check probability_range NOT_EVALUATED check pauli_pair_sum NOT_EVALUATED check conditional_defined NOT_EVALUATED check schrodinger_agreement NOT_EVALUATED @@ -75,4 +75,4 @@ failure_codes TRIVIAL_PHYSICAL_STATE error_code none expectation_met YES end verdict -verdict_id 9d5d757ce34242b8b737ebaf11aea8d592671f8b3e7ac60c58f4727b7fb75f71 +verdict_id a5cbe130af7e2b1c81cd356e866286f9fa15cdbd124b783dc0bee182d3965ab8 diff --git a/research/atemporal/at0/oracle/fixtures/spec-p2-tilted-h0.case b/research/atemporal/at0/oracle/fixtures/spec-p2-tilted-h0.case new file mode 100644 index 000000000..81621b12e --- /dev/null +++ b/research/atemporal/at0/oracle/fixtures/spec-p2-tilted-h0.case @@ -0,0 +1,40 @@ +OMEGA-AT0-CASE v1 +domain omega.at0.case.v1 +contract AT0_CASE_V1 +case_name spec-p2-tilted-h0 +begin semantic +model_family PAGE_WOOTTERS_FINITE_IDEAL +energy_unit DIMENSIONLESS_HBAR_1 +clock_dim 2 +clock_energies -3/5,2/5 +system_dim 2 +system_hamiltonian_pauli 1/10,3/10,0/1,2/5 +interaction NONE +constraint SUM_HC_HS +physical_state NULLSPACE_PROJECTION +reference_clock_label t0 +reference_system_state (1/1;0/1),(0/1;0/1) +clock_povm COVARIANT_DISCRETE +povm_tau_turns 1/4 +povm_weight 1/2 +clock_label_count 4 +clock_label 0 t0 +clock_label 1 t1 +clock_label 2 t2 +clock_label 3 t3 +observables PAULI_X,PAULI_Y,PAULI_Z +end semantic +begin acceptance +control_kind POSITIVE +expected_outcome PASS +expected_failure_codes none +min_bound_kind ESTIMATED +tol_constraint_residual 1@12 +tol_povm_residual 1@12 +tol_probability 1@12 +tol_zero_probability 1@9 +tol_schrodinger 1@12 +end acceptance +case_id ca44ca50fed71a505d6b069d0a54896fbf93e89d8e1077ddfcf0498d4eac5342 +acceptance_id a13fb02dd674b8042ef8c0a197f03d58768709f782ba59cd26545eef6d41a228 +end diff --git a/research/atemporal/at0/oracle/fixtures/spec-p2-tilted-h0.values b/research/atemporal/at0/oracle/fixtures/spec-p2-tilted-h0.values new file mode 100644 index 000000000..315d8985c --- /dev/null +++ b/research/atemporal/at0/oracle/fixtures/spec-p2-tilted-h0.values @@ -0,0 +1,78 @@ +begin values +physical_state_kernel_dim 2 +constraint_residual f64:0000000000000000 1065816@20 +povm_residual f64:3ca9ec474a261264 1065816@20 +label 0 t0 DEFINED +label 1 t1 DEFINED +label 2 t2 DEFINED +label 3 t3 DEFINED +clock_probability 0 f64:3fcfffffffffffff 1065816@20 +clock_probability 1 f64:3fcffffffffffffd 1065816@20 +clock_probability 2 f64:3fcffffffffffffd 1065816@20 +clock_probability 3 f64:3fcfffffffffffff 1065816@20 +pauli 0 X PLUS f64:3fe0000000000000 1065816@20 +pauli 0 X MINUS f64:3fe0000000000000 1065816@20 +pauli 0 Y PLUS f64:3fe0000000000000 1065816@20 +pauli 0 Y MINUS f64:3fe0000000000000 1065816@20 +pauli 0 Z PLUS f64:3ff0000000000000 1065816@20 +pauli 0 Z MINUS f64:0000000000000000 1065816@20 +pauli 1 X PLUS f64:3fe7ae147ae147ae 1065816@20 +pauli 1 X MINUS f64:3fd0a3d70a3d70a2 1065816@20 +pauli 1 Y PLUS f64:3fc9999999999998 1065816@20 +pauli 1 Y MINUS f64:3fe999999999999a 1065816@20 +pauli 1 Z PLUS f64:3fea3d70a3d70a3d 1065816@20 +pauli 1 Z MINUS f64:3fc70a3d70a3d70b 1065816@20 +pauli 2 X PLUS f64:3fef5c28f5c28f5d 1065816@20 +pauli 2 X MINUS f64:3f947ae147ae1478 1065816@20 +pauli 2 Y PLUS f64:3fe0000000000000 1065816@20 +pauli 2 Y MINUS f64:3fe0000000000000 1065816@20 +pauli 2 Z PLUS f64:3fe47ae147ae147b 1065816@20 +pauli 2 Z MINUS f64:3fd70a3d70a3d70b 1065816@20 +pauli 3 X PLUS f64:3fe7ae147ae147af 1065816@20 +pauli 3 X MINUS f64:3fd0a3d70a3d70a3 1065816@20 +pauli 3 Y PLUS f64:3fe999999999999a 1065816@20 +pauli 3 Y MINUS f64:3fc999999999999a 1065816@20 +pauli 3 Z PLUS f64:3fea3d70a3d70a3e 1065816@20 +pauli 3 Z MINUS f64:3fc70a3d70a3d70b 1065816@20 +reference 0 X PLUS f64:3fe0000000000000 1421087@20 +reference 0 X MINUS f64:3fe0000000000000 1421087@20 +reference 0 Y PLUS f64:3fe0000000000000 1421087@20 +reference 0 Y MINUS f64:3fe0000000000000 1421087@20 +reference 0 Z PLUS f64:3ff0000000000000 1421087@20 +reference 0 Z MINUS f64:0000000000000000 1421087@20 +reference 1 X PLUS f64:3fe7ae147ae147ae 2760428@20 +reference 1 X MINUS f64:3fd0a3d70a3d70a5 2760428@20 +reference 1 Y PLUS f64:3fc999999999999d 2760428@20 +reference 1 Y MINUS f64:3fe999999999999b 2760428@20 +reference 1 Z PLUS f64:3fea3d70a3d70a3f 2760428@20 +reference 1 Z MINUS f64:3fc70a3d70a3d708 2760428@20 +reference 2 X PLUS f64:3fef5c28f5c28f5c 409977@19 +reference 2 X MINUS f64:3f947ae147ae147e 409977@19 +reference 2 Y PLUS f64:3fdffffffffffffe 409977@19 +reference 2 Y MINUS f64:3fe0000000000000 409977@19 +reference 2 Z PLUS f64:3fe47ae147ae147a 409977@19 +reference 2 Z MINUS f64:3fd70a3d70a3d708 409977@19 +reference 3 X PLUS f64:3fe7ae147ae147af 5439111@20 +reference 3 X MINUS f64:3fd0a3d70a3d70a2 5439111@20 +reference 3 Y PLUS f64:3fe9999999999999 5439111@20 +reference 3 Y MINUS f64:3fc9999999999999 5439111@20 +reference 3 Z PLUS f64:3fea3d70a3d70a3c 5439111@20 +reference 3 Z MINUS f64:3fc70a3d70a3d70a 5439111@20 +end values +begin verdict +check bound_kind_sufficient PASS +check values_finite PASS +check physical_state_nontrivial PASS +check constraint_residual PASS +check povm_normalization PASS +check clock_probability_sum PASS +check probability_range PASS +check pauli_pair_sum PASS +check conditional_defined PASS +check schrodinger_agreement PASS +outcome PASS +failure_codes none +error_code none +expectation_met YES +end verdict +verdict_id 754094bd4ff835859cd62a94e56852a1989cd8aa781c9d442326b484c130714a diff --git a/research/atemporal/at0/oracle/isolation.sh b/research/atemporal/at0/oracle/isolation.sh index d44757ee2..9ad80777c 100755 --- a/research/atemporal/at0/oracle/isolation.sh +++ b/research/atemporal/at0/oracle/isolation.sh @@ -1,37 +1,62 @@ #!/bin/sh -# Isolation gate for the Rust oracle, adapted from tests/physics0/isolation.sh (C, nm on objects). -# 1. Source rule: the compute crate src/at0/ names no std::time, std::fs, std::process, -# std::thread, std::net, std::env, random or clock facility. +# Symbol-isolation gate for the AT-0 oracle compute crate (src/at0/), Rust adaptation of the +# charter's nm gate. +# 1. Source rule: no compute file names a std::time, std::fs, std::process, std::thread, +# std::net, std::env, random or clock facility. # 2. Object rule: the compute crate compiled alone (rlib) has no undefined reference to a -# clock, file, process, socket, thread or random symbol (nm -u over its objects). +# clock, file, process, thread, network, environment or random symbol (nm -u over its +# objects). Two symbol families are banned: libc entry points (the extern "C" route) and +# mangled Rust std paths (the std route: a std::time call leaves no libc symbol in the +# rlib, only a mangled std path; both the v0 form _RNv..NtCs<hash>_3std4time.. and the +# legacy form _ZN3std4time.. contain the substring 3std4time). +# 3. Negative control: a copy of the crate with a hidden std::time read must be caught by the +# source rule AND by the object rule on its own. # Exit 0 PASS, 1 FAIL. Prints every offending line. set -u cd "$(dirname "$0")" +FLAGS="--edition 2021 -C opt-level=2 -C codegen-units=1 -C debuginfo=0 -C panic=abort" fail=0 + echo "== source rule (src/at0/)" if grep -n -E 'std::(time|fs|process|thread|net|env|io::std(in|out|err))|SystemTime|Instant::|getrandom|rand::|libc::|extern "C"' src/at0/*.rs; then echo "FAIL: forbidden facility named in compute code"; fail=1 else echo "ok: no clock, file, process, thread, network, environment or random facility named" fi + echo "== object rule (nm -u on the compute rlib)" ./build.sh lib >/dev/null || { echo "FAIL: compute crate did not build alone"; exit 1; } rm -rf target/iso && mkdir -p target/iso && (cd target/iso && ar x ../libat0.rlib) || { echo "FAIL: cannot unpack rlib"; exit 1; } objs=$(ls target/iso/*.o 2>/dev/null) [ -n "$objs" ] || { echo "FAIL: no objects in rlib"; exit 1; } -banned='clock_gettime|gettimeofday|^time$|nanosleep|getrandom|/dev/urandom|pthread_create|socket|connect|fopen|open64|openat|read64|write64|fork|execve|system|getenv' -if nm -u $objs 2>/dev/null | awk '{print $NF}' | sort -u | grep -E "$banned"; then +libc_names='clock_gettime|gettimeofday|^time$|nanosleep|getrandom|/dev/urandom|pthread_create|socket|connect|fopen|open64|openat|^read$|^write$|pread64|pwrite64|fork|execve|system|getenv' +std_paths='3std4time|3std2fs|3std7process|3std6thread|3std3net|3std3env|3std2io5stdio|6random' +banned="$libc_names|$std_paths" +object_rule() { + nm -u "$@" 2>/dev/null | awk '{print $NF}' | sort -u | grep -E "$banned" +} +if object_rule $objs; then echo "FAIL: banned undefined symbol in compute objects"; fail=1 else - echo "ok: no clock, random, thread, socket, file, process or environment symbol referenced" + echo "ok: no clock, random, thread, socket, file, process or environment symbol referenced (libc names and mangled std paths)" fi + echo "== negative control: a copy that reads the clock must be caught" rm -rf target/mutant && mkdir -p target/mutant && cp -r src/at0 target/mutant/at0 printf '\npub fn hidden_clock() -> u64 { std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_secs()).unwrap_or(0) }\n' >> target/mutant/at0/mod.rs if grep -q -E 'std::(time|fs|process|thread|net|env)' target/mutant/at0/*.rs; then echo "ok: mutant caught by the source rule" else - echo "FAIL: mutant not caught"; fail=1 + echo "FAIL: mutant not caught by the source rule"; fail=1 fi +# Agent 5 finding D5: the object rule must catch the std::time mutant on its own. +if rustc $FLAGS --crate-type lib --crate-name at0_mutant target/mutant/at0/mod.rs -o target/mutant/libat0_mutant.rlib 2>/dev/null \ + && rm -rf target/mutant/iso && mkdir -p target/mutant/iso && (cd target/mutant/iso && ar x ../libat0_mutant.rlib) \ + && object_rule target/mutant/iso/*.o >/dev/null; then + echo "ok: mutant caught by the object rule (nm -u, mangled std path)" +else + echo "FAIL: mutant not caught by the object rule"; fail=1 +fi + [ $fail -eq 0 ] && echo "ISOLATION PASS" || echo "ISOLATION FAIL" exit $fail diff --git a/research/atemporal/at0/oracle/src/at0/case.rs b/research/atemporal/at0/oracle/src/at0/case.rs index 62dbd34d2..b0a1650a4 100644 --- a/research/atemporal/at0/oracle/src/at0/case.rs +++ b/research/atemporal/at0/oracle/src/at0/case.rs @@ -5,7 +5,11 @@ use super::rational::Rat; use super::sha256::{sha256_hex, tagged_hex}; -pub const CONTRACT_COMMIT: &str = "044c9d11256d8642f80eedd42cbae8763faf63f5"; +/// Freeze commit written as `contract_commit`: AT0_FREEZE lists AT0_RESULT_V2 and marks V1 +/// superseded (aien-architecture#181). AT0_CASE_V1 itself was frozen earlier at +/// `CASE_CONTRACT_COMMIT` and is unchanged since. +pub const CONTRACT_COMMIT: &str = "fe86e43aae63370b3084f78e971a33b81ce75a9d"; +pub const CASE_CONTRACT_COMMIT: &str = "044c9d11256d8642f80eedd42cbae8763faf63f5"; pub const CASE_DOMAIN: &str = "omega.at0.case.v1"; pub const ACCEPTANCE_DOMAIN: &str = "omega.at0.acceptance.v1"; pub const RATIONAL_LIMIT: i128 = 1_048_576; diff --git a/research/atemporal/at0/oracle/src/at0/fixtures.rs b/research/atemporal/at0/oracle/src/at0/fixtures.rs index 4c4efa881..c4ef51d0a 100644 --- a/research/atemporal/at0/oracle/src/at0/fixtures.rs +++ b/research/atemporal/at0/oracle/src/at0/fixtures.rs @@ -89,12 +89,22 @@ pub fn catalogue() -> Vec<Fixture> { let mut rig = neg(&["BOUND_KIND_INSUFFICIENT"]); rig.min_bound_kind = "RIGOROUS"; out.push(Fixture { name: "n5-rigorous-demand", case: build_case("n5-rigorous-demand", &clock(4), zhalf, "t0", PLUS, r(1, 4), r(1, 1), &l4, &rig), dephased: false, expected: None }); - // AT0_SPEC draft (section 12 mapping): two-level clock, H_S = diag(0, 1), omega = 1, phi = 0. + // AT0_SPEC.md at SPEC_COMMIT (section 12 mapping, section 13.2 P1c): two-level clock, H_S = diag(0, 1), omega = 1, phi = 0. let spec_e = [r(-1, 1), ZEROR]; let spec_h = [half(), ZEROR, ZEROR, r(-1, 2)]; out.push(Fixture { name: "spec-ref-model-n4", case: build_case("spec-ref-model-n4", &spec_e, spec_h, "t0", PLUS, r(1, 4), half(), &l4, &pos), dephased: false, expected: Some(table(&[(2, 1, 1, 4), (1, 0, 1, 4), (0, 1, 1, 4), (1, 2, 1, 4)])) }); out.push(Fixture { name: "spec-t4-eigenstate-00", case: build_case("spec-t4-eigenstate-00", &spec_e, spec_h, "t0", [(r(1, 1), ZEROR), (ZEROR, ZEROR)], r(1, 4), half(), &l4, &pos), dephased: false, expected: Some(table(&[(1, 1, 2, 4); 4])) }); out.push(Fixture { name: "spec-t5-relational-phase", case: build_case("spec-t5-relational-phase", &spec_e, spec_h, "t0", [(r(1, 1), ZEROR), (ZEROR, r(1, 1))], r(1, 4), half(), &l4, &pos), dephased: false, expected: Some(table(&[(1, 2, 1, 4), (2, 1, 1, 4), (1, 0, 1, 4), (0, 1, 1, 4)])) }); + // AT0_SPEC.md section 13.2 P2: h0 = 1/10, h = (3/10, 0, 2/5), |h| = 1/2, clock E = -3/5, 2/5, psi_0 = |0>, + // tau = 1/4, w = 1/2, M = 4. Bloch vector rotates about n = (3/5, 0, 4/5) by k pi / 2 (Rodrigues): + // k=1: (12/25, -3/5, 16/25), k=2: (24/25, 0, 7/25), k=3: (12/25, 3/5, 16/25); P(A+) = (1 + r_A)/2. + let p2x = |x: Rat, y: Rat, z: Rat| Some([x, y, z, r(1, 4)]); + out.push(Fixture { + name: "spec-p2-tilted-h0", + case: build_case("spec-p2-tilted-h0", &[r(-3, 5), r(2, 5)], [r(1, 10), r(3, 10), ZEROR, r(2, 5)], "t0", [(r(1, 1), ZEROR), (ZEROR, ZEROR)], r(1, 4), half(), &l4, &pos), + dephased: false, + expected: Some(vec![p2x(half(), half(), r(1, 1)), p2x(r(37, 50), r(1, 5), r(41, 50)), p2x(r(49, 50), half(), r(16, 25)), p2x(r(37, 50), r(4, 5), r(41, 50))]), + }); out.push(Fixture { name: "spec-n3-wrong-weight", case: build_case("spec-n3-wrong-weight", &spec_e, spec_h, "t0", PLUS, r(1, 4), r(1, 4), &l4, &neg(&["POVM_NORMALIZATION_EXCEEDED", "PROBABILITY_SUM_EXCEEDED"])), dephased: false, expected: None }); out.push(Fixture { name: "spec-n4-dropped-effect", case: build_case("spec-n4-dropped-effect", &spec_e, spec_h, "t0", PLUS, r(1, 4), half(), &l4[..3], &neg(&["POVM_NORMALIZATION_EXCEEDED", "PROBABILITY_SUM_EXCEEDED"])), dephased: false, expected: None }); out.push(Fixture { name: "nc-dephased-control", case: build_case("nc-dephased-control", &clock(4), zhalf, "t0", PLUS, r(1, 4), r(1, 1), &l4, &neg(&["SCHRODINGER_DEVIATION_EXCEEDED"])), dephased: true, expected: Some(table(&[(1, 1, 1, 4); 4])) }); diff --git a/research/atemporal/at0/oracle/src/at0/mod.rs b/research/atemporal/at0/oracle/src/at0/mod.rs index 7af5348a4..5c6c03b01 100644 --- a/research/atemporal/at0/oracle/src/at0/mod.rs +++ b/research/atemporal/at0/oracle/src/at0/mod.rs @@ -13,6 +13,7 @@ pub mod reference; pub mod result; pub mod sha256; -/// Draft mathematical contract the hand-table tests target (aien-architecture -/// pull request 176, not merged): re-check when it merges. -pub const SPEC_DRAFT_COMMIT: &str = "0efd1a14cbdf117bc694b556bb61d031cf80c8f9"; +/// Mathematical contract AT0_SPEC.md the hand-table tests and the spec-* fixtures target: +/// aien-architecture pull request 176, merged as this squash commit. Section 13 of it +/// holds the hand-derived tables; re-verified against this commit on 2026-10-09. +pub const SPEC_COMMIT: &str = "68f47e26764a9f0b46d91194bf073824d04333bb"; diff --git a/research/atemporal/at0/oracle/src/at0/result.rs b/research/atemporal/at0/oracle/src/at0/result.rs index 1a0cb7bb9..c682e5ac0 100644 --- a/research/atemporal/at0/oracle/src/at0/result.rs +++ b/research/atemporal/at0/oracle/src/at0/result.rs @@ -5,7 +5,7 @@ //! `omega.at0.result.v2`, verdict tag `omega.at0.verdict.v2`, evidence tag //! `omega.at0.evidence.v2`; `undefined` only for a trivial kernel. Case files //! stay AT0_CASE_V1. Line shape, checks and codes otherwise follow -//! AT0_RESULT_V1 sections 1 to 7 at aien-architecture 044c9d1. +//! AT0_RESULT_V2 (aien-architecture docs/plans/atemporal/AT0_RESULT_V2.md at c7a7181, frozen at fe86e43). //! Every check is decided in exact arithmetic on the written tokens (exact.rs). use super::case::{Case, Scaled, BOUND_KINDS}; @@ -297,7 +297,9 @@ pub fn judge(c: &Case, vlines: &[String], bound_kind: &str) -> Result<Verdict, S rng.push(signed_form(&p.neg(), b, &tol_pr)); rng.push(signed_form(&p.sub(&one), b, &tol_pr)); } - set("probability_range", combine(&rng), "PROBABILITY_OUT_OF_RANGE", &mut checks, &mut codes); + // V2 section 4: on a trivial kernel checks 4, 6, 7, 8, 9, 10 are NOT_EVALUATED even though the + // reference lines are still written (Agent 5 finding D4). + set("probability_range", if live { combine(&rng) } else { "NOT_EVALUATED" }, "PROBABILITY_OUT_OF_RANGE", &mut checks, &mut codes); let defined: Vec<usize> = v.label.iter().filter(|(_, st)| st == "DEFINED").map(|(k, _)| *k).collect(); let find = |list: &[(usize, usize, usize, Option<Exact>, Exact)], k: usize, ax: usize, si: usize| -> Option<(Option<Exact>, Exact)> { list.iter().find(|e| e.0 == k && e.1 == ax && e.2 == si).map(|e| (e.3.clone(), e.4.clone())) diff --git a/research/atemporal/at0/oracle/src/main.rs b/research/atemporal/at0/oracle/src/main.rs index b5f6cd33b..26a37780f 100644 --- a/research/atemporal/at0/oracle/src/main.rs +++ b/research/atemporal/at0/oracle/src/main.rs @@ -397,7 +397,11 @@ mod tests { // N1 uncovered let n1 = compute(&parse_case(&build_case("n1", &[r(1, 1), r(2, 1), r(3, 1), r(4, 1)], zhalf(), "t0", plus(), r(1, 4), r(1, 1), &l4, &Acceptance::negative(&["TRIVIAL_PHYSICAL_STATE"]))).unwrap(), false); assert_eq!(n1.verdict.codes, vec!["TRIVIAL_PHYSICAL_STATE"]); - assert!(n1.verdict.checks.contains(&("constraint_residual", "NOT_EVALUATED"))); + // V2 section 4 trivial-kernel table: check 3 FAIL, checks 4, 6, 7, 8, 9, 10 NOT_EVALUATED, 1, 2, 5 evaluated + for (i, (name, res)) in n1.verdict.checks.iter().enumerate() { + let want = match i + 1 { 3 => "FAIL", 4 | 6 | 7 | 8 | 9 | 10 => "NOT_EVALUATED", _ => "PASS" }; + assert_eq!(*res, want, "check {} {}", i + 1, name); + } assert!(n1.verdict_lines.contains(&"expectation_met YES".to_string())); assert!(n1.values.iter().filter(|l| l.contains(" undefined 0@0")).count() == 1 + 4 + 24); // N2 half covered @@ -422,7 +426,7 @@ mod tests { assert_eq!(n5.verdict.codes, vec!["BOUND_KIND_INSUFFICIENT"]); } - /// AT0_SPEC draft (aien-architecture#176 at SPEC_DRAFT_COMMIT): two-level clock, + /// AT0_SPEC.md (aien-architecture#176, merged at SPEC_COMMIT), sections 1 and 13: two-level clock, /// H_S = diag(0, 1): P(X+) = (1 + cos th)/2, P(Y+) = (1 - sin th)/2, P(Z+) = 1/2, p_k = 1/4. #[test] fn spec_draft_reference_model() { @@ -516,7 +520,7 @@ mod tests { #[test] fn fixtures_render_and_meet_expectations() { let rendered = super::at0::fixtures::render(); - assert_eq!(rendered.files.len(), 21 * 2 + 1); + assert_eq!(rendered.files.len(), 22 * 2 + 1); for f in super::at0::fixtures::catalogue() { let c = parse_case(&f.case).unwrap(); let comp = compute(&c, f.dephased);