harpoon.Analysis
Class SESE

java.lang.Object
  extended by harpoon.Analysis.SESE

public class SESE
extends Object

SESE computes nested single-entry single-exit regions from a cycle-equivalency set.

See Johnson, Pearson, and Pingali, "Finding regions fast: Single entry single exit and control regions in linear time" (Technical Report TR 93-1365, Cornell University, July 1993). Their PLDI'94 paper "The program structure tree: Computing control regions in linear time" might also provide a useful reference.

Version:
$Id: SESE.java,v 1.7 2004/02/08 03:19:12 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Nested Class Summary
static class SESE.Region
          SESE.Region represents a single-entry single-exit (SESE) Region, as computed by the SESE object.
 
Field Summary
 Map smallestSESE
          Mapping from Nodes/Edges to smallest enclosing canonical SESE Region.
 SESE.Region topLevel
          Root of Region tree.
 
Constructor Summary
SESE(HCode hc)
          Creates a SESE using a CycleEq.
 
Method Summary
 Iterator depthFirst()
          Iterate through SESE regions, depth-first.
 void print(PrintWriter pw)
           
 Iterator topDown()
          Iterate through SESE regions, top-down.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topLevel

public final SESE.Region topLevel
Root of Region tree.


smallestSESE

public final Map smallestSESE
Mapping from Nodes/Edges to smallest enclosing canonical SESE Region.

Constructor Detail

SESE

public SESE(HCode hc)
Creates a SESE using a CycleEq.

Method Detail

topDown

public Iterator topDown()
Iterate through SESE regions, top-down. All top-level regions are visited first, then all children of top-level regions, then all grandchildren, then all great-grandchildren, etc.


depthFirst

public Iterator depthFirst()
Iterate through SESE regions, depth-first.


print

public void print(PrintWriter pw)