Beaver

Beaver is an SMT solver (decision procedure) for the theory of quantifier-free finite-precision bit-vector arithmetic (QF_BV). It supports all operators defined under QF_BV, including signed and unsigned non-linear arithmetic operators. Beaver is specially adapted for solving SMT formulae arising out of program analysis (rich in conjunction of linear constraints such as path feasibility queries), security (rich in nonlinear arithmetic) and equivalence checking (rich Boolean structure).

Beaver operates by performing a series of rewrites and simplifications that transform the starting bit-vector arithmetic formula into a Boolean circuit and then into a Boolean satisfiability (SAT) problem in CNF. The main transformations performed by Beaver include:

  1. Constant propagation and constraint propagation: Beaver uses an event-driven approach to propagate constants and constraints through the formula to simplify it. A simple form of constraint that appears in many software benchmarks is an equality that uses a fresh variable to name an expression. Both backward and forward propagation are performed.
  2. Number theoretic rewrite rules: Beaver also uses number-theoretic and other word-level rewrite rules to simplify the formula. These interact with the above step by creating new opportunities for constant/constraint propagation.
  3. Boolean simplifications using synthesis techniques: instead of directly bit-blasting the formula to CNF, Beaver first creates an And-Inverter Graph (AIG) representation of the formula, and then uses the ABC logic synthesis engine to perform Boolean simplifications on the AIG before translating the AIG to CNF. Any off-the-shelf SAT solver (either CNF-based or circuit-based) can then be used to solve the resulting CNF/AIG formula.

Reference

Use the following reference for citing Beaver:

  • Susmit Jha, Rhishikesh Limaye, and Sanjit Seshia. Beaver: Engineering an efficient SMT solver for bit-vector arithmetic. In Computer Aided Verification, pages 668-674. 2009. DOI

BibTeX:

@incollection{jha2009beaver,
    author = {Jha, Susmit and Limaye, Rhishikesh and Seshia, Sanjit},
    booktitle = {Computer Aided Verification},
    doi = {10.1007/978-3-642-02658-4_53},
    journal = {Lecture Notes in Computer Science},
    pages = {668--674},
    title = {Beaver: Engineering an Efficient SMT Solver for Bit-Vector Arithmetic},
    url = {http://dx.doi.org/10.1007/978-3-642-02658-4_53},
    year = {2009},
}

News

  • New release – 1.1-rc1: this has model generation working when using 'abc' as the SAT solver. There are a few other changes. See news.
  • Beaver placed third in the QF_BV category of the SMT competition 2008. It was ranked first among open source QF_BV SMT solvers. See results.

Authors

Download

Beaver is available as open source under the BSD license (see license). Apart from source code, we also provide binary distributions for Linux 32-bit, 64-bit, and Cygwin. Please tell us about yourself before going to the download page. We use the information below to know who is interested in our solver and for what application. Name and email are required.

Name:
Email:
Institution:
Purpose:

How to use

Beaver accepts QF_BV formulae in SMT-LIB syntax. If you are generating your formulae in CVC/STP format, then you can use CVC3 to convert them to SMT-LIB format. The formula can be piped into stdin, or provided as a single file argument.

By default Beaver runs in silent mode conforming to SMTCOMP standard. It only outputs “sat” or “unsat” on stdout. Use –verbose flag to make it print details of different steps of solving. Even in verbose mode, Beaver will print the answer “sat” or “unsat” by itself on a line. You can easily grep it out using patterns ”^sat$”, and ”^unsat$” (or, just single egrep pattern ”^(un)?sat$”).

SAT solver

By default, Beaver uses ABC's internal SAT solver. However, it is not guaranteed to be the most efficient choice. You are strongly encouraged to try out other external SAT solvers using –sat-solver option. Any CNF- or AIG-based SAT solver that conforms to SAT competition requirements works. Beaver automatically detects whether the solver specified with –sat-solver is a CNF- or AIG-based solver.

Acknowledgment

We are thankful to Bryan Brady for his suggestions and for his help in generating hardware benchmarks. We also thank Robert Brayton and Alan Mishchenko for helping us in using ABC. We are also thankful to Dawn Song, David Wagner and David Molnar for providing us with software benchmarks to test and improve our SMT solver.

Links

 
beaver/start.txt · Last modified: 2009/09/30 23:24 by rhishi
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki