diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9924bcdf6e..941fc6d5d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -825,8 +825,14 @@ jobs: # gates before 2026-10-20 took 74, 92, and 100 minutes on this leg; on # 2026-10-20 the 430 conformance tests passed in 99 minutes and the leg # was cancelled at the 120-minute limit it then had, during the last test - # binaries. Twice the slowest observed time leaves the limit a bound on a - # hung job, not a race with the runner's speed. + # binaries. At afe1a002 on 2026-11-02 the leg took 144 minutes (run + # 41478333299), 124.5 of them in the conformance binary. #235 moves SP-02's + # complete stress families and TC-03's seeded fuel sweep to the normative + # host, keeping fixed vectors here, and reads the shared declaration + # inventory once in TC-03 and TC-05. The post-change Intel measurement is + # recorded with the PR's full-gate results before closing #235. This limit + # stays until that evidence supports lowering it: a timeout is a bound on + # a hung job, not a performance result. timeout-minutes: 240 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index ddee99643f..4128c89917 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,13 @@ workspace carried at those versions without a tag. ## Unreleased +- The Intel macOS host-gate cost correction for #235 keeps SP-02's complete + certificate scaling families and TC-03's seeded argument/fuel sweep on the + normative Linux host, with fixed certificate vectors and committed fixture + assertions on every supported host. TC-03 and TC-05 render and parse their + shared fixture modules once for declaration membership checks. No + acceptance recipe, normative assertion, or kernel replay is removed. + - The #34 closure pass (documentation and evidence; no register row, language datum, schema, or compiler source moves). Sixteen examples carry a `README.md` that names the register rows whose gates run on them, what diff --git a/CONFORMANCE.md b/CONFORMANCE.md index ca34dedda2..80c2d5dc7b 100644 --- a/CONFORMANCE.md +++ b/CONFORMANCE.md @@ -82,7 +82,7 @@ the error registry does not sanction (R5, `ERRORS.md`). | --- | --- | --- | | `TC-01` | `build` | Hand-constructed target programs have canonical bytes and a SHA-256 content identity, alpha-equivalent programs canonicalize to identical bytes and identity, an ill-typed program has neither, and every committed fixture validates against the target schemas. | | `TC-02` | `build` | Every malformed target program or violated static rule fails closed with LLB6005, and an invalid program has neither a canonical form nor a rendering. | -| `TC-03` | `build` | The calculus denotation is a kernel-checked LexLean definition that charges every evaluator operation, Lean's kernel reduces every kernel-reducible fixture to its expected outcome with its exact step count, no fixture program is stuck on its stated arguments or on seeded random well-typed arguments at any sampled fuel, and a wrong expected outcome is rejected by Lean. | +| `TC-03` | `build` | The calculus denotation is a kernel-checked LexLean definition that charges every evaluator operation, Lean's kernel reduces every kernel-reducible fixture to its expected outcome with its exact step count, no fixture program is stuck on its stated arguments or, on the normative Linux x86-64 host, on seeded random well-typed arguments at any sampled fuel, and a wrong expected outcome is rejected by Lean. | | `TC-04` | `build` | Lean's evaluator, running the published calculus sources compiled again by pinned Lean, reproduces every fixture's expected outcome and step count, including fixtures a reflexivity proof cannot decide, and the comparison refuses a fixture stated one step off. | | `TC-05` | `build` | Every realization library template has a fixture whose outcome the kernel proves equal to the value LexLean's own collection primitive computes, committed instances equal their templates, and a mutated template is rejected by Lean. | | `TC-06` | `build` | Every runtime construct of the production registry has exactly one realization row naming existing calculus elements and requires allocation and implies recursion exactly when its realization does, and the fixtures exercise every calculus type, literal, expression, shape, primitive, and template, and every fixed-width primitive at every width it admits. | @@ -375,7 +375,7 @@ the error registry does not sanction (R5, `ERRORS.md`). | ID | Level | Statement | | --- | --- | --- | | `SP-01` | `build` | Every production root of the committed examples lowers to a valid realization program in first-binding order, byte-identical across two lowerings, with an origin for every function and document type and exactly the root's eligibility closure; the lowering and certificate sources match no construct by default; a planted closure disagreement fails with LLI9001 and a planted default arm is refused. | -| `SP-02` | `build` | Every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning has a certificate whose root theorem, that the lowered program converges on the encoded arguments to the encoded source value or to overflow exactly where the width predicate fails, compiles under the pinned Lean, replays through leanchecker, and depends on exactly Classical.choice, Quot.sound, and propext; a certificate generated against a program with a planted branch, arithmetic, constructor, recursion, or literal mutation is rejected, and each such rejection lies in the declaration of the function mutated; and a root whose lowered program or certificates would exceed max_ir_nodes or max_file_bytes is refused with LLS8002 before the toolchain is touched: early, by a lower bound on each certificate from what the program states, the greatest of which is compared with the limit and none of which is above its certificate on the corpora, on families of programs that grow one dimension at a time, and on programs that grow several at once, so that a program whose certificates fit, a match on 240 constructors, a string of 450 000 characters, or both a wide match and a long string, is not refused by it (and a mixed shape that fits at its full scale of 256 is checked to fit and not edge-checked), and by a floor on certificate B from the entries its field reads print, which the lowering refuses before the Rust crate is built; during certificate B's derivation at 12 bytes a kernel node; and for every certificate by weighing the finished module in the authoring notation it is recorded in against max_file_bytes before any file is staged; the programs, crates, and certificates of all the roots of a project count together toward max_total_source_bytes, which a chain of roots calling one another passes before memory is exhausted; and a match on 180 constructors verifies through the whole pipeline. | +| `SP-02` | `build` | Every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning has a certificate whose root theorem, that the lowered program converges on the encoded arguments to the encoded source value or to overflow exactly where the width predicate fails, compiles under the pinned Lean, replays through leanchecker, and depends on exactly Classical.choice, Quot.sound, and propext; a certificate generated against a program with a planted branch, arithmetic, constructor, recursion, or literal mutation is rejected, and each such rejection lies in the declaration of the function mutated; and a root whose lowered program or certificates would exceed max_ir_nodes or max_file_bytes is refused with LLS8002 before the toolchain is touched: early, by a lower bound on each certificate from what the program states, the greatest of which is compared with the limit and none of which is above its certificate on the corpora, on families of programs that grow one dimension at a time, and on programs that grow several at once, so that a program whose certificates fit, a match on 240 constructors, a string of 450 000 characters, or both a wide match and a long string, is not refused by it (and a mixed shape that fits at its full scale of 256 is checked to fit and not edge-checked), and by a floor on certificate B from the entries its field reads print, which the lowering refuses before the Rust crate is built; during certificate B's derivation at 12 bytes a kernel node; and for every certificate by weighing the finished module in the authoring notation it is recorded in against max_file_bytes before any file is staged; the programs, crates, and certificates of all the roots of a project count together toward max_total_source_bytes, which a chain of roots calling one another passes before memory is exhausted; and a match on 180 constructors verifies through the whole pipeline; every supported host checks the certificate bounds on the committed corpora and fixed small vectors, and the complete scaling and seeded stress families run on the normative Linux x86-64 host. | | `SP-03` | `build` | On seeded inputs to every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning, the calculus interpreter's outcome on the lowered program equals the certificate's observation evaluated by Lean, and a planted disagreement is detected. | | `SP-04` | `build` | Every declaration of the preservation library is a row of a native module that pins its axioms exactly and depends on exactly them under the pinned Lean, the statement vocabulary SPEC.md quotes equals what the pinned Lean prints of the generated library, the shipped calculus modules are byte-equal to the compiler project's golden modules, and a library module or certificate with a forbidden token, a disallowed option, or a foreign import is refused. | | `SP-05` | `build` | Verification checks certificate A for every production root after named-root extraction and publishes each certificate, its audit output and process records, and a preservation.json valid against its schema whose digest the attestation binds; the lowered program and each target's crate the certificates are about are published and bound by that record, which also states the function each crate is invoked through and agrees with certificate E and the crate; a certificate the pinned Lean rejects fails with LLV7013 and a drifted preservation environment with LLV7014, before publication; and a pinned Lean that gives up on a certificate by heartbeats or recursion depth is reported as that rejection unless the module is at least a quarter of max_file_bytes, in which case, as when it is killed or out of memory, it is an exhausted resource, LLS8002. | diff --git a/SPEC.md b/SPEC.md index f327f0e52c..6acf7310a5 100644 --- a/SPEC.md +++ b/SPEC.md @@ -11216,7 +11216,7 @@ Every row below is normative, has honesty level `build`, and MUST be copied byte | `NE-06` | `extraction` | A proof-only dependency presented as a runtime closure member fails extraction with LLV7011 before any compiler input is published. | §22.10, §26.3 | | `TC-01` | `calculus` | Hand-constructed target programs have canonical bytes and a SHA-256 content identity, alpha-equivalent programs canonicalize to identical bytes and identity, an ill-typed program has neither, and every committed fixture validates against the target schemas. | §17.14, §21.7 | | `TC-02` | `calculus` | Every malformed target program or violated static rule fails closed with LLB6005, and an invalid program has neither a canonical form nor a rendering. | §17.14, §26.3 | -| `TC-03` | `calculus` | The calculus denotation is a kernel-checked LexLean definition that charges every evaluator operation, Lean's kernel reduces every kernel-reducible fixture to its expected outcome with its exact step count, no fixture program is stuck on its stated arguments or on seeded random well-typed arguments at any sampled fuel, and a wrong expected outcome is rejected by Lean. | §17.14 | +| `TC-03` | `calculus` | The calculus denotation is a kernel-checked LexLean definition that charges every evaluator operation, Lean's kernel reduces every kernel-reducible fixture to its expected outcome with its exact step count, no fixture program is stuck on its stated arguments or, on the normative Linux x86-64 host, on seeded random well-typed arguments at any sampled fuel, and a wrong expected outcome is rejected by Lean. | §17.14 | | `TC-04` | `calculus` | Lean's evaluator, running the published calculus sources compiled again by pinned Lean, reproduces every fixture's expected outcome and step count, including fixtures a reflexivity proof cannot decide, and the comparison refuses a fixture stated one step off. | §17.14 | | `TC-05` | `calculus` | Every realization library template has a fixture whose outcome the kernel proves equal to the value LexLean's own collection primitive computes, committed instances equal their templates, and a mutated template is rejected by Lean. | §17.12, §17.14 | | `TC-06` | `calculus` | Every runtime construct of the production registry has exactly one realization row naming existing calculus elements and requires allocation and implies recursion exactly when its realization does, and the fixtures exercise every calculus type, literal, expression, shape, primitive, and template, and every fixed-width primitive at every width it admits. | §17.13, §17.14 | @@ -11261,7 +11261,7 @@ Every row below is normative, has honesty level `build`, and MUST be copied byte | `GC-10` | `gnaf-certification` | The certification model, certificate fixtures, certificate module, and schemas are generated, deterministic, and content-addressed: they equal their generators, the compiler project reaches them from its entrypoint, certificate identities are recomputed from content, and a planted change to a premise, a bound, or a route changes the verdict or the identity. | §17.18 | | `GC-11` | `gnaf-certification` | The certification library is LexLean source: every module of its registry is one language-1.2 native core module of the library's own project, which holds no file of Lean source, no Lean file anywhere in the release tree declares the library's namespace or lies under its module root, and the registry lists only the modules; the declarations and their exact axiom policies are read from the native data, a module that imports anything but `Init`, an earlier module, the preservation core, or the generated and calculus modules it is stated against, or that does not pin its axioms exactly, is refused, and the Lean the compiler generates from the sources is, byte for byte, the Lean the certification library's kernel check compiles, so that neither a stale nor an edited generated module can stand in for the source and a planted drift of the source is visible in what is generated. The one Lean text a generated library module carries beside its data is the decoder of core module 2, which loads native modules. | §17.18 | | `SP-01` | `preservation` | Every production root of the committed examples lowers to a valid realization program in first-binding order, byte-identical across two lowerings, with an origin for every function and document type and exactly the root's eligibility closure; the lowering and certificate sources match no construct by default; a planted closure disagreement fails with LLI9001 and a planted default arm is refused. | §17.17 | -| `SP-02` | `preservation` | Every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning has a certificate whose root theorem, that the lowered program converges on the encoded arguments to the encoded source value or to overflow exactly where the width predicate fails, compiles under the pinned Lean, replays through leanchecker, and depends on exactly Classical.choice, Quot.sound, and propext; a certificate generated against a program with a planted branch, arithmetic, constructor, recursion, or literal mutation is rejected, and each such rejection lies in the declaration of the function mutated; and a root whose lowered program or certificates would exceed max_ir_nodes or max_file_bytes is refused with LLS8002 before the toolchain is touched: early, by a lower bound on each certificate from what the program states, the greatest of which is compared with the limit and none of which is above its certificate on the corpora, on families of programs that grow one dimension at a time, and on programs that grow several at once, so that a program whose certificates fit, a match on 240 constructors, a string of 450 000 characters, or both a wide match and a long string, is not refused by it (and a mixed shape that fits at its full scale of 256 is checked to fit and not edge-checked), and by a floor on certificate B from the entries its field reads print, which the lowering refuses before the Rust crate is built; during certificate B's derivation at 12 bytes a kernel node; and for every certificate by weighing the finished module in the authoring notation it is recorded in against max_file_bytes before any file is staged; the programs, crates, and certificates of all the roots of a project count together toward max_total_source_bytes, which a chain of roots calling one another passes before memory is exhausted; and a match on 180 constructors verifies through the whole pipeline. | §17.17 | +| `SP-02` | `preservation` | Every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning has a certificate whose root theorem, that the lowered program converges on the encoded arguments to the encoded source value or to overflow exactly where the width predicate fails, compiles under the pinned Lean, replays through leanchecker, and depends on exactly Classical.choice, Quot.sound, and propext; a certificate generated against a program with a planted branch, arithmetic, constructor, recursion, or literal mutation is rejected, and each such rejection lies in the declaration of the function mutated; and a root whose lowered program or certificates would exceed max_ir_nodes or max_file_bytes is refused with LLS8002 before the toolchain is touched: early, by a lower bound on each certificate from what the program states, the greatest of which is compared with the limit and none of which is above its certificate on the corpora, on families of programs that grow one dimension at a time, and on programs that grow several at once, so that a program whose certificates fit, a match on 240 constructors, a string of 450 000 characters, or both a wide match and a long string, is not refused by it (and a mixed shape that fits at its full scale of 256 is checked to fit and not edge-checked), and by a floor on certificate B from the entries its field reads print, which the lowering refuses before the Rust crate is built; during certificate B's derivation at 12 bytes a kernel node; and for every certificate by weighing the finished module in the authoring notation it is recorded in against max_file_bytes before any file is staged; the programs, crates, and certificates of all the roots of a project count together toward max_total_source_bytes, which a chain of roots calling one another passes before memory is exhausted; and a match on 180 constructors verifies through the whole pipeline; every supported host checks the certificate bounds on the committed corpora and fixed small vectors, and the complete scaling and seeded stress families run on the normative Linux x86-64 host. | §17.17 | | `SP-03` | `preservation` | On seeded inputs to every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning, the calculus interpreter's outcome on the lowered program equals the certificate's observation evaluated by Lean, and a planted disagreement is detected. | §17.17 | | `SP-04` | `preservation` | Every declaration of the preservation library is a row of a native module that pins its axioms exactly and depends on exactly them under the pinned Lean, the statement vocabulary SPEC.md quotes equals what the pinned Lean prints of the generated library, the shipped calculus modules are byte-equal to the compiler project's golden modules, and a library module or certificate with a forbidden token, a disallowed option, or a foreign import is refused. | §17.17 | | `SP-05` | `preservation` | Verification checks certificate A for every production root after named-root extraction and publishes each certificate, its audit output and process records, and a preservation.json valid against its schema whose digest the attestation binds; the lowered program and each target's crate the certificates are about are published and bound by that record, which also states the function each crate is invoked through and agrees with certificate E and the crate; a certificate the pinned Lean rejects fails with LLV7013 and a drifted preservation environment with LLV7014, before publication; and a pinned Lean that gives up on a certificate by heartbeats or recursion depth is reported as that rejection unless the module is at least a quarter of max_file_bytes, in which case, as when it is killed or out of memory, it is an exhausted resource, LLS8002. | §17.17, §22.8, §22.9 | diff --git a/VERIFICATION.md b/VERIFICATION.md index a6cf6d72f4..7229bb1b37 100644 --- a/VERIFICATION.md +++ b/VERIFICATION.md @@ -12274,3 +12274,35 @@ draws up to a fixed count. `BS-05`, `BS-06`, `BS-08` and `BS-15` read only manif and fixtures. The three failing cases assert the count before their plants, so that run did not reach the plants on the new draws. A package that adds records should set these counts with its records in the tree, on the same commit. + +### Host-matrix cost and coverage (#235) + +The successful Intel macOS job 125390659100 of run 41478333299 at +`afe1a002` ran from 2026-11-02 16:09:07 to 18:33:00 UTC (144 minutes). +Its 468 conformance tests took 7,470.84 seconds. The last three cases were +SP-02 (about 42 minutes), TC-03 (about 21 minutes) and TC-05 (about 18 +minutes), inferred from their 60-second notices and completion timestamps. + +SP-02 now runs its complete scaling grid, mixed-shape searches and seeded +stress families only on the normative Linux x86-64 host. Every host retains +the committed-corpus certificate bounds, negative limits and fixed let-chain +and wide-match vectors. TC-03 keeps its committed fixture and generated +module assertions on every host; its seeded argument/fuel sweep, with the +same seed, fuel schedule and greater-than-10,000-run assertion, runs on the +normative host. Each non-normative case reports the split. TC-03 and TC-05 render and parse their two shared fixture modules once, +then check declaration membership through a set, retaining every assertion. + +The full normative coverage is unchanged. No cache, cross-run evidence, +additional macOS shard, or acceptance recipe is introduced. The post-change +Intel runtime must be measured from the PR's full gate before #235 is +considered closed; no speedup is inferred from this host or from a timeout. + +Focused local validation on Linux x86-64: `validate-model` (468 IDs and 86 +codes), `validate-spec-links`, the five BDD meta-gate tests, formatting, and +workspace/all-target/all-feature Clippy with warnings denied pass. The +isolated `conformance_tc_05` reached its Lean-host check after all template +and declaration-membership assertions in 4.53 seconds, then failed because +this environment installs Lean under `ELAN_HOME` while the conformance +helper requires `$HOME/.elan`. That is a blocked Lean-backed test, not a +pass or an Intel timing measurement. The full normative cases and actual +non-normative host paths remain for CI; neither helper nor home was changed. diff --git a/crates/conformance/src/cases/calculus.rs b/crates/conformance/src/cases/calculus.rs index 8728f5b8b7..196cf97e35 100644 --- a/crates/conformance/src/cases/calculus.rs +++ b/crates/conformance/src/cases/calculus.rs @@ -14,6 +14,25 @@ use serde_json::{json, Value as Json}; use crate::calculus::{self as fixtures, Case}; use crate::support::{self, repo_root, P}; +/// Read the declaration inventory once: each fixture asks about a name in +/// these same two modules, whose parsing costs more than a set lookup. +fn fixture_declaration_names(cases: &[Case]) -> BTreeSet { + [ + fixtures::fixtures_module(cases), + fixtures::reasoning_fixtures_module(cases), + ] + .into_iter() + .flat_map(|module| { + support::module_json(&module)["declarations"] + .as_array() + .expect("fixture module declarations") + .iter() + .filter_map(|declaration| declaration["name"].as_str().map(str::to_owned)) + .collect::>() + }) + .collect() +} + /// Run every fixture program on seeded random well-typed arguments at /// fuels up to the stated one, asserting no run is stuck; the number of /// runs. @@ -1019,15 +1038,8 @@ pub fn run(id: &str) { // states every fixture's outcome. "TC-03" => { let cases = fixtures::cases(); - let modules = [ - fixtures::fixtures_module(&cases), - fixtures::reasoning_fixtures_module(&cases), - ]; - let stated = |name: &str| { - modules - .iter() - .any(|module| crate::support::declares(module, name)) - }; + let names = fixture_declaration_names(&cases); + let stated = |name: &str| names.contains(name); let mut opaque = 0; for case in &cases { let id = fixtures::identifier(&case.fixture.name); @@ -1050,17 +1062,21 @@ pub fn run(id: &str) { // property, not a proof of it. // The interpreter recurses once per unit of fuel, so the sample // runs on a stack sized for the largest stated fuel. - let sampled = cases.clone(); - let runs = std::thread::Builder::new() - .stack_size(1 << 30) - .spawn(move || progress_runs(&sampled)) - .expect("thread") - .join() - .expect("no fixture program is stuck"); - assert!( - runs > 10_000, - "the progress property is sampled ({runs} runs)" - ); + if support::normative_host() { + let sampled = cases.clone(); + let runs = std::thread::Builder::new() + .stack_size(1 << 30) + .spawn(move || progress_runs(&sampled)) + .expect("thread") + .join() + .expect("no fixture program is stuck"); + assert!( + runs > 10_000, + "the progress property is sampled ({runs} runs)" + ); + } else { + eprintln!("TC-03: committed fixture assertions ran; the seeded argument and fuel sweep runs on the normative host (§8.3)"); + } assert!( opaque > 0 && opaque < cases.len() / 4, "kernel-opaque fixtures are the exception ({opaque})" @@ -1133,6 +1149,7 @@ pub fn run(id: &str) { // §17.14: every library template realizes LexLean's own primitive. "TC-05" => { let cases = fixtures::cases(); + let names = fixture_declaration_names(&cases); let mut covered = BTreeSet::new(); for case in cases.iter().filter(|case| !case.libraries.is_empty()) { // The instances follow the fixture's own functions, one @@ -1172,12 +1189,7 @@ pub fn run(id: &str) { case.fixture.name ); let id = fixtures::identifier(&case.fixture.name); - assert!([ - fixtures::fixtures_module(&cases), - fixtures::reasoning_fixtures_module(&cases) - ] - .iter() - .any(|module| crate::support::declares(module, &format!("{id}Agrees")))); + assert!(names.contains(&format!("{id}Agrees"))); } assert_eq!( covered.len(), diff --git a/crates/conformance/src/cases/preservation.rs b/crates/conformance/src/cases/preservation.rs index 34b300d46e..b4bca09701 100644 --- a/crates/conformance/src/cases/preservation.rs +++ b/crates/conformance/src/cases/preservation.rs @@ -1621,7 +1621,24 @@ pub fn run(id: &str) { // read: the stress families (Rust only), the verification of a // wide match through the whole pipeline, and the certification // of the corpora, which the other cases share. - let stress = std::thread::spawn(stress_estimates); + let stress = support::normative_host().then(|| std::thread::spawn(stress_estimates)); + if stress.is_none() { + // The host matrix checks certificate construction and bounds + // on fixed small vectors; the complete scaling grid belongs + // to the normative host, as the bootstrap differentials do. + for (name, project) in [ + ("let chain 4", crate::stress::let_chain_default(4)), + ("wide match 2", crate::stress::wide_match_default(2)), + ] { + let certified = preservation::certificates(&project); + assert!(!certified.is_empty(), "{name} certifies"); + for entry in &certified { + assert_floor(name, entry); + assert_bounds(name, entry); + } + } + eprintln!("SP-02: fixed certificate vectors ran; full scaling and seeded stress families run on the normative host (§8.3)"); + } let wide = support::lean_host_available().then(|| { std::thread::spawn(|| { support::verify_ok(&crate::stress::wide_match_default(180)); @@ -1769,13 +1786,15 @@ pub fn run(id: &str) { error.to_string().contains("recursion limit exceeded"), "{error}" ); - let quadratic = stress - .join() - .unwrap_or_else(|panic| std::panic::resume_unwind(panic)); - assert!( - quadratic > 100_000, - "the record-copy family has a certificate B far beyond A and E, which is what B's own limit is for" - ); + if let Some(stress) = stress { + let quadratic = stress + .join() + .unwrap_or_else(|panic| std::panic::resume_unwind(panic)); + assert!( + quadratic > 100_000, + "the record-copy family has a certificate B far beyond A and E, which is what B's own limit is for" + ); + } if !support::lean_backed("SP-02") { return; } diff --git a/features/suites/calculus.feature b/features/suites/calculus.feature index 5a5837c3af..9e9688bb06 100644 --- a/features/suites/calculus.feature +++ b/features/suites/calculus.feature @@ -17,9 +17,9 @@ Feature: calculus And the invalid program also has no Rust rendering, while the valid one loads and renders @TC-03 @build - Scenario: The calculus denotation is a kernel-checked LexLean definition that charges every evaluator operation, Lean's kernel reduces every kernel-reducible fixture to its expected outcome with its exact step count, no fixture program is stuck on its stated arguments or on seeded random well-typed arguments at any sampled fuel, and a wrong expected outcome is rejected by Lean. + Scenario: The calculus denotation is a kernel-checked LexLean definition that charges every evaluator operation, Lean's kernel reduces every kernel-reducible fixture to its expected outcome with its exact step count, no fixture program is stuck on its stated arguments or, on the normative Linux x86-64 host, on seeded random well-typed arguments at any sampled fuel, and a wrong expected outcome is rejected by Lean. Given the `compiler` project and its generated `TargetFixtures` module - When the project is verified under pinned Lean, every fixture program is run on seeded random well-typed arguments at sampled fuels, and a copy stating one wrong expected outcome is verified + When the project is verified under pinned Lean, on the normative Linux x86-64 host every fixture program is run on seeded random well-typed arguments at sampled fuels, and a copy stating one wrong expected outcome is verified Then every kernel-reducible fixture has a theorem the kernel proves, the module equals its generator, and no run is stuck And the copy fails with LLV7002 on the wrong outcome diff --git a/features/suites/preservation.feature b/features/suites/preservation.feature index f3e4d7e20f..97a9a1512d 100644 --- a/features/suites/preservation.feature +++ b/features/suites/preservation.feature @@ -10,11 +10,12 @@ Feature: preservation And a report whose closure omits a member fails with LLI9001, and a default arm planted in a preservation source is refused @SP-02 @build - Scenario: Every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning has a certificate whose root theorem, that the lowered program converges on the encoded arguments to the encoded source value or to overflow exactly where the width predicate fails, compiles under the pinned Lean, replays through leanchecker, and depends on exactly Classical.choice, Quot.sound, and propext; a certificate generated against a program with a planted branch, arithmetic, constructor, recursion, or literal mutation is rejected, and each such rejection lies in the declaration of the function mutated; and a root whose lowered program or certificates would exceed max_ir_nodes or max_file_bytes is refused with LLS8002 before the toolchain is touched: early, by a lower bound on each certificate from what the program states, the greatest of which is compared with the limit and none of which is above its certificate on the corpora, on families of programs that grow one dimension at a time, and on programs that grow several at once, so that a program whose certificates fit, a match on 240 constructors, a string of 450 000 characters, or both a wide match and a long string, is not refused by it (and a mixed shape that fits at its full scale of 256 is checked to fit and not edge-checked), and by a floor on certificate B from the entries its field reads print, which the lowering refuses before the Rust crate is built; during certificate B's derivation at 12 bytes a kernel node; and for every certificate by weighing the finished module in the authoring notation it is recorded in against max_file_bytes before any file is staged; the programs, crates, and certificates of all the roots of a project count together toward max_total_source_bytes, which a chain of roots calling one another passes before memory is exhausted; and a match on 180 constructors verifies through the whole pipeline. + Scenario: Every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning has a certificate whose root theorem, that the lowered program converges on the encoded arguments to the encoded source value or to overflow exactly where the width predicate fails, compiles under the pinned Lean, replays through leanchecker, and depends on exactly Classical.choice, Quot.sound, and propext; a certificate generated against a program with a planted branch, arithmetic, constructor, recursion, or literal mutation is rejected, and each such rejection lies in the declaration of the function mutated; and a root whose lowered program or certificates would exceed max_ir_nodes or max_file_bytes is refused with LLS8002 before the toolchain is touched: early, by a lower bound on each certificate from what the program states, the greatest of which is compared with the limit and none of which is above its certificate on the corpora, on families of programs that grow one dimension at a time, and on programs that grow several at once, so that a program whose certificates fit, a match on 240 constructors, a string of 450 000 characters, or both a wide match and a long string, is not refused by it (and a mixed shape that fits at its full scale of 256 is checked to fit and not edge-checked), and by a floor on certificate B from the entries its field reads print, which the lowering refuses before the Rust crate is built; during certificate B's derivation at 12 bytes a kernel node; and for every certificate by weighing the finished module in the authoring notation it is recorded in against max_file_bytes before any file is staged; the programs, crates, and certificates of all the roots of a project count together toward max_total_source_bytes, which a chain of roots calling one another passes before memory is exhausted; and a match on 180 constructors verifies through the whole pipeline; every supported host checks the certificate bounds on the committed corpora and fixed small vectors, and the complete scaling and seeded stress families run on the normative Linux x86-64 host. Given every production root of examples/production and of examples/production-coverage When each certificate is compiled with the pinned Lean beside the library and the generated modules, replayed, and its axioms audited Then every certificate is accepted and its root theorem depends on exactly the three classical axioms And a certificate generated against each planted program mutation is rejected inside the function mutated + And every supported host checks the committed corpora and fixed small certificate vectors, and the normative Linux x86-64 host checks the complete scaling and seeded stress families And a program past a limit is refused with LLS8002 before the toolchain, and the lower bound it refuses on is never above the largest certificate on the corpora and the stress families, so programs whose certificates fit are not refused @SP-03 @build diff --git a/model/ids.toml b/model/ids.toml index 48f8596be6..0ff68a8c89 100644 --- a/model/ids.toml +++ b/model/ids.toml @@ -1703,7 +1703,7 @@ statement = "Every malformed target program or violated static rule fails closed id = "TC-03" level = "build" suite = "calculus" -statement = "The calculus denotation is a kernel-checked LexLean definition that charges every evaluator operation, Lean's kernel reduces every kernel-reducible fixture to its expected outcome with its exact step count, no fixture program is stuck on its stated arguments or on seeded random well-typed arguments at any sampled fuel, and a wrong expected outcome is rejected by Lean." +statement = "The calculus denotation is a kernel-checked LexLean definition that charges every evaluator operation, Lean's kernel reduces every kernel-reducible fixture to its expected outcome with its exact step count, no fixture program is stuck on its stated arguments or, on the normative Linux x86-64 host, on seeded random well-typed arguments at any sampled fuel, and a wrong expected outcome is rejected by Lean." [[id]] id = "TC-04" @@ -1973,7 +1973,7 @@ statement = "Every production root of the committed examples lowers to a valid r id = "SP-02" level = "build" suite = "preservation" -statement = "Every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning has a certificate whose root theorem, that the lowered program converges on the encoded arguments to the encoded source value or to overflow exactly where the width predicate fails, compiles under the pinned Lean, replays through leanchecker, and depends on exactly Classical.choice, Quot.sound, and propext; a certificate generated against a program with a planted branch, arithmetic, constructor, recursion, or literal mutation is rejected, and each such rejection lies in the declaration of the function mutated; and a root whose lowered program or certificates would exceed max_ir_nodes or max_file_bytes is refused with LLS8002 before the toolchain is touched: early, by a lower bound on each certificate from what the program states, the greatest of which is compared with the limit and none of which is above its certificate on the corpora, on families of programs that grow one dimension at a time, and on programs that grow several at once, so that a program whose certificates fit, a match on 240 constructors, a string of 450 000 characters, or both a wide match and a long string, is not refused by it (and a mixed shape that fits at its full scale of 256 is checked to fit and not edge-checked), and by a floor on certificate B from the entries its field reads print, which the lowering refuses before the Rust crate is built; during certificate B's derivation at 12 bytes a kernel node; and for every certificate by weighing the finished module in the authoring notation it is recorded in against max_file_bytes before any file is staged; the programs, crates, and certificates of all the roots of a project count together toward max_total_source_bytes, which a chain of roots calling one another passes before memory is exhausted; and a match on 180 constructors verifies through the whole pipeline." +statement = "Every production root of examples/production, examples/production-coverage, examples/models, and examples/reasoning has a certificate whose root theorem, that the lowered program converges on the encoded arguments to the encoded source value or to overflow exactly where the width predicate fails, compiles under the pinned Lean, replays through leanchecker, and depends on exactly Classical.choice, Quot.sound, and propext; a certificate generated against a program with a planted branch, arithmetic, constructor, recursion, or literal mutation is rejected, and each such rejection lies in the declaration of the function mutated; and a root whose lowered program or certificates would exceed max_ir_nodes or max_file_bytes is refused with LLS8002 before the toolchain is touched: early, by a lower bound on each certificate from what the program states, the greatest of which is compared with the limit and none of which is above its certificate on the corpora, on families of programs that grow one dimension at a time, and on programs that grow several at once, so that a program whose certificates fit, a match on 240 constructors, a string of 450 000 characters, or both a wide match and a long string, is not refused by it (and a mixed shape that fits at its full scale of 256 is checked to fit and not edge-checked), and by a floor on certificate B from the entries its field reads print, which the lowering refuses before the Rust crate is built; during certificate B's derivation at 12 bytes a kernel node; and for every certificate by weighing the finished module in the authoring notation it is recorded in against max_file_bytes before any file is staged; the programs, crates, and certificates of all the roots of a project count together toward max_total_source_bytes, which a chain of roots calling one another passes before memory is exhausted; and a match on 180 constructors verifies through the whole pipeline; every supported host checks the certificate bounds on the committed corpora and fixed small vectors, and the complete scaling and seeded stress families run on the normative Linux x86-64 host." [[id]] id = "SP-03"