envgen.analysis.stat
Class ControlFlowGraph

java.lang.Object
  |
  +--envgen.analysis.stat.ControlFlowGraph
All Implemented Interfaces:
soot.toolkits.graph.DirectedGraph

public class ControlFlowGraph
extends java.lang.Object
implements soot.toolkits.graph.DirectedGraph


Field Summary
(package private)  java.util.List heads
           
(package private)  java.util.List tails
           
(package private)  java.util.Collection unitChain
           
protected  java.util.Map unitToPreds
           
protected  java.util.Map unitToSuccs
           
 
Constructor Summary
ControlFlowGraph(java.util.Collection unitChain)
          Constructs a graph for the units found in the provided Body instance.
 
Method Summary
 java.util.List getExtendedBasicBlockPathBetween(soot.Unit from, soot.Unit to)
          Look for a path in graph, from def to use.
 java.util.List getHeads()
           
 java.util.List getPredsOf(java.lang.Object s)
           
 java.util.List getSuccsOf(java.lang.Object s)
           
 java.util.List getTails()
           
 java.util.Iterator iterator()
           
 void removeEdge(soot.Unit from, soot.Unit to)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

heads

java.util.List heads

tails

java.util.List tails

unitToSuccs

protected java.util.Map unitToSuccs

unitToPreds

protected java.util.Map unitToPreds

unitChain

java.util.Collection unitChain
Constructor Detail

ControlFlowGraph

public ControlFlowGraph(java.util.Collection unitChain)
Constructs a graph for the units found in the provided Body instance. Each node in the graph corresponds to a unit. The edges are derived from the control flow.

See Also:
Body, Unit
Method Detail

getExtendedBasicBlockPathBetween

public java.util.List getExtendedBasicBlockPathBetween(soot.Unit from,
                                                       soot.Unit to)
Look for a path in graph, from def to use. This path has to lie inside an extended basic block (and this property implies uniqueness.). The path returned includes from and to.

Parameters:
from - start point for the path.
to - end point for the path.
Returns:
null if there is no such path.

getHeads

public java.util.List getHeads()
Specified by:
getHeads in interface soot.toolkits.graph.DirectedGraph

getTails

public java.util.List getTails()
Specified by:
getTails in interface soot.toolkits.graph.DirectedGraph

getPredsOf

public java.util.List getPredsOf(java.lang.Object s)
Specified by:
getPredsOf in interface soot.toolkits.graph.DirectedGraph

getSuccsOf

public java.util.List getSuccsOf(java.lang.Object s)
Specified by:
getSuccsOf in interface soot.toolkits.graph.DirectedGraph

removeEdge

public void removeEdge(soot.Unit from,
                       soot.Unit to)

size

public int size()
Specified by:
size in interface soot.toolkits.graph.DirectedGraph

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface soot.toolkits.graph.DirectedGraph

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object