viperproject / chalice2silver

Other
0 stars 0 forks source link

Rely-guarantee invariants are not supported in Chalice2Silver #57

Open viper-admin opened 10 years ago

viper-admin commented 10 years ago

Created by bitbucket user ykass on 2014-08-26 13:14 Last updated on 2015-07-07 11:03

The occurrence of "old" in an invariant triggers a "not well-formed predicate" error by Silicon.

viper-admin commented 9 years ago

@vakaras commented on 2015-07-07 11:03

Example code:

#!Chalice

class Counter1 {
  var x: int;
  // Should be rejected because invariant is not reflexive.
  invariant acc(x) && old(x) < x;
}

class Counter2 {
  var x: int;
  // Should work.
  invariant acc(x) && old(x) <= x;
}