All Projects → SRI-CSL → Yices2

SRI-CSL / Yices2

Licence: other
The Yices SMT Solver

Labels

Projects that are alternatives of or similar to Yices2

Liquidhaskell
Liquid Types For Haskell
Stars: ✭ 863 (+247.98%)
Mutual labels:  smt
Eustathios Spider V2
Update to Eustathios with a little bit of HercuLien Design Changes
Stars: ✭ 107 (-56.85%)
Mutual labels:  smt
Fstar
A Proof-oriented Programming Language
Stars: ✭ 2,171 (+775.4%)
Mutual labels:  smt
Nopol
Automatic program repair and patch generation system for Java based on dynamic analysis and code synthesis with SMT, developed at University of Lille and Inria, France.
Stars: ✭ 73 (-70.56%)
Mutual labels:  smt
Deepblockchains
Deep Blockchains - reference implementation of Plasma, Stark, SMT and more
Stars: ✭ 93 (-62.5%)
Mutual labels:  smt
Sbv
SMT Based Verification in Haskell. Express properties about Haskell programs and automatically prove them using SMT solvers.
Stars: ✭ 125 (-49.6%)
Mutual labels:  smt
Adafruit cad parts
CAD files for various boards, components and parts
Stars: ✭ 386 (+55.65%)
Mutual labels:  smt
Alive2
Automatic verification of LLVM optimizations
Stars: ✭ 199 (-19.76%)
Mutual labels:  smt
Mbed Hdk
mbed HDK - This repository is not being maintained. For the latest updates, please use: https://github.com/ARMmbed/mbed-HDK-Eagle-Projects
Stars: ✭ 106 (-57.26%)
Mutual labels:  smt
Boolector
A Satisfiability Modulo Theories (SMT) solver for the theories of fixed-size bit-vectors, arrays and uninterpreted functions.
Stars: ✭ 172 (-30.65%)
Mutual labels:  smt
Storm
A blackbox mutational fuzzer for detecting critical bugs in SMT solvers
Stars: ✭ 79 (-68.15%)
Mutual labels:  smt
Mbed Hdk Eagle Projects
Collection of Eagle projects for targets, interfaces, shields and more
Stars: ✭ 91 (-63.31%)
Mutual labels:  smt
Precious Plastic Kit
Precious Plastic Downloadpack
Stars: ✭ 136 (-45.16%)
Mutual labels:  smt
Dreal4
SMT Solver for Nonlinear Theories of Reals
Stars: ✭ 72 (-70.97%)
Mutual labels:  smt
Apalache
APALACHE: symbolic model checker for TLA+
Stars: ✭ 187 (-24.6%)
Mutual labels:  smt
Cvc4
CVC4 is an efficient open-source automatic theorem prover for satisfiability modulo theories (SMT) problems.
Stars: ✭ 476 (+91.94%)
Mutual labels:  smt
Jlcparts
Better parametric search for components available for JLC PCB assembly
Stars: ✭ 114 (-54.03%)
Mutual labels:  smt
Stainless
Verification framework and tool for higher-order Scala programs
Stars: ✭ 241 (-2.82%)
Mutual labels:  smt
Manticore
Symbolic execution tool
Stars: ✭ 2,599 (+947.98%)
Mutual labels:  smt
Triton
Triton is a Dynamic Binary Analysis (DBA) framework. It provides internal components like a Dynamic Symbolic Execution (DSE) engine, a dynamic taint engine, AST representations of the x86, x86-64, ARM32 and AArch64 Instructions Set Architecture (ISA), SMT simplification passes, an SMT solver interface and, the last but not least, Python bindings.
Stars: ✭ 1,934 (+679.84%)
Mutual labels:  smt

License: GPL v3 Build Status Coverity Scan Build Status Coverage Status

Yices 2

Yices 2 is a solver for Satisfiability Modulo Theories (SMT) problems. Yices 2 can process input written in the SMT-LIB language, or in Yices' own specification language. We also provide a C API and bindings for Java, Python, Go, and OCaml.

This repository includes the source of Yices 2, documentation, tests, and examples.

Yices 2 is developed by Bruno Dutertre, Dejan Jovanovic, Stéphane Graham-Lengrand, and Ian A. Mason at the Computer Science Laboratory, SRI International. To contact us, or to get more information about Yices, please visit our website.

Simple Examples

Here are a few typical small examples that illustrate the use of Yices using the SMT2 language.

Linear Real Arithmetic

;; QF_LRA = Quantifier-Free Linear Real Arithmetic
(set-logic QF_LRA)
;; Declare variables x, y
(declare-fun x () Real)
(declare-fun y () Real)
;; Find solution to (x + y > 0), ((x < 0) || (y < 0))
(assert (> (+ x y) 0))
(assert (or (< x 0) (< y 0)))
;; Run a satisfiability check
(check-sat)
;; Print the model
(get-model)

Running Yices on the above problem gives a solution

> yices-smt2 lra.smt2
sat
(= x 2)
(= y (- 1))

Bit-Vectors

