User-provided theory solvers in JavaSMT #319
Replies: 4 comments
-
Hi Thomas, Your request targets Z3, which is a solver with a very broad API, including goal-based solving, theory handling and user propagators. We do not want to copy the complete API and features from Z3, because the user of suh features would then also be bound to Z3, just with the steps through JavaSMT. I currently may not have fully unterstood the API and I do not yet see the benefit or full potential for that feature. However, if you are willing to provide a well-written pull-request, such that the maintenance of the code is not too complex, we will take a look. Do you plan to make the API solver-independent, i.e. fully implemented with JavaSMT's base classes for Formulas and FormulaTypes? Our build steps for Z3 depend mainly on the original Z3 binary libraries, see 'doc/Developers-How-to-Release-into-Ivy.md'. You can compile Z3 on your own and simply include the files in the environment. Example: for Linux include 'libz3.so' in the LD_LIBRARY_PATH and provide the Z3.jar in the Java classpath. Best |
Beta Was this translation helpful? Give feedback.
-
The idea was to make a solver-independent frontend, i.e., to make it work purely over Some background: A rough sketch of what I have in mind for theory solvers would be this:
Thank you for the pointers. We (or rather my student) already ran into problems a few times, so I expect to ask some more detailed questions regarding the build/release process of JavaSMT. With best regards, |
Beta Was this translation helpful? Give feedback.
-
I want to give an update on this. I will open a PR in the coming days. However, this feature requires the newest release of Z3 which is not yet available via JavaSMT's ivy repo I believe. For now I just locally built Z3, added it to the JavaSMT project, and removed the outdated version from |
Beta Was this translation helpful? Give feedback.
-
User propagator is integrated into JavaSMT since v5.0.0. |
Beta Was this translation helpful? Give feedback.
-
Z3 has a feature called
user propagators
which allows users to provide their own (simple) theory solvers.Recently, they added Java bindings for this feature as well (merged into
master
but not yet part of the release version).We would like to use this in our JavaSMT-based project.
Here is the main question: would you even want to provide such a feature over the JavaSMT interface with only one supporting solver?
If so, we are willing to implement this feature and create a PR.
We have already tried to implement it and it didn't seem too hard to support. However, we failed to understand the build system and how to manually update to a newer (manually built) Z3 version, so we were not able to test it yet.
Beta Was this translation helpful? Give feedback.
All reactions