-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExprPPrinter.h
78 lines (62 loc) · 2.41 KB
/
ExprPPrinter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//===-- ExprPPrinter.h ------------------------------------------*- C++ -*-===//
//
// The KLEE Symbolic Virtual Machine
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef KLEE_EXPRPPRINTER_H
#define KLEE_EXPRPPRINTER_H
#include "klee/Expr.h"
namespace llvm {
class raw_ostream;
}
namespace klee {
class ConstraintManager;
class ExprPPrinter {
protected:
ExprPPrinter() {}
public:
static ExprPPrinter *create(llvm::raw_ostream &os);
virtual ~ExprPPrinter() {}
virtual void setNewline(const std::string &newline) = 0;
virtual void setForceNoLineBreaks(bool forceNoLineBreaks) = 0;
virtual void reset() = 0;
virtual void scan(const ref<Expr> &e) = 0;
virtual void print(const ref<Expr> &e, unsigned indent=0) = 0;
// utility methods
template<class Container>
void scan(Container c) {
scan(c.begin(), c.end());
}
template<class InputIterator>
void scan(InputIterator it, InputIterator end) {
for (; it!=end; ++it)
scan(*it);
}
/// printOne - Pretty print a single expression prefixed by a
/// message and followed by a line break.
static void printOne(llvm::raw_ostream &os, const char *message,
const ref<Expr> &e);
/// printSingleExpr - Pretty print a single expression.
///
/// The expression will not be followed by a line break.
///
/// Note that if the output stream is not positioned at the
/// beginning of a line then printing will not resume at the
/// correct position following any output line breaks.
static void printSingleExpr(llvm::raw_ostream &os, const ref<Expr> &e);
static void printConstraints(llvm::raw_ostream &os,
const ConstraintManager &constraints);
static void printQuery(llvm::raw_ostream &os,
const ConstraintManager &constraints,
const ref<Expr> &q,
const ref<Expr> *evalExprsBegin = 0,
const ref<Expr> *evalExprsEnd = 0,
const Array * const* evalArraysBegin = 0,
const Array * const* evalArraysEnd = 0,
bool printArrayDecls = true);
};
}
#endif