// verifast_options{disable_overflow_check target:ILP32} extern void abort(void); //@ requires true; //@ ensures true; void reach_error() //@ requires false; //@ ensures true; {}extern int __VERIFIER_nondet_int(void); //@ requires true; //@ ensures true; void assume_abort_if_not(int cond) //@ requires true; //@ ensures true; { if(!cond) {abort();} } void __VERIFIER_assert(int cond) //@ requires (1 <= cond); //@ ensures (1 <= cond); { if (!(cond)) { ERROR: {reach_error();} } return; } int main() //@ requires module(ps2_ll__verifast_instrumented, true); //@ ensures junk(); { //@ open_module(); int k; long long y, x, c; k = __VERIFIER_nondet_int(); y = 0; x = 0; c = 0; while (1) //@ invariant ((x * 2) == (y + (y * y))); { __VERIFIER_assert((y * y) - 2 * x + y == 0); if (!(c < k)) break; c = c + 1; y = y + 1; x = y + x; } __VERIFIER_assert((y*y) - 2*x + y == 0); return 0; }