1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryCell_H 
    2#define ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryCell_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_BINARY_ANALYSIS 
    5#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/BasicTypes.h> 
    7#include <Rose/BinaryAnalysis/AddressSet.h> 
    8#include <Combinatorics.h>                               
   10#include <Sawyer/Set.h> 
   12#include <boost/enable_shared_from_this.hpp> 
   14#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   15#include <boost/serialization/access.hpp> 
   16#include <boost/serialization/export.hpp> 
   17#include <boost/serialization/list.hpp> 
   23namespace BinaryAnalysis {
 
   24namespace InstructionSemantics {
 
   35class MemoryCell: 
public boost::enable_shared_from_this<MemoryCell> {
 
   79    unsigned position_ = 0;                             
 
   83#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   85    friend class boost::serialization::access;
 
   88    void serialize(S &s, 
const unsigned version) {
 
   89        s & BOOST_SERIALIZATION_NVP(address_);
 
   90        s & BOOST_SERIALIZATION_NVP(value_);
 
   91        s & BOOST_SERIALIZATION_NVP(writers_);
 
   92        s & BOOST_SERIALIZATION_NVP(ioProperties_);
 
   94            s & BOOST_SERIALIZATION_NVP(position_);
 
  253    void print(std::ostream &stream) 
const;
 
  263        void print(std::ostream &stream)
 const { obj->print(stream, fmt); }
 
 
 
  282std::ostream& operator<<(std::ostream&, 
const MemoryCell&);
 
  290#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
Predicate that always returns true.
 
virtual bool operator()(const MemoryCellPtr &) override
Invoked for some cell.
 
Predicate for non-written cells.
 
virtual bool operator()(const MemoryCellPtr &) override
Invoked for some cell.
 
Predicate for matching cells.
 
virtual bool operator()(const MemoryCellPtr &)=0
Invoked for some cell.
 
Visitor for traversing a cells.
 
Represents one location in memory.
 
virtual MemoryCellPtr clone() const
Creates a new deep-copy of this memory cell.
 
MemoryCellPtr Ptr
Shared-ownership pointer.
 
WithFormatter operator+(Formatter &)
Used for printing states with formatting.
 
virtual SValuePtr address() const
Property: Memory cell address.
 
virtual bool eraseWriters(const AddressSet &writerVas)
Erase specified writers.
 
unsigned position() const
Property: Position in listings.
 
bool mustAlias(const MemoryCellPtr &other, RiscOperators *addrOps) const
Test whether two memory cells must alias one another.
 
void position(unsigned p)
Property: Position in listings.
 
virtual void address(const SValuePtr &addr)
Property: Memory cell address.
 
InputOutputPropertySet & ioProperties()
Properties: Boolean property set.
 
virtual void value(const SValuePtr &v)
Property: Memory cell value.
 
bool eraseWriter(Address writerVa)
Erase specified writers.
 
static MemoryCellPtr instance(const MemoryCellPtr &other)
Instantiates a new copy of an existing cell.
 
bool insertWriter(Address writerVa)
Insert writer information.
 
virtual bool insertWriters(const AddressSet &writerVas)
Insert writer information.
 
void setWriter(Address writerVa)
Sets writer information.
 
virtual void eraseWriters()
Erase all writers.
 
virtual void print(std::ostream &, Formatter &) const
Print the memory cell on a single line.
 
virtual const AddressSet & getWriters() const
Get writer information.
 
WithFormatter with_format(Formatter &)
Used for printing states with formatting.
 
virtual MemoryCellPtr create(const SValuePtr &address, const SValuePtr &value)
Creates a new memory cell object with the specified address and value.
 
bool mayAlias(const MemoryCellPtr &other, RiscOperators *addrOps) const
Test whether two memory cells can alias one another.
 
const InputOutputPropertySet & ioProperties() const
Properties: Boolean property set.
 
void print(std::ostream &stream) const
Print the memory cell on a single line.
 
static MemoryCellPtr instance(const SValuePtr &address, const SValuePtr &value)
Instantiates a new memory cell object with the specified address and value.
 
virtual SValuePtr value() const
Property: Memory cell value.
 
WithFormatter operator+(const std::string &linePrefix)
Used for printing states with formatting.
 
virtual void setWriters(const AddressSet &writerVas)
Sets writer information.
 
virtual void hash(Combinatorics::Hasher &) const
Hash the address and value.
 
Base class for most instruction semantics RISC operators.
 
bool insert(const Value &value)
Insert a value.
 
bool erase(const Value &value)
Erase a value.
 
void clear()
Erase all values.
 
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.
 
std::uint64_t Address
Address.