Class CFGUtil.RegionFinder

java.lang.Object
com.pnfsoftware.jeb.core.units.code.CFGUtil.RegionFinder
Enclosing class:
CFGUtil

public static class CFGUtil.RegionFinder extends Object
This class attempts to determine a region in a graph. A region consists of a set of blocks, reachable from an entry block, and reaching an optional set of outputs. The only way to reach a region's node is via the entry block.
  • Constructor Details

    • RegionFinder

      public RegionFinder(CFG<? extends IInstruction> cfg, long entry, Set<Long> outputs, boolean canLoopBackToEntry)
      Build a region finder.
      Parameters:
      cfg - CFG
      entry - entry block address
      outputs - output block addresses (may be 0, 1, or 2+)
      canLoopBackToEntry - true if the blocks in the region to-be-determined may loop back to the entry node; false if they may not
    • RegionFinder

      public RegionFinder(CFG<? extends IInstruction> cfg, long entry, long output)
      Build a finder for a region having a single output, for which the region blocks cannot loop back to the entry.
      Parameters:
      cfg - CFG
      entry - entry block address
      output - exit block address
  • Method Details

    • getRegionBlocks

      public Collection<Long> getRegionBlocks()
      Returns:
      the list of blocks in the region (the list of outputs can never be included in this result)
    • process

      public boolean process()
      Returns:
      true if a region was properly determined; else, false