Replies: 1 comment
-
|
Thanks! There are various open issues about the SMT solvers, and I apologize that they're not consolidated in one place. It's worth stepping back and asking what are the concerns that people are trying to solve. For example, I think many of the proposals are from people who are trying to package BSC, and are having difficulty in building or want to simplify the install for their users. My current feeling is that we should do this:
Less important, but we could also do the following:
The SMT solver versions that we currently use have not had a bug, and there's a lot to be said for that and not upgrading unnecessarily. But I'm certainly fine with upgrading if it improves speed and if it makes building easier (particular to keep up with support for newer architectures and compilers). However, the speed of the SMT solvers is not currently a big concern. But it would be good to have some examples that stress-test the scaling of SMT solver use in scheduling, typechecking, and logic optimization. Supporting the ability to plug in other solvers is also nice, but is not what people are clamouring for. I'm all for adding an SMTLib interface, as a way to allow people to experiment with other solvers, but I don't think it's a solution to the priority problems -- I think it would need to be an optional solver (via a flag like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In 2020, #117 proposed to switch away from using STP and Yices directly, to instead use a more generic SMTlib-based solver.
The proposal there mentions
sbvas the preferred choice. In the mean time,what4has become available, so those two are compared to assess their drawbacks in switching to them.The 3 categories of comparison are:
GHC Support
SBV
The SBV support is determined from the changelog:
What4
The What4 support is determined from the changelog and from the support of versions.
Distro availability
Package versions and availability based on pkgs.org
SBV
What4
Solver support
SBV keeps track of supported solvers via SMTSolverVersions.md.
What4 support is taken from the description.
OS support via pkgs.org
SBV generally focuses on Z3 (which is the default there), using the latest features where possible. Yices is supported by both, so that can continue to be used. STP is only supported by What4.
Depending on version, not all features may be supported.
Conclusion
Using
what4would immediately mean dropping support for GHC <8.2.sbvdoes possibly support GHC 7.10.3, though only before v8.1 which is positively ancient. In more general terms,sbvtends to support more and older releases for GHC. It also has better solver support with the exception of STP, though it's neither default forbscnor is it impossible to add if it's needed.When choosing to use
sbv, allowing use as far back as 7.12 would cover both all supported GHC releases as well as the major distributions out-of-the-box. There are 38 versions since then (as of 11.1), so might be done more on an on-demand basis where issues occur.sbvitself only supports the latest 3 versions (currently 10.12, 11.0, 11.1).The solvers to focus on could be Z3 for its widespread use and Yices as the current default.
What do you think? I believe this summary to be useful to make an informed decision.
Examples
SBV
yields
[(Yices,0.002754131s,Q.E.D.),(Z3,0.012029021s,Q.E.D.)]when Yices and Z3 are installed.Beta Was this translation helpful? Give feedback.
All reactions