Skip to content

Conversation

@charles-cooper
Copy link
Contributor

Summary

  • Move stateEquivScript.sml and execEquivScript.sml from phi_elimination/ to venom/ for shared use
  • Create venomSemPropsScript.sml with general semantic lemmas (bool_to_word, step_iszero, step_assert, step_jnz, step_jmp)
  • Extend state_equiv to include all state fields (returndata, accounts, call_ctx, tx_ctx, block_ctx)
  • Add new proof cases in execEquiv for environment opcodes and ASSERT_UNREACHABLE (introduced in 3f969d7)
  • Update revert_to_assert to use common lemmas instead of duplicating

Test plan

  • venom/ builds successfully
  • phi_elimination/ builds successfully
  • revert_to_assert/ builds successfully (with expected CHEATs)

🤖 Generated with Claude Code

Refactors state equivalence and semantic properties into common
location so they can be reused by phi_elimination, revert_to_assert,
and future optimization passes.

Changes:
- Move stateEquivScript.sml to venom/ (extended for all state fields)
- Move execEquivScript.sml to venom/ (updated for new opcodes)
- Add venomSemPropsScript.sml with general semantic lemmas
- Update phi_elimination to use common theories
- Update revert_to_assert to use venomSemProps instead of duplicating

Note: New cases added to execEquiv proofs for environment opcodes
and ASSERT_UNREACHABLE introduced in 3f969d7.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link
Member

@xrchz xrchz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good. Only thing to note is that something like state_equiv is not in general gonna be the same for every compiler pass proof - it's good to have a generic one like this, but some passes might need to define a more specialised one that allows more differences or something.

@xrchz xrchz merged commit bb6ce57 into main Dec 28, 2025
2 checks passed
@charles-cooper charles-cooper deleted the rta-common branch December 28, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants