ROSE  0.11.51.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::ModelChecker::P2Model::State Class Reference

Description

Semantic state.

Definition at line 220 of file P2Model.h.

#include <P2Model.h>

Inheritance diagram for Rose::BinaryAnalysis::ModelChecker::P2Model::State:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::ModelChecker::P2Model::State:
Collaboration graph
[legend]

Public Types

using Super = InstructionSemantics2::SymbolicSemantics::State
 Base type. More...
 
using Ptr = StatePtr
 Shared-ownership pointer. More...
 
- Public Types inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::State
using Ptr = StatePtr
 Shared-ownership pointer for a State. More...
 

Public Member Functions

virtual InstructionSemantics2::BaseSemantics::StatePtr create (const InstructionSemantics2::BaseSemantics::RegisterStatePtr &registers, const InstructionSemantics2::BaseSemantics::MemoryStatePtr &memory) const override
 Virtual constructor. More...
 
virtual InstructionSemantics2::BaseSemantics::StatePtr clone () const override
 Virtual copy constructor. More...
 
const FunctionCallStackcallStack () const
 Function call stack. More...
 
FunctionCallStackcallStack ()
 Function call stack. More...
 
- Public Member Functions inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::State
SValuePtr protoval () const
 Return the protoval. More...
 
virtual void clear ()
 Initialize state. More...
 
void zeroRegisters ()
 Initialize all registers to zero. More...
 
virtual void zero_registers ()
 
void clearMemory ()
 Clear all memory locations. More...
 
virtual void clear_memory ()
 
RegisterStatePtr registerState () const
 Property: Register state. More...
 
MemoryStatePtr memoryState () const
 Property: Memory state. More...
 
virtual SValuePtr readRegister (RegisterDescriptor desc, const SValuePtr &dflt, RiscOperators *ops)
 Read a value from a register. More...
 
virtual SValuePtr peekRegister (RegisterDescriptor desc, const SValuePtr &dflt, RiscOperators *ops)
 Read register without side effects. More...
 
virtual void writeRegister (RegisterDescriptor desc, const SValuePtr &value, RiscOperators *ops)
 Write a value to a register. More...
 
virtual SValuePtr readMemory (const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps)
 Read a value from memory. More...
 
virtual SValuePtr peekMemory (const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps)
 Read from memory without side effects. More...
 
virtual void writeMemory (const SValuePtr &addr, const SValuePtr &value, RiscOperators *addrOps, RiscOperators *valOps)
 Write a value to memory. More...
 
virtual void hash (Combinatorics::Hasher &, RiscOperators *addrOps, RiscOperators *valOps) const
 Compute a hash of the state. More...
 
std::string toString () const
 Convert the state to a string for debugging. More...
 
virtual bool merge (const StatePtr &other, RiscOperators *ops)
 Merge operation for data flow analysis. More...
 
void printRegisters (std::ostream &stream, const std::string &prefix="")
 Print the register contents. More...
 
virtual void printRegisters (std::ostream &stream, Formatter &fmt) const
 Print the register contents. More...
 
void printMemory (std::ostream &stream, const std::string &prefix="") const
 Print memory contents. More...
 
virtual void printMemory (std::ostream &stream, Formatter &fmt) const
 Print memory contents. More...
 
void print (std::ostream &stream, const std::string &prefix="") const
 Print the state. More...
 
virtual void print (std::ostream &, Formatter &) const
 Print the state. More...
 
WithFormatter with_format (Formatter &fmt)
 Used for printing states with formatting. More...
 
WithFormatter operator+ (Formatter &fmt)
 Used for printing states with formatting. More...
 
WithFormatter operator+ (const std::string &linePrefix)
 Used for printing states with formatting. More...
 

Static Public Member Functions

static Ptr instance (const InstructionSemantics2::BaseSemantics::RegisterStatePtr &, const InstructionSemantics2::BaseSemantics::MemoryStatePtr &)
 Allocating constructor. More...
 
static Ptr instance (const StatePtr &)
 Deep-copy allocating constructor. More...
 
static Ptr promote (const InstructionSemantics2::BaseSemantics::StatePtr &)
 Checked dynamic cast. More...
 
- Static Public Member Functions inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::State
static StatePtr instance (const RegisterStatePtr &registers, const MemoryStatePtr &memory)
 Instantiate a new state object with specified register and memory states. More...
 
static StatePtr instance (const StatePtr &other)
 Instantiate a new copy of an existing state. More...
 
static StatePtr promote (const StatePtr &x)
 

Protected Member Functions

 State (const InstructionSemantics2::BaseSemantics::RegisterStatePtr &, const InstructionSemantics2::BaseSemantics::MemoryStatePtr &)
 
 State (const State &)
 
- Protected Member Functions inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::State
 State (const RegisterStatePtr &registers, const MemoryStatePtr &memory)
 
 State (const State &other)
 

Member Typedef Documentation

Base type.

Definition at line 223 of file P2Model.h.

Shared-ownership pointer.

Definition at line 226 of file P2Model.h.

Member Function Documentation

static Ptr Rose::BinaryAnalysis::ModelChecker::P2Model::State::instance ( const InstructionSemantics2::BaseSemantics::RegisterStatePtr ,
const InstructionSemantics2::BaseSemantics::MemoryStatePtr  
)
static

Allocating constructor.

Referenced by create().

static Ptr Rose::BinaryAnalysis::ModelChecker::P2Model::State::instance ( const StatePtr )
static

Deep-copy allocating constructor.

virtual InstructionSemantics2::BaseSemantics::StatePtr Rose::BinaryAnalysis::ModelChecker::P2Model::State::create ( const InstructionSemantics2::BaseSemantics::RegisterStatePtr registers,
const InstructionSemantics2::BaseSemantics::MemoryStatePtr memory 
) const
inlineoverridevirtual

Virtual constructor.

Reimplemented from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::State.

Definition at line 249 of file P2Model.h.

References instance().

virtual InstructionSemantics2::BaseSemantics::StatePtr Rose::BinaryAnalysis::ModelChecker::P2Model::State::clone ( ) const
overridevirtual

Virtual copy constructor.

Reimplemented from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::State.

static Ptr Rose::BinaryAnalysis::ModelChecker::P2Model::State::promote ( const InstructionSemantics2::BaseSemantics::StatePtr )
static

Checked dynamic cast.

const FunctionCallStack& Rose::BinaryAnalysis::ModelChecker::P2Model::State::callStack ( ) const

Function call stack.

The stack of functions whose calls are in progress. The top of the stack is the most recent function call.

FunctionCallStack& Rose::BinaryAnalysis::ModelChecker::P2Model::State::callStack ( )

Function call stack.

The stack of functions whose calls are in progress. The top of the stack is the most recent function call.


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