//===-- ArrayExprRewriter.h -----------------------------------------------===// // // The KLEE Symbolic Virtual Machine // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef KLEE_ARRAYEXPRREWRITER_H #define KLEE_ARRAYEXPRREWRITER_H #include #include #include #include "klee/Expr/Expr.h" #include "klee/util/Ref.h" namespace klee { using array2idx_ty = std::map>>; using mapIndexOptimizedExpr_ty = std::map, std::vector>>; class ExprRewriter { public: static ref createOptExpr(const ref &e, const array2idx_ty &arrays, const mapIndexOptimizedExpr_ty &idx_valIdx); private: static ref rewrite(const ref &e, const array2idx_ty &arrays, const mapIndexOptimizedExpr_ty &idx_valIdx); static ref concatenateOrExpr(const std::vector>::const_iterator begin, const std::vector>::const_iterator end); static ref createEqExpr(const ref &index, const ref &valIndex); static ref createRangeExpr(const ref &index, const ref &valStart, const ref &valEnd); }; } // namespace klee #endif /* KLEE_ARRAYEXPRREWRITER_H */