Method invocations inside while loop conditions #844
Closed
Naum-Tomov
started this conversation in
General
Replies: 1 comment 2 replies
-
To concretize the problem it has been reduced to the following example:
The assertion fails to verify, despite the fact that logically, if you enter the The problem here is tied to the way loops are encoded. Further investigation in frama.c with the following example:
In Frama-C this verifies correctly, because the loop gets encoded into:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, you cannot use the post-conditions of methods that are invoked inside of while-loop conditions, because they get rewritten into
And you cannot use the post-conditions of the invocation, inside the while condition, since it is not preserved inside the res. This warrants some discussion on whether we want to find a way to preserve the post-conditions in these cases and how this can be done.
Beta Was this translation helpful? Give feedback.
All reactions