forge.cfg
Class ForgeCFG.Impl

java.lang.Object
  extended by forge.cfg.ForgeCFG
      extended by forge.cfg.ForgeCFG.Impl
All Implemented Interfaces:
ProgramElement
Enclosing class:
ForgeCFG

public static final class ForgeCFG.Impl
extends ForgeCFG

An implementation CFG with several statements.


Nested Class Summary
 
Nested classes/interfaces inherited from class forge.cfg.ForgeCFG
ForgeCFG.Impl, ForgeCFG.Spec
 
Method Summary
 CFGStmt entry()
          Returns the entry stmt of the cfg.
 AssignStmt newAssign(ForgeVariable var, ForgeExpression expr)
          Constructs a new assign stmt with the specified variable and expr, whose successor is the exit stmt of this cfg.
 SpecStmt newAssume(ForgeExpression condition)
          Constructs a new spec stmt with the specified condition and no modified variables, whose successor is the exit stmt of this cfg.
 BranchStmt newBranch(ForgeExpression condition)
          Constructs a new branch node with the specified condition value, whose successors are both the exit stmt of this cfg.
 CallStmt newCall(ForgeCFG called, java.util.List<ForgeExpression> inArgs, java.util.List<ForgeVariable> outArgs)
          Constructs a new call stmt with the specified values, whose successor is the exit stmt of this cfg.
 CreateStmt newCreate(ForgeVariable var, InstanceDomain type)
          Constructs a new create stmt with the specified values, whose successor is the exit stmt of this cfg.
 SpecStmt newSpec(java.util.Set<? extends ForgeVariable> modified, ForgeExpression condition)
          Constructs a new assume stmt with the specified condition and the given set of modified variables, whose successor is the exit stmt of this cfg.
 void setEntry(CFGStmt stmt)
          Set the entry stmt of the implementation.
 
Methods inherited from class forge.cfg.ForgeCFG
checkCFG, exit, generalSpecification, implementation, jmlSpecification, procedure, program, specification, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

entry

public CFGStmt entry()
Description copied from class: ForgeCFG
Returns the entry stmt of the cfg.

Specified by:
entry in class ForgeCFG

setEntry

public void setEntry(CFGStmt stmt)
Set the entry stmt of the implementation.


newAssign

public AssignStmt newAssign(ForgeVariable var,
                            ForgeExpression expr)
Constructs a new assign stmt with the specified variable and expr, whose successor is the exit stmt of this cfg.


newAssume

public SpecStmt newAssume(ForgeExpression condition)
Constructs a new spec stmt with the specified condition and no modified variables, whose successor is the exit stmt of this cfg.


newSpec

public SpecStmt newSpec(java.util.Set<? extends ForgeVariable> modified,
                        ForgeExpression condition)
Constructs a new assume stmt with the specified condition and the given set of modified variables, whose successor is the exit stmt of this cfg.


newCall

public CallStmt newCall(ForgeCFG called,
                        java.util.List<ForgeExpression> inArgs,
                        java.util.List<ForgeVariable> outArgs)
Constructs a new call stmt with the specified values, whose successor is the exit stmt of this cfg.


newCreate

public CreateStmt newCreate(ForgeVariable var,
                            InstanceDomain type)
Constructs a new create stmt with the specified values, whose successor is the exit stmt of this cfg.


newBranch

public BranchStmt newBranch(ForgeExpression condition)
Constructs a new branch node with the specified condition value, whose successors are both the exit stmt of this cfg.