// verifast_options{disable_overflow_check target:ILP32} extern void abort(void); //@ requires true; //@ ensures true; void reach_error() //@ requires false; //@ ensures true; {}void assume_abort_if_not(int cond) //@ requires true; //@ ensures true; { if(!cond) {abort();} } void __VERIFIER_assert(int cond) //@ requires (cond != 0); //@ ensures (cond != 0); { if (!(cond)) { ERROR: {reach_error();abort();} } return; } extern bool __VERIFIER_nondet_bool(); //@ requires true; //@ ensures true; extern int __VERIFIER_nondet_int(); //@ requires true; //@ ensures true; void foo() //@ requires true; //@ ensures true; { int y=0; bool c1=__VERIFIER_nondet_bool(), c2=__VERIFIER_nondet_bool(); if (c1) y++; if (c2) y--; else y+=10; } int main() //@ requires module(trex04__verifast_instrumented, true); //@ ensures junk(); { //@ open_module(); int d = 1; int x = __VERIFIER_nondet_int(); if (!(x <= 1000000 && x >= -1000000)) return 0; bool c1=__VERIFIER_nondet_bool(), c2=__VERIFIER_nondet_bool(); if (c1) d = d - 1; if (c2) foo(); c1=__VERIFIER_nondet_bool(), c2=__VERIFIER_nondet_bool(); if (c1) foo(); if (c2) d = d - 1; while(x>0) { x=x-d; } __VERIFIER_assert(x<=0); return 0; }