Public Member Functions | Public Attributes | List of all members
Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics Class Reference


Information related to instruction semantics.

The purpose of this class is mainly to encapsulate all instruction semantics information so it can be accessed atomically in a multi-threaded application.

Definition at line 35 of file BasicBlock.h.

#include <BasicBlock.h>

Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics:
Collaboration graph

Public Member Functions

 BasicBlockSemantics ()
 Construct an empty semantics object. More...
bool isSemanticsDropped () const
 Determines whether semantics have been dropped. More...
bool isSemanticsError () const
 Determines whether a semantics error was encountered. More...
BaseSemantics::StatePtr finalState () const
 Return the final semantic state. More...

Public Attributes

BaseSemantics::DispatcherPtr dispatcher
 How instructions are dispatched. More...
BaseSemantics::RiscOperatorsPtr operators
 Risc operators. More...
BaseSemantics::StatePtr initialState
 Initial state for semantics. More...
bool usingDispatcher
 Whether semantic state is up-to-date. More...
Sawyer::Optional< BaseSemantics::StatePtroptionalPenultimateState
 The state just prior to executing the final instruction. More...
bool wasDropped
 Whether the semantics had been dropped and reconstructed. More...

Constructor & Destructor Documentation

Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::BasicBlockSemantics ( )

Construct an empty semantics object.

Definition at line 74 of file BasicBlock.h.

Member Function Documentation

bool Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::isSemanticsDropped ( ) const

Determines whether semantics have been dropped.

Returns true if a basic block's semantics have been dropped and a dispatcher is available. Always returns false if a dispatcher is not available.

Definition at line 81 of file BasicBlock.h.

References initialState.

bool Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::isSemanticsError ( ) const

Determines whether a semantics error was encountered.

Returns true if an error was encountered in the block's instruction semantics. Always returns false if a dispatcher is not available or if semantics have been dropped.

Definition at line 89 of file BasicBlock.h.

References usingDispatcher.

BaseSemantics::StatePtr Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::finalState ( ) const

Return the final semantic state.

The returned state is equivalent to starting with the initial state and processing each instruction. If a semantic error occurs during processing then the null pointer is returned. The null pointer is also returned if the basic block is empty.

Definition at line 98 of file BasicBlock.h.

Member Data Documentation

BaseSemantics::DispatcherPtr Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::dispatcher

How instructions are dispatched.

Dispatchers are specific to the instruction architecture, and also contain a pointer to the register dictionary that was used. The register dictionary can be employed to obtain names for the registers in the semantic states. The disptcher is null if this basic block is empty or instruction semantics are not implemented for the instruction set architecture being used.

Definition at line 43 of file BasicBlock.h.

BaseSemantics::RiscOperatorsPtr Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::operators

Risc operators.

This is just the dispatcher's RiscOperators if there is a disptcher. If no dispatcher, then the operators are still present.

Definition at line 49 of file BasicBlock.h.

BaseSemantics::StatePtr Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::initialState

Initial state for semantics.

This is the semantic state prior to execution of the first instruction of the basic block. This is a nulll pointer if semantics have been dropped.

Definition at line 55 of file BasicBlock.h.

Referenced by isSemanticsDropped().

bool Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::usingDispatcher

Whether semantic state is up-to-date.

True if dispatcher's state is up-to-date, i.e., represents the semantic state after executing the last instruction of the basic block.

Definition at line 61 of file BasicBlock.h.

Referenced by isSemanticsError().

Sawyer::Optional<BaseSemantics::StatePtr> Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::optionalPenultimateState

The state just prior to executing the final instruction.

The penultimate state is saved so that one instruction can be efficiently popped from the end of the basic block, after which the final state is the old penultimate state and the new penultimate state is not stored.

Definition at line 67 of file BasicBlock.h.

bool Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics::wasDropped

Whether the semantics had been dropped and reconstructed.

Definition at line 70 of file BasicBlock.h.

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