class {:autocontracts} Rat {
const name : string
twostate predicate Valid() {
&& fresh(Repr - old(Repr))
} //Darth: all too easy...
constructor(n : string)
ensures name == n
{
name := n;
Contents := {};
Family := null;
}
method setFamily(r : Rat)
{
Family := r;
}
var Contents : set<Rat>
//
var Family : Rat?
}
Failing code
Steps to reproduce the issue
Expected behavior
verification error
Actual behavior
crash