|
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.Merge
public class Merge
Field Summary | |
---|---|
private ProcessExpression[] |
expr
|
private State[] |
initialState
|
private int |
LEFT
|
private boolean |
leftLast
|
private State |
mergeState
|
private ProcessInstance |
processInstance
|
private static java.util.Random |
rand
|
private int |
RIGHT
|
private State[] |
state
|
Fields inherited from class toolbus.process.ProcessExpression |
---|
posInfo, tbfactory |
Constructor Summary | |
---|---|
Merge(ProcessExpression left,
ProcessExpression right,
TBTermFactory tbfactory,
PositionInformation posInfo)
|
Method Summary | |
---|---|
void |
activate()
Activate the StateElement, i.e. |
protected void |
compile(ProcessInstance processInstance,
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()
|
State |
getFirst()
|
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. |
private void |
initState()
|
boolean |
isEnabled()
Is this StateElelement enabled for execution, i.e., are its associated tests all true? If enabled, the StateElement is ready for execution. |
static boolean |
nextBoolean()
Generate next random boolean. |
protected void |
replaceFormals(Environment env)
|
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, 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 static final java.util.Random rand
private final int LEFT
private final int RIGHT
private ProcessInstance processInstance
private final ProcessExpression[] expr
private final State[] state
private final State[] initialState
private final State mergeState
private boolean leftLast
Constructor Detail |
---|
public Merge(ProcessExpression left, ProcessExpression right, TBTermFactory tbfactory, PositionInformation posInfo)
Method Detail |
---|
protected void computeFirst()
computeFirst
in class ProcessExpression
protected void compile(ProcessInstance processInstance, java.util.Stack<java.lang.String> calls, State follows) throws ToolBusException
compile
in class ProcessExpression
ToolBusException
protected void replaceFormals(Environment env) throws ToolBusException
replaceFormals
in class ProcessExpression
ToolBusException
protected ProcessExpression copy()
copy
in class ProcessExpression
public AtomList getAtoms()
getAtoms
in class ProcessExpression
public State getFirst()
getFirst
in class ProcessExpression
public boolean contains(StateElement a)
StateElement
contains
in interface StateElement
a
- the StateElement
public ProcessInstance getProcess()
getProcess
in interface StateElement
public void setTest(aterm.ATerm test, Environment env) throws ToolBusException
StateElement
setTest
in interface StateElement
env
- to be used for executing the test
ToolBusException
public java.util.List<aterm.ATerm> getTests()
StateElement
getTests
in interface StateElement
public boolean isEnabled()
StateElement
isEnabled
in interface StateElement
private void initState()
public State gotoNextStateAndActivate()
gotoNextStateAndActivate
in interface StateElement
public State gotoNextStateAndActivate(StateElement se)
StateElement
gotoNextStateAndActivate
in interface StateElement
public void activate()
StateElement
activate
in interface StateElement
public static boolean nextBoolean()
public boolean execute() throws ToolBusException
StateElement
execute
in interface StateElement
ToolBusException
public ProcessInstance[] debugExecute() throws ToolBusException
StateElement
debugExecute
in interface StateElement
ToolBusException
public java.lang.String toString()
toString
in class java.lang.Object
|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |