Here is a reduced case I encountered:
field f: Int
method test(i: Int, u: Seq[Ref], select: Int)
requires 0 < i && i < |u|
requires acc(u[0].f, write)
requires acc(u[i].f, write)
requires select == 0 || select == 1
{
assert perm(u[select*i].f) == write // ok
u[select*i].f := 0 // fails
}
It seems to me that proving the permission value is the same as the condition of the assignment. If the root cause really is just non-linear arithmetic, why is there a difference between the assertion and assignment? Thanks!
Here is a reduced case I encountered:
It seems to me that proving the permission value is the same as the condition of the assignment. If the root cause really is just non-linear arithmetic, why is there a difference between the assertion and assignment? Thanks!