Skip to content
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

Add support for CVC4 and Boolector #103

Merged
merged 6 commits into from
Jun 15, 2018
Merged

Conversation

jamesbornholt
Copy link
Collaborator

@jamesbornholt jamesbornholt commented Jun 15, 2018

This PR adds support for the CVC4 and Boolector SMT solvers.

Since this is the first time we've had multiple SMT backends, we also have to make a few wider changes:

  • Different solvers support different SMT logics and features (e.g., unsat cores, optimization), so add solver-features to get the supported features of a solver.
  • Annotate the test suite with the required features for each test, so that they aren't run on solvers that don't support them.
  • Refactor SMT generation and model parsing to support the quirks of different SMT solvers.
  • Since we're not going to install CVC4 or Boolector by default, add support for manually specifying their locations, via a #:path argument to their constructors (and add the same argument to the Z3 constructor, too).

As an added bonus, we also add a new output-smt global parameter that can be set to #t to dump all generated SMT to temporary files for inspection or reuse.


Here's an example of how to use a different solver for queries:

#lang rosette

(require rosette/solver/smt/cvc4)
(current-solver (cvc4 #:path "/path/to/cvc4"))

(define-symbolic x (bitvector 5))
(solve (assert (bvsge x (bv 4 5))))

@pmatos
Copy link
Contributor

pmatos commented Jun 15, 2018

@jamesbornholt Great job. Thanks for this!

@emina emina merged commit 269baef into emina:master Jun 15, 2018
@emina
Copy link
Owner

emina commented Jun 15, 2018

Thank you @jamesbornholt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants