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

Description

Creates GraphViz files from Partitioner data.

This class operates in these steps:

Step 2 (choosing vertices and edges) is accomplished via vertexOrganization and edgeOrganization methods and the Organization::select method invoked on their return values. Step 3 (setting labels and other attributes) is performed the same way, but with Organization::label and Organization::attributes methods. This class also has a number of "select" methods that perform steps 2 and 3 at the same time; these methods adjust labels and attributes only when selecting a previously unselected vertex, edge, or subgraph–otherwise they use the label and attributes that were previously specified. Step 4 is normally achieved by invoking the emit method, but the class also defines other emitters that combine a "select" method of the same name with emit.

Partitioner::Ptr partitioner = ...;
Function::Ptr f1=..., f2=...;
GraphViz::CfgEmitter gv(partitioner);
gv.showInstructions(true);
gv.useFunctionSubgraphs(true);
gv.selectFunctionGraph(f1);
gv.emit(std::cout);

Definition at line 436 of file GraphViz.h.

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

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter:
Collaboration graph
[legend]

Public Member Functions

PartitionerConstPtr partitioner ()
 Property: partitioner. More...
 
void selectInterval (const AddressInterval &)
 Selects vertices in some interval. More...
 
void selectIntraFunction (const FunctionPtr &)
 Select vertices and intra-function edges for one function. More...
 
void selectFunctionCallees (const FunctionPtr &)
 Select outgoing edges to neighboring vertices. More...
 
void selectFunctionCallers (const FunctionPtr &)
 Select incoming edges from neighboring vertices. More...
 
void deselectReturnEdges ()
 Deselect all function return edges. More...
 
void deselectUnusedVertex (ControlFlowGraph::ConstVertexIterator)
 Deselect a vertex if it has no selected incident edges. More...
 
void deselectUnusedVertexType (VertexType)
 Deselect vertices of specified type if they have no selected incident edges. More...
 
void selectNeighbors (bool selectInEdges=true, bool selectOutEdges=true)
 Select neighboring vertices. More...
 
CfgEmitterselectWholeGraph ()
 Selects graph elements for whole-graph output. More...
 
CfgEmitterselectFunctionGraph (const FunctionPtr &)
 Selects the CFG for one function. More...
 
CfgEmitterselectIntervalGraph (const AddressInterval &interval)
 Selects vertices that start within some interval. More...
 
void emitWholeGraph (std::ostream &)
 Dump entire control flow graph. More...
 
void emitFunctionGraph (std::ostream &, const FunctionPtr &)
 Dump control flow graph for one function. More...
 
void emitIntervalGraph (std::ostream &, const AddressInterval &)
 Dump control flow graph for some address interval. More...
 
void assignFunctionSubgraphs ()
 Assign vertices and edges to subgraphs. More...
 
virtual std::string sourceLocation (const ControlFlowGraph::ConstVertexIterator &) const
 Source location for vertex. More...
 
virtual std::string functionLabel (const FunctionPtr &) const
 Label for function vertex. More...
 
virtual Attributes functionAttributes (const FunctionPtr &) const
 Attributes for function vertex. More...
 
 CfgEmitter (const PartitionerConstPtr &)
 Constructor. More...
 
 CfgEmitter (const PartitionerConstPtr &, const ControlFlowGraph &)
 Constructor. More...
 
bool useFunctionSubgraphs () const
 Property: use function subgraphs. More...
 
void useFunctionSubgraphs (bool b)
 Property: use function subgraphs. More...
 
bool showInstructions () const
 Property: show basic block instructions. More...
 
void showInstructions (bool b)
 Property: show basic block instructions. More...
 
bool showInstructionAddresses () const
 Property: show instruction addresses. More...
 
void showInstructionAddresses (bool b)
 Property: show instruction addresses. More...
 
bool showInstructionStackDeltas () const
 Property: show instruction stack deltas. More...
 
void showInstructionStackDeltas (bool b)
 Property: show instruction stack deltas. More...
 
bool strikeNoopSequences () const
 Property: strike no-op sequences. More...
 
void strikeNoopSequences (bool b)
 Property: strike no-op sequences. More...
 
const Color::HSVfuncEnterColor () const
 Property: color to use for background of function entrance nodes. More...
 
void funcEnterColor (const Color::HSV &bg)
 Property: color to use for background of function entrance nodes. More...
 
const Color::HSVfuncReturnColor () const
 Property: color to use for background of function return nodes.
 
