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

Checking only read permissions when asserting function preconditions #816

Merged
merged 16 commits into from
Dec 19, 2024

Conversation

marcoeilers
Copy link
Contributor

@marcoeilers marcoeilers commented Oct 15, 2024

Silver parts of the changes described here: viperproject/silicon#877

  • Modify AST and ParseAST access predicates to track if a write permission was explicitly supplied or not.
  • Warn whenever concrete fractions are used anywhere inside a function (done in the type checker)
  • Add a command line flag to get the old behavior where permission amounts in functions are checked as usual
  • Modify consistency checks to allow complex permission expressions involving wildcards in functions, so that we can allow acc(x.f, b ? wildcard : none) there, which is useful with the new interpretation but was previously forbidden. Unfortunately, this requires adding state to the Consistency object while we also support the legacy behavior.

@marcoeilers marcoeilers merged commit f96ac01 into master Dec 19, 2024
5 checks passed
@marcoeilers marcoeilers deleted the meilers_assert_read_only branch December 19, 2024 16: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