aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Solver/CoreSolver.cpp
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2016-01-26 17:15:08 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2016-02-14 23:55:24 +0000
commit1f13e9dbf9db2095b6612a47717c2b86e4aaba72 (patch)
tree9b2ffeab24fb1b5d6bdb04d0b0b8677e62263f06 /lib/Solver/CoreSolver.cpp
parent37694e11c7a767105244ec563b061d13f0779f05 (diff)
downloadklee-1f13e9dbf9db2095b6612a47717c2b86e4aaba72.tar.gz
Add basic implementation of Z3Builder and Z3Solver and Z3SolverImpl
which is based on the work of Andrew Santosa (see PR #295) but fixes many bugs in that implementation. The implementation communicates with Z3 via it's C API. This implementation is based of the STPSolver and STPBuilder and so it inherits a lot of its flaws (See TODOs and FIXMEs). I have also ripped out some of the optimisations (constructMulByConstant, constructSDivByConstant and constructUDivByConstant) that were used in the STPBuilder because * I don't trust them * Z3 can probably do these for us in the future if we use the ``Z3_simplify()`` At a glance its performance seems worse than STP but future work can look at improving this.
Diffstat (limited to 'lib/Solver/CoreSolver.cpp')
-rw-r--r--lib/Solver/CoreSolver.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Solver/CoreSolver.cpp b/lib/Solver/CoreSolver.cpp
index 26842d31..94bb3a5e 100644
--- a/lib/Solver/CoreSolver.cpp
+++ b/lib/Solver/CoreSolver.cpp
@@ -88,9 +88,7 @@ Solver *createCoreSolver(CoreSolverType cst) {
return createDummySolver();
case Z3_SOLVER:
#ifdef ENABLE_Z3
- // TODO
- llvm::report_fatal_error("Z3 support not implemented");
- return NULL;
+ return new Z3Solver();
#else
llvm::errs() << "Not compiled with Z3 support\n";
return NULL;