ROSE 0.11.145.192
|
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 368 of file SymbolicExpressionParser.h.
#include <Rose/BinaryAnalysis/SymbolicExpressionParser.h>
Public Types | |
typedef Sawyer::SharedPointer< MemorySubstituter > | Ptr |
Shared-ownership pointer. | |
typedef Sawyer::Container::Map< SymbolicExpression::Ptr, SymbolicExpression::Ptr > | ExprToMem |
Public Types inherited from Rose::BinaryAnalysis::SymbolicExpressionParser::OperatorExpansion | |
typedef Sawyer::SharedPointer< OperatorExpansion > | Ptr |
Shared-ownership pointer. | |
Public Types inherited from Rose::BinaryAnalysis::SymbolicExpressionParser::Expansion | |
typedef Sawyer::SharedPointer< Expansion > | Ptr |
Shared-ownership pointer to an Expansion. | |
Public Member Functions | |
virtual SymbolicExpression::Ptr | immediateExpansion (const Token &name, const SymbolicExpression::Nodes &operands) override |
Operator to expand a list into an expression tree. | |
virtual SymbolicExpression::Ptr | delayedExpansion (const SymbolicExpression::Ptr &, const SymbolicExpressionParser *) override |
Substitute one expression with another. | |
InstructionSemantics::BaseSemantics::RiscOperatorsPtr | riscOperators () const |
Property: Semantic state used during delayed expansion. | |
void | riscOperators (const InstructionSemantics::BaseSemantics::RiscOperatorsPtr &ops) |
Property: Semantic state used during delayed expansion. | |
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. | |
void | docString (const std::string &s) |
Property: Documentation string. | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. | |
SharedObject (const SharedObject &) | |
Copy constructor. | |
virtual | ~SharedObject () |
Virtual destructor. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
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 |
typedef Sawyer::SharedPointer<MemorySubstituter> Rose::BinaryAnalysis::SymbolicExpressionParser::MemorySubstituter::Ptr |
Shared-ownership pointer.
See Shared ownership.
Definition at line 371 of file SymbolicExpressionParser.h.
typedef Sawyer::Container::Map<SymbolicExpression::Ptr , SymbolicExpression::Ptr > Rose::BinaryAnalysis::SymbolicExpressionParser::MemorySubstituter::ExprToMem |
Definition at line 374 of file SymbolicExpressionParser.h.
|
inlineprotected |
Definition at line 381 of file SymbolicExpressionParser.h.
|
inline |
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 394 of file SymbolicExpressionParser.h.
|
inline |
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 397 of file SymbolicExpressionParser.h.
|
overridevirtual |
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.
|
overridevirtual |
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.