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


Expand unrecognized terms to placholder variables.

When parsing a symbolic expression, any unrecognized variable names such as "foo" will be replaced with a new symbolic variable such as "v48722" and a record of the substitution is saved in this object. The same name is always substituted with the same placeholder.

Definition at line 411 of file SymbolicExprParser.h.

#include <SymbolicExprParser.h>

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

Public Types

typedef Sawyer::SharedPointer< TermPlaceholdersPtr
 Shared-ownership pointer. More...
typedef Sawyer::Container::BiMap< std::string, SymbolicExpr::PtrNameToVarMap
 Mapping between term names and placeholder variables. More...
- Public Types inherited from Rose::BinaryAnalysis::SymbolicExprParser::AtomExpansion
typedef Sawyer::SharedPointer< AtomExpansionPtr
 Shared-ownership pointer to an AtomExpansion. More...
- Public Types inherited from Rose::BinaryAnalysis::SymbolicExprParser::Expansion
typedef Sawyer::SharedPointer< ExpansionPtr
 Shared-ownership pointer to an Expansion. More...

Public Member Functions

const NameToVarMapmap () const
 Mapping between terms and variables. More...
SymbolicExpr::Ptr immediateExpansion (const SymbolicExprParser::Token &) ROSE_OVERRIDE
 Expand a parsed atom into some other expression. More...
- Public Member Functions inherited from Rose::BinaryAnalysis::SymbolicExprParser::Expansion
virtual SymbolicExpr::Ptr delayedExpansion (const SymbolicExpr::Ptr &src, const SymbolicExprParser *parser)
 Substitute one expression with another. More...
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 ()
 Allocating constructor. More...

Member Typedef Documentation

Shared-ownership pointer.

See Shared ownership.

Definition at line 414 of file SymbolicExprParser.h.

Mapping between term names and placeholder variables.

Definition at line 417 of file SymbolicExprParser.h.

Member Function Documentation

static Ptr Rose::BinaryAnalysis::SymbolicExprParser::TermPlaceholders::instance ( )

Allocating constructor.

const NameToVarMap& Rose::BinaryAnalysis::SymbolicExprParser::TermPlaceholders::map ( ) const

Mapping between terms and variables.

Definition at line 430 of file SymbolicExprParser.h.

SymbolicExpr::Ptr Rose::BinaryAnalysis::SymbolicExprParser::TermPlaceholders::immediateExpansion ( const SymbolicExprParser::Token name)

Expand a parsed atom into some other expression.

This method takes a token parsed from the input and optionally replaces it with some other expression. For instance, a subclass that recognizes the token "true" would replace it with a single-bit constant 1. If this object does not recognize the token, it should return a null pointer. This phase of expansion occurs immediately during parsing; a second phase may occur later.

Implements Rose::BinaryAnalysis::SymbolicExprParser::AtomExpansion.

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