Package soot.toolkits.graph.pdg
Class EnhancedUnitGraph
- java.lang.Object
-
- soot.toolkits.graph.UnitGraph
-
- soot.toolkits.graph.pdg.EnhancedUnitGraph
-
- All Implemented Interfaces:
Iterable<Unit>,DirectedBodyGraph<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 adding 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
-
-
Constructor Summary
Constructors Constructor Description EnhancedUnitGraph(Body body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAuxiliaryExceptionalEdges()Add an exceptional flow edge for each handler from the corresponding auxiliary nop node to the beginning of the handler.protected voidhandleExplicitThrowEdges()protected voidhandleMultipleReturns()This method adds a STOP node to the graph, if necessary, to make the CFG single-tailed.protected voidremoveBogusHeads()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, size, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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.
-
-