I'm a beginner with Z3. I just have tried some of the examples released in Z3 package, and I have no the other experience any more. I am working with a problem about shortest path in a graph. Can I do it by Z3 ? Thanks you all.
You can express such queries in logic, but maybe you can just use a dedicated algorithm (Dijktra or variants) for such problems.
For an introduction to using Z3, take a look at the tutorial linked from
http://rise4fun.com/z3
Related
I am using Z3 to solve a problem and I find it is very slow.
Are there any general principles or guidelines about the acceleration of Z3 solver? Such as:
Try to reduce the number of constraints.
Try specifying the tactics.
...
There are no generally applicable rules; otherwise we would have implemented and automated them. Without further information about the problem, there is no way to help you. A good place for performance investigations is a Z3 GitHub discussion.
As Christoph mentioned, there's no "one-size-fits-all" advice that applies uniformly to all problems. However, this sort of performance question comes up often enough, and there has been previous discussion on stack-overflow with a summary of how to think about scalability before: Scalability of z3
I'd start by reviewing this answer, and see if you have specific questions. In particular, sharing the particulars of your actual problem and how you modeled it in z3 will be essential to get better guidance.
I have downloaded z3 and find a mini_ic3.py program? I think it is for ic3--an inductive invariant -based formal verification program.
is there some reference paper to recommend for understanding mini_ic3.py in z3 directory
Not much directly describing that particular implementation, I'm afraid. Your best bet is to read through https://theory.stanford.edu/~nikolaj/programmingz3.html#sec-bounded-model-checking
The original IC3 papers themselves would help as well. The following is a great introduction: http://theory.stanford.edu/~arbrad/papers/Understanding_IC3.pdf
Can any one suggest equivalent iOS SDK similar to GRG Non-linear solver in Excel ?
Which can be a c/c++ solution and can be easily integrated into iOS i.e to solves non-linear equations similar to EXCEL GRG Non linear Solver.
Please advice.
You can look at RASON which is a JSON based modeling language and REST API. Once you model your problem in RASON format, you can call GRG solver, the exact same solver used in Excel, or choose other non-linear solvers available.
Disclaimer: I used to work at Frontline Systems, the developers of RASON.
Anyone knows does Z3 support minimal unsatifiable core? If not, is there any other tool that supports MUC?
Currently, Z3 does not support minimal unsat core, and to best of my knowledge, there is no smt tools supoorts it. You can implement the algorithm by yourself. There are many papers regarding the algorithm.
Do you know is there any smt tool other than Z3 that supports fixpoint?
By fixpoint, I presume you mean solving for Horn clause queries. There are many tools that solve problems of a similar nature, but perhaps not with precisely the same format.
Philippe Suter's Leon tool uses different algorithms and can solve many correctness queries over recursive programs. Andrey Rybalchenko's ARMC tool solves Horn formulas with linear real arithmetic as well. It can also establish termination conditions. CLP systems with tabling should also be amenable to solving queries in a format that is similar to Z3's (both use Horn formulas as their input format). There are also many symbolic model checking solvers that could be used depending on your context.