-
Notifications
You must be signed in to change notification settings - Fork 660
/
ExprUtil.h
52 lines (42 loc) · 1.56 KB
/
ExprUtil.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
//===-- ExprUtil.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_EXPRUTIL_H
#define KLEE_EXPRUTIL_H
#include "klee/Expr/ExprVisitor.h"
#include <vector>
namespace klee {
class Array;
class Expr;
class ReadExpr;
template<typename T> class ref;
/// Find all ReadExprs used in the expression DAG. If visitUpdates
/// is true then this will including those reachable by traversing
/// update lists. Note that this may be slow and return a large
/// number of results.
void findReads(ref<Expr> e,
bool visitUpdates,
std::vector< ref<ReadExpr> > &result);
/// Return a list of all unique symbolic objects referenced by the given
/// expression.
void findSymbolicObjects(ref<Expr> e,
std::vector<const Array*> &results);
/// Return a list of all unique symbolic objects referenced by the
/// given expression range.
template<typename InputIterator>
void findSymbolicObjects(InputIterator begin,
InputIterator end,
std::vector<const Array*> &results);
class ConstantArrayFinder : public ExprVisitor {
protected:
ExprVisitor::Action visitRead(const ReadExpr &re);
public:
std::set<const Array *> results;
};
}
#endif /* KLEE_EXPRUTIL_H */