extern void __VERIFIER_error() __attribute__ ((__noreturn__));
extern int __VERIFIER_nondet_float(void);
extern int __VERIFIER_nondet_int();
extern void __VERIFIER_assume(int);
extern void __assert_fail();
#define __VERIFIER_assert(cond) { if(!(cond)) { __assert_fail(); } }
int test(int NN, float epsilon)
{
__VERIFIER_assume(epsilon > 0);
__VERIFIER_assume(NN > 0);
float cost = 0;
int count = 0;
while (count < NN)
{
cost = cost + epsilon * (0.5 / NN);
count = count + 1;
}
__VERIFIER_assert(cost <= 0.5 * epsilon);
}
And I've attached the premap.txt I'm using but z3 gives up. I believe the loop invariants are sufficient to prove because I used the same invariants on Dafny (which I believe uses z3 as backend) and it verifies this program.
I've read some posts about non-linear arithmetic about z3 (https://stackoverflow.com/questions/13898175/how-does-z3-handle-non-linear-integer-arithmetic). It turns out using different tactics might solve the problem, but I cannot find configurations of cpachecker to use different tactics, do you know the correct way to specify the tactics for cpachecker?
Any suggestions are appreciated!
-Ryan
--
You received this message because you are subscribed to the Google Groups "CPAchecker Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpachecker-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.