com.veromodo.tempo.ast
Class ASTTransition

java.lang.Object
  extended by com.veromodo.tempo.ast.ASTNode
      extended by com.veromodo.tempo.ast.ASTAction
          extended by com.veromodo.tempo.ast.ASTTransition
All Implemented Interfaces:
Locatable, Resource, ResourceGenre

public class ASTTransition
extends ASTAction

Concrete class for a transition. This class augments basic actions with - a list of local declarations - the preconditions - a list of local functions - an optional urgency clause - the effect program - the optional label for the transition

Author:
L. Michel

Nested Class Summary
 
Nested classes/interfaces inherited from class com.veromodo.tempo.ast.ASTAction
ASTAction.Genre
 
Constructor Summary
ASTTransition(ASTAction.Genre g, ASTIdentifier n, ASTListActionFormal f, ASTExpr w, ASTListDeclLocals ll, ASTIdOrNum caseName)
          Constructor for a concrete transition
 
Method Summary
 ASTEffect getEffect()
          Accessor
 ASTListDeclFuns getFuns()
          Accessor
 ASTIdOrNum getLabel()
          Accessor
 ASTListDeclLocals getLocals()
          Accessor
 ASTListFormula getPre()
          Accessor
 ASTExpr getUrgency()
          Accessor
 void setEffect(ASTEffect ef)
          Modifier
 void setFuns(ASTListDeclFuns lf)
          Modifier
 void setPre(ASTListFormula pre)
          Modifier
 void setUrgency(ASTExpr ur)
          Modifier
 void visit(ASTIVisitor v)
          The visitor design pattern method @see ASTIVisitor
 
Methods inherited from class com.veromodo.tempo.ast.ASTAction
getFormals, getGenre, getId, getName, getWhere
 
Methods inherited from class com.veromodo.tempo.ast.ASTNode
getExtent, setExtent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.veromodo.tempo.util.Resource
getExtent
 

Constructor Detail

ASTTransition

public ASTTransition(ASTAction.Genre g,
                     ASTIdentifier n,
                     ASTListActionFormal f,
                     ASTExpr w,
                     ASTListDeclLocals ll,
                     ASTIdOrNum caseName)
Constructor for a concrete transition

Parameters:
g - genre of the transition (@see ASTAction#Genre)
n - the name of the transition
f - the list of formals for the transition
w - the optional where clause
ll - the list of locals
caseName - the optional label for the transition
Method Detail

getLocals

public ASTListDeclLocals getLocals()
Accessor

Returns:
the list of local declarations

setFuns

public void setFuns(ASTListDeclFuns lf)
Modifier

Parameters:
lf - the list of local function declarations

getFuns

public ASTListDeclFuns getFuns()
Accessor

Returns:
the list of local function declarations

setPre

public void setPre(ASTListFormula pre)
Modifier

Parameters:
pre - the list of preconditions

getPre

public ASTListFormula getPre()
Accessor

Returns:
the list of preconditions

setUrgency

public void setUrgency(ASTExpr ur)
Modifier

Parameters:
ur - the urgency clause

getUrgency

public ASTExpr getUrgency()
Accessor

Returns:
the urgency clause

setEffect

public void setEffect(ASTEffect ef)
Modifier

Parameters:
ef - the effect program

getEffect

public ASTEffect getEffect()
Accessor

Returns:
the effect program

getLabel

public ASTIdOrNum getLabel()
Accessor

Returns:
the transition label

visit

public void visit(ASTIVisitor v)
The visitor design pattern method @see ASTIVisitor

Overrides:
visit in class ASTAction
Parameters:
v - the visitor interface
See Also:
ASTIVisitor