CREST installation
Tested on Ubuntu 12.04 (32 bit)
Install yices-2.2.2 (CREST DOES NOT WORK WITH VERSION)
- Pre-requisites:
$ sudo apt-get install libgmp-dev gpref gcc
- Build:
$ ./configure $ make
Install yices-1.0.40
- Download yices-1.0.40-i686-pc-linux-gnu.tar.gz from here (http://yices.csl.sri.com/download-yices1.shtml)
- Extract it somewhere
Install Crest
1. First build CIL
- Install libraries
$ sudo apt-get install ocaml ocaml-findlib
- Build CIL
$ cd YOUR-CREST-DIR/cil $ ./cofigure $ make
2. Build crest
- Update src/Makefile by setting
Yices_Dir = /path-to-yices-1.0.4
- Build
$ cd src/ $ make
3. To run crest, use LD_LIBRARY_PATH
$ LD_LIBRARY_PATH=/path-to-yices/lib ./bin/run_crest <program> <iteration> <searcher>
OR create a script named “start-crest” as follows and store it at top directory of crest
#!/bin/sh BASE=$(dirname $0) # Run LD_LIBRARY_PATH=/path-to-yices-1.0.40/lib $BASE/bin/run_crest "$@"
Using this script, you can run crest as follows
$ ./start-crest --help
5. Test a program
$ cd test/ $ ../bin/crestc uniform_test.c $ ../start-crest ./uniform_test 10 -dfs
This should produce output roughly like:
Iteration 0 (0s): covered 0 branches [0 reach funs, 0 reach branches]. Iteration 1 (0s): covered 1 branches [1 reach funs, 8 reach branches]. Iteration 2 (0s): covered 3 branches [1 reach funs, 8 reach branches]. Iteration 3 (0s): covered 5 branches [1 reach funs, 8 reach branches]. Iteration 4 (0s): covered 7 branches [1 reach funs, 8 reach branches]. GOAL! Iteration 5 (0s): covered 8 branches [1 reach funs, 8 reach branches].