1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryState_H
2#define ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryState_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/AddressSpace.h>
7#include <Rose/BinaryAnalysis/ByteOrder.h>
9#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
10#include <boost/serialization/access.hpp>
11#include <boost/serialization/export.hpp>
12#include <boost/serialization/shared_ptr.hpp>
16namespace BinaryAnalysis {
17namespace InstructionSemantics {
41#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
43 friend class boost::serialization::access;
46 void serialize(S &s,
const unsigned ) {
48 s & BOOST_SERIALIZATION_NVP(addrProtoval_);
49 s & BOOST_SERIALIZATION_NVP(valProtoval_);
50 s & BOOST_SERIALIZATION_NVP(byteOrder_);
52 s & BOOST_SERIALIZATION_NVP(byteRestricted_);
178#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
Base class for address spaces.
Represents all memory in the state.
void set_byteOrder(ByteOrder::Endianness)
Memory byte order.
virtual MemoryStatePtr create(const SValuePtr &addrProtoval, const SValuePtr &valProtoval) const =0
Virtual allocating constructor.
virtual SValuePtr peekMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps)=0
Read a value from memory without side effects.
SValuePtr get_val_protoval() const
Return the value protoval.
void merger(const MergerPtr &)
Property: Merger.
virtual void writeMemory(const SValuePtr &addr, const SValuePtr &value, RiscOperators *addrOps, RiscOperators *valOps)=0
Write a value to memory.
MergerPtr merger() const
Property: Merger.
ByteOrder::Endianness get_byteOrder() const
Memory byte order.
MemoryStatePtr Ptr
Shared-ownership pointer.
SValuePtr get_addr_protoval() const
Return the address protoval.
virtual void clear()=0
Clear memory.
bool byteRestricted() const
Indicates whether memory cell values are required to be eight bits wide.
virtual SValuePtr readMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps)=0
Read a value from memory.
void byteRestricted(bool)
Indicates whether memory cell values are required to be eight bits wide.
Base class for most instruction semantics RISC operators.
Base classes for instruction semantics.
boost::shared_ptr< MemoryState > MemoryStatePtr
Shared-ownership pointer to a memory state.
boost::shared_ptr< AddressSpace > AddressSpacePtr
Shared-ownership pointer for AddressSpace objects.