1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryCellList_H 
    2#define ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryCellList_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_BINARY_ANALYSIS 
    6#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/MemoryCellState.h> 
    7#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/RiscOperators.h> 
    9#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   10#include <boost/serialization/access.hpp> 
   11#include <boost/serialization/base_object.hpp> 
   12#include <boost/serialization/export.hpp> 
   16namespace BinaryAnalysis {
 
   17namespace InstructionSemantics {
 
   51    bool occlusionsErased_;                             
 
   55#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   57    friend class boost::serialization::access;
 
   60    void serialize(S &s, 
const unsigned ) {
 
   62        s & BOOST_SERIALIZATION_NVP(cells);
 
   63        s & BOOST_SERIALIZATION_NVP(occlusionsErased_);
 
  198    template<
class Iterator>
 
  201        ASSERT_not_null(addr);
 
  204        for (; cursor!=cells.end(); ++cursor) {
 
  205            if (tempCell->mayAlias(*cursor, addrOps)) {
 
  206                retval.push_back(*cursor);
 
  207                if (tempCell->mustAlias(*cursor, addrOps))
 
 
 
  251#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
Simple list-based memory state.
 
virtual void clear() override
Clear memory.
 
virtual const CellList & get_cells() const
Returns the list of all memory cells.
 
virtual void traverse(MemoryCell::Visitor &) override
Traverse and modify cells.
 
virtual SValuePtr peekMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps) override
Read a value from memory without side effects.
 
virtual std::vector< MemoryCellPtr > matchingCells(MemoryCell::Predicate &) const override
Find all matching cells.
 
static MemoryCellListPtr instance(const MemoryCellListPtr &other)
Instantiate a new copy of an existing memory state.
 
bool mergeWithAliasing(const AddressSpacePtr &other, RiscOperators *addrOps, RiscOperators *valOps)
Merge two states with aliasing.
 
virtual CellList & get_cells()
Returns the list of all memory cells.
 
MemoryCellListPtr Ptr
Shared-ownership pointer.
 
virtual AddressSpacePtr clone() const override
Deep-copy of this address space.
 
virtual MemoryStatePtr create(const MemoryCellPtr &protocell) const
Virtual allocating constructor.
 
void occlusionsErased(bool b)
Property: erase occluded cells.
 
virtual AddressSet getWritersIntersection(const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps) override
Writers for an address.
 
virtual std::vector< MemoryCellPtr > leadingCells(MemoryCell::Predicate &) const override
Find leading matching cells.
 
CellList scan(Iterator &cursor, const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps) const
Scan cell list to find matching cells.
 
virtual void eraseLeadingCells(MemoryCell::Predicate &) override
Remove leading matching cells.
 
virtual void hash(Combinatorics::Hasher &, RiscOperators *addrOps, RiscOperators *valOps) const override
Hash this address space.
 
virtual bool isAllPresent(const SValuePtr &address, size_t nBytes, RiscOperators *addrOps, RiscOperators *valOps) const
Predicate to determine whether all bytes are present.
 
static MemoryCellListPtr promote(const BaseSemantics::AddressSpacePtr &m)
Promote a base address space pointer to a BaseSemantics::MemoryCellList pointer.
 
virtual void writeMemory(const SValuePtr &addr, const SValuePtr &value, RiscOperators *addrOps, RiscOperators *valOps) override
Write a value to memory.
 
virtual SValuePtr readMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps) override
Read a value from memory.
 
bool occlusionsErased() const
Property: erase occluded cells.
 
virtual MemoryStatePtr create(const SValuePtr &addrProtoval, const SValuePtr &valProtoval) const override
Virtual allocating constructor.
 
virtual AddressSet getWritersUnion(const SValuePtr &addr, size_t nBits, RiscOperators *addrOps, RiscOperators *valOps) override
Writers for an address.
 
static MemoryCellListPtr instance(const SValuePtr &addrProtoval, const SValuePtr &valProtoval)
Instantiate a new prototypical memory state.
 
static MemoryCellListPtr instance(const MemoryCellPtr &protocell)
Instantiate a new memory state with prototypical memory cell.
 
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.
 
virtual void eraseMatchingCells(MemoryCell::Predicate &) override
Remove all matching cells.
 
bool mergeNoAliasing(const AddressSpacePtr &other, RiscOperators *addrOps, RiscOperators *valOps)
Merge two states without aliasing.
 
Predicate for matching cells.
 
Visitor for traversing a cells.
 
Base class for most instruction semantics RISC operators.
 
virtual SValuePtr undefined_(size_t nbits)
Returns a new undefined value.
 
Base classes for instruction semantics.
 
boost::shared_ptr< MemoryState > MemoryStatePtr
Shared-ownership pointer to a memory state.
 
boost::shared_ptr< MemoryCell > MemoryCellPtr
Shared-ownership pointer to a memory cell.
 
std::list< MemoryCellPtr > CellList
List of memory cells.
 
boost::shared_ptr< class MemoryCellList > MemoryCellListPtr
Shared-ownership pointer to a list-based memory state.
 
boost::shared_ptr< AddressSpace > AddressSpacePtr
Shared-ownership pointer for AddressSpace objects.