// 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", "ps5-ll.c", 3, "reach_error"); } extern short __VERIFIER_nondet_short(void);//@ requires true; //@ ensures true; extern void abort(void); 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(ps5_ll__verifast_instrumented_modified, true); //@ ensures junk(); { short k; long long y, x, c; k = __VERIFIER_nondet_short(); assume_abort_if_not(k <= 256); y = 0; x = 0; c = 0; while (1)//@ invariant (((((c + (c * y)) == (y + (y * y))) && (((c * 2) + (c * y)) == ((y * 2) + (y * y)))) && ((y + (30 * x)) == ((((((y * y) * y) * y) * 15) + (6 * ((((y * y) * y) * y) * y))) + (((y * y) * y) * 10)))) && ((c < k) || ((y * y) == (k * y)))); { __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); if (!(c < k)) break; c = c + 1; y = y + 1; x = y * y * y * y + x; } __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); __VERIFIER_assert(k*y == y*y); return 0; }