From d34a946acb7f5155ee62f1bdc95ae7ef7b848e49 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Mon, 11 Apr 2016 08:19:02 -0500 Subject: Add ``-debug-cross-check-core-solver`` option to allow cross-checking with another solver. For example the core solver can be STP and the cross checking solver can be Z3. Unfortunately a few fragile tests don't pass when actually using this option. --- lib/Basic/ConstructSolverChain.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Basic/ConstructSolverChain.cpp') diff --git a/lib/Basic/ConstructSolverChain.cpp b/lib/Basic/ConstructSolverChain.cpp index b48c5cb0..2df87d51 100644 --- a/lib/Basic/ConstructSolverChain.cpp +++ b/lib/Basic/ConstructSolverChain.cpp @@ -62,6 +62,10 @@ Solver *constructSolverChain(Solver *coreSolver, std::string querySMT2LogPath, llvm::errs() << "Logging all queries in .smt2 format to " << querySMT2LogPath.c_str() << "\n"; } + if (DebugCrossCheckCoreSolverWith != NO_SOLVER) { + Solver *oracleSolver = createCoreSolver(DebugCrossCheckCoreSolverWith); + solver = createValidatingSolver(/*s=*/solver, /*oracle=*/oracleSolver); + } return solver; } -- cgit 1.4.1