| 
The Meta-Environment API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttoolbus.process.ProcessExpression
toolbus.process.ProcessCall
public class ProcessCall
ProcessCall implements a call to a process P(f1, f2, ...). There are two main cases: (1) A static process call: the current environment does not contain a declaration for a string variable P and the name of the process is P. Its declaration is taken and the call is replaced statically by the corresponding process expression. (2) A dynamic process call: the current environment *does* contain a declaration for a string variable P and the name of the process is the *string value* of that variable. The declaration correspodning to that value is taken and the call is replaced dynamically by the corresponding process expression. In the dynamic case, each the call is encountered during execution it the may thus be expanded into a different process expression. Due to the possibility of dynamic calls, a process call is a StateElement and exists during execution.
| Field Summary | |
|---|---|
private  boolean | 
activated
 | 
protected  aterm.ATermList | 
actuals
 | 
private  ProcessDefinition | 
definition
 | 
private  Environment | 
env
 | 
private  boolean | 
evalArgs
 | 
private  boolean | 
executing
 | 
private  State | 
firstState
 | 
private  aterm.ATermList | 
formals
 | 
private  java.lang.String | 
name
 | 
protected  aterm.ATermList | 
originalActuals
 | 
protected  ProcessExpression | 
PE
 | 
protected  ProcessInstance | 
processInstance
 | 
| Fields inherited from class toolbus.process.ProcessExpression | 
|---|
posInfo, tbfactory | 
| Constructor Summary | |
|---|---|
ProcessCall(aterm.ATerm call,
                       TBTermFactory tbfactory,
                       PositionInformation posInfo)
 | 
|
ProcessCall(java.lang.String name,
                       aterm.ATermList actuals,
                       boolean evalArgs,
                       TBTermFactory tbfactory,
                       PositionInformation posInfo)
 | 
|
ProcessCall(java.lang.String name,
                       aterm.ATermList actuals,
                       TBTermFactory tbfactory,
                       PositionInformation posInfo)
 | 
|
| Method Summary | |
|---|---|
 void | 
activate()
Activate the StateElement, i.e.  | 
protected  void | 
compile(ProcessInstance P,
               java.util.Stack<java.lang.String> calls,
               State follows)
 | 
protected  void | 
computeFirst()
 | 
 boolean | 
contains(StateElement a)
Check whether a StateElement contains another StateElement.  | 
protected  ProcessExpression | 
copy()
 | 
 ProcessInstance[] | 
debugExecute()
Executes the state element in debug mode.  | 
 boolean | 
execute()
Execute this StateElement  | 
 AtomList | 
getAtoms()
 | 
 StateElement | 
getExecutedStateElement()
Returns the last, by this process call, executed state element.  | 
 java.lang.String | 
getName()
 | 
 ProcessInstance | 
getProcess()
 | 
 java.util.List<aterm.ATerm> | 
getTests()
Returns a collection containing all tests that are associated with this state element.  | 
 State | 
gotoNextStateAndActivate()
 | 
 State | 
gotoNextStateAndActivate(StateElement se)
Get the successor of the StateElement for a given other StateElement elem.  | 
 boolean | 
isEnabled()
Is this StateElelement enabled for execution, i.e., are its associated tests all true? If enabled, the StateElement is ready for execution.  | 
protected  void | 
replaceFormals(Environment e)
 | 
 void | 
setEvalArgs(boolean b)
 | 
 void | 
setTest(aterm.ATerm test,
               Environment env)
Add a test to this state element.  | 
 java.lang.String | 
toString()
 | 
| Methods inherited from class toolbus.process.ProcessExpression | 
|---|
addToFirst, addToFollow, getFirst, getFollow, getPosInfo, setFirst, setFollow | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface toolbus.StateElement | 
|---|
getFollow, getPosInfo | 
| Field Detail | 
|---|
private java.lang.String name
protected final aterm.ATermList originalActuals
protected aterm.ATermList actuals
private aterm.ATermList formals
private Environment env
private ProcessDefinition definition
protected ProcessExpression PE
protected ProcessInstance processInstance
private boolean evalArgs
private final State firstState
private boolean executing
private boolean activated
| Constructor Detail | 
|---|
public ProcessCall(java.lang.String name,
                   aterm.ATermList actuals,
                   TBTermFactory tbfactory,
                   PositionInformation posInfo)
public ProcessCall(aterm.ATerm call,
                   TBTermFactory tbfactory,
                   PositionInformation posInfo)
public ProcessCall(java.lang.String name,
                   aterm.ATermList actuals,
                   boolean evalArgs,
                   TBTermFactory tbfactory,
                   PositionInformation posInfo)
| Method Detail | 
|---|
public void setEvalArgs(boolean b)
protected ProcessExpression copy()
copy in class ProcessExpressionprotected void computeFirst()
computeFirst in class ProcessExpression
protected void replaceFormals(Environment e)
                       throws ToolBusException
replaceFormals in class ProcessExpressionToolBusException
protected void compile(ProcessInstance P,
                       java.util.Stack<java.lang.String> calls,
                       State follows)
                throws ToolBusException
compile in class ProcessExpressionToolBusExceptionpublic AtomList getAtoms()
getAtoms in class ProcessExpressionpublic java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean contains(StateElement a)
StateElement
contains in interface StateElementa - the StateElement
public ProcessInstance getProcess()
getProcess in interface StateElement
public void setTest(aterm.ATerm test,
                    Environment env)
             throws ToolBusException
StateElement
setTest in interface StateElementenv - to be used for executing the test
ToolBusExceptionpublic java.util.List<aterm.ATerm> getTests()
StateElement
getTests in interface StateElementpublic boolean isEnabled()
StateElement
isEnabled in interface StateElementpublic State gotoNextStateAndActivate()
gotoNextStateAndActivate in interface StateElementpublic State gotoNextStateAndActivate(StateElement se)
StateElement
gotoNextStateAndActivate in interface StateElementpublic void activate()
StateElement
activate in interface StateElement
public boolean execute()
                throws ToolBusException
StateElement
execute in interface StateElementToolBusException
public ProcessInstance[] debugExecute()
                               throws ToolBusException
StateElement
debugExecute in interface StateElementToolBusExceptionpublic StateElement getExecutedStateElement()
  | 
The Meta-Environment API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||