klee
SMTLIBLoggingSolver.cpp
Go to the documentation of this file.
1//===-- SMTLIBLoggingSolver.cpp -------------------------------------------===//
2//
3// The KLEE Symbolic Virtual Machine
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "QueryLoggingSolver.h"
11
13
14using namespace klee;
15
19{
20 private:
21
23
24 virtual void printQuery(const Query& query,
25 const Query* falseQuery = 0,
26 const std::vector<const Array*>* objects = 0)
27 {
28 if (0 == falseQuery)
29 {
30 printer.setQuery(query);
31 }
32 else
33 {
34 printer.setQuery(*falseQuery);
35 }
36
37 if (0 != objects)
38 {
40 }
41
43 }
44
45 public:
47 std::string path,
48 time::Span queryTimeToLog,
49 bool logTimedOut)
50 : QueryLoggingSolver(_solver, path, ";", queryTimeToLog, logTimedOut)
51 {
52 //Setup the printer
54 }
55};
56
57
58Solver* klee::createSMTLIBLoggingSolver(Solver *_solver, std::string path,
59 time::Span minQueryTimeToLog, bool logTimedOut)
60{
61 return new Solver(new SMTLIBLoggingSolver(_solver, path, minQueryTimeToLog, logTimedOut));
62}
llvm::raw_string_ostream logBuffer
virtual void printQuery(const Query &query, const Query *falseQuery=0, const std::vector< const Array * > *objects=0)
SMTLIBLoggingSolver(Solver *_solver, std::string path, time::Span queryTimeToLog, bool logTimedOut)
ExprSMTLIBPrinter printer
void setQuery(const Query &q)
void setOutput(llvm::raw_ostream &output)
void setArrayValuesToGet(const std::vector< const Array * > &a)
Definition: main.cpp:291
Solver * createSMTLIBLoggingSolver(Solver *s, std::string path, time::Span minQueryTimeToLog, bool logTimedOut)