|
ROSE 0.11.145.354
|
Represents the entire state of the machine.
This state expects to use a subclass of BaseSemantics::MemoryCellList as its memory state, and does not expect that MemoryCellList to be byte-restricted.
Definition at line 194 of file PartialSymbolicSemantics.h.
#include <Rose/BinaryAnalysis/InstructionSemantics/PartialSymbolicSemantics.h>


Public Types | |
| using | Super = BaseSemantics::State |
| Base type. | |
| using | Ptr = StatePtr |
| Shared-ownership pointer. | |
Public Types inherited from Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::State | |
| using | Ptr = StatePtr |
| Shared-ownership pointer. | |
Public Member Functions | |
| virtual BaseSemantics::StatePtr | create (const BaseSemantics::RegisterStatePtr ®isters, const BaseSemantics::MemoryStatePtr &memory) const override |
| Virtual constructor. | |
| virtual BaseSemantics::StatePtr | clone () const override |
| Virtual copy constructor. | |
| virtual void | print_diff_registers (std::ostream &, const StatePtr &other_state, Formatter &) const |
| Print info about how registers differ. | |
| virtual bool | equal_registers (const StatePtr &other) const |
| Tests registers of two states for equality. | |
| virtual void | discard_popped_memory () |
| Removes from memory those values at addresses below the current stack pointer. | |
Public Member Functions inherited from Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::State | |
| SValuePtr | protoval () const |
| Property: Prototypical value. | |
| void | insertAddressSpace (const AddressSpacePtr &) |
| Insert an address space into this state. | |
| const std::vector< AddressSpacePtr > & | addressSpaces () const |
| The list of all address spaces. | |
| AddressSpacePtr | findFirstAddressSpace (AddressSpacePurpose) const |
| Find the first address space with the specified purpose. | |
| AddressSpacePtr | findFirstAddressSpace (AddressSpacePurpose, const std::string &name) const |
| Find the first address space with the specified purpose and name. | |
| virtual SValuePtr | read (const AddressSpacePtr &, const AddressSpaceAddress &, const SValuePtr &dflt, RiscOperators &addrOps, RiscOperators &valOps) |
| Read a value from an address space. | |
| virtual SValuePtr | peek (const AddressSpacePtr &, const AddressSpaceAddress &, const SValuePtr &dflt, RiscOperators &addrOps, RiscOperators &valOps) |
| Peek at a value in an address space. | |
| virtual void | write (const AddressSpacePtr &, const AddressSpaceAddress &, const SValuePtr &value, RiscOperators &addrOps, RiscOperators &valOps) |
| Write a value to an address space. | |
| virtual bool | merge (const StatePtr &other, RiscOperators *addrOps, RiscOperators *valOps) |
| Merge operation for data flow analysis. | |
| virtual void | clear () |
| Initialize state. | |
| void | zeroRegisters () |
| Initialize all registers to zero. | |
| void | clearMemory () |
| Clear all memory locations. | |
| RegisterStatePtr | registerState () const |
| Property: Register state. | |
| MemoryStatePtr | memoryState () const |
| Property: Memory state. | |
| RegisterStatePtr | interruptState () const |
| Property: Interrupt state. | |
| void | interruptState (const RegisterStatePtr &) |
| Property: Interrupt state. | |
| bool | hasInterruptState () const |
| Tests whether an interrupt state is present. | |
| virtual SValuePtr | readRegister (RegisterDescriptor desc, const SValuePtr &dflt, RiscOperators *ops) |
| Read a value from a register. | |
| virtual SValuePtr | peekRegister (RegisterDescriptor desc, const SValuePtr &dflt, RiscOperators *ops) |
| Read register without side effects. | |
| virtual void | writeRegister (RegisterDescriptor desc, const SValuePtr &value, RiscOperators *ops) |
| Write a value to a register. | |
| virtual SValuePtr | readMemory (const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps) |
| Read a value from memory. | |
| virtual SValuePtr | peekMemory (const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps) |
| Read from memory without side effects. | |
| virtual void | writeMemory (const SValuePtr &addr, const SValuePtr &value, RiscOperators *addrOps, RiscOperators *valOps) |
| Write a value to memory. | |
| virtual SValuePtr | readInterrupt (unsigned major, unsigned minor, const SValuePtr &dflt, RiscOperators *valOps) |
| Read an interrupt state. | |
| virtual SValuePtr | peekInterrupt (unsigned major, unsigned minor, const SValuePtr &dflt, RiscOperators *valOps) |
| Read an interrupt state without side effects. | |
| virtual bool | writeInterrupt (unsigned major, unsigned minor, const SValuePtr &value, RiscOperators *valOps) |
| Write an interrupt state. | |
| SValuePtr | raiseInterrupt (unsigned major, unsigned minor, RiscOperators *valOps) |
| Raise an interrupt. | |
| SValuePtr | clearInterrupt (unsigned major, unsigned minor, RiscOperators *valOps) |
| Clear an interrupt. | |
| bool | isInterruptDefinitelyRaised (unsigned major, unsigned minor, RiscOperators *valOps) |
| Test an interrupt. | |
| bool | isInterruptDefinitelyClear (unsigned major, unsigned minor, RiscOperators *valOps) |
| Test an interrupt. | |
| virtual void | hash (Combinatorics::Hasher &, RiscOperators *addrOps, RiscOperators *valOps) const |
| Compute a hash of the state. | |
| std::string | toString () const |
| Convert the state to a string for debugging. | |
| void | printRegisters (std::ostream &stream, const std::string &prefix="") |
| Print the register contents. | |
| virtual void | printRegisters (std::ostream &stream, Formatter &fmt) const |
| Print the register contents. | |
| void | printMemory (std::ostream &stream, const std::string &prefix="") const |
| Print memory contents. | |
| virtual void | printMemory (std::ostream &stream, Formatter &fmt) const |
| Print memory contents. | |
| void | printInterrupts (std::ostream &, const std::string &prefix="") |
| Print interrupt states. | |
| virtual void | printInterrupts (std::ostream &stream, Formatter &fmt) const |
| Print interrupt states. | |
| void | print (std::ostream &stream, const std::string &prefix="") const |
| Print the state. | |
| virtual void | print (std::ostream &, Formatter &) const |
| Print the state. | |
| WithFormatter | with_format (Formatter &fmt) |
| Used for printing states with formatting. | |
| WithFormatter | operator+ (Formatter &fmt) |
| Used for printing states with formatting. | |
| WithFormatter | operator+ (const std::string &linePrefix) |
| Used for printing states with formatting. | |
Static Public Member Functions | |
| static StatePtr | instance (const BaseSemantics::RegisterStatePtr ®isters, const BaseSemantics::MemoryStatePtr &memory) |
| Instantiates a new instance of memory state with specified register and memory states. | |
| static StatePtr | instance (const StatePtr &other) |
| Instantiates a new copy of an existing state. | |
| static StatePtr | promote (const BaseSemantics::StatePtr &) |
Static Public Member Functions inherited from Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::State | |
| static StatePtr | instance (const RegisterStatePtr ®isters, const MemoryStatePtr &memory, const RegisterStatePtr &interrupts) |
| Instantiate a new state object with specified register, memory, and interrupt address spaces. | |
| static StatePtr | instance (const RegisterStatePtr ®isters, const MemoryStatePtr &memory) |
| Instantiate a new state object with specified register and memory address spaces. | |
| static StatePtr | instance (const StatePtr &other) |
| Instantiate a new copy of an existing state. | |
| static StatePtr | promote (const StatePtr &) |
Protected Member Functions | |
| State (const BaseSemantics::RegisterStatePtr ®isters, const BaseSemantics::MemoryStatePtr &memory) | |
| State (const State &other) | |
Protected Member Functions inherited from Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::State | |
| State (const RegisterStatePtr ®isters, const MemoryStatePtr &memory, const RegisterStatePtr &interrupts) | |
| State (const RegisterStatePtr ®isters, const MemoryStatePtr &memory) | |
| State (const State &other) | |
| using Rose::BinaryAnalysis::InstructionSemantics::PartialSymbolicSemantics::State::Super = BaseSemantics::State |
Base type.
Definition at line 197 of file PartialSymbolicSemantics.h.
Shared-ownership pointer.
Definition at line 200 of file PartialSymbolicSemantics.h.
|
overridevirtual |
Virtual constructor.
Constructs a new instance of a state from an existing state without copying the existing state. The register and memory address spaces will be set to the specified states and the optional interruptState will be a null pointer.
Reimplemented from Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::State.
|
overridevirtual |
Virtual copy constructor.
Allocates a new state object which is a deep copy of this state. States must be copyable objects because many analyses depend on being able to make a copy of the entire semantic state at each machine instruction, at each CFG vertex, etc.
Reimplemented from Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::State.
|
virtual |
Print info about how registers differ.
If a RenameMap is specified then named values will be renamed to have a shorter name.
|
virtual |
Removes from memory those values at addresses below the current stack pointer.
This is automatically called after each instruction if the policy's p_discard_popped_memory property is set.