Merge branch 'why3tools-register-main' into 'master'
[why3.git] / examples / micro-c / loops.c
blob1d21223092365aaae8fb045e03fbf37c73b42358
2 #include <stdio.h>
4 void loop1(int b)
5 //@ requires b > 0;
7 while (--b) {
8 //@ invariant b > 0;
9 //@ variant b;
12 //@ assert b == 0;
15 void loop2(int b)
16 //@ requires b >= 0;
18 while (b) {
19 //@ invariant b >= 0;
20 //@ variant b;
21 b--;
23 //@ assert b == 0;