Class CompleteUnitGraph
- java.lang.Object
-
- soot.toolkits.graph.UnitGraph
-
- soot.toolkits.graph.ExceptionalUnitGraph
-
- soot.toolkits.graph.CompleteUnitGraph
-
- All Implemented Interfaces:
Iterable<Unit>,DirectedBodyGraph<Unit>,DirectedGraph<Unit>,ExceptionalGraph<Unit>
public class CompleteUnitGraph extends ExceptionalUnitGraph
Represents a CFG for a
Bodyinstance where the nodes areUnitinstances, and where control flow associated with exceptions is taken into account. In aCompleteUnitGraph, everyUnitcovered by aTrapis considered to have the potential to throw an exception caught by theTrap, so there are edges to theTrap's handler from every trappedUnit, as well as from all the predecessors of the trappedUnits.This implementation of
CompleteUnitGraphis included for backwards compatibility (new code should useExceptionalUnitGraph), but the graphs it produces are not necessarily identical to the graphs produced by the implementation ofCompleteUnitGraphprovided by versions of Soot up to and including release 2.1.0. The known differences include:- If a
BodyincludesUnits which branch into the middle of the region protected by aTrapthis implementation ofCompleteUnitGraphwill include edges from those branchingUnits to theTrap's handler (since the branches are predecessors of an instruction which may throw an exception caught by theTrap). The 2.1.0 implementation ofCompleteUnitGraphmistakenly omitted these edges. - If the initial
Unitin theBodymight throw an exception caught by aTrapwithin the body, this implementation will include the initial handlerUnitin the list returned bygetHeads()(since the handler unit might be the first Unit in the method to execute to completion). The 2.1.0 implementation ofCompleteUnitGraphmistakenly omitted the handler from the set of heads.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class soot.toolkits.graph.ExceptionalUnitGraph
ExceptionalUnitGraph.ExceptionDest
-
-
Field Summary
-
Fields inherited from class soot.toolkits.graph.ExceptionalUnitGraph
throwAnalysis, unitToExceptionalPreds, unitToExceptionalSuccs, unitToExceptionDests, unitToUnexceptionalPreds, unitToUnexceptionalSuccs
-
Fields inherited from class soot.toolkits.graph.UnitGraph
body, heads, method, tails, unitChain, unitToPreds, unitToSuccs
-
-
Constructor Summary
Constructors Constructor Description CompleteUnitGraph(Body b)
-
Method Summary
-
Methods inherited from class soot.toolkits.graph.ExceptionalUnitGraph
buildExceptionalEdges, buildExceptionDests, buildHeadsAndTails, getExceptionalPredsOf, getExceptionalSuccsOf, getExceptionDests, getThrowAnalysis, getUnexceptionalPredsOf, getUnexceptionalSuccsOf, initialize, toString
-
Methods inherited from class soot.toolkits.graph.UnitGraph
addEdge, buildUnexceptionalEdges, combineMapValues, getBody, getExtendedBasicBlockPathBetween, getHeads, getPredsOf, getSuccsOf, getTails, iterator, size
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface soot.toolkits.graph.DirectedGraph
getHeads, getPredsOf, getSuccsOf, getTails, iterator, size
-
Methods inherited from interface soot.toolkits.graph.ExceptionalGraph
getBody
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
CompleteUnitGraph
public CompleteUnitGraph(Body b)
-
-