void abort() { }; void assume_abort_if_not(int cond) { if(!cond) {abort();} } /*@ requires ((cond != 0)) && (cond != 0); ensures ((cond != 0)) && (1); @*/ void __VERIFIER_assert(int cond) { if (!(cond)) { ERROR: {/*@ assert(0); */;abort();} } return; } int __VERIFIER_nondet_int(); int main() { int a = __VERIFIER_nondet_int(); int b = __VERIFIER_nondet_int(); int res, cnt; if (!(a <= 1000000)) return 0; if (!(0 <= b && b <= 1000000)) return 0; res = a; cnt = b; /*@ loop invariant (((res <= ((long long) b + a)) && (((long long) cnt + res) == ((long long) b + a)))); @*/ while (cnt > 0) { cnt = cnt - 1; res = res + 1; } __VERIFIER_assert(res == a + b); return 0; }