Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::SymbolicExprParser::MemorySubstituter Class Reference


Expand "memory" function to placeholder.

This parser replaces functions of the form (memory[NBYTES] ADDRESS) to placeholders that are later substituted with the actual value read from ROSE's semantic memory state.

Definition at line 366 of file SymbolicExprParser.h.

#include <SymbolicExprParser.h>

Inheritance diagram for Rose::BinaryAnalysis::SymbolicExprParser::MemorySubstituter:
Inheritance graph
Collaboration diagram for Rose::BinaryAnalysis::SymbolicExprParser::MemorySubstituter:
Collaboration graph

Public Types

typedef Sawyer::SharedPointer< MemorySubstituterPtr
 Shared-ownership pointer. More...
typedef Sawyer::Container::Map< SymbolicExpr::Ptr, SymbolicExpr::PtrExprToMem
- Public Types inherited from Rose::BinaryAnalysis::SymbolicExprParser::OperatorExpansion
typedef Sawyer::SharedPointer< OperatorExpansionPtr
 Shared-ownership pointer. More...
- Public Types inherited from Rose::BinaryAnalysis::SymbolicExprParser::Expansion
typedef Sawyer::SharedPointer< ExpansionPtr
 Shared-ownership pointer to an Expansion. More...

Public Member Functions

virtual SymbolicExpr::Ptr immediateExpansion (const Token &name, const SymbolicExpr::Nodes &operands) ROSE_OVERRIDE
 Operator to expand a list into an expression tree. More...
virtual SymbolicExpr::Ptr delayedExpansion (const SymbolicExpr::Ptr &, const SymbolicExprParser *) ROSE_OVERRIDE
 Substitute one expression with another. More...
InstructionSemantics2::BaseSemantics::RiscOperatorsPtr riscOperators () const
 Property: Semantic state used during delayed expansion. More...
void riscOperators (const InstructionSemantics2::BaseSemantics::RiscOperatorsPtr &ops)
 Property: Semantic state used during delayed expansion. More...
- Public Member Functions inherited from Rose::BinaryAnalysis::SymbolicExprParser::Expansion
const std::string & title () const
 Property: Title to use for documentation.
void title (const std::string &s)
 Property: Title to use for documentation.
const std::string & docString () const
 Property: Documentation string. More...
void docString (const std::string &s)
 Property: Documentation string. More...
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 SharedObject (const SharedObject &)
 Copy constructor. More...
virtual ~SharedObject ()
 Virtual destructor. More...
SharedObjectoperator= (const SharedObject &)
 Assignment. More...

Static Public Member Functions

static Ptr instance (const SmtSolver::Ptr &solver)
 Allocating constructor.

Protected Member Functions

 MemorySubstituter (const SmtSolver::Ptr &solver)
- Protected Member Functions inherited from Rose::BinaryAnalysis::SymbolicExprParser::OperatorExpansion
 OperatorExpansion (const SmtSolverPtr &solver)

Additional Inherited Members

- Protected Attributes inherited from Rose::BinaryAnalysis::SymbolicExprParser::OperatorExpansion
SmtSolverPtr solver

Member Typedef Documentation

Shared-ownership pointer.

See Shared ownership.

Definition at line 369 of file SymbolicExprParser.h.

Member Function Documentation

InstructionSemantics2::BaseSemantics::RiscOperatorsPtr Rose::BinaryAnalysis::SymbolicExprParser::MemorySubstituter::riscOperators ( ) const

Property: Semantic state used during delayed expansion.

This property holds a pointer to the semantic operators and its current state that's used during the second phase of expansion (delayedExpansion).

Definition at line 392 of file SymbolicExprParser.h.

void Rose::BinaryAnalysis::SymbolicExprParser::MemorySubstituter::riscOperators ( const InstructionSemantics2::BaseSemantics::RiscOperatorsPtr ops)

Property: Semantic state used during delayed expansion.

This property holds a pointer to the semantic operators and its current state that's used during the second phase of expansion (delayedExpansion).

Definition at line 395 of file SymbolicExprParser.h.

virtual SymbolicExpr::Ptr Rose::BinaryAnalysis::SymbolicExprParser::MemorySubstituter::immediateExpansion ( const Token name,
const SymbolicExpr::Nodes &  operands 

Operator to expand a list into an expression tree.

The width in bits is either the width specified in square brackets for the function symbol, or zero. Functors are all called for each symbol, and the first one to return non-null is the one that's used to generate the symbolic expression.

Implements Rose::BinaryAnalysis::SymbolicExprParser::OperatorExpansion.

virtual SymbolicExpr::Ptr Rose::BinaryAnalysis::SymbolicExprParser::MemorySubstituter::delayedExpansion ( const SymbolicExpr::Ptr src,
const SymbolicExprParser parser 

Substitute one expression with another.

This second phase of expansion occurs after parsing (perhaps much later) and is able to dynamically replace the given expression with some other expression. For instance, if this object recognizes register names, it it might replace the register names with variables in the first phase, and during the second phase read register values from a provided state.

If the input expression does not need to be substituted, then this function should return the original expression.

Reimplemented from Rose::BinaryAnalysis::SymbolicExprParser::Expansion.

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