Section 13: Burden Verification Suite
Goal: Adopt the six transferable methodologies plans/completed/aims-proofing-suite invented, applied BURDEN-SPECIFIC: mechanically bind the shipped burden emission/elimination/lowering sites to their governing proven calculus (CH-1..CH-comp, RL-comp RL3_elision_net_preserving, DP-2/DP-3) so drift is caught at build-time + test-all-time. This is the tooling §10’s terminal verification RUNS; §13 BUILDS it. Replaces the generic copy-paste verification of plans/llvm-verification-tooling (stripped by §14) with proof-bound, burden-aware conformance.
Context: The completed proofing suite shipped a reusable methodology, not just proofs:
- AST-probe-binds-proof-to-shipped-code —
aims-proof/checker/build.rsparses compiler source AST and emitspub constprobe markers the conformance gate consumes; drift between proof and code is mechanical, not reviewer-time. - Conformance cross-walk with 3-verdict manifest —
check-section-05-compiler-conformance.sh(DP-1..DP-10 → impl tokens) +run-locality-conformance.sh+shipped-conformance-manifest.json(pass/divergent/divergent-pending). - Dual-prover agreement —
dual-discharge.sh+proof-lean-map.json: Ori-checker verdict ↔ Lean kernel verdict must agree (statement-parity prelude defeats vacuous Lean proofs). - SMT counterexample adequacy —
proofs/10-counterexample/.smt2+.leanshapes, Expected UNSAT, with an asymmetric encoder-validation guard (known-SAT→SAT, known-UNSAT→UNSAT) so no UNSAT is vacuous. - proven_by criterion binding —
proven_by:frontmatter maps criteria to.proofartifacts +proof_status; FAIL-on-completeroutes to/fix-bugnot redesign (per §04B.N coverage guard). - Affected-set checking — lefthook glob runs proof/conformance checks zero-cost on non-touching commits; env-var widening for full-corpus.
The burden architecture already grew its own real verification primitives (burden_balance.rs VF-1, burden_delta.rs, the VF-3 oracle.rs, the static check-section-05-compiler-conformance.sh DP-2/DP-3 burden cross-walk). §13 completes the methodology adoption on top of those primitives — burden-specific AST-probe + burden SMT shapes + burden dual-discharge rows + burden proven_by + burden-aware oracle — never a parallel mechanism (missions.md §AIMS invariant 5).
Why a section (not §10 subsections): §10.6/§10.7 carried the lighter proto-versions (a single design-oracle script + a single oracle-extension item). The full six-pattern adoption is independently-workable (its proof-bound deliverables depend only on the proof corpus + emission sites, buildable in parallel with §08/§09 per routing.md §4 independence test), has its own success criteria, and is a closed unit of value. §10.6/§10.7 are absorbed here; §10 re-points to consume.
Depends on: TWO-HALF split (the corpus-wide assertion gates on §09, NOT §07B). The TOOLING-BUILD half (13.1 probe, 13.2 cross-walk, 13.3 SMT shapes, 13.4 dual-discharge, 13.5 proven_by binding, 13.6 design-oracle) is §07B-CLASSIFICATION-gated: it depends on §07B’s frozen probe-gateable burden emission shape + the §07B classification of which shapes are §09.2-owned (the frozen_burden_shape_version contract), and on the proof corpus + emission sites — authored IN PARALLEL with §08/§09. The CORPUS-ASSERTION half (the corpus-wide VF-1=0 conformance run + the oracle asserting the burden path is the real RC emitter on EVERY value shape) is §09-ACTIVATION-gated: it cannot pass until §09.2 retires the predicate stack + completes the Phase-5 broad-shape emission (the burden path is the sole RC emitter corpus-wide ONLY after §09.2, NOT after §07B — §07B proves the probe-gateable surface self-sufficient + classifies the §09.2-territory residual but does NOT deliver corpus-wide completion). depends_on: ["07B", "09"] carries both halves; the §10 verification join already gates the corpus run on depends_on [09, 13], and this section’s dependency now aligns with that. §07A delivered the narrow-shape self-sufficiency; §07B proves the broad probe-gateable shapes (iterator-from-collection / fat-pointer-matrix / collection-element / SSO / generic) self-sufficient; §09.2 completes the JOINT remainder + is the TRUE corpus-wide sole-RC-emitter milestone §13’s corpus-assertion half binds against. FEEDS §10 (verification RUNS this suite).
Reference implementations: compiler_repo/aims-proof/checker/build.rs (AST-probe), scripts/check-section-05-compiler-conformance.sh (3-verdict cross-walk), scripts/dual-discharge.sh + scripts/proof-lean-map.json (dual-prover), proofs/10-counterexample/{README.md,results.json,bug-04-118.smt2} (SMT shape template + encoder-validation guard), plans/completed/aims-proofing-suite/section-13-04b-criterion-binding.md (proven_by binding), plans/completed/aims-proofing-suite/section-17-locality-shipped-conformance.md (manifest/probe/cross-walk), lean/AimsProof/Coexistence.lean (the CH-* mirror the burden shapes discharge against).
Intelligence Reconnaissance
Queries:
scripts/intel-query.sh --human file-symbols "compiler_repo/aims-proof/checker" --repo ori— checker/build.rs probe surfacescripts/intel-query.sh --human callers eliminate_burden_ops --repo ori— burden-op decision sites the probe + oracle bindscripts/intel-query.sh --human callers emit_burden_ops --repo ori— Step-4b emission site the CH-5 phase-ordering probe checksscripts/intel-query.sh --human file-symbols "compiler_repo/compiler/ori_arc/src/aims/verify" --repo ori— oracle.rs + burden_balance.rs extension surface
Queried: 2026-06-03.
Results summary (≤500 chars) [ori]: §13 EXTENDS existing infrastructure per missions.md §AIMS invariant 5 — build.rs probe pattern (proofing-suite), check-section-NN-compiler-conformance.sh cross-walk pattern, dual-discharge.sh + proof-lean-map.json, proofs/10-counterexample/ SMT corpus, VF-3 oracle.rs + burden_balance.rs. Zero parallel checkers; every burden-specific deliverable binds to a real CH-*/RL-comp/DP .proof + its Lean mirror. The static DP-2/DP-3 burden cross-walk already exists; §13 adds CH-2/CH-4/CH-5 + RL-comp + the runtime per-IR strengthening.
13.1 AST-probe conformance — binds burden emission sites to the proven calculus
File(s): compiler_repo/aims-proof/checker/build.rs (EXTEND the existing syn-AST probe)
- Extend
build.rs(mirroring its locality-variant +may_escapeprobe) to parse the burden emission/elimination sites viasynand emitpub constmarkers:BURDEN_EMIT_AT_STEP_4B: bool—emit_burden_opsinvoked afteranalyze_function, beforerealize_rc_reuse(CH-5 phase-ordering / PL-2).BURDEN_ELIM_READS_FROZEN_STATEMAP: bool—eliminate_burden_opstakes&AimsStateMap(read-only), never&mut(CH-4 immutability).BURDEN_ELIM_CONSUMES_DP2_DP3: bool—is_rc_dec_unnecessary(DP-2) +is_rc_inc_elidable(DP-3) called at burden-op sites inburden_elim.rs(CH-2 single-elimination).
- Each marker carries
cargo:rerun-if-changed=for its probed source path so a stale probe cannot bake into the binary (perbuild.rsprecedent). - A renamed / moved / deleted site flips its marker → the 13.2 cross-walk reports
divergent(FATAL). This is the mechanical drift detector that makes the CH-2/CH-4/CH-5 proofs mean something about shipped code. - Banned: a shell
grepreflection of the source (the probe is AST-level perbuild.rs; grep is the cross-walk’s job, not the probe’s). Banned: probing for a value outside the recognized set without amending the manifest first (perbuild.rsforward-invariant — an unrecognized tuple routes to FATAL).
Subsection close-out (13.1) per protocol.
13.2 check-burden-conformance.sh — 3-verdict cross-walk
File(s): compiler_repo/aims-proof/scripts/check-burden-conformance.sh (new — extends the check-section-NN-compiler-conformance.sh family)
- Author the cross-walk with a BURDEN_ROWS table (
"RULE | target-file | required-token | description") mapping each burden-governing rule to its implementation token, followingcheck-section-05-compiler-conformance.shexactly:CH-2 | burden_elim.rs | eliminate_burden_ops | single-elimination over the burden baselineCH-4 | burden_elim.rs | fn eliminate_burden_ops(.*&AimsStateMap | reads frozen state map, never mutatesCH-5 | pipeline/aims_pipeline | emit_burden_ops | Step-4b emission after analyze_functionDP-2 | burden_elim.rs | is_rc_dec_unnecessary | dec-unnecessary at burden-op siteDP-3 | burden_elim.rs | is_rc_inc_elidable | inc-elidable at burden-op siteRL-comp | burden_balance.rs | verify_burden_balance | net-preservation conformance
- 3-verdict output:
pass(token present),divergent(token absent — FATAL, exit 2),divergent-pending(locality-carve-out rule blocked byplans/locality-representation-unificationper the §17shipped-conformance-manifest.jsondiscipline — non-fatal, exit 0). Exit 3 on infrastructure failure (percheck-proofs.shexit-code contract). - Grep-based, sub-second, NO cargo build (the AST probe owns the build-time leg; this is the fast text leg) so it folds into
test-all.shpreamble alongsidecheck-debug-flags.sh(§14 wires it). - Tests: a token-present fixture →
pass; a deliberately-renamed-token fixture →divergentexit 2; a carve-out rule →divergent-pendingexit 0.
Subsection close-out (13.2) per protocol.
13.3 Burden SMT counterexample shapes
File(s): compiler_repo/aims-proof/proofs/10-counterexample/burden-{under-elim,over-elim,phase-ordering,stale-statemap}.{smt2,lean} + results.json + README.md (new shapes; extend the existing corpus)
- Author four
.smt2+ paired.leanshapes, each with thebug-04-118.smt2header template (shape description,Expected: UNSAT,SAT would mean the calculus is defective,shape_id,source,fixture_path,Cited proven rules:list naming each rule ID + its.proofpath):burden-under-elim—eliminate_burden_opsremoves aBurdenDecwhere DP-2’s antecedent (cardinality = Absent ∨ consumption = Dead) is FALSE → leak. Refuted byDP-2.proof+CH-2.proof→ UNSAT.burden-over-elim— Phase-7 lowering (BurdenInc→RcInc/BurdenDec→RcDec) nets ±1 over a path/SCC → double-free or leak. Refuted byRL-comp.proof(RL3_elision_net_preserving) → UNSAT.burden-phase-ordering— burden emission fires before lattice convergence → violates CH-5 + PL-2. Refuted byCH-5.proof+PL-2.proof→ UNSAT.burden-stale-statemap—eliminate_burden_opsmutates the state map → violates CH-4. Refuted byCH-4.proof→ UNSAT.
- The asymmetric encoder-validation guard (
fixtures/encoder-validation.smt2known-SAT must return SAT, known-UNSAT must return UNSAT) covers these shapes — a vacuous-UNSAT encoder is caught before any burden-shape verdict is trusted (perproofs/10-counterexample/README.mdlines 34-41). - Record each in
results.jsonwithroute_target: feeds_burden_adequacy_verdict+ the Z3 verdict; add aREADME.mdrow per shape (shape inventory pattern). - Banned: trusting an UNSAT verdict when the known-SAT fixture returns UNSAT (encoder-invalid → halt, fix encoding first, per the README routing table).
Subsection close-out (13.3) per protocol.
13.4 Dual-discharge + proof-lean-map rows for burden surface
File(s): compiler_repo/aims-proof/scripts/proof-lean-map.json (add rows) + lean/AimsProof/Coexistence.lean (the burden CH-* mirror — already exists; confirm coverage)
- Add
kind: theoremrows toproof-lean-map.jsonfor every burden-governing CH-* rule (CH-1..CH-5 + CH-comp →lean_module: AimsProof.Coexistence, withparity_tokensfrom each.proof’sSoundness property:) sodual-discharge.shenforces Ori-checker↔Lean verdict agreement on the coexistence surface the burden path depends on. - Add rows for the four 13.3
.smt2↔.leanburden shapes so the Lean kernel cross-validates each Z3 UNSAT (a Lean rejection of a claimed-UNSAT shape =ENCODER_INVALIDhalt per the counterexample methodology). - Confirm
dual-discharge.sh(statement-parity prelude → Ori-checker full-corpus →lake build→ per-theorem verdict comparison) exits 0 for every burden row. The statement-parity prelude is load-bearing: it prevents a vacuous Lean proof (True := by trivial) from falsely agreeing. - Banned: a burden row with
kind: theoremand a nulllean_theorem(parity-enforced kinds require a real Lean theorem; a foundation-only row iskind: foundation/unimplemented_engine_shape).
Subsection close-out (13.4) per protocol.
13.5 proven_by binding + burden-aware VF-3 oracle extension (absorbs §10.7)
File(s): this section’s frontmatter (proven_by: block) + compiler_repo/compiler/ori_arc/src/aims/verify/oracle.rs + burden_balance.rs (EXTEND — never parallel, per aims-proofing-suite §18.3 ownership note)
- Add a
proven_by:frontmatter block to this section mapping each suite-criterion to its governing.proofartifact +proof_status(persection-13-04b-criterion-binding.mdschema): AST-probe/conformance → CH-2/CH-4/CH-5 (proven_sound); SMT shapes → DP-2/DP-3/RL-comp/CH-5 (proven_sound/reformulated_and_proven); oracle → DP/RL/CH proven-complete set. A FAIL on aproof_status: completecriterion routes to/fix-bugagainst the divergent site (NEVER redesign / NEVER void §05), gated by the §04B.N within-coverage guard (theaims-rules.mdHISTORY 2026-05-28 terminal-state table is the deciding artifact). - PRIMARY — burden-aware per-IR oracle (absorbs §10.7 PRIMARY): extend the VF-3 oracle (
oracle.rs) to assert on emitted burden-op IR that each burden-op decision point satisfies the proven antecedent of its governing rule — a BurdenDec-eliminated site satisfies DP-2 (AimsProof.Decision::DP2_is_rc_dec_unnecessary_table); a burden ledger that nets 0 over every SCC/path satisfiesRL3_elision_net_preserving; a burden-emitted site satisfies CH-1 (AimsProof.Coexistence::CH1_burden_emitted_is_bridge:burden_emitted = burden_owned); the per-class coverage partition satisfies CH-comp. - COMPLEMENT — static cross-walk (do NOT duplicate, absorbs §10.7 COMPLEMENT): the DP-2/DP-3 burden-op-site mapping is ALREADY static-cross-walked by
check-section-05-compiler-conformance.sh; the 13.2check-burden-conformance.shextends it to CH-2/CH-4/CH-5 + RL-comp. The oracle is the per-IR runtime strengthening over the SAME proven antecedents — not a parallel mechanism. - Consume proven-rule set as data: enforce ONLY
proof_status: completerules (kind: theorem | composition_foldedinproof-lean-map.json∩proven_sound | reformulated_and_provenin theaims-rules.mdterminal-state table). Locality-carve-out rules whose §17 manifest verdict isdivergent-pendingstay advisory (do NOT hard-fail a target-only rule the shipped 4-variant lattice cannot satisfy). - Tests: a burden-op IR fixture obeying the antecedents passes; an injected violation (BurdenDec eliminated where DP-2’s antecedent is false) → conformance error citing rule ID + site (negative pin). The asserted antecedent is the SAME one
proof-lean-map.jsonmaps to the kernel-checked Lean theorem (no second copy of the rule). - TPR checkpoint —
/tpr-reviewcovering 13.1-13.5.
Subsection close-out (13.5) per protocol.
13.6 aims-burden-design-oracle.sh + frozen_rule_version (absorbs §10.6)
File(s): compiler_repo/diagnostics/aims-burden-design-oracle.sh (new — absorbed from §10.6)
- Author
aims-burden-design-oracle.shconsuming the §00.1 walkthrough document + the 12-risk-shape matrix + the Five-Invariant matrix +decisions/01–04dispositions, outputting pass/fail per shape + per invariant (per §00.3 + blind-spots cross_cutting[2]). - The script enforces the
frozen_rule_versionproducer/consumer contract: VERIFY §00 frontmatterfrozen_rule_version: v1matches §05 frontmatterconsumes_proof_product: v1(drift →FROZEN_RULE_VERSION_MISMATCHerror). - Record in §10’s body that §10.6 is absorbed here (§10 re-points; this section is the SSOT for the design-oracle).
Subsection close-out (13.6) per protocol.
13.R Third Party Review Findings
- None.
13.N Completion Checklist
- AST-probe ships (13.1); a renamed emission site flips the probe → cross-walk
divergent. -
check-burden-conformance.shships 3-verdict (13.2); folds into test-all preamble (wired by §14); token-rename →divergentexit 2. - Four burden SMT shapes ship UNSAT with encoder-validation guard green (13.3);
results.json+README.mdupdated. -
proof-lean-map.jsonburden rows added;dual-discharge.shexit 0 for every burden row (13.4). -
proven_by:block authored +coherence.pyvalidates therule:atoms; burden-aware VF-3 oracle extended; negative pin (injected DP-2 violation → error) passes (13.5). -
aims-burden-design-oracle.sh+frozen_rule_versioncontract land (13.6); §10.6 absorbed. - §10 re-pointed: §10.6/§10.7 consume §13’s deliverables (§10 frontmatter
depends_onincludes 13; §10.6/§10.7 bodies reference §13 as the builder). - Affected-set lefthook glob added (burden_elim.rs + aims_pipeline + burden .smt2);
ORI_RUN_BURDEN_CONFORMANCE=1widening works; full proof corpus stays inaims-proofs.yml. - Plan annotation cleanup.
- Plan sync per protocol.
-
/tpr-reviewpassed (final);/impl-hygiene-reviewpassed.
HISTORY
- 2026-06-03 — §13 created via
/create-plan --inline(routing.md §3 case b) — the Burden Verification Suite. User directive: close out aims-burden-tracking with insanely-overkill, proof-tightly-integrated verification tooling by adopting the six methodologies the completedaims-proofing-suiteinvented (AST-probe-binds-proof-to-shipped-code, 3-verdict conformance cross-walk, dual-prover agreement, SMT counterexample adequacy, proven_by criterion binding, affected-set checking) BURDEN-SPECIFIC — replacing the generic copy-paste verification ofplans/llvm-verification-tooling(stripped by §14). Topology (user-approved 2026-06-03): §13depends_on §07A, built in parallel with §08/§09, FEEDS §10; absorbs §10.6 (aims-burden-design-oracle.sh+frozen_rule_version) + §10.7 (VF-3 oracle extension + static cross-walk +proof-lean-map.jsonbinding) into the full methodology. Every deliverable EXTENDS the unified model permissions.md §AIMSinvariant 5 — zero parallel checkers; each burden-specific artifact binds to a real CH-*/RL-comp/DP.proof+ its Lean mirror. CI disposition (user-approved): the fast grep cross-walk + VF-1 corpus gate fold intotest-all.sh; the full proof corpus + Lean dual-discharge stay inaims-proofs.yml(the ~30min corpus cannot fit test-all’s 150s budget);nightly-verification.yml(sanitizers + Alive2) is deleted by §14.