klee
|
Class representing a one byte read from an array. More...
#include <Expr.h>
Public Member Functions | |
Width | getWidth () const |
Kind | getKind () const |
unsigned | getNumKids () const |
ref< Expr > | getKid (unsigned i) const |
int | compareContents (const Expr &b) const |
virtual ref< Expr > | rebuild (ref< Expr > kids[]) const |
virtual unsigned | computeHash () |
Public Member Functions inherited from klee::Expr | |
Expr () | |
virtual | ~Expr () |
virtual Kind | getKind () const =0 |
virtual Width | getWidth () const =0 |
virtual unsigned | getNumKids () const =0 |
virtual ref< Expr > | getKid (unsigned i) const =0 |
virtual void | print (llvm::raw_ostream &os) const |
void | dump () const |
dump - Print the expression to stderr. More... | |
virtual unsigned | hash () const |
Returns the pre-computed hash of the current expression. More... | |
virtual unsigned | computeHash () |
int | compare (const Expr &b) const |
virtual ref< Expr > | rebuild (ref< Expr > kids[]) const =0 |
bool | isZero () const |
isZero - Is this a constant zero. More... | |
bool | isTrue () const |
isTrue - Is this the true expression. More... | |
bool | isFalse () const |
isFalse - Is this the false expression. More... | |
Static Public Member Functions | |
static ref< Expr > | alloc (const UpdateList &updates, const ref< Expr > &index) |
static ref< Expr > | create (const UpdateList &updates, ref< Expr > i) |
static bool | classof (const Expr *E) |
static bool | classof (const ReadExpr *) |
Static Public Member Functions inherited from klee::NonConstantExpr | |
static bool | classof (const Expr *E) |
static bool | classof (const NonConstantExpr *) |
Static Public Member Functions inherited from klee::Expr | |
static void | printKind (llvm::raw_ostream &os, Kind k) |
static void | printWidth (llvm::raw_ostream &os, Expr::Width w) |
static unsigned | getMinBytesForWidth (Width w) |
returns the smallest number of bytes in which the given width fits More... | |
static ref< Expr > | createSExtToPointerWidth (ref< Expr > e) |
static ref< Expr > | createZExtToPointerWidth (ref< Expr > e) |
static ref< Expr > | createImplies (ref< Expr > hyp, ref< Expr > conc) |
static ref< Expr > | createIsZero (ref< Expr > e) |
static ref< Expr > | createTempRead (const Array *array, Expr::Width w) |
static ref< ConstantExpr > | createPointer (uint64_t v) |
static ref< Expr > | createFromKind (Kind k, std::vector< CreateArg > args) |
static bool | isValidKidWidth (unsigned kid, Width w) |
static bool | needsResultType () |
static bool | classof (const Expr *) |
Public Attributes | |
UpdateList | updates |
ref< Expr > | index |
Public Attributes inherited from klee::Expr | |
class ReferenceCounter | _refCount |
Required by klee::ref-managed objects. More... | |
Static Public Attributes | |
static const Kind | kind = Read |
static const unsigned | numKids = 1 |
Static Public Attributes inherited from klee::Expr | |
static unsigned | count = 0 |
static const unsigned | MAGIC_HASH_CONSTANT = 39 |
static const Width | InvalidWidth = 0 |
static const Width | Bool = 1 |
static const Width | Int8 = 8 |
static const Width | Int16 = 16 |
static const Width | Int32 = 32 |
static const Width | Int64 = 64 |
static const Width | Fl80 = 80 |
Private Member Functions | |
ReadExpr (const UpdateList &_updates, const ref< Expr > &_index) | |
Additional Inherited Members | |
Public Types inherited from klee::Expr | |
enum | Kind { InvalidKind = -1 , Constant = 0 , NotOptimized , Read =NotOptimized+2 , Select , Concat , Extract , ZExt , SExt , Not , Add , Sub , Mul , UDiv , SDiv , URem , SRem , And , Or , Xor , Shl , LShr , AShr , Eq , Ne , Ult , Ule , Ugt , Uge , Slt , Sle , Sgt , Sge , LastKind =Sge , CastKindFirst =ZExt , CastKindLast =SExt , BinaryKindFirst =Add , BinaryKindLast =Sge , CmpKindFirst =Eq , CmpKindLast =Sge } |
typedef unsigned | Width |
The type of an expression is simply its width, in bits. More... | |
virtual int | compareContents (const Expr &b) const =0 |
Protected Attributes inherited from klee::Expr | |
unsigned | hashValue |
|
inlineprivate |
Definition at line 598 of file Expr.h.
References klee::UpdateList::root, and updates.
Referenced by alloc().
|
inlinestatic |
Definition at line 575 of file Expr.h.
References klee::Expr::computeHash(), index, ReadExpr(), and updates.
Referenced by create().
|
inlinestatic |
Definition at line 602 of file Expr.h.
References klee::Expr::getKind(), and klee::Expr::Read.
|
inlinestatic |
|
virtual |
Compares b
to this
Expr and determines how they are ordered (ignoring their kid expressions - i.e. those returned by getKid()
).
Typically this requires comparing internal attributes of the Expr.
Implementations can assume that b
and this
are of the same kind.
This method effectively defines a partial order over Expr of the same kind (partial because kid Expr are not compared).
This method should not be called directly. Instead compare()
should be used.
[in] | b | Expr to compare this to. |
this
is <
b
ignoring kid expressions.this
is >
b
ignoring kid expressions.this
and b
are not ordered.<
and >
are binary relations that express the partial order.
Implements klee::Expr.
Definition at line 588 of file Expr.cpp.
References klee::UpdateList::compare(), and updates.
|
virtual |
(Re)computes the hash of the current expression. Returns the hash value.
Reimplemented from klee::Expr.
Definition at line 218 of file Expr.cpp.
References klee::Expr::hash(), klee::UpdateList::hash(), klee::Expr::hashValue, index, klee::Expr::MAGIC_HASH_CONSTANT, and updates.
|
static |
Definition at line 538 of file Expr.cpp.
References alloc(), klee::Array::constantValues, klee::UpdateList::head, index, klee::Array::isConstantArray(), klee::UpdateList::root, and klee::Array::size.
Referenced by klee::ValidatingSolver::computeInitialValues(), klee::Assignment::createConstraintsFromAssignment(), klee::Expr::createTempRead(), klee::ExprEvaluator::evalRead(), klee::Assignment::evaluate(), klee::SeedInfo::patchSeed(), klee::ObjectState::read8(), and rebuild().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Implements klee::Expr.
Definition at line 583 of file Expr.h.
References klee::Array::getRange(), klee::UpdateList::root, and updates.
Referenced by klee::ExprRangeEvaluator< T >::evaluate(), klee::ArrayExprHelper::hasOrderedReads(), klee::AssignmentGenerator::hasOrderedReads(), PPrinter::hasOrderedReads(), klee::ArrayExprHelper::isReadExprAtOffset(), klee::AssignmentGenerator::isReadExprAtOffset(), PPrinter::isReadExprAtOffset(), and klee::ArrayReadExprVisitor::visitRead().
Implements klee::Expr.
Definition at line 591 of file Expr.h.
References create(), and updates.
Definition at line 572 of file Expr.h.
Referenced by alloc(), klee::ExprOptimizer::buildMixedSelectExpr(), klee::ImpliedValue::checkForImpliedValues(), computeHash(), create(), klee::Executor::doImpliedValueConcretization(), klee::ExprRangeEvaluator< T >::evaluate(), getKid(), klee::ArrayExprHelper::hasOrderedReads(), klee::AssignmentGenerator::hasOrderedReads(), PPrinter::hasOrderedReads(), klee::AssignmentGenerator::helperGenerateAssignment(), IndependentElementSet::IndependentElementSet(), klee::ArrayReadExprVisitor::inspectRead(), klee::ArrayExprHelper::isReadExprAtOffset(), klee::AssignmentGenerator::isReadExprAtOffset(), PPrinter::isReadExprAtOffset(), klee::SeedInfo::patchSeed(), PPrinter::printRead(), CexData::propogateExactValues(), CexData::propogatePossibleValues(), TryConstArrayOpt(), klee::ConstantArrayExprVisitor::visitConcat(), klee::ConstantArrayExprVisitor::visitRead(), klee::IndexCompatibilityExprVisitor::visitRead(), and klee::ExprEvaluator::visitRead().
|
static |
Definition at line 568 of file Expr.h.
Referenced by getNumKids().
UpdateList klee::ReadExpr::updates |
Definition at line 571 of file Expr.h.
Referenced by alloc(), klee::ExprOptimizer::buildMixedSelectExpr(), klee::ImpliedValue::checkForImpliedValues(), compareContents(), computeHash(), klee::ExprRangeEvaluator< T >::evaluate(), getWidth(), klee::AssignmentGenerator::helperGenerateAssignment(), IndependentElementSet::IndependentElementSet(), klee::ArrayReadExprVisitor::inspectRead(), klee::SeedInfo::patchSeed(), PPrinter::printRead(), CexData::propogateExactValues(), CexData::propogatePossibleValues(), ReadExpr(), rebuild(), TryConstArrayOpt(), klee::ConstantArrayExprVisitor::visitConcat(), klee::ConstantArrayExprVisitor::visitRead(), klee::IndexCompatibilityExprVisitor::visitRead(), klee::ExprEvaluator::visitRead(), klee::ConstantArrayFinder::visitRead(), and klee::SymbolicObjectFinder::visitRead().