From 64868646eed7384c38db41aff5002215b92c1601 Mon Sep 17 00:00:00 2001 From: Hristina Palikareva Date: Fri, 4 Oct 2013 18:32:55 +0100 Subject: MetaSMT builder, solver and command-line options. --- include/klee/CommandLine.h | 9 +++++++++ include/klee/Solver.h | 15 +++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'include') diff --git a/include/klee/CommandLine.h b/include/klee/CommandLine.h index 38b22c6f..c755114b 100644 --- a/include/klee/CommandLine.h +++ b/include/klee/CommandLine.h @@ -43,6 +43,15 @@ enum QueryLoggingSolverType */ extern llvm::cl::list queryLoggingOptions; +enum MetaSMTBackendType +{ + METASMT_BACKEND_NONE, + METASMT_BACKEND_STP, + METASMT_BACKEND_Z3, + METASMT_BACKEND_BOOLECTOR +}; + +extern llvm::cl::opt UseMetaSMT; //A bit of ugliness so we can use cl::list<> like cl::bits<>, see queryLoggingOptions template diff --git a/include/klee/Solver.h b/include/klee/Solver.h index 8fe33c7c..00e4c962 100644 --- a/include/klee/Solver.h +++ b/include/klee/Solver.h @@ -219,6 +219,21 @@ namespace klee { virtual void setCoreSolverTimeout(double timeout); }; + +#ifdef SUPPORT_METASMT + + template + class MetaSMTSolver : public Solver { + public: + MetaSMTSolver(bool useForked, bool optimizeDivides); + virtual ~MetaSMTSolver(); + + virtual char *getConstraintLog(const Query&); + virtual void setCoreSolverTimeout(double timeout); +}; + +#endif /* SUPPORT_METASMT */ + /* *** */ /// createValidatingSolver - Create a solver which will validate all query -- cgit 1.4.1 From 7b46fc6cc9d9104a226d28f286b19fffc5a1e029 Mon Sep 17 00:00:00 2001 From: Hristina Palikareva Date: Tue, 15 Oct 2013 14:31:49 +0100 Subject: command-line option --use-metasmt declared and defined inside #ifdef SUPPORT_METASMT ... #endif macros --- include/klee/CommandLine.h | 5 +++++ lib/Basic/CmdLineOptions.cpp | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/klee/CommandLine.h b/include/klee/CommandLine.h index c755114b..c4c70069 100644 --- a/include/klee/CommandLine.h +++ b/include/klee/CommandLine.h @@ -7,6 +7,7 @@ #define KLEE_COMMANDLINE_H #include "llvm/Support/CommandLine.h" +#include "klee/Config/config.h" namespace klee { @@ -43,6 +44,8 @@ enum QueryLoggingSolverType */ extern llvm::cl::list queryLoggingOptions; +#ifdef SUPPORT_METASMT + enum MetaSMTBackendType { METASMT_BACKEND_NONE, @@ -53,6 +56,8 @@ enum MetaSMTBackendType extern llvm::cl::opt UseMetaSMT; +#endif /* SUPPORT_METASMT */ + //A bit of ugliness so we can use cl::list<> like cl::bits<>, see queryLoggingOptions template static bool optionIsSet(llvm::cl::list list, T option) diff --git a/lib/Basic/CmdLineOptions.cpp b/lib/Basic/CmdLineOptions.cpp index 1201ac29..eac54141 100644 --- a/lib/Basic/CmdLineOptions.cpp +++ b/lib/Basic/CmdLineOptions.cpp @@ -73,6 +73,7 @@ llvm::cl::list queryLoggingOptions( llvm::cl::CommaSeparated ); +#ifdef SUPPORT_METASMT llvm::cl::opt UseMetaSMT("use-metasmt", @@ -84,6 +85,10 @@ UseMetaSMT("use-metasmt", clEnumValEnd), llvm::cl::init(METASMT_BACKEND_NONE)); +#endif /* SUPPORT_METASMT */ } + + + -- cgit 1.4.1