void abort() { }; // Category: Loops // Verification result: TRUE extern int __VERIFIER_nondet_int(); /*@ requires ((1 <= cond)) && (cond != 0); ensures ((1 <= cond)) && (1); @*/ void __VERIFIER_assert(int cond){ if(!(cond)) ERROR: {/*@ assert(0); */;abort();} return; } int main(){ unsigned int x = __VERIFIER_nondet_int(); unsigned int y = 1; /*@ loop invariant (((y == 1) || ((x % 3) < 1))); @*/ while(__VERIFIER_nondet_int()){ if(x % 3 == 1){ x += 2; y = 0;} else{ if(x % 3 == 2){ x += 1; y = 0;} else{ if(__VERIFIER_nondet_int()){ x += 4; y = 1;} else{ x += 5; y = 1;} } } } if(y == 0) __VERIFIER_assert(x % 3 == 0); return 0; }