-------------------------------- MODULE loop --------------------------------
EXTENDS Naturals, TLC
(*
--algorithm loop {
variables y;
{
A:
goto C;
B:
y:=y-1;
C:
if (y > 0){
goto B };
D: skip;
}
}
end algorithm;
*)
I give y an initial value of 10, but when I ask TLC to check for termination, it fails. Why would that be? The error trace shows the loop working as expected, with y decreasing from 10 to 0 in increments of 1.