// S : tags c $TAGS // S : expect --result valid // S : cc -o test.bc $CC_OPT $file // S : verify --sequential -o nofail:malloc $V_OPT test.bc // Source: Denis Gopan, Thomas Reps: "Lookahead Widening", CAV 2006. extern void __VERIFIER_error(void); extern void __VERIFIER_assume(int); void __VERIFIER_assert(int cond) { if (!(cond)) { ERROR: __VERIFIER_error(); } return; } int __VERIFIER_nondet_int(); #define LARGE_INT 1000000 int main() { int x,y; x = 0; y = 0; while (1) { if (x < 50) { y++; } else { y--; } if (y < 0) break; x++; } __VERIFIER_assert(x == 100); return 0; }