You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constructor of C
interface constructor()
creates
uint x := 0
invariants
x < 2
behaviour f of C
interface f()
case x == 0:
storage
x => 1
behaviour g of C
interface g()
case x == 1:
storage
x => 2
The counterexample is correct, but not complete. It tells us one step to reach x_post = 2 from x_pre = 1, but I'm wondering if we can get the whole trace.
I think one possible way is by running extra queries:
Get the cex above, g() makes x_pre = 1 -> x_post = 2
Ask how to get to x_post = 1, which gives us f() makes x_pre = 0 -> x_post = 1.
Ask how to get to x_post = 0, which gives us init() (or similar) makes x_post = 0
The text was updated successfully, but these errors were encountered:
I think this procedure is a bit broader than just counterexample generation. The procedure you are describing is essentially a backtracing to the initial state from the goal, and so would also be able to discard noninductive invariants which would currently be false positives. For example, if there was no f() spec above, the invariant would actually hold, but the counterexample would still be provided by act prove
The counterexample is correct, but not complete. It tells us one step to reach
x_post = 2
fromx_pre = 1
, but I'm wondering if we can get the whole trace.I think one possible way is by running extra queries:
g()
makesx_pre = 1 -> x_post = 2
x_post = 1
, which gives usf()
makesx_pre = 0 -> x_post = 1
.x_post = 0
, which gives usinit()
(or similar) makesx_post = 0
The text was updated successfully, but these errors were encountered: