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

Resources can be used on left of implication in assumes #705

Open
totoyoyo opened this issue May 25, 2023 · 0 comments
Open

Resources can be used on left of implication in assumes #705

totoyoyo opened this issue May 25, 2023 · 0 comments

Comments

@totoyoyo
Copy link

Impure expressions are typically not allowed on the LHS of an implication, except in an assume :

field val: Int

method foo(r: Ref) 
    requires acc(r.val) ==> true
    ensures acc(r.val) ==> true
{
    assume acc(r.val) ==> true
    assert acc(r.val) ==> true 

    inhale acc(r.val) ==> true
    exhale acc(r.val) ==> true
}

In the above example, all uses of acc(r.val) are not allowed except for assume acc(r.val) ==> true. Isn't this a bit inconsistent, especially if you cannot assert something you have assumed?

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