-
|
I'm verifying the following piece of code with boogie: And the output is: P.S. I know "This is Boogie 2" is very outdated and the last docs are very incomplete, any other source of information other than trial and error ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
These are fundamental concepts, so you will find all the explanation you need in "This is Boogie 2". |
Beta Was this translation helpful? Give feedback.
old(v)refers to the value ofvat the beginning of the procedure (even beforev := 0;). In your example this can be anything, because you do not have a precondition that talks aboutv. When Boogie checks the maintenance of the loop invariant, it could be thatold(v) == 42andv == 0so the invariant holds, but after the loop body executes we haveold(v) == 42 && v == 1and the invariant does not hold anymore.These are fundamental concepts, so you will find all the explanation you need in "This is Boogie 2".