Promela and Model Description
7) Repetition
ex1:
do
:: count = count + 1
:: count = count - 1
:: (count == 0) -> break
od
ex2:
do
:: (count != 0) -> if
:: count = count + 1
:: count = count - 1
fi
:: (count == 0) -> break
od
In ex1, one branch is chosen to execute repeatedly, and it terminate only if
count equal zero. To guarantee that it always terminate if count==1, we
then get ex2.