public static class

CFGUtil.RegionFinder

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.CFGUtil.RegionFinder

Class Overview

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.

Summary

Public Constructors
RegionFinder(CFG<? extends IInstruction> cfg, long entry, Set<Long> outputs, boolean canLoopBackToEntry)
Build a region finder.
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.
Public Methods
Collection<Long> getRegionBlocks()
boolean process()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

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

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

Public Methods

public Collection<Long> getRegionBlocks ()

Returns
  • the list of blocks in the region (the list of outputs can never be included in this result)

public boolean process ()

Returns
  • true if a region was properly determined; else, false