Skip to content

Commit

Permalink
Detect default solver (#1820)
Browse files Browse the repository at this point in the history
* Detect default solver: try yices, if not present use z3

* Update solver.py

* Update message about solver selection

Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com>
  • Loading branch information
montyly and Eric Hennenfent committed Nov 6, 2020
1 parent c8e5e25 commit 5b5f37c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ for idx, val_list in enumerate(m.collect_returns()):
* We're still in the process of implementing full support for the EVM Istanbul instruction semantics, so certain opcodes may not be supported.
In a pinch, you can try compiling with Solidity 0.4.x to avoid generating those instructions.

## Using a different solver (Z3, Yices, CVC4)
## Using a different solver (Yices, Z3, CVC4)
Manticore relies on an external solver supporting smtlib2. Currently Z3, Yices and CVC4 are supported and can be selected via commandline or configuration settings.
By default Manticore will use Z3. Once you've installed a different solver, you can choose which one to use like this:
```manticore --smt.solver yices```
If Yices is available, Manticore will use it by default. If not, it will fall back to Z3 or CVC4. If you want to manually choose which solver to use, you can do so like this:
```manticore --smt.solver Z3```
### Installing CVC4
For more details go to https://cvc4.github.io/. Otherwise just get the binary and use it.

Expand Down
2 changes: 1 addition & 1 deletion manticore/core/smtlib/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SolverType(config.ConfigEnum):

consts.add(
"solver",
default=SolverType.z3,
default=SolverType.auto,
description="Choose default smtlib2 solver (z3, yices, cvc4, auto)",
)

Expand Down

0 comments on commit 5b5f37c

Please sign in to comment.