From 4ad66e2e348597ffb814c23232d2ca453785f9d6 Mon Sep 17 00:00:00 2001
From: Cristian Cadar If you would like to try KLEE, the current procedure for building is
-below. NOTE: KLEE is only currently tested on Linux and Darwin
-x86-32 and x86-64 targets, using LLVM 2.8. KLEE will not work with an
-older LLVM (e.g., 2.5), and might not work with newer versions of LLVM
-(e.g., 2.9 or 3.0)
+ The current procedure for building is outlined below.
+KLEE is built on top of LLVM; the first
+steps are to get a working LLVM installation.
+See Getting Started
+with the LLVM System for more information.
+
+NOTE: KLEE is currently tested only on Linux x86-32 and x86-64
+targets, using LLVM 2.9. KLEE will not work with older LLVM
+versions (e.g., 2.5), and might not work with newer versions (e.g.,
+3.0).
+ This assumes that you compiled LLVM in-place. If you used a
- different directory for the object files then use:
- KLEE is based on
+the STP
+constraint solver. STP does not make frequent releases, and its
+Subversion repository is under constant development and may be
+unstable. The instructions below are for a particular revision which
+we have used successfully, but you can try a more recent revision by
+changing or removing the -r argument to the svn co
+command. (Please let us know if you have successfully and extensively
+used KLEE with a more recent version of STP.)
+ The steps above are enough for building and testing KLEE on closed programs
-(programs that don't use any external code such as C library
-functions). However, if you want to use KLEE to run real programs you will want
-to enable the KLEE POSIX runtime, which is built on top of the uClibc C
-library.
+By default, KLEE works on closed programs (programs that don't use any
+external code such as C library functions). However, if you want to
+use KLEE to run real programs you will want to enable the KLEE POSIX
+runtime, which is built on top of the uClibc C library.
+
1. Trying out KLEE without installing any dependencies
@@ -54,24 +52,34 @@ The only requirement is that you are running a reasonably-modern x86-Linux distr
2. Building KLEE
-3. Building KLEE with POSIX runtime support
-4. Building KLEE with a more recent version of STP
Building KLEE
-
+
-
-
Add llvm-gcc to your PATH. It
+
Add llvm-gcc to your PATH. It
is important to do this first so that llvm-gcc is
found in subsequent configure
steps. llvm-gcc will be used later to compile
@@ -84,14 +92,11 @@ older LLVM (e.g., 2.5), and might not work with newer versions of LLVM
- $ tar zxvf llvm-2.8.tgz
- $ cd llvm-2.8
+ $ curl -O http://llvm.org/releases/2.9/llvm-2.9.tgz
+ $ tar zxvf llvm-2.9.tgz
+ $ cd llvm-2.9
$ ./configure --enable-optimized --enable-assertions
$ make
- $ make unittests
- Building KLEE with POSIX runtime support
+
+ $ cd stp
+ $ ./scripts/configure --with-prefix=path/to/stp/install --with-cryptominisat2
+ $ make OPTIMIZE=-O2 CFLAGS_M32= install
+
-
-
NOTE: KLEE's uClibc is shipped in a pre-configured for x86-32. If - you are on a different target (e.g. x86-64), you will need to run 'make - config' and select the correct target. The defaults for the other uClibc - configuration variables should be fine.
+
NOTE: If you are on a different target (i.e., not i386 + or x64), you will need to run make config and select the + correct target. The defaults for the other uClibc configuration + variables should be fine.
From the KLEE source directory, run:
+NOTE: If you skipped step 3, simply remove the --with-uclibc and --enable-posix-runtime options.
If your benchmarks are running slowly or not terminating it may -be worth trying a more recent version of KLEE's constraint solver -STP, -which offers performance improvements over the version supplied -with KLEE.
- -STP does not make frequent releases, and its Subversion repository -is under constant development and may be unstable. The instructions -below are for a particular revision which is known to pass the KLEE -test suite, but you can try a more recent revision (at your own risk) -by changing or removing the -r argument to the svn -co command.
- -