soot.toolkits.graph.pdg
Class EnhancedUnitGraph
java.lang.Object
soot.toolkits.graph.UnitGraph
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
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 |
try2nop
protected Hashtable<Unit,Unit> try2nop
handler2header
protected Hashtable<Unit,Unit> handler2header
EnhancedUnitGraph
public EnhancedUnitGraph(Body body)
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.