Class BriefBlockGraph

  • All Implemented Interfaces:
    Iterable<Block>, DirectedBodyGraph<Block>, DirectedGraph<Block>

    public class BriefBlockGraph
    extends BlockGraph

    Represents a CFG for a Body where the nodes are Blocks and edges are derived from control flow. Control flow associated with exceptions is ignored, so the graph will be a forest where each exception handler constitutes a disjoint subgraph.

    • Constructor Detail

      • BriefBlockGraph

        public BriefBlockGraph​(Body body)
        Constructs a BriefBlockGraph from a given Body.

        Note that this constructor builds a BriefUnitGraph internally when splitting body's Units into Blocks. Callers who already have a BriefUnitGraph to hand can use the constructor taking a CompleteUnitGraph as a parameter, as a minor optimization.

        Parameters:
        body - the Body for which to build a graph.
      • BriefBlockGraph

        public BriefBlockGraph​(BriefUnitGraph unitGraph)
        Constructs a BriefBlockGraph representing the Unit-level control flow represented by the passed BriefUnitGraph.
        Parameters:
        unitGraph - the Body for which to build a graph.