Simulation framework: parameterized by state relation R#165
Merged
charles-cooper merged 2 commits intomainfrom Mar 5, 2026
Merged
Simulation framework: parameterized by state relation R#165charles-cooper merged 2 commits intomainfrom
charles-cooper merged 2 commits intomainfrom
Conversation
c2e74e9 to
55af130
Compare
- lift_result: lifts state relation R through exec_result - inst_simulates R f / block_simulates R bt: simulation predicates - block_map_transform / function_map_transform: 1:1 mapping transforms - valid_state_rel: closure conditions for step_inst_preserves_R - Instantiations: state_equiv and state_equiv_except satisfy valid_state_rel - analysis_pass_correct: end-to-end composition theorem All proofs cheated (stubs for proving later).
55af130 to
9441f95
Compare
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.
co-authored by claude opus 4.6
Pass simulation framework parameterized by state relation R, with cheated proofs as placeholders.
Components
Simulation Framework (
venom/simulation/)lift_result(defs/passSimulationDefsScript.sml): Lifts state relation R throughexec_result— generalizesresult_equiv(which islift_result state_equiv)inst_simulates R f: Per-instruction simulation —fpreserveslift_result Randis_terminatorblock_simulates R bt: Whole-block simulation viarun_blockblock_map_transform/function_map_transform: 1:1 instruction/block mappingParameterized Execution Equivalence (
venom/simulation/defs/execEquivParamDefsScript.sml)valid_state_rel R: Closure conditions on R enabling the master theorem (preserves non-var fields, closed underupdate_var, preserveseval_operandwhen operand vars agree, reflexive)step_inst_preserves_R: Master theorem —valid_state_rel R ∧ R s1 s2 ∧ operand vars agree ⟹ lift_result R (step_inst inst s1) (step_inst inst s2)state_equivandstate_equiv_exceptboth satisfyvalid_state_relComposition (
venom/simulation/proofs/passCompositionProofsScript.sml)analysis_pass_correct: End-to-end theorem connecting dataflow convergence → soundness → simulation → function correctness, parameterized by RLifting Theorems
inst_sim_block_sim— instruction sim → block simblock_sim_function— block sim → function correctnessconditional_inst_sim— partial + identity → full inst_simulatesblock_sim_compose— composition preserves block_simulateslift_result_refl/lift_result_trans— R properties lift through resultsMotivation
Eliminates per-pass boilerplate (~800 LOC each) for execution preservation proofs. Current RTA has 839 LOC of opcode-by-opcode helpers that
step_inst_preserves_Rreplaces with one master theorem + onevalid_state_relsatisfaction proof.Stats
Depends on