-
Notifications
You must be signed in to change notification settings - Fork 45
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
Inhaling negative permission goes to magic #522
Comments
The original motivation were simpler preconditions with symbolic permissions, if I remember correctly. However, the decision was probably heavily influenced by Chalice, which had integer fractions rather than a dedicated permission type. Moreover, most other well-definedness conditions in Viper are either already checked in in- and exhale position (divison by zero, sequence indices), or at least should be (e.g. injectivity of QPs). Potential technical issue: currently, |
Viper meeting 1.7.2021:
|
@tdardinier I've created Silver branch |
Since the fix was implemented and merged a while ago, I'll close this. |
Currently, both Silicon and Carbon consider accessibility predicates with negative permissions (such as
acc(x.f, -1/2)
) as well-defined, but false. Thus, the following program is verified by both Silicon and Carbon:It is unclear why such a behavior would be useful (and even sound). Treating accessibility predicates with negative permissions as not well-defined seems like a better choice. That is, statements like
inhale acc(x.f, -1/2)
should actually fail (because they are not well-defined).The text was updated successfully, but these errors were encountered: