Formalize LSC-1u XOR retained-boundary refinement - #33
Draft
Th0rgal wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
One sharply bounded LSC-1u equivalence tranche: a cycle-accurate reduced retained-state model for accepted XOR micro-ops, checked in lockstep against handwritten
lsc1u_coreobservables from command acceptance through all 16 result beats and final retirement.Base gate:
origin/mainwas independently fetched immediately before branch creation and again immediately before commit/push. Both checks returned commit31b146234bb786a77e25cef50b991ac3ba69de75, treee2a5118d3f9c036337f0fe6e29e98eddcb30ec52.Exact claims
The unbounded ABC PDR task proves, for every reachable execution after an initial reset:
rx_valid,tx_ready,ena, andrst_nmay vary independently every cycle;A XOR Bbyte-for-byte;The mechanically checked relation covers
rx_ready,tx_valid,tx_data,busy,fault, anddone_pulse. The reduced architectural state and inductive invariants are enumerated informal/LSC1U_XOR_REFINEMENT.md.The cover task reaches one composed trace containing command acceptance, a retained output stall, reset during an active operation, restart, and final retirement at depth 56.
Falsifiers / non-vacuity
^changed to+: both the existing protocol proof and the new refinement proof terminal-fail.Residual gaps
This is not full-controller equivalence. It does not prove opcode decode/fault responses, SET, MUL arithmetic, the Tiny Tapeout wrapper, packet LSC-1, Lean-to-RTL correspondence, liveness under unfair backpressure, or RTL-to-netlist equivalence. LSC-1u has no abort input, so abort refinement is outside this RTL interface rather than excluded by an assumption. The multiplier is replaced only for this XOR proof by an unconstrained-output boundary; no XOR transition reads it.
PR #30 was inspected read-only for proof-structure ideas and was not merged, checked out, rebased, or modified.
Local validation
cd formal && sby -f lsc1u_xor_refinement.sby— exit 0, 2.00s; PDR PASS and cover PASS at depth 56.python3 formal/check_mutations.py --only xor_result --only xor_retirement_lane— exit 0, 5.16s; all three selected config runs rejected their mutations.make python conformance-check host-comparison design-space exact-xor interface-check consistency mincore-state-count smoke placeholders fpga-boundary fpga-harness— exit 0, 22.90s.make sim— exit 0, 3.14s.cd lean && lake build LeanVMBMinCorewith pinned Lean 4.32.1 — exit 0, 21.71s.make checksum-checkafter final regeneration — exit 0, 0.05s.One broader local
python3 formal/check_mutations.pydiagnostic reached and rejected every new mutation, then exited 1 because this host lacksyices-smt2for the pre-existinggf128_serialize.sbymutation. That is a local dependency error, not hidden proof evidence; the targeted new mutation gate above passed, and CI installs the repository's pinned OSS CAD Suite.Review / merge guard
Draft only. The author must not merge this PR. A distinct integrator must independently fetch and review the exact immutable head and merge only after exact-head gates and required CI are green.