-
Notifications
You must be signed in to change notification settings - Fork 46
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
Integration of CVC4 into JavaSMT #2
Comments
I just did some research on that, CVC4 is written in C++. Java bindings can be generated via swig. They seem to be quite useful, however they use finalizers. So the question is if we want to use the bindings or, equal to Z3 and Mathsat create the JNI wrapper ourselves. (Type hierarchy, no need to handle pointer on our side and also no need to create the JNI wrapper versus the usage of finalizers) |
Can we at least convince CVC4 to switch away from finalizers? :P (since they edit the auto-generated code already). We would need supporting data though. |
CVC4 is now (at least partly) integrated in java-smt. Several methods are missing and currently only implemented by throwing an Exception, and also some Unit-Tests do up to now not work properly. Therefore I did not add CVC4 to the Solvers enum right now. I will do that later on when the implementation passes the unit-tests. After the integration of CVC4 in our ivy-repository I recognized one thing: |
Wow, impressively fast! On binaries: yeah, they go to java/runtime/ because Ivy puts them there. |
So what is the status of this? When I've tried to run it, it was dying with some link error. |
I'm working on it at the moment, the linking errors are resolved, but there are a couple of other issues I am fixing right now. |
I just pushed all changes and added versions of CVC4 that look at the right places for the dynamically linked libraries. Locally all unit tests are passing (besides dumping and parsing which I have disabled for CVC4 for now). But on travis the unit-tests don't work. I can only guess why, perhaps of further linking errors (e.g. libgmp is missing or so) |
Thanks a lot! We need to have Travis working though. https://docs.travis-ci.com/user/installing-dependencies/ can you have a look? They expose an interface for managing dependencies. Alternatively, can we bundle |
Container infrastructure does not support |
I tested on a few other computers, too. And found out that following error occurs (different for each Unit-Test file): However when these tests are executed from an IDE they work. I hope I can fix this tomorrow, but if you have any suggestions on that which might help I would be very glad. You can also see it here (I uploaded the JUnit.html to my webserver): |
But before CVC4 integration the tests worked just fine... I think it has to be some sort of UnsatisfiedLinkError, which perhaps On Tue, Jan 12, 2016 at 2:57 PM, Thomas Stieglmaier <
|
We also should package the sources of CVC4 Java bindings as well. |
Had to temporarily disabled it to get a reliable integration on. |
I did some more research and the problems seem to be related to issues with the Finalizer thread,. this can be seen in this logfile: hs_err_pid3981.txt I am still curious why this is not happening on sosy-lab machines, but only on travis and other computers, but I also have no idea how we could fix this without writing our own Java bindings (and this is not an option for me) which do not use finalizers. |
Ah ok, maybe they did not know that finalizer actually runs in a separate On Wed, Jan 13, 2016 at 1:20 PM, Thomas Stieglmaier <
|
The CVC4 classes should be made package-private, like all the other solvers. |
Hi, any updates? We're definitely not going to write our own JNI bindings for CVC4. However, we should also be somewhat sure that the problem is indeed a finalizer-associated race condition. Can we somehow increase our certainty is that we are definitely not missing any dependencies on Travis? It still looks like a more likely culprit to me. If their Java API is unstable, we should move the package to a separate branch. |
Hey George, |
The README of JavaSMT still claims that support for CVC4 is coming soon. I guess this won't happen, so we should remove this claim. |
@PaulMeng any comments? Is your branch working? https://github.com/PaulMeng/java-smt/tree/cvc4_integration_iowa I can see a few commits were done in December. |
Hi @cheshire, My branch is based on the old CVC4 java api, which has some memory-racing issues, and it does not fully support all the JavaSMT features. But we are still actively working on this. And it was in charged by another person since Jan. Now I think he's been working on fixing those CVC4 issues that we talked about in the past. |
Work in progress. Implementation and bindings will be updated by a student. |
CVC4 binary is available via Ivy now. Some parts are working. There seem to be SegFaults when GC removes CVC4-Objects. The problem is the usage of finalize in Swig. |
Let's close this and add specific issues for the open problems? |
Closing this issue as integration as such is finished. |
No description provided.
The text was updated successfully, but these errors were encountered: