-
Notifications
You must be signed in to change notification settings - Fork 54
Re-enable Z3 4.5.0 for better interpolation (continuation of #536) #549
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
base: master
Are you sure you want to change the base?
Conversation
Merge "Re-enable Z3 4.5.0 for better interpolation" into branch z3_legacy
added patch and readme for z3-4.5.0 building
…vaDoc for now) + rename z3 legacy publish script
|
@kfriedberger: I see that in ac68cf8, you re-enabled the assertions I commented out. My understanding is that these tests are checking if my issue in #381 applies to the solver, but I don't think the equivalence of the handle for the formulas is necessarily a good way to test this. The issue was that a repeated addition of formulas made interpolation not work, and I think that tests should test exactly that -- and in this case, legacy Z3 fails the current tests, but otherwise pass the original issue's tests. |
|
@leventeBajczi points for noticing ✔️ The tests were just a smaller issue: Please do not disable tests that are intended for all solvers, when just adding one new solver, but rather use an |
|
Thanks, great! |
Both solutions are equal in expression-strength, however, Z3 uses Nullable, and we want to keep the code similar.
…on for not loading native libraries, and update rpath.
It should be easy to cross-compile Z3 for ARM64 or even Windows. However, that is not our main goal for now.
|
@leventeBajczi and @baierd : |
This PR continues the work from PR536 with support from our CI etc.
Original PR description from @leventeBajczi:
Old versions of z3 were really good at interpolation, and I want to add support for it in JavaSMT.
To this end, I've added the implementation of a Z3Legacy solver (to be renamed, as discussed with @baierd), which builds on the 4.5.0 release of z3, rebuilt to use com.microsoft.z3legacy as its package name to avoid name collisions with new z3.
Pre-built binaries with the modifications are available at https://github.com/leventeBajczi/z3/releases/tag/legacy-4.3.0-15644597379, which Theta already uses like this. This should be somehow integrated into the solver management of JavaSMT, which I have no experience with.
To demonstrate how good this version of Z3 is, I ran some preliminary tests in CPAchecker, and found that an NLA encoding of programs using Z3 as the interpolation solver in the predicate analysis configuration results in 510 successfully solved tasks, which are otherwise unsolved by the bitprecise encoding of the same tasks with mathsat5.
Also, I found that #381 (which I opened) is referenced in 3 of the tests, that now failed on this implementation. I removed the overly constraining line which expected the constraint IDs to be unique, which is not necessary IMO if the interpolation problem reported in that issue is otherwise handled - which it seems to be.