ROSE  0.9.9.109
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super > Class Template Reference

Description

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
class Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >

Memory state.

Reading from an address that is either not writable (lacks MemoryMap::WRITABLE) or which is initialized (has MemoryMap::INITIALIZED) obtains the data directly from the memory map.

Addresses for each read operation are saved in a list which is nominally reset at the beginning of each instruction.

Definition at line 37 of file Semantics.h.

#include <Semantics.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >:
Collaboration graph
[legend]

Public Types

typedef boost::shared_ptr< MemoryStatePtr
 Shared-ownership pointer to a MemoryState. More...
 

Public Member Functions

virtual InstructionSemantics2::BaseSemantics::MemoryStatePtr create (const InstructionSemantics2::BaseSemantics::SValuePtr &addrProtoval, const InstructionSemantics2::BaseSemantics::SValuePtr &valProtoval) const ROSE_OVERRIDE
 Virtual constructor. More...
 
virtual InstructionSemantics2::BaseSemantics::MemoryStatePtr create (const InstructionSemantics2::BaseSemantics::MemoryCellPtr &protocell) const ROSE_OVERRIDE
 Virtual constructor. More...
 
virtual InstructionSemantics2::BaseSemantics::MemoryStatePtr clone () const ROSE_OVERRIDE
 Virtual copy constructor. More...
 
virtual InstructionSemantics2::BaseSemantics::SValuePtr readMemory (const InstructionSemantics2::BaseSemantics::SValuePtr &addr, const InstructionSemantics2::BaseSemantics::SValuePtr &dflt, InstructionSemantics2::BaseSemantics::RiscOperators *addrOps, InstructionSemantics2::BaseSemantics::RiscOperators *valOps) ROSE_OVERRIDE
 
virtual void writeMemory (const InstructionSemantics2::BaseSemantics::SValuePtr &addr, const InstructionSemantics2::BaseSemantics::SValuePtr &value, InstructionSemantics2::BaseSemantics::RiscOperators *addrOps, InstructionSemantics2::BaseSemantics::RiscOperators *valOps) ROSE_OVERRIDE
 
bool enabled () const
 Property: Enabled. More...
 
void enabled (bool b)
 Property: Enabled. More...
 
MemoryMap::Ptr memoryMap () const
 The memory map for the specimen. More...
 
void memoryMap (const MemoryMap::Ptr &map)
 The memory map for the specimen. More...
 
const std::vector< SValuePtr > & addressesRead () const
 Property: concrete virtual addresses that were read.
 
std::vector< SValuePtr > & addressesRead ()
 Property: concrete virtual addresses that were read.
 

Static Public Member Functions

static Ptr instance (const InstructionSemantics2::BaseSemantics::MemoryCellPtr &protocell)
 Instantiates a new memory state having specified prototypical cells and value. More...
 
static Ptr instance (const InstructionSemantics2::BaseSemantics::SValuePtr &addrProtoval, const InstructionSemantics2::BaseSemantics::SValuePtr &valProtoval)
 Instantiates a new memory state having specified prototypical value. More...
 
static Ptr instance (const Ptr &other)
 Instantiates a new deep copy of an existing state. More...
 
static Ptr promote (const InstructionSemantics2::BaseSemantics::MemoryStatePtr &x)
 Recasts a base pointer to a symbolic memory state. More...
 

Protected Member Functions

 MemoryState (const InstructionSemantics2::BaseSemantics::MemoryCellPtr &protocell)
 
 MemoryState (const InstructionSemantics2::BaseSemantics::SValuePtr &addrProtoval, const InstructionSemantics2::BaseSemantics::SValuePtr &valProtoval)
 

Member Typedef Documentation

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
typedef boost::shared_ptr<MemoryState> Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::Ptr

Shared-ownership pointer to a MemoryState.

See Shared ownership.

Definition at line 40 of file Semantics.h.

Member Function Documentation

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
static Ptr Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::instance ( const InstructionSemantics2::BaseSemantics::MemoryCellPtr protocell)
inlinestatic

Instantiates a new memory state having specified prototypical cells and value.

Definition at line 73 of file Semantics.h.

Referenced by Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::create(), and Rose::BinaryAnalysis::Partitioner2::Semantics::RiscOperators::instance().

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
static Ptr Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::instance ( const InstructionSemantics2::BaseSemantics::SValuePtr addrProtoval,
const InstructionSemantics2::BaseSemantics::SValuePtr valProtoval 
)
inlinestatic

Instantiates a new memory state having specified prototypical value.

Definition at line 78 of file Semantics.h.

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
static Ptr Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::instance ( const Ptr other)
inlinestatic

Instantiates a new deep copy of an existing state.

Definition at line 84 of file Semantics.h.

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
virtual InstructionSemantics2::BaseSemantics::MemoryStatePtr Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::create ( const InstructionSemantics2::BaseSemantics::SValuePtr addrProtoval,
const InstructionSemantics2::BaseSemantics::SValuePtr valProtoval 
) const
inlinevirtual

Virtual constructor.

Creates a memory state having specified prototypical value.

Definition at line 91 of file Semantics.h.

References Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::instance().

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
virtual InstructionSemantics2::BaseSemantics::MemoryStatePtr Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::create ( const InstructionSemantics2::BaseSemantics::MemoryCellPtr protocell) const
inlinevirtual

Virtual constructor.

Creates a new memory state having specified prototypical cells and value.

Definition at line 98 of file Semantics.h.

References Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::instance().

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
virtual InstructionSemantics2::BaseSemantics::MemoryStatePtr Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::clone ( ) const
inlinevirtual

Virtual copy constructor.

Creates a new deep copy of this memory state.

Definition at line 104 of file Semantics.h.

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
static Ptr Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::promote ( const InstructionSemantics2::BaseSemantics::MemoryStatePtr x)
inlinestatic

Recasts a base pointer to a symbolic memory state.

This is a checked cast that will fail if the specified pointer does not point to an object of our class.

Definition at line 112 of file Semantics.h.

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
bool Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::enabled ( ) const
inline

Property: Enabled.

A memory state can be disabled, in which case writes are ignored and reads always return a copy of the provided default value. Disabling a memory state is useful for certain data-flow analyses that don't need memory.

Definition at line 125 of file Semantics.h.

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
void Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::enabled ( bool  b)
inline

Property: Enabled.

A memory state can be disabled, in which case writes are ignored and reads always return a copy of the provided default value. Disabling a memory state is useful for certain data-flow analyses that don't need memory.

Definition at line 126 of file Semantics.h.

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
MemoryMap::Ptr Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::memoryMap ( ) const
inline

The memory map for the specimen.

If this memory map exists and contains segments that have read permission but lack write permission, then any reads from such addresses will return the concrete values read from the map. Any writes to such addresses will cause warnings and no operation to be performed.

Definition at line 136 of file Semantics.h.

template<class Super = InstructionSemantics2::SymbolicSemantics::MemoryListState>
void Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::memoryMap ( const MemoryMap::Ptr map)
inline

The memory map for the specimen.

If this memory map exists and contains segments that have read permission but lack write permission, then any reads from such addresses will return the concrete values read from the map. Any writes to such addresses will cause warnings and no operation to be performed.

Definition at line 137 of file Semantics.h.


The documentation for this class was generated from the following file: