Is it possible to have Z3Py generate more counterexamples within reasonable time ?
I can generate one counterexample using z3.prove
as follows:
import z3
x = z3.Real("x")
rule = x > 0
goal = x < 0
z3.prove(z3.Implies(rule, goal))
which gives the following output,
counterexample
[x = 1]
But what if I want to generate more counterexamples ?
Is the only way to do this by incrementally adding rules based on the counterexamples ?
For the above case, I can get a different counterexample by doing this,
z3.prove(z3.Implies(z3.And(rule, x!=1), goal))
but I believe this is slow when many rules are involved so I am hoping for a faster approach.