CBMC
|
Patterns of expressions that should be replaced. More...
#include <linker_script_merge.h>
Public Member Functions | |
replacement_predicatet (const std::string &description, const std::function< const symbol_exprt &(const exprt &)> inner_symbol, const std::function< bool(const exprt &)> match) | |
const std::string & | description () const |
a textual description of the expression that we're trying to match More... | |
const symbol_exprt & | inner_symbol (const exprt &expr) const |
Return the underlying symbol of the matched expression. More... | |
bool | match (const exprt &expr) const |
Predicate: does the given expression match an interesting pattern? More... | |
Private Attributes | |
std::string | _description |
std::function< const symbol_exprt &(const exprt &)> | _inner_symbol |
std::function< bool(const exprt &)> | _match |
Patterns of expressions that should be replaced.
Each instance of this class describes an expression 'shape' that should be replaced with a different expression. The intention is that if some expression matches the pattern described by this replacement_predicatet (i.e. replacement_predicatet::match() returns true), then that expression should be replaced by a new expression.
Definition at line 27 of file linker_script_merge.h.
|
inline |
Definition at line 30 of file linker_script_merge.h.
|
inline |
a textual description of the expression that we're trying to match
Definition at line 38 of file linker_script_merge.h.
|
inline |
Return the underlying symbol of the matched expression.
Definition at line 45 of file linker_script_merge.h.
|
inline |
Predicate: does the given expression match an interesting pattern?
If this function returns true, the entire expression should be replaced by a pointer whose underlying symbol is the symbol returned by replacement_predicatet::inner_symbol().
Definition at line 55 of file linker_script_merge.h.
|
private |
Definition at line 61 of file linker_script_merge.h.
|
private |
Definition at line 62 of file linker_script_merge.h.
|
private |
Definition at line 63 of file linker_script_merge.h.