//===-- 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 namespace klee { class Array; class Expr; class ReadExpr; template 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 e, bool visitUpdates, std::vector< ref > &result); /// Return a list of all unique symbolic objects referenced by the given /// expression. void findSymbolicObjects(ref e, std::vector &results); /// Return a list of all unique symbolic objects referenced by the /// given expression range. template void findSymbolicObjects(InputIterator begin, InputIterator end, std::vector &results); class ConstantArrayFinder : public ExprVisitor { protected: ExprVisitor::Action visitRead(const ReadExpr &re); public: std::set results; }; } #endif /* KLEE_EXPRUTIL_H */