Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

z3 hangs forever #2525

Closed
ramanuj1729 opened this issue Aug 29, 2019 · 2 comments
Closed

z3 hangs forever #2525

ramanuj1729 opened this issue Aug 29, 2019 · 2 comments

Comments

@ramanuj1729
Copy link

ramanuj1729 commented Aug 29, 2019

Consider the smt2 file generated with the help of Klee.

I am trying to evaluate it using z3 [version 4.8.5 - 64 bit]. However, z3 hangs forever. Specifically, when the formula is UNSAT z3 runs forever and does not produce any result.

Is formula size is big?
Is there any issue while using logic theory AUFBV?
May I get some suggestions to improve the z3 performance.

Each assert statement having some common subexpression. Is it possible to improve the z3 performance by solving subexpression separately?

Note: There is no issue with Klee. I am not able to get an idea that if I give this file to z3 as input then it fails and hags forever. Note that formula is UNSAT but z3 hangs. If I modify some condition to make it SAT then z3 also reports SAT and produce a model also.

SMT 2 FILE: z3Input_2.txt

@ramanuj1729 ramanuj1729 changed the title z3 hangs for ever. z3 hangs forever. Aug 30, 2019
@ramanuj1729 ramanuj1729 changed the title z3 hangs forever. z3 hangs forever Aug 30, 2019
NikolajBjorner added a commit that referenced this issue Sep 1, 2019
…gnificantly for #2525 as it now uses the SAT solver core instead of SMT core

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
@ramanuj1729
Copy link
Author

Many thanks for looking at the issue. However, when I use updated Z3 [version 4.8.6 - 64 bit] to evaluate the different SMT2 file then z3 still hangs forever. I have attached the new SMT2 file. I have noticed that when a formula is UNSAT then only z3 hangs. I suspect that there is some issue while using logic theory AUFBV in z3.

SMTLIB2 File: z3InputNew.txt

@NikolajBjorner
Copy link
Contributor

It just happens to be tough to solve. I see a bunch of multipliers.
The examples illustrated that Z3 could detect benchmarks that are in reality pure bit-vector formulas.
More generally, if you have array store and select over many different arguments the current transformation does not take effect and you will be using the slower more general purpose solver.
Note also that you can throw all your cores at this problem by setting parallel.enable=true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants