Files
why3/bench/infer/while_loop_count.mlw
Claude Marche e6a11b4b11 complements on BDDinfer
support for unary -, div and mod in logic

support for <-> in logic

support for calls inside conditions of if and while

support for `check`

fixed compilation warnings
2023-01-20 17:38:10 +01:00

22 lines
311 B
Plaintext

use int.Int
use bool.Bool
val ref exit : bool
val ref c : int
let test [@bddinfer] () diverges =
exit <- false;
c <- 0;
[@bddinfer:myloop]
while (not exit) do
[@bddinfer:myassert] assert { c <= 42 };
c <- c + 1;
if c >= 42 then
begin
exit <- true;
(* break*)
end
done