Class BlockTypeAnalysis

All Implemented Interfaces:
DataflowAnalysis<BlockType>

public class BlockTypeAnalysis extends BasicAbstractDataflowAnalysis<BlockType>
Dataflow analysis to determine the nesting of catch and finally blocks within a method.
Author:
David Hovemeyer
See Also:
  • Constructor Details

    • BlockTypeAnalysis

      public BlockTypeAnalysis(DepthFirstSearch dfs)
      Constructor.
      Parameters:
      dfs - a DepthFirstSearch for the method to be analyzed
  • Method Details

    • createFact

      public BlockType createFact()
      Description copied from interface: DataflowAnalysis
      Create empty (uninitialized) dataflow facts for one program point. A valid value will be copied into it before it is used.
    • copy

      public void copy(BlockType source, BlockType dest)
      Description copied from interface: DataflowAnalysis
      Copy dataflow facts.
    • initEntryFact

      public void initEntryFact(BlockType result) throws DataflowAnalysisException
      Description copied from interface: DataflowAnalysis
      Initialize the "entry" fact for the graph.
      Throws:
      DataflowAnalysisException
    • makeFactTop

      public void makeFactTop(BlockType fact)
      Description copied from interface: DataflowAnalysis
      Make given fact the top value.
    • isTop

      public boolean isTop(BlockType fact)
      Description copied from interface: DataflowAnalysis
      Is the given fact the top value.
    • isForwards

      public boolean isForwards()
      Description copied from interface: DataflowAnalysis
      Returns true if the analysis is forwards, false if backwards.
    • getBlockOrder

      public BlockOrder getBlockOrder(CFG cfg)
      Description copied from interface: DataflowAnalysis
      Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop.
      Parameters:
      cfg - the CFG upon which we're performing dataflow analysis
    • same

      public boolean same(BlockType fact1, BlockType fact2)
      Description copied from interface: DataflowAnalysis
      Are given dataflow facts the same?
    • transfer

      public void transfer(BasicBlock basicBlock, @CheckForNull org.apache.bcel.generic.InstructionHandle end, BlockType start, BlockType result) throws DataflowAnalysisException
      Description copied from interface: DataflowAnalysis
      Transfer function for the analysis. Taking dataflow facts at start (which might be either the entry or exit of the block, depending on whether the analysis is forwards or backwards), modify result to be the facts at the other end of the block.
      Parameters:
      basicBlock - the basic block
      end - if nonnull, stop before considering this instruction; otherwise, consider all of the instructions in the basic block
      start - dataflow facts at beginning of block (if forward analysis) or end of block (if backwards analysis)
      result - resulting dataflow facts at other end of block
      Throws:
      DataflowAnalysisException
    • meetInto

      public void meetInto(BlockType fact, Edge edge, BlockType result) throws DataflowAnalysisException
      Description copied from interface: DataflowAnalysis
      Meet a dataflow fact associated with an incoming edge into another fact. This is used to determine the start fact for a basic block.
      Parameters:
      fact - the predecessor fact (incoming edge)
      edge - the edge from the predecessor
      result - the result fact
      Throws:
      DataflowAnalysisException