Skip to content

Fixed wildcard encoding issue for QP#386

Merged
tdardinier merged 1 commit into
viperproject:masterfrom
nick-bachmann:fixing_carbon_wildcard_encoding
Jul 15, 2021
Merged

Fixed wildcard encoding issue for QP#386
tdardinier merged 1 commit into
viperproject:masterfrom
nick-bachmann:fixing_carbon_wildcard_encoding

Conversation

@nick-bachmann

Copy link
Copy Markdown
Contributor

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