Improve super_prove integration
authorClifford Wolf <clifford@clifford.at>
Sun, 26 Feb 2017 12:03:59 +0000 (13:03 +0100)
committerClifford Wolf <clifford@clifford.at>
Sun, 26 Feb 2017 12:03:59 +0000 (13:03 +0100)
docs/source/index.rst
docs/source/quickstart.rst
sbysrc/sby.py
sbysrc/sby_core.py

index b6de19a13e9c8df057980217b840617e8f842816..b697dbed87b4424b47abe21c1615105a835aa4a2 100644 (file)
@@ -16,7 +16,7 @@ formal tasks:
 at the moment.)
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 3
 
    quickstart.rst
    reference.rst
index c7c723224aa58ff30ac6d3c5a4f9391a8f596d39..9fb6a946e7c51edb2355e509030571dce71a5672 100644 (file)
@@ -8,19 +8,77 @@ The example files used in this chapter can be downloaded from `here
 Installing
 ----------
 
-TBD
+Follow the instructions below to install SymbiYosys and its dependencies.
+Yosys, SymbiYosys, and Z3 are non-optional. The other packages are only
+required for some engine configurations.
 
-Until I find the time to write this section this links must suffice:
+Prerequisites
+~~~~~~~~~~~~~
+
+Installing prerequisites (this command is for Ubuntu 16.04):
+
+.. code-block:: text
+
+   sudo apt-get install build-essential clang bison flex libreadline-dev \
+                        gawk tcl-dev libffi-dev git mercurial graphviz   \
+                        xdot pkg-config python python3 libftdi-dev
+
+Yosys, Yosys-SMTBMC and ABC
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Next install Yosys, Yosys-SMTBMC and ABC (``yosys-abc``):
+
+.. code-block:: text
+
+   git clone https://github.com/cliffordwolf/yosys.git yosys
+   cd yosys
+   make -j$(nproc)
+   sudo make install
+
+SymbiYosys
+~~~~~~~~~~
+
+.. code-block:: text
+
+   git clone https://github.com/cliffordwolf/SymbiYosys.git SymbiYosys
+   cd SymbiYosys
+   sudo make install
+
+Z3
+~~
+
+.. code-block:: text
+
+   git clone https://github.com/Z3Prover/z3.git z3
+   cd z3
+   python scripts/mk_make.py
+   cd build
+   make -j$(nproc)
+   sudo make install
+
+super_prove
+~~~~~~~~~~~
+
+Download the right binary .tar.gz for your system from http://downloads.bvsrc.org/super_prove/
+and extract it to ``/usr/local/super_prove``.
+
+Then create a wrapper script ``/usr/local/bin/suprove`` with the following contents:
+
+.. code-block:: text
+
+   #!/bin/bash
+   tool=super_prove; if [ "$1" != "${1#+}" ]; then tool="${1#+}"; shift; fi
+   exec /usr/local/super_prove/bin/${tool}.sh "$@"
+
+Other packages
+~~~~~~~~~~~~~~
+
+Until I find the time to write install guides for this packages, the following links must suffice:
 
-  * Yosys: http://www.clifford.at/yosys/
-  * SymbiYosys: https://github.com/cliffordwolf/SymbiYosys
-  * Z3: https://github.com/Z3Prover/z3
   * Yices2: http://yices.csl.sri.com/
   * Boolector: http://fmv.jku.at/boolector/
-  * super_prove: http://downloads.bvsrc.org/super_prove/
-
-(Yosys, SymbiYosys, and Z3 are non-optional. The other packages are only
-required for some engine configurations.)
+  * Avy: https://arieg.bitbucket.io/avy/
+  * AIGER: http://fmv.jku.at/aiger/
 
 First step: A simple BMC example
 --------------------------------
index e960240c8f910af986f925879bf8882aa5396c34..922513b9e29229e2f33d9bdf043a3042b4c0ce59 100644 (file)
@@ -44,6 +44,7 @@ sby [options] <jobname>.sby
     --abc <path_to_executable>
     --smtbmc <path_to_executable>
     --suprove <path_to_executable>
+    --aigbmc <path_to_executable>
     --avy <path_to_executable>
         configure which executable to use for the respective tool
 """)
@@ -51,7 +52,7 @@ sby [options] <jobname>.sby
 
 try:
     opts, args = getopt.getopt(sys.argv[1:], "d:bf", ["yosys=",
-            "abc=", "smtbmc=", "suprove="])
+            "abc=", "smtbmc=", "suprove=", "aigbmc=", "avy="])
 except:
     usage()
 
@@ -70,6 +71,10 @@ for o, a in opts:
         exe_paths["smtbmc"] = a
     elif o == "--suprove":
         exe_paths["suprove"] = a
+    elif o == "--aigbmc":
+        exe_paths["aigbmc"] = a
+    elif o == "--avy":
+        exe_paths["avy"] = a
     else:
         usage()
 
index c32bf733d8a5770fe8498f506a77f621ccf696b8..ad7aa2e2c9bd753bd266e81d16d63493301bac31 100644 (file)
@@ -140,7 +140,7 @@ class SbyJob:
             "yosys": "yosys",
             "abc": "yosys-abc",
             "smtbmc": "yosys-smtbmc",
-            "suprove": "super_prove",
+            "suprove": "suprove",
             "aigbmc": "aigbmc",
             "avy": "avy",
         }