23 std::vector< ref<Expr> > stack;
25 std::set<const UpdateNode *> updates;
27 if (!isa<ConstantExpr>(e)) {
32 while (!stack.empty()) {
36 if (
ReadExpr *re = dyn_cast<ReadExpr>(top)) {
39 results.push_back(re);
41 if (!isa<ConstantExpr>(re->index) &&
42 visited.insert(re->index).second)
43 stack.push_back(re->index);
52 if (updates.insert(re->updates.head.get()).second) {
53 for (
const auto *un = re->updates.head.get(); un;
54 un = un->next.get()) {
55 if (!isa<ConstantExpr>(un->index) &&
56 visited.insert(un->index).second)
57 stack.push_back(un->index);
58 if (!isa<ConstantExpr>(un->value) &&
59 visited.insert(un->value).second)
60 stack.push_back(un->value);
64 }
else if (!isa<ConstantExpr>(top)) {
68 if (!isa<ConstantExpr>(k) &&
69 visited.insert(k).second)
86 for (
const auto *un = ul.
head.get(); un; un = un->next.get()) {
110 for (
const auto *un = ul.
head.get(); un; un = un->next.get()) {
123template<
typename InputIterator>
126 std::vector<const Array*> &results) {
128 for (; begin!=end; ++begin)
133 std::vector<const Array*> &results) {
137typedef std::vector< ref<Expr> >::iterator
A;
138template void klee::findSymbolicObjects<A>(
A,
A, std::vector<const Array*> &);
140typedef std::set< ref<Expr> >::iterator
B;
141template void klee::findSymbolicObjects<B>(
B,
B, std::vector<const Array*> &);
std::vector< ref< Expr > >::iterator A
std::set< ref< Expr > >::iterator B
bool isConstantArray() const
bool isSymbolicArray() const
ExprVisitor::Action visitRead(const ReadExpr &re)
std::set< const Array * > results
static Action doChildren()
ref< Expr > visit(const ref< Expr > &e)
Class representing symbolic expressions.
virtual unsigned getNumKids() const =0
virtual ref< Expr > getKid(unsigned i) const =0
Class representing a one byte read from an array.
Action visitRead(const ReadExpr &re)
std::vector< const Array * > & objects
SymbolicObjectFinder(std::vector< const Array * > &_objects)
std::set< const Array * > results
Class representing a complete list of updates into an array.
ref< UpdateNode > head
pointer to the most recent update node
void findSymbolicObjects(ref< Expr > e, std::vector< const Array * > &results)
void findReads(ref< Expr > e, bool visitUpdates, std::vector< ref< ReadExpr > > &result)
std::unordered_set< ref< Expr >, klee::util::ExprHash, klee::util::ExprCmp > ExprHashSet