Solver *constructSolverChain(STPSolver *stpSolver, std::string querySMT2LogPath, std::string baseSolverQuerySMT2LogPath, std::string queryPCLogPath, std::string baseSolverQueryPCLogPath) { Solver *solver = stpSolver; if (optionIsSet(queryLoggingOptions, SOLVER_PC)) { solver = createPCLoggingSolver(solver, baseSolverQueryPCLogPath, MinQueryTimeToLog); std::cerr << "Logging queries that reach solver in .pc format to " << baseSolverQueryPCLogPath.c_str() << std::endl; } if (optionIsSet(queryLoggingOptions, SOLVER_SMTLIB)) { solver = createSMTLIBLoggingSolver(solver, baseSolverQuerySMT2LogPath, MinQueryTimeToLog); std::cerr << "Logging queries that reach solver in .smt2 format to " << baseSolverQuerySMT2LogPath.c_str() << std::endl; } if (UseFastCexSolver) solver = createFastCexSolver(solver); if (UseCexCache) solver = createCexCachingSolver(solver); if (UseCache) solver = createCachingSolver(solver); if (UseIndependentSolver) solver = createIndependentSolver(solver); if (DebugValidateSolver) solver = createValidatingSolver(solver, stpSolver); if (optionIsSet(queryLoggingOptions, ALL_PC)) { solver = createPCLoggingSolver(solver, queryPCLogPath, MinQueryTimeToLog); std::cerr << "Logging all queries in .pc format to " << queryPCLogPath.c_str() << std::endl; } if (optionIsSet(queryLoggingOptions, ALL_SMTLIB)) { solver = createSMTLIBLoggingSolver(solver,querySMT2LogPath, MinQueryTimeToLog); std::cerr << "Logging all queries in .smt2 format to " << querySMT2LogPath.c_str() << std::endl; } return solver; }
Solver *constructSolverChain(Solver *coreSolver, std::string querySMT2LogPath, std::string baseSolverQuerySMT2LogPath, std::string queryPCLogPath, std::string baseSolverQueryPCLogPath) { Solver *solver = coreSolver; if (optionIsSet(queryLoggingOptions, SOLVER_PC)) { solver = createPCLoggingSolver(solver, baseSolverQueryPCLogPath, MinQueryTimeToLog); klee_message("Logging queries that reach solver in .pc format to %s\n", baseSolverQueryPCLogPath.c_str()); } if (optionIsSet(queryLoggingOptions, SOLVER_SMTLIB)) { solver = createSMTLIBLoggingSolver(solver, baseSolverQuerySMT2LogPath, MinQueryTimeToLog); klee_message("Logging queries that reach solver in .smt2 format to %s\n", baseSolverQuerySMT2LogPath.c_str()); } if (UseFastCexSolver) solver = createFastCexSolver(solver); if (UseCexCache) solver = createCexCachingSolver(solver); if (UseCache) solver = createCachingSolver(solver); if (UseIndependentSolver) solver = createIndependentSolver(solver); if (DebugValidateSolver) solver = createValidatingSolver(solver, coreSolver); if (optionIsSet(queryLoggingOptions, ALL_PC)) { solver = createPCLoggingSolver(solver, queryPCLogPath, MinQueryTimeToLog); klee_message("Logging all queries in .pc format to %s\n", queryPCLogPath.c_str()); } if (optionIsSet(queryLoggingOptions, ALL_SMTLIB)) { solver = createSMTLIBLoggingSolver(solver, querySMT2LogPath, MinQueryTimeToLog); klee_message("Logging all queries in .smt2 format to %s\n", querySMT2LogPath.c_str()); } if (DebugCrossCheckCoreSolverWith != NO_SOLVER) { Solver *oracleSolver = createCoreSolver(DebugCrossCheckCoreSolverWith); solver = createValidatingSolver(/*s=*/solver, /*oracle=*/oracleSolver); } return solver; }