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
12
#include "
klee/Expr/ExprSMTLIBPrinter.h
"
13
14
using namespace
klee
;
15
18
class
SMTLIBLoggingSolver
:
public
QueryLoggingSolver
19
{
20
private
:
21
22
ExprSMTLIBPrinter
printer
;
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
{
39
printer
.
setArrayValuesToGet
(*objects);
40
}
41
42
printer
.
generateOutput
();
43
}
44
45
public
:
46
SMTLIBLoggingSolver
(
Solver
*_solver,
47
std::string path,
48
time::Span
queryTimeToLog,
49
bool
logTimedOut)
50
:
QueryLoggingSolver
(_solver, path,
";"
, queryTimeToLog, logTimedOut)
51
{
52
//Setup the printer
53
printer
.
setOutput
(
logBuffer
);
54
}
55
};
56
57
58
Solver
*
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
}
ExprSMTLIBPrinter.h
QueryLoggingSolver.h
QueryLoggingSolver
Definition:
QueryLoggingSolver.h:26
QueryLoggingSolver::logBuffer
llvm::raw_string_ostream logBuffer
Definition:
QueryLoggingSolver.h:34
SMTLIBLoggingSolver
Definition:
SMTLIBLoggingSolver.cpp:19
SMTLIBLoggingSolver::printQuery
virtual void printQuery(const Query &query, const Query *falseQuery=0, const std::vector< const Array * > *objects=0)
Definition:
SMTLIBLoggingSolver.cpp:24
SMTLIBLoggingSolver::SMTLIBLoggingSolver
SMTLIBLoggingSolver(Solver *_solver, std::string path, time::Span queryTimeToLog, bool logTimedOut)
Definition:
SMTLIBLoggingSolver.cpp:46
SMTLIBLoggingSolver::printer
ExprSMTLIBPrinter printer
Definition:
SMTLIBLoggingSolver.cpp:22
klee::ExprSMTLIBPrinter
Definition:
ExprSMTLIBPrinter.h:79
klee::ExprSMTLIBPrinter::setQuery
void setQuery(const Query &q)
Definition:
ExprSMTLIBPrinter.cpp:76
klee::ExprSMTLIBPrinter::setOutput
void setOutput(llvm::raw_ostream &output)
Definition:
ExprSMTLIBPrinter.cpp:69
klee::ExprSMTLIBPrinter::generateOutput
void generateOutput()
Definition:
ExprSMTLIBPrinter.cpp:517
klee::ExprSMTLIBPrinter::setArrayValuesToGet
void setArrayValuesToGet(const std::vector< const Array * > &a)
Definition:
ExprSMTLIBPrinter.cpp:1134
klee::Solver
Definition:
Solver.h:60
klee
Definition:
main.cpp:291
klee::createSMTLIBLoggingSolver
Solver * createSMTLIBLoggingSolver(Solver *s, std::string path, time::Span minQueryTimeToLog, bool logTimedOut)
Definition:
SMTLIBLoggingSolver.cpp:58
klee::Query
Definition:
Solver.h:32
klee::time::Span
Definition:
Time.h:67
lib
Solver
SMTLIBLoggingSolver.cpp
Generated by
1.9.3