Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Solidity's memory layout #190

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Implement Solidity's memory layout #190

wants to merge 12 commits into from

Conversation

zoep
Copy link
Collaborator

@zoep zoep commented Feb 4, 2025

This PR implements Solidity's memory layout of storage variables is the translation of Act to Expr. This is necessary for proving the equivalence of our specs to Solidity smart contracts.

Summary of Changes:

  • Implement Solidity-compliant storage layout for base types and mappings.
  • Resolve minor issues related to boolean translation.
  • Enforce precondition bounds for booleans.
  • Add multiple tests covering various layout scenarios.

In the future, it would be ideal to further generalize the translation, by making it parametric on the memory layout (e.g., loading it from a JSON file).

Closes #175, #189.

@zoep zoep changed the base branch from addr-block to main February 6, 2025 13:43
@zoep zoep linked an issue Feb 6, 2025 that may be closed by this pull request
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.

Correct encoding of the Solidity storage layout in the Expr translation
1 participant