;; QF_BV = Quantifier-Free Bit-Vectors
(set-logic QF_BV)
;; Declare variables
(declare-fun x () (_ BitVec 32))
(declare-fun y () (_ BitVec 32))
;; Find solution to (signed) x > 0, y > 0, x + y < x
(assert (bvsgt x #x00000000))
(assert (bvsgt y #x00000000))
(assert (bvslt (bvadd x y) x))
;; Check
(check-sat)
;; Get the model
(get-model)

Running Yices on the above problem gives

> yices-smt2 bv.smt2
sat
(= x #b01000000000000000000000000000000)
(= y #b01000000000000000000000000000000)

Non-Linear Arithmetic

;; QF_NRA = Quantifier-Free Nonlinear Real Arithmetic
(set-logic QF_NRA)
;; Declare variables
(declare-fun x () Real)
(declare-fun y () Real)
;; Find solution to x^2 + y^2 = 1, x = 2*y, x > 0
(assert (= (+ (* x x) (* y y)) 1))
(assert (= x (* 2 y)))
(assert (> x 0))
;; Check
(check-sat)
;; Get the model
(get-model)

Running Yices on the above problem gives

sat
(= x 0.894427)
(= y 0.447214)

Installing Prebuilt Binaries

Currently you can install Yices either using Homebrew or Apt.

Homebrew

Installing on Darwin using homebrew can be achieved via:

brew install SRI-CSL/sri-csl/yices2

This will install the full mcsat-enabled version of Yices, including dynamic library and header files.

Apt

To install Yices on Ubuntu or Debian, do the following:

sudo add-apt-repository ppa:sri-csl/formal-methods
sudo apt-get update
sudo apt-get install yices2

This will install the executables. If you also need the Yices library and header files, replace the last step with:

sudo apt-get install yices2-dev

Building From Source

Prerequisites

To build Yices from the source, you need:

  • GCC version 4.0.x or newer (or clang 3.0 or newer)
  • gperf version 3.0 or newer
  • the GMP library version 4.1 or newer
  • other standard tools: make (gnumake is required), sed, etc.

To build the manual, you also need:

  • a latex installation
  • the latexmk tool

To build the on-line documentation, you need to install the Sphinx python package. The simplest method is:

sudo pip install sphinx

Sphinx 1.4.x or better is needed.

Quick Installation

Do this:

autoconf
./configure
make
sudo make install

This will install binaries and libraries in /usr/local/. You can change the installation location by giving option --prefix=... to the ./configure script.

For more explanations, please check doc/COMPILING.

Support for Non-Linear Arithmetic and MC-SAT

Yices supports non-linear real and integer arithmetic using a method known as Model-Constructing Satisfiability (MC-SAT), but this is not enabled by default. The MC-SAT solver also supports other theories and theory combination. We are currently extending it to handle bit-vector constraints.

If you want the MC-SAT solver, follow these instructions:

  1. Install SRI's library for polynomial manipulation. It's available on github.

  2. Install the CUDD library for binary-decision diagrams. We recommand using the github distribution: https://github.com/ivmai/cudd.

  3. After you've installed libpoly and CUDD, add option --enable-mcsat to the configure command. In details, type this in the toplevel Yices directory:

autoconf
./configure --enable-mcsat
make
sudo make install
  1. You may need to provide LDFLAGS/CPPFLAGS if ./configure fails to find the libpoly or CUDD libraries. Other options may be useful too. Try ./configure --help to see what's there.

Support for Thread Safety

The Yices library is not thread safe by default, if you need a re-entrant version:

autoconf
./configure --enable-thread-safety
make
sudo make install

If configured with --enable-thread-safety the Yices library will be thread safe in the following sense: as long as the creation and manipulation of each context and each model is restricted to a single thread, there should be no races. In particular separate threads can create their own contexts, and manipulate and check them without impeding another thread's progress.

NOTE: --enable-mcsat and --enable-thread-safety are currently incompatible.

Windows Builds

We recommend compiling using Cygwin. If you want a version that works natively on Windows (i.e., does not depend on the Cygwin DLLs), you can compile from Cygwin using the MinGW cross-compilers. This is explained in doc/COMPILING.

Documentation

To build the manual from the source, type

make doc

This will build ./doc/manual/manual.pdf.

Other documentation is in the ./doc directory:

  • doc/COMPILING explains the compilation process and options in detail.
  • doc/NOTES gives an overview of the source code.
  • doc/YICES-LANGUAGE explains the syntax of the Yices language, and describes commands, functions, and heuristic parameters.

To build the Sphinx documentation:

cd doc/sphinx
make html

This will build the documentation in build/html (within directory doc/sphinx). You can also do:

make epub

and you'll have the doc in build/epub/Yices.epub.

Getting Help and Reporting bugs

For further questions about Yices, please contact us via the Yices mailing lists [email protected]. This mailing list is moderated, but you do not need to register to post to it. You can register to this mailing list if you are interested in helping others.

Please submit bug reports through GitHub issues. Please include enough information in your bug report to enable us to reproduce and fix the problem. This is an example of a good report:

I am experiencing a segmentation fault from Yices. The following is a small test case that causes the crash. I am using Yices 2.4.1 on x86_64 statically linked against GMP on Ubuntu 12.04.

This is an example of a poor bug report:

I have just downloaded Yices. After I compile my code and link it with Yices, there is a segmentation fault when I run the executable. Can you help?

Please try to include answers to the following questions:

  • Which version of Yices are you using?
  • On which hardware and OS?
  • How can we reproduce the bug? If possible, include an input file or program fragment.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].