3#ifndef ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_SymbolicMemory_H
4#define ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_SymbolicMemory_H
5#include <featureTests.h>
6#ifdef ROSE_ENABLE_BINARY_ANALYSIS
8#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/MemoryState.h>
9#include <Rose/BinaryAnalysis/SymbolicExpression.h>
12namespace BinaryAnalysis {
13namespace InstructionSemantics {
Represents all memory in the state.
Base class for most instruction semantics RISC operators.
Purely symbolic memory state.
void expression(const SymbolicExpression::Ptr &mem)
Property: the symbolic expression for the memory.
virtual SValuePtr peekMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps) override
Read a value from memory without side effects.
virtual bool merge(const AddressSpacePtr &other, RiscOperators *addrOps, RiscOperators *valOps) override
Merge address spaces for data flow analysis.
SymbolicMemoryPtr Ptr
Shared-ownership pointer.
virtual void hash(Combinatorics::Hasher &, RiscOperators *addrOps, RiscOperators *valOps) const override
Hash this address space.
virtual void writeMemory(const SValuePtr &address, const SValuePtr &value, RiscOperators *addrOps, RiscOperators *valOps) override
Write a value to memory.
static SymbolicMemoryPtr promote(const AddressSpacePtr &)
Convert pointer to a SymbolicMemory pointer.
static SymbolicMemoryPtr instance(const SValuePtr &addrProtoval, const SValuePtr &valProtoval)
Instantiate a new empty memory state on the heap.
virtual void clear() override
Clear memory.
virtual AddressSpacePtr clone() const override
Deep-copy of this address space.
SymbolicExpression::Ptr expression() const
Property: the symbolic expression for the memory.
virtual SValuePtr readMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps) override
Read a value from memory.
virtual void print(std::ostream &, Formatter &) const override
Print an address space.
virtual MemoryStatePtr create(const SValuePtr &addrProtoval, const SValuePtr &valProtoval) const override
Virtual allocating constructor.
Base classes for instruction semantics.
boost::shared_ptr< MemoryState > MemoryStatePtr
Shared-ownership pointer to a memory state.
boost::shared_ptr< class SymbolicMemory > SymbolicMemoryPtr
Shared-ownership pointer for symbolic memory state.
boost::shared_ptr< AddressSpace > AddressSpacePtr
Shared-ownership pointer for AddressSpace objects.