-
Notifications
You must be signed in to change notification settings - Fork 123
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
Support for concurrent solvers #7
Comments
This is a great idea. One that I pondered and was inclined to implement several times, but never got around to. May I humbly suggest you guys implement this for SBV directly, and then inherit backwards. Note that the "Why" platform already has a similar capability. (http://why3.lri.fr/) Point 3: Unlikely one can decide which will be better ahead of time, as most differences will be very solver specific, including the choice of the random-seed. Point 4: The word "certificate" has a certain meaning in these circles, and it's better not to conflate the terms here. Some solvers (z3 in particular) can generate proof traces which can (in theory) be independently checked in a separate theorem prover (say Isabelle). There's some work on this already: http://research.microsoft.com/en-us/people/nbjorner/iwil08.pdf But this is really a whole can of worms, and maybe it's more a job for the SAW suite of tools, potentially. |
I think that this is straightforward enough to aim for 2.1, given I wrote the same thing for another verification system years ago and it is supported by the likes of Why3. @brianhuffman, push back if that's not the case. |
I've just added a new set of API to SBV that should simplify this: LeventErkok/sbv@72c98c6 Added are:
The With these in tow, implementing concurrent solver calls should be easy. The issue is of course how you present it back to the user in a meaningful way; or provide some sort of feedback to the user which solver has been running, how long, etc. More like how why3 handled this issue back in the day, with a snippy GUI and such. That would be an overkill for Cryptol, but the user should at least get an indication as to which solver finished first, etc. I have tested these to a fair degree; but asynchronous programming is notoriously tricky to get right. If you play around with them and find any issues, file a ticket! Or, better yet; fix it and push to SBV. |
This is now partially implemented (commit 92e7f1b). The prover I've been considering implementing another prover, Points (3) and (4) from the original issue comment are trickier. We don't currently have any heuristics for deciding what solver might work best in a particular case (thought I expect there exist some heuristics that might frequently work well). |
Cool.. One gotcha though: If you start using a solver that did nothing but just reported "Unknown" it'd always win the proveAny race, and thus would be hardly useful. Maybe the right thing to do is to proveAll, and walk through the results and return the first one that's not an error/unknown result. I don't think this is a major issue, but something to keep in mind. |
Perhaps it would make sense to modify the behavior of |
@atomb: Sure, maybe For Cryptol, however, I don't think this'll be necessary: No Cryptol generated SBV proof goal will have alternating quantifiers, and also it'll always be restricted to the QF_BV logic. So, other than "timeout" related issues, solvers should always return SAT/UNSAT for those queries. If you hit an "UNKNOWN" case, I'd like to see that! |
Since we support many solvers (thanks to SBV), and each has its sweet spot of the kinds of problems it can solve, we should be able to support the concurrent execution of multiple solvers.
The point of this feature is to support for following use-cases:
The first two "seem easy", the latter might be interesting research projects.
The text was updated successfully, but these errors were encountered: