|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.synth.graph.NamedObject
byucc.jhdl.synth.graph.Graph
byucc.jhdl.synth.ControlFlowGraph
A graph representing control flow of a method. ControlFlowGraph consists of CFVertex and CFEdge objects. Each CFVertex can be either a block or a decision. Each block represents a basic block of a method and each decision represents the possible flow of control between basic blocks. Each basic block also contains a DataFlowGraph representing the dataflow within that basic block.
CFVertex
,
CFEdge
,
DataFlowGraph
Field Summary |
Fields inherited from class byucc.jhdl.synth.graph.Graph |
printNum, vertexVector |
Fields inherited from class byucc.jhdl.synth.graph.NamedObject |
name |
Constructor Summary | |
ControlFlowGraph()
Create a new unnamed ContorlFlowGraph |
|
ControlFlowGraph(java.lang.String name)
Constructs a new ControlFlowGraph with the given name. |
Method Summary | |
CFVertex |
addBlock(SynthBlock sb,
DataFlowGraph dfGraph)
Add a new block to this ControlFlowGraph associated with the given SynthBlock or return one that existed previously. |
CFEdge |
addCFEdge(CFVertex tail,
CFVertex head)
Add a new CFEdge to the graph. |
CFEdge |
addCFEdge(CFVertex tail,
CFVertex head,
java.lang.String weight)
Add a new CFEdge with the given weight to the graph. |
CFVertex |
addCFVertex(java.lang.String name)
Add a new CFVertex to the graph. |
CFVertex |
addDecision(java.lang.String name)
Add a new decision to this ControlFlowGraph. |
CFVertex |
getBlock(SynthBlock sb)
Get a block from the graph associated with the given SynthBlock, (null if none exists) |
BlockIterator |
getBlocks()
Get a list of all the blocks in this ControlFlowGraph |
boolean |
hasBlock(SynthBlock sb)
Does this graph have a block vertex associated with the given SynthBlock. |
protected Edge |
newEdge(Vertex tail,
Vertex head)
Overrides newEdge in Graph so that all edges in a ControlFlowGraph will be of type CFEdge. |
protected Vertex |
newVertex(java.lang.String name)
Overrides newVertex in Graph so that all vertices in a ControlFlowGraph will be of type CFVertex. |
Methods inherited from class byucc.jhdl.synth.graph.Graph |
addEdge, addEdge, addVertex, addVertex, getEdge, getEdges, getPrintWriter, getVertices, hasEdge, hasEdge, hasVertex, mergeVertices, printGraph, printGraph, printGraph, printGraph, removeEdge, removeEdge, removeVertex, resetVisited, setEdgeProperty, setVertexProperty, toDot, toDot, toString |
Methods inherited from class byucc.jhdl.synth.graph.NamedObject |
getName, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ControlFlowGraph()
public ControlFlowGraph(java.lang.String name)
Method Detail |
protected Vertex newVertex(java.lang.String name)
newVertex
in class Graph
name
- the name for the new vertex.
protected Edge newEdge(Vertex tail, Vertex head)
newEdge
in class Graph
tail
- the tail for the new edge.head
- the head for the new edge.
public CFVertex addCFVertex(java.lang.String name)
name
- The name for the new vertex.
public CFEdge addCFEdge(CFVertex tail, CFVertex head)
tail
- the tail vertex for the new edge.head
- the head vertex for the new edge.
public CFEdge addCFEdge(CFVertex tail, CFVertex head, java.lang.String weight)
tail
- the tail vertex for the new edge.head
- the head vertex for the new edge.weight
- the weight for the new edge.
public boolean hasBlock(SynthBlock sb)
sb
- A SynthBlock to look up in the graph.
getBlock(byucc.jhdl.synth.SynthBlock)
public CFVertex getBlock(SynthBlock sb)
sb
- A SynthBlock to look up in the graph.
hasBlock(byucc.jhdl.synth.SynthBlock)
,
addBlock(byucc.jhdl.synth.SynthBlock, byucc.jhdl.synth.DataFlowGraph)
public CFVertex addBlock(SynthBlock sb, DataFlowGraph dfGraph)
sb
- the SynthBlock with which this vertex will be associateddfGraph
- the DataFlowGraph in which this block will have a subgraph
public CFVertex addDecision(java.lang.String name)
name
- the name for the new decision.
public BlockIterator getBlocks()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |