-
Notifications
You must be signed in to change notification settings - Fork 143
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
Remove STP support #31
Conversation
It was an extremely old version of CUDD. CUDD is no longer supported and both STP and yices are much newer and have better performance characteristics.
As noted by Julie in issue B-Lang-org#16, STP is a historical default for the compiler to solve constraints, but recent Yices is now in use as well with the open source release (Yices is GPLv3). Since CUDD is also being removed, we can take this chance to just drop STP as well. Signed-off-by: Austin Seipp <aseipp@pobox.com>
@thoughtpolice you might want to update the README as well - it seems the only leftover perl script is in |
rebased on top of current master: https://github.com/flokli/bsc/tree/remove-stp |
I'd like to leave in the ability to use STP, for those who want it. I propose that we remove the STP snapshot and replace it with a stub C file with empty functions for the API; Yices will be the default solver, but if STP is selected, BSC can check whether it's connected to a stub and report an error or revert to Yices. Then, if someone wants to use STP, they can make or get the real library and put it in the LD_LIBRARY_PATH, and BSC will be able to use it. I think I already have a stub C file, so I can make those changes. |
Works for me, but I think bsc should fail if the STP solver is explicitly selected but not available.
|
@quark17 did you publish the STP stub somewhere? I'd be nice if we could wrap this up here as well :-) |
Earlier, I thought that the STP code was preventing BSC from building in some environments. It seems that we've fixed that, so I feel there's less urgency to make any changes. I have just pushed changes that make Yices the default solver and allow Yices to be used everywhere that solvers are used (so STP is not used anywhere if the -sat-stp flag is not given). Beyond that, the current STP snapshot seems as good as a stub, to me? But I can dig up the stub code and add it. |
FWIW STP currently does not compile on MacOS/Clang. The error has to do with the template for hashable types:
So from a perspective of making the code base leaner I'd still argue for its removal/replacement by a proper stub. Having said that it compiles fine using GCC and I'll have another look at it at some point to figure out what's failing here, because this should just work. |
I'd suggest comparing it with https://github.com/stp/stp, to see if/how they've fixed it. |
Or bumping to up-to-date stp master is a good option? |
That's harder because STP has changed a lot, and they've completely redone their build system to use CMake. |
If it's so hard, why not really ditch it now, and re-introduce once we have a less complicated interface like On top of that, we'll still have it in the git history ;-) |
I'm not sure why @bpfoley says it's hard. While the source has improved a lot, it looked like the C API might still have the same functions, and not require much change in BSC. However, the text of the C API has changed enough that I couldn't quickly generate a useful diff and would need to spend time manually looking at the old an new APIs to see what's changed. The reason to keep STP in the build is, in case there's a bug encountered in Yices, a user can switch to STP (without having to get a new build) and see if that gets them past the problem. Maybe this is unlikely to happen often? I would certainly like to update to the new STP, instead of this snapshot. The downside is that it adds requirements for people who are building from source; additional dependencies as well as adding a new build tool (cmake). I've been proposing incremental steps, but don't take that to mean that I think we should stop at any given step. I'm willing to check in a stub, and have the Makefile choose either the snapshot or the stub, based on a variable which can be set on the command line. Depending on whether it's more important for the default build to have a working STP (for end users) or whether it's more important for people to build from the repo to have a cleaner default experience, we can set the default to be the stub or the snapshot. And at some point, the snapshot can be replaced with newer code, or all of this can be replaced by unvendoring STP or even by using a single common SMT interface (like SMT-Lib) so that people can plug in whatever they want. |
As noted by Julie in issue #16, STP is a historical default for the compiler to solve constraints, but recent Yices is now in use as well with the open source release. Since CUDD is also being removed, we can take this chance to just drop STP as well.
NOTE: This pull request depends on #25. I've included that here just to keep the relevant diff simpler to manage, since I had to remove CUDD to make things easier for myself to build. Once #25 is merged, I'll rebase this and turn it into a single commit.