de.rwth.dfa.jvm
Class FlowGraph

java.lang.Object
  |
  +--de.rwth.graph.Graph
        |
        +--de.rwth.graph.RootedGraph
              |
              +--de.rwth.dfa.jvm.FactorisedFlowGraph
                    |
                    +--de.rwth.dfa.jvm.FlowGraph

public class FlowGraph
extends FactorisedFlowGraph

A class for the 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.

All instructions which may throw an exception are connected to all nodes with ExceptionHeaderInstructionHandle as label, if this node belongs to an active handler for the instruction. Hence, the control flow caused by exceptions is represented by this kind of 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: FlowGraph.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
Author:
Markus Mohnen

Inner classes inherited from class de.rwth.graph.RootedGraph
RootedGraph.Node
 
Inner classes inherited from class de.rwth.graph.Graph
Graph.Node, Graph.NodeDyer
 
Fields inherited from class de.rwth.graph.RootedGraph
leafs, roots
 
Fields inherited from class de.rwth.graph.Graph
curNumber, label, nodes, sizeEdges
 
Constructor Summary
FlowGraph(de.fub.bytecode.classfile.Method method)
          Creates a new FlowGraph instance.
FlowGraph(java.lang.String name, de.fub.bytecode.generic.InstructionList instrs, de.fub.bytecode.classfile.CodeException[] exceptions)
          Creates a new FlowGraph instance.
 
Methods inherited from class de.rwth.dfa.jvm.FactorisedFlowGraph
makeFactorisedFlowGraph
 
Methods inherited from class de.rwth.graph.RootedGraph
addLeaf, addRoot, getLeafArray, getLeafs, getRootArray, getRoots, isLeaf, isRoot, removeLeaf, removeRoot
 
Methods inherited from class de.rwth.graph.Graph
getLabel, getNodes, main, setLabel, sizeEdges, sizeNodes, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlowGraph

public FlowGraph(java.lang.String name,
                 de.fub.bytecode.generic.InstructionList instrs,
                 de.fub.bytecode.classfile.CodeException[] exceptions)
Creates a new FlowGraph instance.
Parameters:
name - a String value
instrs - an InstructionList value
exceptions - a CodeException[] value

FlowGraph

public FlowGraph(de.fub.bytecode.classfile.Method method)
Creates a new FlowGraph instance.
Parameters:
method - a Method value