1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryCellState_H
2#define ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryCellState_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
6#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/MemoryCell.h>
7#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/MemoryState.h>
9#include <boost/serialization/access.hpp>
10#include <boost/serialization/base_object.hpp>
11#include <boost/serialization/export.hpp>
14namespace BinaryAnalysis {
15namespace InstructionSemantics {
33#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
35 friend class boost::serialization::access;
38 void serialize(S &s,
const unsigned ) {
39 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
MemoryState);
40 s & BOOST_SERIALIZATION_NVP(protocell);
41 s & BOOST_SERIALIZATION_NVP(latestWrittenCell_);
144#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
virtual std::vector< MemoryCellPtr > matchingCells(MemoryCell::Predicate &) const =0
Find all matching cells.
void eraseNonWritten()
Erase cells that have no writers.
virtual void updateReadProperties(const CellList &)
Adjust I/O properties after reading memory.
std::vector< MemoryCellPtr > allCells() const
All cells.
virtual AddressSet getWritersIntersection(const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps)=0
Writers for an address.
virtual MemoryCellPtr latestWrittenCell() const
Property: Cell most recently written.
MemoryCellStatePtr Ptr
Shared-ownership pointer.
virtual void eraseMatchingCells(MemoryCell::Predicate &)=0
Remove all matching cells.
virtual void eraseLeadingCells(MemoryCell::Predicate &)=0
Remove leading matching cells.
virtual void updateWriteProperties(const CellList &, InputOutputPropertySet)
Adjust I/O properties after writing memory.
virtual std::vector< MemoryCellPtr > leadingCells(MemoryCell::Predicate &) const =0
Find leading matching cells.
virtual void traverse(MemoryCell::Visitor &)=0
Traverse and modify cells.
virtual void clear() override
Clear memory.
virtual AddressSet getWritersUnion(const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps)=0
Writers for an address.
virtual void latestWrittenCell(const MemoryCellPtr &)
Property: Cell most recently written.
static MemoryCellStatePtr promote(const BaseSemantics::AddressSpacePtr &)
Promote a base address space pointer to a BaseSemantics::MemoryCellState pointer.
Predicate for matching cells.
Visitor for traversing a cells.
Represents all memory in the state.
Base class for most instruction semantics RISC operators.
Base classes for instruction semantics.
boost::shared_ptr< MemoryCell > MemoryCellPtr
Shared-ownership pointer to a memory cell.
std::list< MemoryCellPtr > CellList
List of memory cells.
boost::shared_ptr< class MemoryCellState > MemoryCellStatePtr
Shared-ownership pointer to a cell-based memory state.
boost::shared_ptr< AddressSpace > AddressSpacePtr
Shared-ownership pointer for AddressSpace objects.