void funcReturnColor (const Color::HSV &bg)
 Property: color to use for background of function return nodes.
 
const Color::HSVwarningColor () const
 Property: color to use for background of special nodes and for warnings.
 
void warningColor (const Color::HSV &bg)
 Property: color to use for background of special nodes and for warnings.
 
bool showOutNeighbors () const
 Property: show outgoing edges to neighbor vertices. More...
 
void showOutNeighbors (bool b)
 Property: show outgoing edges to neighbor vertices. More...
 
bool showInNeighbors () const
 Property: show incoming edges from neighbor vertices. More...
 
void showInNeighbors (bool b)
 Property: show incoming edges from neighbor vertices. More...
 
bool showReturnEdges () const
 Property: show function return edges. More...
 
void showReturnEdges (bool b)
 Property: show function return edges. More...
 
const SourceLocationssrcMapper () const
 Property: Address-to-source mapping. More...
 
SourceLocationssrcMapper ()
 Property: Address-to-source mapping. More...
 
void srcMapper (const SourceLocations &mapper)
 Property: Address-to-source mapping. More...
 
virtual std::string vertexLabel (const ControlFlowGraph::ConstVertexIterator &) const
 Label for CFG vertex. More...
 
std::string vertexLabel (const ControlFlowGraph::Vertex &) const
 Label for CFG vertex. More...
 
virtual std::string vertexLabelDetailed (const ControlFlowGraph::ConstVertexIterator &) const
 Detailed label for CFG vertex. More...
 
std::string vertexLabelDetailed (const ControlFlowGraph::Vertex &) const
 Detailed label for CFG vertex. More...
 
virtual Attributes vertexAttributes (const ControlFlowGraph::ConstVertexIterator &) const
 Attributes for a CFG vertex.
 
Attributes vertexAttributes (const ControlFlowGraph::Vertex &) const
 Attributes for a CFG vertex.
 
virtual std::string edgeLabel (const ControlFlowGraph::ConstEdgeIterator &) const
 Label for CFG edge. More...
 
std::string edgeLabel (const ControlFlowGraph::Edge &) const
 Label for CFG edge. More...
 
virtual Attributes edgeAttributes (const ControlFlowGraph::ConstEdgeIterator &) const
 Attributes for a CFG edge.
 
Attributes edgeAttributes (const ControlFlowGraph::Edge &) const
 Attributes for a CFG edge.
 
- Public Member Functions inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
 BaseEmitter ()
 Default constructor. More...
 
 BaseEmitter (const Graph &g)
 Constructor. More...
 
void graph (const Graph &g)
 Reset the graph. More...
 
void selectAll (bool b=true)
 Causes all vertices and edges to be selected. More...
 
void selectNone ()
 Deselects all vertices and edges. More...
 
void selectAllVertices (bool b=true)
 Causes all vertices to be selected. More...
 
void selectAllEdges (bool b=true)
 Causes all edges to be selected. More...
 
void deselectParallelEdges ()
 Deselect all but one parallel edge. More...
 
virtual void emit (std::ostream &) const
 Dump selected vertices, edges, and subgraphs. More...
 
AttributesdefaultGraphAttributes ()
 Property: default graph attributes. More...
 
const AttributesdefaultGraphAttributes () const
 Property: default graph attributes. More...
 
AttributesdefaultNodeAttributes ()
 Property: default graph node attributes. More...
 
const AttributesdefaultNodeAttributes () const
 Property: default graph node attributes. More...
 
AttributesdefaultEdgeAttributes ()
 Property: default graph edge attributes. More...
 
const AttributesdefaultEdgeAttributes () const
 Property: default graph edge attributes. More...
 
const Color::HSVsubgraphColor () const
 Property: color to use for function subgraph background.
 
void subgraphColor (const Color::HSV &bg)
 Property: color to use for function subgraph background.
 
const VertexOrganizationvertexOrganization () const
 Property: Controls which vertices are to appear in the output, and how. More...
 
VertexOrganizationvertexOrganization ()
 Property: Controls which vertices are to appear in the output, and how. More...
 
const OrganizationvertexOrganization (size_t vertexId) const
 Property: Controls which vertices are to appear in the output, and how. More...
 
OrganizationvertexOrganization (size_t vertexId)
 Property: Controls which vertices are to appear in the output, and how. More...
 
const OrganizationvertexOrganization (const typename ControlFlowGraph::ConstVertexIterator &vertex) const
 Property: Controls which vertices are to appear in the output, and how. More...
 
