0
votes

I am working with z3 python api. When I solve constraints using z3 python api then the solver runs infinitely and no errors are thrown. But, when same constraints are dumped in the form of smtlib2 format and then are solved via z3 executable, it almost instantaneously gives sat or unsat. The smtlib2 dump is very large (around 1000 lines). Although for small number of constraints, z3 api works fine. Is there a bug in z3 python api for handling large number of constraints?

1

1 Answers

0
votes

This can happen, e.g., when the configuration between the two methods differs (even slightly), or when when the problems aren't exactly identical (e.g. different order of constraints). Some tactics are also non-deterministic (e.g. they use timers in the preprocessing) and the executable happens to be a bit faster/slower. To diagnose what exactly causes the difference we would need to see some of your problems, or at the very least some diagnostic output, for instance, add -v:10 on the command line and set the global "verbosity" option to 10.