forge.cfg
Class CFGStmt

java.lang.Object
  extended by forge.cfg.CFGStmt
All Implemented Interfaces:
CFGElement, ProgramElement
Direct Known Subclasses:
ExitStmt, ReferenceStmt

public abstract class CFGStmt
extends java.lang.Object
implements CFGElement

A stmt in a Forge control flow graph.

Author:
Greg Dennis (gdennis@mit.edu)

Method Summary
abstract  void accept(CFGVisitor visitor)
          Applies a CFG visitor to this stmt.
 ForgeCFG cfg()
          Returns the cfg to which this element belongs.
 java.lang.String id()
          Returns a unique id for this stmt.
 StmtSet preds()
          Returns an unmodifiable view of the predecessor stmts.
 ForgeProgram program()
          Returns the program to which this element belongs.
abstract  StmtSet succs()
          Returns an unmodifiable view of the successor stmts.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

cfg

public final ForgeCFG cfg()
Description copied from interface: CFGElement
Returns the cfg to which this element belongs.

Specified by:
cfg in interface CFGElement

program

public final ForgeProgram program()
Description copied from interface: ProgramElement
Returns the program to which this element belongs.

Specified by:
program in interface ProgramElement

id

public final java.lang.String id()
Returns a unique id for this stmt.


preds

public final StmtSet preds()
Returns an unmodifiable view of the predecessor stmts. The predecessors are held by weak reference, so if they are not otherwise held in the heap, they will disappear from the set of predecessors.


succs

public abstract StmtSet succs()
Returns an unmodifiable view of the successor stmts.


accept

public abstract void accept(CFGVisitor visitor)
Applies a CFG visitor to this stmt.


toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object