forge.cfg
Class BranchStmt

java.lang.Object
  extended by forge.cfg.CFGStmt
      extended by forge.cfg.ReferenceStmt
          extended by forge.cfg.BranchStmt
All Implemented Interfaces:
CFGElement, ProgramElement

public final class BranchStmt
extends ReferenceStmt

A branching node of a Forge control flow graph.

Author:
Greg Dennis (gdennis@mit.edu)

Method Summary
 void accept(CFGVisitor visitor)
          Applies a CFG visitor to this stmt.
 ForgeExpression condition()
           
 CFGStmt getElse()
           
 CFGStmt getThen()
           
 java.util.Set<ForgeExpression.Modifiable> referenced()
          Returns the set of variables and instance domains referenced by the statement.
 void setElse(CFGStmt elseStmt)
           
 void setThen(CFGStmt thenStmt)
           
 StmtSet succs()
          Returns an unmodifiable view of the successor stmts.
 
Methods inherited from class forge.cfg.CFGStmt
cfg, id, preds, program, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

condition

public ForgeExpression condition()

referenced

public java.util.Set<ForgeExpression.Modifiable> referenced()
Description copied from class: ReferenceStmt
Returns the set of variables and instance domains referenced by the statement. The "used" modifiables, in the def-use meaning.

Specified by:
referenced in class ReferenceStmt

succs

public StmtSet succs()
Description copied from class: ReferenceStmt
Returns an unmodifiable view of the successor stmts.

Specified by:
succs in class ReferenceStmt

getThen

public CFGStmt getThen()

setThen

public void setThen(CFGStmt thenStmt)

getElse

public CFGStmt getElse()

setElse

public void setElse(CFGStmt elseStmt)

accept

public void accept(CFGVisitor visitor)
Description copied from class: CFGStmt
Applies a CFG visitor to this stmt.

Specified by:
accept in class CFGStmt