ROSE
0.11.21.0
|
Cell-based memory state.
This is the base class for cell-based memory states.
Definition at line 24 of file MemoryCellState.h.
#include <MemoryCellState.h>
Public Member Functions | |
virtual void | clear () ROSE_OVERRIDE |
virtual MemoryCell::AddressSet | getWritersUnion (const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps)=0 |
Writers for an address. More... | |
virtual MemoryCell::AddressSet | getWritersIntersection (const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps)=0 |
Writers for an address. More... | |
virtual std::vector< MemoryCellPtr > | matchingCells (const MemoryCell::Predicate &) const =0 |
Find all matching cells. More... | |
virtual std::vector< MemoryCellPtr > | leadingCells (const MemoryCell::Predicate &) const =0 |
Find leading matching cells. More... | |
virtual void | eraseMatchingCells (const MemoryCell::Predicate &)=0 |
Remove all matching cells. More... | |
virtual void | eraseLeadingCells (const MemoryCell::Predicate &)=0 |
Remove leading matching cells. More... | |
virtual void | traverse (MemoryCell::Visitor &)=0 |
Traverse and modify cells. More... | |
void | eraseNonWritten () |
Erase cells that have no writers. More... | |
std::vector< MemoryCellPtr > | allCells () const |
All cells. More... | |
virtual MemoryCellPtr | latestWrittenCell () const |
Property: Cell most recently written. | |
virtual void | latestWrittenCell (const MemoryCellPtr &cell) |
Property: Cell most recently written. | |
Static Public Member Functions | |
static MemoryCellStatePtr | promote (const BaseSemantics::MemoryStatePtr &m) |
Promote a base memory state pointer to a BaseSemantics::MemoryCellState pointer. More... | |
Protected Member Functions | |
MemoryCellState (const MemoryCellPtr &protocell) | |
MemoryCellState (const SValuePtr &addrProtoval, const SValuePtr &valProtoval) | |
MemoryCellState (const MemoryCellState &other) | |
Protected Attributes | |
MemoryCellPtr | protocell |
MemoryCellPtr | latestWrittenCell_ |
|
inlinestatic |
Promote a base memory state pointer to a BaseSemantics::MemoryCellState pointer.
The memory state m
must have a BaseSemantics::MemoryCellState dynamic type.
Definition at line 56 of file MemoryCellState.h.
|
pure virtual |
Writers for an address.
Returns the set of all writers that wrote to the specified address or any address that might alias the specified address. Memory states that don't normally compute aliases (e.g., MemoryCellMap) return only the writers for the specified address, not any aliases, and in this case getWritersUnion and getWritersIntersection return the same set.
Implemented in Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellList, and Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellMap.
|
pure virtual |
Writers for an address.
Returns the set of all writers that wrote to the specified address and any address that might alias the specified address. Memory states that don't normally compute aliases (e.g., MemoryCellMap) return only the writers for the specified address, not any aliases, and in this case getWritersUnion and getWritersIntersection return the same set.
Implemented in Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellList, and Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellMap.
|
pure virtual |
Find all matching cells.
Returns a vector of cells for which the predicate
returns true.
Implemented in Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellList, and Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellMap.
Referenced by allCells().
|
pure virtual |
Find leading matching cells.
Returns the vector of cells obtained by invoking the predicate on each cell and returning those leading cells for which the predicate is true. The first cell for which the predicate is false terminates the traversal and does not appear in the return value.
Implemented in Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellList, and Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellMap.
|
pure virtual |
Remove all matching cells.
Traverses the memory cells and removes those for which the predicate returns true.
Implemented in Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellList, and Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellMap.
Referenced by eraseNonWritten().
|
pure virtual |
Remove leading matching cells.
Traverses the memory cells and removes those for which the predicate returns true. The traversal is terminated the first time the predicate returns false.
Implemented in Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellList, and Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellMap.
|
pure virtual |
Traverse and modify cells.
Traverse cells and optionally modify them.
Implemented in Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellList, and Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::MemoryCellMap.
|
inline |
Erase cells that have no writers.
Definition at line 124 of file MemoryCellState.h.
References eraseMatchingCells().
|
inline |