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

Description

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 38 of file BasicBlock.h.

#include <Rose/BinaryAnalysis/Partitioner2/BasicBlock.h>

Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::BasicBlockSemantics:
Collaboration graph
[legend]

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 ( )
inline

Construct an empty semantics object.

Definition at line 77 of file BasicBlock.h.

Member Function Documentation

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

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 84 of file BasicBlock.h.

References initialState.

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

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 92 of file BasicBlock.h.

References usingDispatcher.

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

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 101 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 46 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 52 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 58 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 64 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 70 of file BasicBlock.h.

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

Whether the semantics had been dropped and reconstructed.

Definition at line 73 of file BasicBlock.h.


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