de.rwth.dfa.jvm
Class FactorisedFlowGraph
java.lang.Object
|
+--de.rwth.graph.Graph
|
+--de.rwth.graph.RootedGraph
|
+--de.rwth.dfa.jvm.FactorisedFlowGraph
- Direct Known Subclasses:
- BasicBlockGraph, FlowGraph
- public class FactorisedFlowGraph
- extends RootedGraph
A class for the factorised flow graph of JVM methods. For each instruction in the
method's bytecode, there is a node in the graph. The instruction handle for the
instruction is the label of the node. For each possible control flow between two
instructions, there is an edge from the first to the second instruction.
In addition, there are nodes not representing real instruction: For each exception
handler, there is a node with an ExceptionHeaderInstructionHandle
as
label. An edge goes from this node to the start node for the actual exception
handler code.
However, there are no edges to nodes with ExceptionHeaderInstructionHandle
as label. Hence, the control flow caused by exceptions in not represented by this
kind of graph. Thats why its a factorised flow graph.
The roots of this graph are the first instruction and the nodes with ExceptionHeaderInstructionHandle
as label.
The leafs of this graph are all exit points of the method.
- Version:
- $Id: FactorisedFlowGraph.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
- Author:
- Markus Mohnen
Constructor Summary |
FactorisedFlowGraph()
Default constructor used by the FlowGraph sub class. |
FactorisedFlowGraph(de.fub.bytecode.classfile.Method method)
Creates a new FactorisedFlowGraph instance. |
FactorisedFlowGraph(java.lang.String name,
de.fub.bytecode.generic.InstructionList instrs,
de.fub.bytecode.classfile.CodeException[] exceptions)
Creates a new FactorisedFlowGraph instance. |
Method Summary |
protected RootedGraph.Node[] |
makeFactorisedFlowGraph(de.fub.bytecode.generic.InstructionList instrs,
de.fub.bytecode.classfile.CodeException[] exceptions)
This method does the actual creation of nodes and edges. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FactorisedFlowGraph
public FactorisedFlowGraph()
- Default constructor used by the
FlowGraph
sub class. Simply creates an
empty graph.
FactorisedFlowGraph
public FactorisedFlowGraph(java.lang.String name,
de.fub.bytecode.generic.InstructionList instrs,
de.fub.bytecode.classfile.CodeException[] exceptions)
- Creates a new
FactorisedFlowGraph
instance.
- Parameters:
name
- a String
valueinstrs
- an InstructionList
valueexceptions
- a CodeException[]
value
FactorisedFlowGraph
public FactorisedFlowGraph(de.fub.bytecode.classfile.Method method)
- Creates a new
FactorisedFlowGraph
instance.
- Parameters:
method
- a Method
value
makeFactorisedFlowGraph
protected RootedGraph.Node[] makeFactorisedFlowGraph(de.fub.bytecode.generic.InstructionList instrs,
de.fub.bytecode.classfile.CodeException[] exceptions)
- This method does the actual creation of nodes and edges. It is called from the
constructors, except from
FactorisedFlowGraph()
.
- Parameters:
instrs
- an InstructionList
valueexceptions
- a CodeException[]
value- Returns:
- a
RootedGraph.Node[]
value