In the following example, the assertion fails:
field f: Int
method foo(r1: Ref, r2: Ref, s: Set[Ref]) returns (res:Int)
requires acc(r1.f)
requires acc(r2.f)
requires forall x: Ref :: {x in s} x in s ==> acc(x.f)
{
r1.f := 3
assert r1 != r2
}
When leaving out the quantified permission in the precondition, the assertion goes through. Dropping the field assignment in the body also leads to the assertion going through. Adding an assert true before the failing assertion does not seem to change anything.
In the following example, the assertion fails:
When leaving out the quantified permission in the precondition, the assertion goes through. Dropping the field assignment in the body also leads to the assertion going through. Adding an
assert truebefore the failing assertion does not seem to change anything.