Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::SymbolicExpressionParser::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 367 of file SymbolicExpressionParser.h.

#include <Rose/BinaryAnalysis/SymbolicExpressionParser.h>

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

Public Types

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

Public Member Functions

virtual SymbolicExpression::Ptr immediateExpansion (const Token &name, const SymbolicExpression::Nodes &operands) override
 Operator to expand a list into an expression tree. More...
virtual SymbolicExpression::Ptr delayedExpansion (const SymbolicExpression::Ptr &, const SymbolicExpressionParser *) override
 Substitute one expression with another. More...
InstructionSemantics::BaseSemantics::RiscOperatorsPtr riscOperators () const
 Property: Semantic state used during delayed expansion. More...
void riscOperators (const InstructionSemantics::BaseSemantics::RiscOperatorsPtr &ops)
 Property: Semantic state used during delayed expansion. More...
- Public Member Functions inherited from Rose::BinaryAnalysis::SymbolicExpressionParser::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::SymbolicExpressionParser::OperatorExpansion
 OperatorExpansion (const SmtSolverPtr &solver)

Additional Inherited Members

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

Member Typedef Documentation

Shared-ownership pointer.

See Shared ownership.

Definition at line 370 of file SymbolicExpressionParser.h.

Member Function Documentation

InstructionSemantics::BaseSemantics::RiscOperatorsPtr Rose::BinaryAnalysis::SymbolicExpressionParser::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 393 of file SymbolicExpressionParser.h.

void Rose::BinaryAnalysis::SymbolicExpressionParser::MemorySubstituter::riscOperators ( const InstructionSemantics::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 396 of file SymbolicExpressionParser.h.

virtual SymbolicExpression::Ptr Rose::BinaryAnalysis::SymbolicExpressionParser::MemorySubstituter::immediateExpansion ( const Token name,
const SymbolicExpression::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::SymbolicExpressionParser::OperatorExpansion.

virtual SymbolicExpression::Ptr Rose::BinaryAnalysis::SymbolicExpressionParser::MemorySubstituter::delayedExpansion ( const SymbolicExpression::Ptr src,
const SymbolicExpressionParser  

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::SymbolicExpressionParser::Expansion.

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