Skip to content

Checking only read permissions when asserting function preconditions#816

Merged
marcoeilers merged 16 commits into
masterfrom
meilers_assert_read_only
Dec 19, 2024
Merged

Checking only read permissions when asserting function preconditions#816
marcoeilers merged 16 commits into
masterfrom
meilers_assert_read_only

Conversation

@marcoeilers

@marcoeilers marcoeilers commented Oct 15, 2024

Copy link
Copy Markdown
Contributor

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.

Comment thread src/main/scala/viper/silver/parser/Resolver.scala Outdated
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