// 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();} } extern unsigned int __VERIFIER_nondet_uint(void); //@ requires true; //@ ensures true; void __VERIFIER_assert(int cond) //@ requires (cond != 0); //@ ensures (cond != 0); { if (!(cond)) { ERROR: {reach_error();abort();} } return; } int main(void) //@ requires module(phases_2_2__verifast_instrumented, true); //@ ensures junk(); { //@ open_module(); unsigned int x = 1; unsigned int y = __VERIFIER_nondet_uint(); if (!(y > 0)) return 0; while (x < y) //@ invariant ((x == 1) && (1 <= y)); { if (x < y / x) { x *= x; } else { x++; } } __VERIFIER_assert(x == y); return 0; }