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

Unify the approach of integer bounds assertions #171

Open
zoep opened this issue Nov 3, 2023 · 0 comments
Open

Unify the approach of integer bounds assertions #171

zoep opened this issue Nov 3, 2023 · 0 comments

Comments

@zoep
Copy link
Collaborator

zoep commented Nov 3, 2023

We need to have a more principled approach to generate arithmetic bounds for storage variables.

Right now:

  • inRange assertions in preconditions might generate duplicate bounds assertions as Enrich already adds some go them
  • inRange assertion can be implicit and generated automatically using type information, though we need to be careful to with the semantics of this. For example for a storage variable uint128 x , writing the following update
    x => (x + 1234) + 5678
    will implicitly add the precondition inRange(uint128, (x + 1234) + 5678) which implies that every subexpression never goes out of uint128 bound.

Issue #109 describes how an inferring-bounds analysis can be performed.

@zoep zoep changed the title Unify the approach of integer bound assertions Unify the approach of integer bounds assertions Nov 3, 2023
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

No branches or pull requests

1 participant