/* * This file groups command line options definitions and associated * data that are common to both KLEE and Kleaver. */ #include "klee/CommandLine.h" namespace klee { llvm::cl::opt UseFastCexSolver("use-fast-cex-solver", llvm::cl::init(false), llvm::cl::desc("(default=off)")); llvm::cl::opt UseCexCache("use-cex-cache", llvm::cl::init(true), llvm::cl::desc("Use counterexample caching (default=on)")); llvm::cl::opt UseCache("use-cache", llvm::cl::init(true), llvm::cl::desc("Use validity caching (default=on)")); llvm::cl::opt UseIndependentSolver("use-independent-solver", llvm::cl::init(true), llvm::cl::desc("Use constraint independence (default=on)")); llvm::cl::opt DebugValidateSolver("debug-validate-solver", llvm::cl::init(false)); llvm::cl::opt MinQueryTimeToLog("min-query-time-to-log", llvm::cl::init(0), llvm::cl::value_desc("milliseconds"), llvm::cl::desc("Set time threshold (in ms) for queries logged in files. " "Only queries longer than threshold will be logged. (default=0). " "Set this param to a negative value to log timeouts only.")); llvm::cl::opt MaxCoreSolverTime("max-solver-time", llvm::cl::desc("Maximum amount of time for a single SMT query (default=0s (off)). Enables --use-forked-solver"), llvm::cl::init(0.0), llvm::cl::value_desc("seconds")); llvm::cl::opt UseForkedCoreSolver("use-forked-solver", llvm::cl::desc("Run the core SMT solver in a forked process (default=on)"), llvm::cl::init(true)); llvm::cl::opt CoreSolverOptimizeDivides("solver-optimize-divides", llvm::cl::desc("Optimize constant divides into add/shift/multiplies before passing to core SMT solver (default=on)"), llvm::cl::init(true)); /* Using cl::list<> instead of cl::bits<> results in quite a bit of ugliness when it comes to checking * if an option is set. Unfortunately with gcc4.7 cl::bits<> is broken with LLVM2.9 and I doubt everyone * wants to patch their copy of LLVM just for these options. */ llvm::cl::list queryLoggingOptions( "use-query-log", llvm::cl::desc("Log queries to a file. Multiple options can be specified seperate by a comma. By default nothing is logged."), llvm::cl::values( clEnumValN(ALL_PC,"all:pc","All queries in .pc (KQuery) format"), clEnumValN(ALL_SMTLIB,"all:smt2","All queries in .smt2 (SMT-LIBv2) format"), clEnumValN(SOLVER_PC,"solver:pc","All queries reaching the solver in .pc (KQuery) format"), clEnumValN(SOLVER_SMTLIB,"solver:smt2","All queries reaching the solver in .smt2 (SMT-LIBv2) format"), clEnumValEnd ), llvm::cl::CommaSeparated ); #ifdef SUPPORT_METASMT llvm::cl::opt 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)); #endif /* SUPPORT_METASMT */ }