// verifast_options{disable_overflow_check target:ILP32} extern void abort(void);//@ requires true; //@ ensures true; extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); void reach_error() //@ requires false; //@ ensures true; { __assert_fail("0", "sumt2.c", 3, "reach_error"); } extern void abort(void); void assume_abort_if_not(int cond) //@ requires true; //@ ensures true; { if(!cond) {abort();} } void __VERIFIER_assert(int cond) //@ requires integer(&SIZE, ?veri_req_SIZE) &*& (cond != 0); //@ ensures integer(&SIZE, ?veri_ens_SIZE) &*& ((cond != 0) && (veri_req_SIZE == veri_ens_SIZE)); { if (!(cond)) { ERROR: {reach_error();abort();} } return; } int SIZE = 20000001; unsigned int __VERIFIER_nondet_uint();//@ requires true; //@ ensures true; int main() //@ requires module(sumt2__verifast_instrumented_modified, true); //@ ensures junk(); { unsigned int n,i,j,l=0; //@ invariant integer(&SIZE, ?veri_req_SIZE) &*& true; n = __VERIFIER_nondet_uint(); if (!(n <= SIZE)) return 0; i = 0; j = 0; l=0; while( l < n )//@ invariant integer(&SIZE, ?veri_inv_SIZE) &*& (((i + j) % 4294967296) == l); { if(!(l%2)) i = i + 1; else j = j+1; l = l+1; } __VERIFIER_assert((i+j) == l); return 0; }