diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2016-01-07 12:00:25 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2016-01-12 11:40:39 +0000 |
commit | e81f5ceed580d4d267e3c857b47637d6bd065499 (patch) | |
tree | eb9f3b74b036a59edd1164bc68e9e00d5156936d /lib/Basic | |
parent | 9da07ca0ccc58286f8247bc2e7d7745abfa0cc54 (diff) | |
download | klee-e81f5ceed580d4d267e3c857b47637d6bd065499.tar.gz |
Refactor setting the core solver (i.e. STP, MetaSMT or DummySolver) by providing
a ``createCoreSolver()`` function. The solver used is set by the new ``--solver-backend`` command line argument. The default is STP. This change necessitated refactoring the MetaSMT stuff. That clearly didn't belong in the Executor! The MetaSMT command line option is now ``--metasmt-backend`` as this only picks the MetaSMT backend. In order to use MetaSMT ``--solver-backend=metasmt`` needs to be passed. Note I don't have MetaSMT built on my development machine so I don't know if the MetaSMT stuff even compiles...
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/CmdLineOptions.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lib/Basic/CmdLineOptions.cpp b/lib/Basic/CmdLineOptions.cpp index eac54141..d7157b25 100644 --- a/lib/Basic/CmdLineOptions.cpp +++ b/lib/Basic/CmdLineOptions.cpp @@ -75,18 +75,26 @@ llvm::cl::list<QueryLoggingSolverType> queryLoggingOptions( #ifdef SUPPORT_METASMT -llvm::cl::opt<klee::MetaSMTBackendType> -UseMetaSMT("use-metasmt", - llvm::cl::desc("Use MetaSMT as an underlying SMT solver and specify the solver backend type."), - llvm::cl::values(clEnumValN(METASMT_BACKEND_NONE, "none", "Don't use metaSMT"), - clEnumValN(METASMT_BACKEND_STP, "stp", "Use metaSMT with STP"), - clEnumValN(METASMT_BACKEND_Z3, "z3", "Use metaSMT with Z3"), - clEnumValN(METASMT_BACKEND_BOOLECTOR, "btor", "Use metaSMT with Boolector"), - clEnumValEnd), - llvm::cl::init(METASMT_BACKEND_NONE)); +llvm::cl::opt<klee::MetaSMTBackendType> MetaSMTBackend( + "metasmt-backend", + llvm::cl::desc("Specify the MetaSMT solver backend type."), + llvm::cl::values( + clEnumValN(METASMT_BACKEND_STP, "stp", "Use metaSMT with STP"), + clEnumValN(METASMT_BACKEND_Z3, "z3", "Use metaSMT with Z3"), + clEnumValN(METASMT_BACKEND_BOOLECTOR, "btor", + "Use metaSMT with Boolector"), + clEnumValEnd), + llvm::cl::init(METASMT_BACKEND_STP)); #endif /* SUPPORT_METASMT */ +llvm::cl::opt<CoreSolverType> CoreSolverToUse( + "solver-backend", llvm::cl::desc("Specifiy the core solver backend to use"), + llvm::cl::values(clEnumValN(STP_SOLVER, "stp", "stp (default)"), + clEnumValN(METASMT_SOLVER, "metasmt", "metaSMT"), + clEnumValN(DUMMY_SOLVER, "dummy", "Dummy solver"), + clEnumValEnd), + llvm::cl::init(STP_SOLVER)); } |