1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryCellMap_H 
    2#define ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryCellMap_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_BINARY_ANALYSIS 
    6#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/MemoryCellState.h> 
   10#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   11#include <boost/serialization/access.hpp> 
   12#include <boost/serialization/base_object.hpp> 
   13#include <boost/serialization/export.hpp> 
   17namespace BinaryAnalysis {
 
   18namespace InstructionSemantics {
 
   49    uint32_t lastPosition_ = 0;                         
 
   54#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   56    friend class boost::serialization::access;
 
   59    void serialize(S &s, 
const unsigned ) {
 
   61        s & BOOST_SERIALIZATION_NVP(cells);
 
  127    unsigned nextPosition();
 
  130    unsigned lastPosition() 
const;
 
  131    void lastPosition(
unsigned);
 
 
  139#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
Simple map-based memory state.
 
MemoryCellMapPtr Ptr
Shared-ownership pointer.
 
virtual void eraseLeadingCells(MemoryCell::Predicate &) override
Remove leading matching cells.
 
virtual bool merge(const AddressSpacePtr &other, RiscOperators *addrOps, RiscOperators *valOps) override
Merge address spaces for data flow analysis.
 
virtual void print(std::ostream &, Formatter &) const override
Print an address space.
 
static MemoryCellMapPtr promote(const AddressSpacePtr &)
Promote a base address space pointer to a MemoryCellMap pointer.
 
virtual void writeMemory(const SValuePtr &address, const SValuePtr &value, RiscOperators *addrOps, RiscOperators *valOps) override
Write a value to memory.
 
virtual std::vector< MemoryCellPtr > leadingCells(MemoryCell::Predicate &) const override
Find leading matching cells.
 
virtual bool isAllPresent(const SValuePtr &address, size_t nBytes, RiscOperators *addrOps) const
Predicate to determine whether all bytes are present.
 
virtual CellKey generateCellKey(const SValuePtr &address) const =0
Generate a cell lookup key.
 
virtual AddressSet getWritersIntersection(const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps) override
Writers for an address.
 
virtual void traverse(MemoryCell::Visitor &) override
Traverse and modify cells.
 
virtual void hash(Combinatorics::Hasher &, RiscOperators *addrOps, RiscOperators *valOps) const override
Hash this address space.
 
virtual void eraseMatchingCells(MemoryCell::Predicate &) override
Remove all matching cells.
 
virtual void clear() override
Clear memory.
 
uint64_t CellKey
Key used to look up memory cells.
 
virtual AddressSet getWritersUnion(const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps) override
Writers for an address.
 
virtual SValuePtr readMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps) override
Read a value from memory.
 
Sawyer::Container::Map< CellKey, MemoryCellPtr > CellMap
Map of memory cells indexed by cell keys.
 
virtual SValuePtr peekMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps) override
Read a value from memory without side effects.
 
virtual MemoryCellPtr findCell(const SValuePtr &addr) const
Look up memory cell for address.
 
virtual std::vector< MemoryCellPtr > matchingCells(MemoryCell::Predicate &) const override
Find all matching cells.
 
Predicate for matching cells.
 
Visitor for traversing a cells.
 
Base class for most instruction semantics RISC operators.
 
Container associating values with keys.
 
Base classes for instruction semantics.
 
boost::shared_ptr< MemoryCell > MemoryCellPtr
Shared-ownership pointer to a memory cell.
 
boost::shared_ptr< class MemoryCellMap > MemoryCellMapPtr
Shared-ownership pointer to a map-based memory state.
 
boost::shared_ptr< AddressSpace > AddressSpacePtr
Shared-ownership pointer for AddressSpace objects.