Class 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 a Trap within the Body, the excepting Unit starts a new basic block.

    ClassicCompleteBlockGraph approximates the results that would have been produced by Soot's CompleteBlockGraph in 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 old CompleteBlockGraph's logic, but by using ClassicCompleteUnitGraph as the basis for dividing Units into Blocks.

    • Constructor Detail

      • ClassicCompleteBlockGraph

        public ClassicCompleteBlockGraph​(Body body)

        Constructs a ClassicCompleteBlockGraph for the blocks found by partitioning the the units of the provided Body instance into basic blocks.

        Note that this constructor builds a ClassicCompleteUnitGraph internally when splitting body's Units into Blocks. Callers who already have a ClassicCompleteUnitGraph to 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.