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

Fixed wildcard encoding issue for QP #386

Merged

Conversation

broggoli
Copy link
Contributor

@broggoli broggoli commented May 4, 2021

The following viper program should not verify. The assert statement should fail since the permission amounts on location x.f and y.f might have totally different positive permission amounts according to my understanding of the wildcard keyword.

field f: Int

method main(s: Set[Ref])
{
inhale forall r:Ref :: {r in s } r in s ==> acc(r.f, wildcard)

var x: Ref
var y: Ref

assume x in s 
assume y in s
assume x != y

//:: ExpectedOutput(assert.failed:assertion.false)
assert perm(x.f) == perm(y.f)

}

@gauravpartha gauravpartha self-requested a review May 25, 2021 17:51
@tdardinier tdardinier merged commit c606c32 into viperproject:master Jul 15, 2021
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