// 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) &*& (1 <= cond); //@ ensures integer(&SIZE, ?veri_ens_SIZE) &*& (1 <= cond); { if (!(cond)) { ERROR: {reach_error();abort();} } return; } int SIZE = 20000001; int __VERIFIER_nondet_int(); //@ requires integer(&SIZE, ?veri_req_SIZE) &*& true; //@ ensures integer(&SIZE, ?veri_ens_SIZE) &*& true; int main() //@ requires module(sumt7__verifast_instrumented, true); //@ ensures junk(); { //@ open_module(); unsigned int n=0,i=0,k=0,j=0,l=0; unsigned int v1=0, v2=0, v3=0, v4=0; n = __VERIFIER_nondet_int(); if (!(n <= SIZE)) return 0; while( l < n ) //@ invariant integer(&SIZE, ?veri_inv_SIZE) &*& (((((((( i + k) + j) + v3) + v2) + v1) + v4) % 4294967296) == l); { if(!(l%7)) v1 = v1 + 1; else if(!(l%6)) v2 = v2 + 1; else if(!(l%5)) v3 = v3 + 1; else if(!(l%4)) v4 = v4 + 1; else if(!(l%3)) i = i + 1; else if(!(l%2)) j = j+1; else k = k+1; l = l+1; __VERIFIER_assert((i+j+k+v1+v2+v3+v4) == l); } return 0; }