-
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
CVC5: parallel prover instances cause issues (found in CPAchecker benchmark) #310
Comments
Another log file
|
This looks like a bug in CVC5. Because what fails is our preconditions |
While the bug is fixed for now, there are 2 problems with CVC5 that caused this problem.
We need to report these issues to the CVC5 devs. |
I've had a closer look at this bug since I've run into the same issue while working on the new SolverThreadLocalityTest class for bug #347. The problem is that CVC5 doesn't separate between solver context and prover environment in the same way as JavaSMT does. Instead a single "Solver" class is used for almost everything: from declaring functions to building terms, pushing assertions and checking satisfiability. Internally there is a "NodeManager" that comes pretty close to the functionality of SolverContext in that it stores all the definitions, sorts and formulas that are available. However, this class is not exposed through the API. Instead whenever a new Solver instance is created the "current" NodeManager is used. Here "current" is defined by a thread_local variable. As a result all Solver instances created on the same thread share a single NodeManager, and terms can be moved freely between them. On the other hand moving Solver instances between threads becomes impossible, even if there is never any concurrent access. I've added some test cases for this issue to my fork of CVC5 here. The last commit (here) tries to fix the issue by making the NodeManager global (instead of thread local). This of course comes with its own problems and means that solver instances can no longer be run in parallel. (In fact this patch will (re-)break the test case for #347 I added just a few days ago.) However, all test in SolverThreadLocalityTest pass with it. I'll add a bug report for CVC5 in the next few days. Hopefully they can help us find a better solution. |
I've now opened a discussion on the CVC5 bugtracker: |
CVC5 now has a new "TermManger" interface that should solve our problem: I'll start working on an update to the solver backend in the next few days. EDIT: |
…. See cvc5/cvc5#10426 for the interface. This will solve issue #310.
Our expectation in CVC5 being able to provide multiple provers that can be used interleaved (or even parallel) based on a common basis (shared types and formulas) was not fulfilled.
There are multiple errors when applying CVC5 that way.
Examples from CPAchecker when applying kInduction (two provers applied in parallel)
LOG:
The text was updated successfully, but these errors were encountered: