klee
klee::ExprOptimizer Class Reference

#include <ArrayExprOptimizer.h>

Collaboration diagram for klee::ExprOptimizer:

Public Member Functions

ref< ExproptimizeExpr (const ref< Expr > &e, bool valueOnly)
 

Private Member Functions

bool computeIndexes (array2idx_ty &arrays, const ref< Expr > &e, mapIndexOptimizedExpr_ty &idx_valIdx) const
 
ref< ExprgetSelectOptExpr (const ref< Expr > &e, std::vector< const ReadExpr * > &reads, std::map< const ReadExpr *, std::pair< ref< Expr >, Expr::Width > > &readInfo, bool isSymbolic)
 
ref< ExprbuildConstantSelectExpr (const ref< Expr > &index, std::vector< uint64_t > &arrayValues, Expr::Width width, unsigned elementsInArray) const
 
ref< ExprbuildMixedSelectExpr (const ReadExpr *re, std::vector< std::pair< uint64_t, bool > > &arrayValues, Expr::Width width, unsigned elementsInArray) const
 

Private Attributes

ExprHashMap< ref< Expr > > cacheExprOptimized
 
ExprHashSet cacheExprUnapplicable
 
ExprHashMap< ref< Expr > > cacheReadExprOptimized
 

Detailed Description

Definition at line 31 of file ArrayExprOptimizer.h.

Member Function Documentation

◆ buildConstantSelectExpr()

ref< Expr > ExprOptimizer::buildConstantSelectExpr ( const ref< Expr > &  index,
std::vector< uint64_t > &  arrayValues,
Expr::Width  width,
unsigned  elementsInArray 
) const
private

Definition at line 432 of file ArrayExprOptimizer.cpp.

References klee::ExtractExpr::alloc(), klee::ArrayValueRatio(), klee::ExprBuilder::Constant(), klee::SelectExpr::create(), klee::createDefaultExprBuilder(), klee::Expr::getWidth(), and klee::Expr::Int32.

Referenced by getSelectOptExpr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildMixedSelectExpr()

ref< Expr > ExprOptimizer::buildMixedSelectExpr ( const ReadExpr re,
std::vector< std::pair< uint64_t, bool > > &  arrayValues,
Expr::Width  width,
unsigned  elementsInArray 
) const
private

◆ computeIndexes()

bool ExprOptimizer::computeIndexes ( array2idx_ty arrays,
const ref< Expr > &  e,
mapIndexOptimizedExpr_ty idx_valIdx 
) const
private

◆ getSelectOptExpr()

ref< Expr > ExprOptimizer::getSelectOptExpr ( const ref< Expr > &  e,
std::vector< const ReadExpr * > &  reads,
std::map< const ReadExpr *, std::pair< ref< Expr >, Expr::Width > > &  readInfo,
bool  isSymbolic 
)
private

◆ optimizeExpr()

Member Data Documentation

◆ cacheExprOptimized

ExprHashMap<ref<Expr> > klee::ExprOptimizer::cacheExprOptimized
private

Definition at line 33 of file ArrayExprOptimizer.h.

Referenced by optimizeExpr().

◆ cacheExprUnapplicable

ExprHashSet klee::ExprOptimizer::cacheExprUnapplicable
private

Definition at line 34 of file ArrayExprOptimizer.h.

Referenced by optimizeExpr().

◆ cacheReadExprOptimized

ExprHashMap<ref<Expr> > klee::ExprOptimizer::cacheReadExprOptimized
private

Definition at line 35 of file ArrayExprOptimizer.h.

Referenced by getSelectOptExpr().


The documentation for this class was generated from the following files: