Class ClassicCompleteBlockGraph
- java.lang.Object
-
- soot.toolkits.graph.BlockGraph
-
- soot.toolkits.graph.ClassicCompleteBlockGraph
-
- All Implemented Interfaces:
Iterable<Block>,DirectedBodyGraph<Block>,DirectedGraph<Block>
public class ClassicCompleteBlockGraph extends BlockGraph
Represents a CFG where the nodes are
Blocks and the edges are derived from control flow. Control flow associated with exceptions is taken into account: when a Unit may throw an exception that is caught by aTrapwithin the Body, the excepting Unit starts a new basic block.ClassicCompleteBlockGraph approximates the results that would have been produced by Soot's
CompleteBlockGraphin releases up to Soot 2.1.0. It is included solely for testing purposes, and should not be used in actual analyses. The approximation works not by duplicating the oldCompleteBlockGraph's logic, but by usingClassicCompleteUnitGraphas the basis for dividingUnits intoBlocks.
-
-
Constructor Summary
Constructors Constructor Description ClassicCompleteBlockGraph(Body body)Constructs a ClassicCompleteBlockGraph for the blocks found by partitioning the the units of the providedBodyinstance into basic blocks.ClassicCompleteBlockGraph(ClassicCompleteUnitGraph unitGraph)Constructs a graph for the blocks found by partitioning the the units in aClassicCompleteUnitGraph.
-
Method Summary
-
Methods inherited from class soot.toolkits.graph.BlockGraph
buildBlocks, computeLeaders, getBlocks, getBody, 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
-
ClassicCompleteBlockGraph
public ClassicCompleteBlockGraph(Body body)
Constructs a ClassicCompleteBlockGraph for the blocks found by partitioning the the units of the provided
Bodyinstance into basic blocks.Note that this constructor builds a
ClassicCompleteUnitGraphinternally when splitting body'sUnits intoBlocks. Callers who already have aClassicCompleteUnitGraphto hand can use the constructor taking a ClassicCompleteUnitGraph as a parameter, as a minor optimization.- Parameters:
body- The underlying body we want to make a graph for.
-
ClassicCompleteBlockGraph
public ClassicCompleteBlockGraph(ClassicCompleteUnitGraph unitGraph)
Constructs a graph for the blocks found by partitioning the the units in aClassicCompleteUnitGraph.- Parameters:
unitGraph- AClassicCompleteUnitGraphbuilt from body. The CompleteBlockGraph constructor uses the passed graph to split the body into blocks.
-
-