soot.toolkits.graph.pdg
Class EnhancedUnitGraph

java.lang.Object
  extended by soot.toolkits.graph.UnitGraph
      extended by soot.toolkits.graph.pdg.EnhancedUnitGraph
All Implemented Interfaces:
Iterable<Unit>, DirectedGraph<Unit>

public class EnhancedUnitGraph
extends UnitGraph

This class represents a control flow graph which behaves like an ExceptionalUnitGraph and BriefUnitGraph when there are no exception handling construct in the method; at the presence of such constructs, the CFG is constructed from a brief graph by addition a concise representation of the exceptional flow as well as START/STOP auxiliary nodes. In a nutshell, the exceptional flow is represented at the level of try-catch-finally blocks instead of the Unit level to allow a more useful region analysis.

Author:
Hossein Sadat-Mohtasham

Field Summary
protected  Hashtable<Unit,Unit> handler2header
           
protected  Hashtable<Unit,Unit> try2nop
           
 
Fields inherited from class soot.toolkits.graph.UnitGraph
body, heads, method, tails, unitChain, unitToPreds, unitToSuccs
 
Constructor Summary
EnhancedUnitGraph(Body body)
           
 
Method Summary
protected  void addAuxiliaryExceptionalEdges()
          Add an exceptional flow edge for each handler from the corresponding auxiliary nop node to the beginning of the handler.
protected  void handleExplicitThrowEdges()
           
protected  void handleMultipleReturns()
          This method adds a STOP node to the graph, if necessary, to make the CFG single-tailed.
protected  void removeBogusHeads()
          This method removes all the heads in the CFG except the one that corresponds to the first unit in the method.
 
Methods inherited from class soot.toolkits.graph.UnitGraph
addEdge, buildHeadsAndTails, buildUnexceptionalEdges, combineMapValues, getBody, getExtendedBasicBlockPathBetween, getHeads, getPredsOf, getSuccsOf, getTails, iterator, makeMappedListsUnmodifiable, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

try2nop

protected Hashtable<Unit,Unit> try2nop

handler2header

protected Hashtable<Unit,Unit> handler2header
Constructor Detail

EnhancedUnitGraph

public EnhancedUnitGraph(Body body)
Method Detail

handleMultipleReturns

protected void handleMultipleReturns()
This method adds a STOP node to the graph, if necessary, to make the CFG single-tailed.


removeBogusHeads

protected void removeBogusHeads()
This method removes all the heads in the CFG except the one that corresponds to the first unit in the method.


handleExplicitThrowEdges

protected void handleExplicitThrowEdges()

addAuxiliaryExceptionalEdges

protected void addAuxiliaryExceptionalEdges()
Add an exceptional flow edge for each handler from the corresponding auxiliary nop node to the beginning of the handler.