// verifast_options{disable_overflow_check target:ILP32} // This file is part of the SV-Benchmarks collection of verification tasks: // https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks // // It was automatically generated from 'ps2-ll.c' with https://github.com/FlorianDyck/semtransforms // To reproduce it you can use the following command: // python run_transformations.py [insert path here]ps2-ll.c -o . --pretty_names --trace to_recursive:0 // in case the newest version cannot recreate this file, the commit hash of the used version is 869b5a9 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(); } else { } } void __VERIFIER_assert(int cond) //@ requires (1 <= cond); //@ ensures (1 <= cond); { if (!cond) { ERROR: { reach_error(); } } else { } return; } void func_to_recursive_line_26_to_34_0(long long *x, int *k, long long *y, long long *c) //@ requires true; //@ ensures true; { if (1) { { __VERIFIER_assert(((((*y) * (*y)) - (2 * (*x))) + (*y)) == 0); if (!((*c) < (*k))) { return; } else { } *c = (*c) + 1; *y = (*y) + 1; *x = (*y) + (*x); } func_to_recursive_line_26_to_34_0(x, k, y, c); } else { } } int main() //@ requires module(recursified_ps2_ll__verifast_instrumented, true); //@ ensures junk(); { //@ open_module(); int k; long long y; long long x; long long c; k = __VERIFIER_nondet_int(); y = 0; x = 0; c = 0; func_to_recursive_line_26_to_34_0(&x, &k, &y, &c); __VERIFIER_assert((((y * y) - (2 * x)) + y) == 0); return 0; }