10#ifndef KLEE_ARRAYEXPROPTIMIZER_H
11#define KLEE_ARRAYEXPROPTIMIZER_H
15#include <unordered_map>
16#include <unordered_set>
28using array2idx_ty = std::map<const Array *, std::vector<ref<Expr>>>;
49 const ref<Expr> &e, std::vector<const ReadExpr *> &reads,
54 std::vector<uint64_t> &arrayValues,
56 unsigned elementsInArray)
const;
60 std::vector<std::pair<uint64_t, bool>> &arrayValues,
Implements smart-pointer ref<> used by KLEE.
ref< Expr > getSelectOptExpr(const ref< Expr > &e, std::vector< const ReadExpr * > &reads, std::map< const ReadExpr *, std::pair< ref< Expr >, Expr::Width > > &readInfo, bool isSymbolic)
ExprHashSet cacheExprUnapplicable
ExprHashMap< ref< Expr > > cacheExprOptimized
ref< Expr > optimizeExpr(const ref< Expr > &e, bool valueOnly)
ref< Expr > buildMixedSelectExpr(const ReadExpr *re, std::vector< std::pair< uint64_t, bool > > &arrayValues, Expr::Width width, unsigned elementsInArray) const
bool computeIndexes(array2idx_ty &arrays, const ref< Expr > &e, mapIndexOptimizedExpr_ty &idx_valIdx) const
ref< Expr > buildConstantSelectExpr(const ref< Expr > &index, std::vector< uint64_t > &arrayValues, Expr::Width width, unsigned elementsInArray) const
ExprHashMap< ref< Expr > > cacheReadExprOptimized
unsigned Width
The type of an expression is simply its width, in bits.
Class representing a one byte read from an array.
std::unordered_set< ref< Expr >, klee::util::ExprHash, klee::util::ExprCmp > ExprHashSet
std::map< ref< Expr >, std::vector< ref< Expr > > > mapIndexOptimizedExpr_ty
std::map< const Array *, std::vector< ref< Expr > > > array2idx_ty