// verifast_options{disable_overflow_check target:ILP32} extern void abort(void); //@ requires integer(&SIZE, ?veri_req_SIZE) &*& true; //@ ensures integer(&SIZE, ?veri_ens_SIZE) &*& true; void reach_error() //@ requires false; //@ ensures true; {}void assume_abort_if_not(int cond) //@ requires integer(&SIZE, ?veri_req_SIZE) &*& true; //@ ensures integer(&SIZE, ?veri_ens_SIZE) &*& 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); { if (!(cond)) { ERROR: {reach_error();abort();} } return; } int SIZE = 20000001; unsigned int __VERIFIER_nondet_uint(); //@ requires integer(&SIZE, ?veri_req_SIZE) &*& true; //@ ensures integer(&SIZE, ?veri_ens_SIZE) &*& true; int main() //@ requires module(sumt2__verifast_instrumented, true); //@ ensures junk(); { //@ open_module(); unsigned int n,i,j,l=0; 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; }