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

Fixing issues #410 and #338 #899

Merged
merged 4 commits into from
Feb 14, 2025
Merged

Fixing issues #410 and #338 #899

merged 4 commits into from
Feb 14, 2025

Conversation

marcoeilers
Copy link
Contributor

When inside a package statement, we have to always call the continuation, we cannot use shortcuts that just return Success(). If we do that, Silicon still continues verification after the package block, but it will not know that it has to continue with the heap from the infeasible branch.

Thus, this PR:

  • adds a new state entry which marks whether we are currently inside a package block (exhaleExt does not work for this because it's temporarily set to false e.g. when evaluating pure assertions)
  • changes the three places in the code that return Success() when in an infeasible branch s.t. verification continues, possibly with an unknown value if we're reading a field that we don't have permission to

Copy link
Member

@ArquintL ArquintL left a comment

Choose a reason for hiding this comment

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

Looks good to me; although, I must admit that I don't fully grasp the necessity of optimalSnapshotSort

@marcoeilers
Copy link
Contributor Author

Looks good to me; although, I must admit that I don't fully grasp the necessity of optimalSnapshotSort

Depending on what is in a predicate, its snapshot has a different sort (e.g. a predicate containing only a permission to an int field will have type int; if it contains multiple values, it'll be type snap). The fix needs us to continue verification when we're in an infeasible state when reading a resource we don't have any chunk of; to do that, we need to return a fresh value of the expected sort.

@marcoeilers marcoeilers merged commit ff4d359 into master Feb 14, 2025
4 checks passed
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.

2 participants