const OrganizationvertexOrganization (const typename ControlFlowGraph::Vertex &vertex) const
 Property: Controls which vertices are to appear in the output, and how. More...
 
OrganizationvertexOrganization (const typename ControlFlowGraph::ConstVertexIterator &vertex)
 Property: Controls which vertices are to appear in the output, and how. More...
 
OrganizationvertexOrganization (const typename ControlFlowGraph::Vertex &vertex)
 Property: Controls which vertices are to appear in the output, and how. More...
 
const EdgeOrganizationedgeOrganization () const
 Property: Controls which edges are to appear in the output, and how. More...
 
EdgeOrganizationedgeOrganization ()
 Property: Controls which edges are to appear in the output, and how. More...
 
const OrganizationedgeOrganization (size_t edgeId) const
 Property: Controls which edges are to appear in the output, and how. More...
 
OrganizationedgeOrganization (size_t edgeId)
 Property: Controls which edges are to appear in the output, and how. More...
 
const OrganizationedgeOrganization (const typename ControlFlowGraph::ConstEdgeIterator &edge) const
 Property: Controls which edges are to appear in the output, and how. More...
 
const OrganizationedgeOrganization (const typename ControlFlowGraph::Edge &edge) const
 Property: Controls which edges are to appear in the output, and how. More...
 
OrganizationedgeOrganization (const typename ControlFlowGraph::ConstEdgeIterator &edge)
 Property: Controls which edges are to appear in the output, and how. More...
 
OrganizationedgeOrganization (const typename ControlFlowGraph::Edge &edge)
 Property: Controls which edges are to appear in the output, and how. More...
 
const SubgraphOrganizationsubgraphOrganization () const
 Property: Controls which subgraphs appear in the output, and how. More...
 
SubgraphOrganizationsubgraphOrganization ()
 Property: Controls which subgraphs appear in the output, and how. More...
 
const OrganizationsubgraphOrganization (const std::string &name) const
 Property: Controls which subgraphs appear in the output, and how. More...
 
OrganizationsubgraphOrganization (const std::string &name)
 Property: Controls which subgraphs appear in the output, and how. More...
 

Static Public Member Functions

static bool isInterFunctionEdge (const ControlFlowGraph::Edge &)
 Returns true if the edge spans two different functions.
 
static bool isInterFunctionEdge (const ControlFlowGraph::ConstEdgeIterator &)
 Returns true if the edge spans two different functions.
 
static FunctionPtr firstOwningFunction (const ControlFlowGraph::Vertex &)
 First function that owns a vertex. More...
 
static FunctionPtr firstOwningFunction (const ControlFlowGraph::ConstVertexIterator &v)
 First function that owns a vertex. More...
 
static FunctionSet owningFunctions (const ControlFlowGraph::Vertex &)
 Functions that own a vertex. More...
 
static FunctionSet owningFunctions (const ControlFlowGraph::ConstVertexIterator &)
 Functions that own a vertex. More...
 

Additional Inherited Members

- Public Types inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
typedef ControlFlowGraph Graph
 
typedef std::vector< OrganizationVertexOrganization
 Organizational information for vertices. More...
 
typedef std::vector< OrganizationEdgeOrganization
 Organizational information for edges. More...
 
typedef Sawyer::Container::Map< std::string, OrganizationSubgraphOrganization
 Organizational information for subgraphs. More...
 
- Protected Types inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
typedef Sawyer::Container::Map< size_t, size_t > VMap
 
- Protected Member Functions inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
size_t emitVertex (std::ostream &, const typename ControlFlowGraph::ConstVertexIterator &, const Organization &, const VMap &) const
 Emit a single vertex if it hasn't been emitted already. More...
 
void emitEdge (std::ostream &, const typename ControlFlowGraph::ConstEdgeIterator &, const Organization &, const VMap &) const
 Emit a single edge. More...
 
- Protected Attributes inherited from Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >
Graph graph_
 
VertexOrganization vertexOrganization_
 
EdgeOrganization edgeOrganization_
 
SubgraphOrganization subgraphOrganization_
 
Attributes defaultGraphAttributes_
 
Attributes defaultNodeAttributes_
 
Attributes defaultEdgeAttributes_
 
std::list< PseudoEdge > pseudoEdges_
 
Color::HSV subgraphColor_
 

Constructor & Destructor Documentation

Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::CfgEmitter ( const PartitionerConstPtr )
explicit

Constructor.

Constructs a GraphViz emitter that uses the control flow graph (and possibly other data structures) from the specified partitioner, or the provided control flow graph which must be compatible with the partitioner. The GraphViz object will hold a reference to the partitioner, therefore the partitioner should not be deleted before the GraphViz object.

Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::CfgEmitter ( const PartitionerConstPtr ,
const ControlFlowGraph  
)

Constructor.

Constructs a GraphViz emitter that uses the control flow graph (and possibly other data structures) from the specified partitioner, or the provided control flow graph which must be compatible with the partitioner. The GraphViz object will hold a reference to the partitioner, therefore the partitioner should not be deleted before the GraphViz object.

Member Function Documentation

PartitionerConstPtr Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::partitioner ( )
inline

Property: partitioner.

The partitioner that's being used, set when this emitter was constructed.

Definition at line 471 of file GraphViz.h.

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::useFunctionSubgraphs ( ) const
inline

Property: use function subgraphs.

When this property is true, GraphViz-emitting methods that adjust the vertex, edge, and/or subgraph organization will create new subgraphs for each function that has selected vertices. The subgraphs will correspond to functions. Vertices that don't appear in any function will likewise not belong to any subgraph.

Definition at line 480 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::useFunctionSubgraphs ( bool  b)
inline

Property: use function subgraphs.

When this property is true, GraphViz-emitting methods that adjust the vertex, edge, and/or subgraph organization will create new subgraphs for each function that has selected vertices. The subgraphs will correspond to functions. Vertices that don't appear in any function will likewise not belong to any subgraph.

Definition at line 481 of file GraphViz.h.

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructions ( ) const
inline

Property: show basic block instructions.

When true, vertex labels computed by the GraphViz-emitting methods (as opposed to labels set by the user), will contain the disassembled instructions. Otherwise such labels will consist of only the basic block starting address. This property is expected to be honored by the vertexLabel virtual method.

Definition at line 491 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructions ( bool  b)
inline

Property: show basic block instructions.

When true, vertex labels computed by the GraphViz-emitting methods (as opposed to labels set by the user), will contain the disassembled instructions. Otherwise such labels will consist of only the basic block starting address. This property is expected to be honored by the vertexLabel virtual method.

Definition at line 492 of file GraphViz.h.

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructionAddresses ( ) const
inline

Property: show instruction addresses.

When true and basic block instructions are shown (showInstructions), then the address of each instruction is also rendered. This property is expected to be honored by the vertexLabel virtual method.

Definition at line 501 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructionAddresses ( bool  b)
inline

Property: show instruction addresses.

When true and basic block instructions are shown (showInstructions), then the address of each instruction is also rendered. This property is expected to be honored by the vertexLabel virtual method.

Definition at line 502 of file GraphViz.h.

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructionStackDeltas ( ) const
inline

Property: show instruction stack deltas.

When true and basic block instructions are shown (showInstructions), then each instruction will be preceeded by a two-digit (or more) hexadecimal stack offset. The stack delta appears after the address (if any). This property is expected to be honored by the vertexLabel virtual method.

Definition at line 512 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInstructionStackDeltas ( bool  b)
inline

Property: show instruction stack deltas.

When true and basic block instructions are shown (showInstructions), then each instruction will be preceeded by a two-digit (or more) hexadecimal stack offset. The stack delta appears after the address (if any). This property is expected to be honored by the vertexLabel virtual method.

Definition at line 513 of file GraphViz.h.

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::strikeNoopSequences ( ) const
inline

Property: strike no-op sequences.

Those instructions that are part of a no-op sequence are rendered in a different font (such as strike-through). When two or more sequences overlap, the largest sequence is struck and all overlapping sequences are not processed. For nested squences, this causes all instructions to be struck; for overlapping but non-nested sequences, only the largest one is struck.

Definition at line 524 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::strikeNoopSequences ( bool  b)
inline

Property: strike no-op sequences.

Those instructions that are part of a no-op sequence are rendered in a different font (such as strike-through). When two or more sequences overlap, the largest sequence is struck and all overlapping sequences are not processed. For nested squences, this causes all instructions to be struck; for overlapping but non-nested sequences, only the largest one is struck.

Definition at line 525 of file GraphViz.h.

const Color::HSV& Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::funcEnterColor ( ) const
inline

Property: color to use for background of function entrance nodes.

Edges to these nodes are created by converting the background color to a foreground color by inverting the value in HSV space (keeping the same hue and saturation).

Definition at line 535 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::funcEnterColor ( const Color::HSV bg)
inline

Property: color to use for background of function entrance nodes.

Edges to these nodes are created by converting the background color to a foreground color by inverting the value in HSV space (keeping the same hue and saturation).

Definition at line 536 of file GraphViz.h.

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showOutNeighbors ( ) const
inline

Property: show outgoing edges to neighbor vertices.

If set, then a function selector will also select inter-function edges originating from the selected function, and the incident vertices for those edges. Most of the time the incident vertices will be entry points for called functions.

Definition at line 559 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showOutNeighbors ( bool  b)
inline

Property: show outgoing edges to neighbor vertices.

If set, then a function selector will also select inter-function edges originating from the selected function, and the incident vertices for those edges. Most of the time the incident vertices will be entry points for called functions.

Definition at line 560 of file GraphViz.h.

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInNeighbors ( ) const
inline

Property: show incoming edges from neighbor vertices.

If set, then a function selector will also select inter-function edges targeting the selected function, and the incident vertices for those edges. Under certain (usual) circumstances, all incident vertices from the same function are collapsed into a single function vertex and the parallel edges are replaced with a single edge having a label indicating the number of original edges and their types.

Definition at line 571 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showInNeighbors ( bool  b)
inline

Property: show incoming edges from neighbor vertices.

If set, then a function selector will also select inter-function edges targeting the selected function, and the incident vertices for those edges. Under certain (usual) circumstances, all incident vertices from the same function are collapsed into a single function vertex and the parallel edges are replaced with a single edge having a label indicating the number of original edges and their types.

Definition at line 572 of file GraphViz.h.

bool Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showReturnEdges ( ) const
inline

Property: show function return edges.

If this property is false, then selector functions that normally add E_FUNCTION_RETURN edges to the output will omit those edges instead by calling deselectReturnEdges.

Definition at line 581 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::showReturnEdges ( bool  b)
inline

Property: show function return edges.

If this property is false, then selector functions that normally add E_FUNCTION_RETURN edges to the output will omit those edges instead by calling deselectReturnEdges.

Definition at line 582 of file GraphViz.h.

const SourceLocations& Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::srcMapper ( ) const
inline

Property: Address-to-source mapping.

If an address to source mapping is provided then source location information will be shown in each vertex.

Definition at line 590 of file GraphViz.h.

SourceLocations& Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::srcMapper ( )
inline

Property: Address-to-source mapping.

If an address to source mapping is provided then source location information will be shown in each vertex.

Definition at line 591 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::srcMapper ( const SourceLocations mapper)
inline

Property: Address-to-source mapping.

If an address to source mapping is provided then source location information will be shown in each vertex.

Definition at line 592 of file GraphViz.h.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectInterval ( const AddressInterval )

Selects vertices in some interval.

Selects all vertices whose starting address falls within the specified interval, then selects all edges that connect any two selected vertices (regardless of whether those vertices were just selected by this method or were previously selected).

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectIntraFunction ( const FunctionPtr )

Select vertices and intra-function edges for one function.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectFunctionCallees ( const FunctionPtr )

Select outgoing edges to neighboring vertices.

These edges typically represent calls to other functions.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectFunctionCallers ( const FunctionPtr )

Select incoming edges from neighboring vertices.

These edges typically represent calls from other functions. When possible, multiple edges from the same function will be replaced with a single pseudo-edge coming from that function's entry vertex.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::deselectReturnEdges ( )

Deselect all function return edges.

Any edge of type E_FUNCTION_RETURN is deselected.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::deselectUnusedVertex ( ControlFlowGraph::ConstVertexIterator  )

Deselect a vertex if it has no selected incident edges.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::deselectUnusedVertexType ( VertexType  )

Deselect vertices of specified type if they have no selected incident edges.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectNeighbors ( bool  selectInEdges = true,
bool  selectOutEdges = true 
)

Select neighboring vertices.

Selects vertices that are neighbors of selected vertices, and the edges that connect them.

CfgEmitter& Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectWholeGraph ( )

Selects graph elements for whole-graph output.

(Re)selects all vertices and edges and gives them default names and attributes according to certain properties defined in this object. The user then has a chance to make adjustments to the organization before calling emit. The emitWholeGraph does the selection and emitting in one step.

CfgEmitter& Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectFunctionGraph ( const FunctionPtr )

Selects the CFG for one function.

Selects all vertices and edges that are part of the specified function. Additionally, any inter-function edges to/from this function and their incident vertices are also selected according to selectFunctionCallees and selectFunctionCallers.

CfgEmitter& Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::selectIntervalGraph ( const AddressInterval interval)

Selects vertices that start within some interval.

Selects all vertices whose starting address falls within the specified interval, plus all edges whose incident vertices are selected. Additionally, neighboring vertices and connective edges are optionally added depending on showOutNeighbors and showInNeighbors.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::emitWholeGraph ( std::ostream &  )

Dump entire control flow graph.

This is a convenient wrapper around selectWholeGraph and emit.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::emitFunctionGraph ( std::ostream &  ,
const FunctionPtr  
)

Dump control flow graph for one function.

This is a convenient wrapper around selectFunctionGraph and emit.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::emitIntervalGraph ( std::ostream &  ,
const AddressInterval  
)

Dump control flow graph for some address interval.

This is a convenient wrapper around selectIntervalGraph and emit.

static FunctionPtr Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::firstOwningFunction ( const ControlFlowGraph::Vertex &  )
static

First function that owns a vertex.

Returns the first of possibly many functions that own a vertex. "First" is defined as the function listed first in the set returned by CfgVertex::owningFunctions. Returns null if there are no owning functions.

static FunctionPtr Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::firstOwningFunction ( const ControlFlowGraph::ConstVertexIterator &  v)
inlinestatic

First function that owns a vertex.

Returns the first of possibly many functions that own a vertex. "First" is defined as the function listed first in the set returned by CfgVertex::owningFunctions. Returns null if there are no owning functions.

Definition at line 701 of file GraphViz.h.

static FunctionSet Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::owningFunctions ( const ControlFlowGraph::Vertex &  )
static

Functions that own a vertex.

Returns a set of pointers to the functions that own the specified vertex. Usually a vertex is owned by either zero or one function.

static FunctionSet Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::owningFunctions ( const ControlFlowGraph::ConstVertexIterator &  )
static

Functions that own a vertex.

Returns a set of pointers to the functions that own the specified vertex. Usually a vertex is owned by either zero or one function.

void Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::assignFunctionSubgraphs ( )

Assign vertices and edges to subgraphs.

Each vertex is assigned to a subgraph, one subgraph per function. If a vertex is owned by more than one function then the "first" function is used, where the definition of "first" is quite arbitrary.

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::sourceLocation ( const ControlFlowGraph::ConstVertexIterator &  ) const
virtual

Source location for vertex.

Returns a string indicating the source code location for a vertex. If no information is available then an empty string is returned.

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::vertexLabel ( const ControlFlowGraph::ConstVertexIterator &  ) const
virtual

Label for CFG vertex.

Returns the simple label for a CFG vertex. The simple label is usually just an address rather than instructions, etc. The returned lable must include the delimiting double quotes or angle brackets and have proper escaping of contents.

std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::vertexLabel ( const ControlFlowGraph::Vertex &  ) const

Label for CFG vertex.

Returns the simple label for a CFG vertex. The simple label is usually just an address rather than instructions, etc. The returned lable must include the delimiting double quotes or angle brackets and have proper escaping of contents.

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::vertexLabelDetailed ( const ControlFlowGraph::ConstVertexIterator &  ) const
virtual

Detailed label for CFG vertex.

The detailed label can be a multi-line value and must include delimiting double quotes or angle brackets with proper escaping of the content. This method should honor the showInstructionAddresses and showInstructionStackDeltas properties.

std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::vertexLabelDetailed ( const ControlFlowGraph::Vertex &  ) const

Detailed label for CFG vertex.

The detailed label can be a multi-line value and must include delimiting double quotes or angle brackets with proper escaping of the content. This method should honor the showInstructionAddresses and showInstructionStackDeltas properties.

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::edgeLabel ( const ControlFlowGraph::ConstEdgeIterator &  ) const
virtual

Label for CFG edge.

The returned lable must include the delimiting double quotes or angle brackets and have proper escaping of contents.

std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::edgeLabel ( const ControlFlowGraph::Edge &  ) const

Label for CFG edge.

The returned lable must include the delimiting double quotes or angle brackets and have proper escaping of contents.

virtual std::string Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::functionLabel ( const FunctionPtr ) const
virtual

Label for function vertex.

The returned label must include the delimiting double quotes or angle brackets and have proper escaping of contents.

virtual Attributes Rose::BinaryAnalysis::Partitioner2::GraphViz::CfgEmitter::functionAttributes ( const FunctionPtr ) const
virtual

Attributes for function vertex.


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