The following control flow graph is the bytecode graph generated by Control Flow Factory:
|
| Control Flow Graph of the method C1.t() |
The Control Flow Graph Factory export of the graph C1.t() without visual or geometry information is presented below:
2 [label="" ]; 2 -> 3 [label="" ]; 3 -> 4 [label="0" ]; 4 -> 5 [label="" ]; 5 -> 6 [label="" ]; 6 -> 7 [label="" ]; 7 -> 8 [label="" ]; 3 -> 9 [label="1" ]; 9 -> 10 [label="" ]; 10 -> 11 [label="" ]; 11 -> 12 [label="true" ]; 3 -> 13 [label="default" ]; 8 -> 13 [label="" ]; 11 -> 13 [label="false" ]; 12 -> 13 [label="" ]; 13 -> 15 [label="" ]; } ]]>download the dot graph file |
|
Each node has a unique ID and a label. The label includes the information of the original code label="29 putstatic".
In this example the information is the bytecode instruction.
The label of an edge may have control flow specific information. In the example the outgoing edges of the switch table value and decision are labeled. The label may be empty.
The export of the graph C1.t() with visual information is presented below:
2 [label="", style=dashed ]; 2 -> 3 [label="", style=solid ]; 3 -> 4 [label="0", style=solid ]; 4 -> 5 [label="", style=solid ]; 5 -> 6 [label="", style=solid ]; 6 -> 7 [label="", style=solid ]; 7 -> 8 [label="", style=solid ]; 3 -> 9 [label="1", style=solid ]; 9 -> 10 [label="", style=solid ]; 10 -> 11 [label="", style=solid ]; 11 -> 12 [label="true", style=solid ]; 3 -> 13 [label="default", style=solid ]; 8 -> 13 [label="", style=solid ]; 11 -> 13 [label="false", style=solid ]; 12 -> 13 [label="", style=solid ]; 13 -> 15 [label="", style=dashed ]; } ]]>download the dot graph file |
|
Each node has a unique ID and a label like the graph in the example above and the information
about shape, style and node color
(shape=hexagon, style="filled", fillcolor="#decd87").
The shape is one of the shapes defined in the DOT specification: diamond,
parallelogram, box, invhouse, hexagon or ellipse.
More shapes are available at the GraphViz info page about Node Shapes.
The style is always filled.
The node color is specified in the red-green-blue (RGB) format.
Three hexadecimal numbers between 00 and FF, preceded by the character ’#’ (#decd87).
An edge includes the information about line style: solid or dashed.
Usually the virtual edges are represented by dashed lines.
The export of the graph C1.t() with visual and geometry information is presented below:
2 [label="", style=dashed ]; 2 -> 3 [label="", style=solid ]; 3 -> 4 [label="0", style=solid ]; 4 -> 5 [label="", style=solid ]; 5 -> 6 [label="", style=solid ]; 6 -> 7 [label="", style=solid ]; 7 -> 8 [label="", style=solid ]; 3 -> 9 [label="1", style=solid ]; 9 -> 10 [label="", style=solid ]; 10 -> 11 [label="", style=solid ]; 11 -> 12 [label="true", style=solid ]; 3 -> 13 [label="default", style=solid ]; 8 -> 13 [label="", style=solid ]; 11 -> 13 [label="false", style=solid ]; 12 -> 13 [label="", style=solid ]; 13 -> 15 [label="", style=dashed ]; } ]]>download the dot graph file |
|
In this graph each node additionally includes the following parameters:
fixedsize=true,fontsize=12,width=0.85 and height=0.36.The parameter fixedsize and fontsize
are always set accordingly to true and 12.
The parameters width and height are set to the actual size of the nodes in inches.