Skip to content

Epic: verified-codegen infrastructure (VCR-*) — replace the patch-accreting selector + allocator #242

@avrabe

Description

@avrabe

Tracking epic for the verified-codegen roadmap filed as rivet requirements in artifacts/verified-codegen-roadmap.yaml (PR #241).

Thesis

The recurring greedy-fixes — reciprocal-mult cost-gate (v0.11.20), register-exhaustion hard-fail (instruction_selector.rs:330/356/577/4667), "selector missed an op" (#223/#226/#232) — are symptoms of the single-pass hand-written selector + allocator. We build the structural cure incrementally, in parallel with the gale per-issue cadence. Behavior frozen at every step (fixtures bit-identical, oracle-gated).

Work items (rivet IDs ↔ future PRs)

Track A — codegen core (sequential):

  • VCR-RA-001 — SSA allocator with spilling (removes the hard-fail that forces cost-gates). Do first.
  • VCR-SEL-001 — Rocq-discharged verified selector DSL. Kill-criterion: ≥70% of a pilot op-class auto-discharged by existing tactics.

Track B — authoritative semantics (parallel):

  • VCR-ISA-001 — Sail-generated Rocq ARM/RISC-V semantics.
  • VCR-WASM-001 — WasmCert-Coq source semantics.

Track C — validation (start now):

  • VCR-ORACLE-001 — coverage-guided, theorem-linked differential oracle.

Gate:

  • VCR-VER-001 — the cleanup audit confirms a previously load-bearing greedy-fix becomes revert-able, fixtures bit-identical, cycles equal-or-better.

Suggested first step

VCR-RA-001 (allocator) — it unblocks reverting the cost-gates and is the prerequisite for VCR-SEL-001 (a verified rule that can't be allocated isn't yet correct end-to-end). Track C (VCR-ORACLE-001) can begin in parallel immediately.

Related: #209 (perf lever), #181 (native-pointer ABI / #237), #166/#73 (v0.12 control-flow proofs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions