|
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.atom.Atom
public abstract class Atom
The class Atom forms the basic building block of Tscripts. Instances of Atom are both the most primitive elements of process expressions and the elements of the states to which process exprssions are being compiled.
Nested Class Summary | |
---|---|
private static class |
Atom.EmptyProcessInstanceArrayHolder
This class holds static reference to an empty process instance array, which can be used as return value in the debugExecute method. |
private static class |
Atom.Test
This class represents a test associated with an atom. |
Field Summary | |
---|---|
private long |
activateTime
|
private Ref[] |
atomArgs
|
private int |
delay
|
private long |
enabledTime
|
private Environment |
env
|
protected java.lang.String |
externalNameAsReceivedByTool
|
private static java.lang.String |
MSECS
|
private static Ref[] |
NOATOMARGS
|
private ProcessInstance |
processInstance
|
private static java.lang.String |
SECS
|
private java.util.List<Atom.Test> |
tests
|
private boolean |
timeExpr
|
private int |
timeout
|
private long |
timeoutTime
|
Fields inherited from class toolbus.process.ProcessExpression |
---|
posInfo, tbfactory |
Constructor Summary | |
---|---|
Atom(TBTermFactory tbfactory,
PositionInformation posInfo)
|
Method Summary | |
---|---|
void |
activate()
Activate the StateElement, i.e. |
void |
compile(ProcessInstance pi,
java.util.Stack<java.lang.String> calls,
State follow)
|
void |
computeFirst()
|
boolean |
contains(StateElement b)
Check whether a StateElement contains another StateElement. |
void |
copyAtomAttributes(Atom a)
|
ProcessInstance[] |
debugExecute()
Executes the state element in debug mode. |
void |
destroy()
|
aterm.ATerm |
getAtomArgValue(int i)
|
AtomList |
getAtoms()
|
int |
getDelay()
|
Environment |
getEnv()
|
ProcessInstance |
getProcess()
|
java.util.List<aterm.ATerm> |
getTests()
Returns a collection containing all tests that are associated with this state element. |
int |
getTimeout()
|
ToolBus |
getToolBus()
|
State |
gotoNextStateAndActivate()
|
State |
gotoNextStateAndActivate(StateElement b)
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. |
void |
replaceFormals(Environment e)
|
void |
setAbsoluteDelay(aterm.ATermList delay)
|
void |
setAbsoluteTimeout(aterm.ATermList timeout)
|
void |
setAtomArgs(Ref[] refs)
|
void |
setDelay(aterm.ATerm delay)
|
protected void |
setEnv(Environment env)
|
void |
setTest(aterm.ATerm test,
Environment e)
Add a test to this state element. |
void |
setTimeout(aterm.ATerm timeout)
|
private java.lang.String |
shortName()
|
aterm.ATermAppl |
toATerm()
|
java.lang.String |
toString()
|
Methods inherited from class toolbus.process.ProcessExpression |
---|
addToFirst, addToFollow, copy, 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 |
---|
execute, getFollow, getPosInfo |
Field Detail |
---|
private static final java.lang.String SECS
private static final java.lang.String MSECS
private static final Ref[] NOATOMARGS
private ProcessInstance processInstance
private Environment env
private java.util.List<Atom.Test> tests
private Ref[] atomArgs
private int delay
private int timeout
private boolean timeExpr
private long activateTime
private long enabledTime
private long timeoutTime
protected java.lang.String externalNameAsReceivedByTool
Constructor Detail |
---|
public Atom(TBTermFactory tbfactory, PositionInformation posInfo)
Method Detail |
---|
public void destroy()
public void setAtomArgs(Ref[] refs)
public aterm.ATerm getAtomArgValue(int i)
public void copyAtomAttributes(Atom a)
protected void setEnv(Environment env)
public Environment getEnv()
public void setTest(aterm.ATerm test, Environment e) throws ToolBusException
StateElement
setTest
in interface StateElement
e
- to be used for executing the test
ToolBusException
public java.util.List<aterm.ATerm> getTests()
StateElement
getTests
in interface StateElement
public void setDelay(aterm.ATerm delay)
public void setAbsoluteDelay(aterm.ATermList delay)
public int getDelay()
public void setTimeout(aterm.ATerm timeout)
public void setAbsoluteTimeout(aterm.ATermList timeout)
public int getTimeout()
public ToolBus getToolBus()
public AtomList getAtoms()
getAtoms
in class ProcessExpression
private java.lang.String shortName()
public java.lang.String toString()
toString
in class java.lang.Object
public aterm.ATermAppl toATerm()
public void computeFirst()
computeFirst
in class ProcessExpression
public void replaceFormals(Environment e) throws ToolBusException
replaceFormals
in class ProcessExpression
ToolBusException
public void compile(ProcessInstance pi, java.util.Stack<java.lang.String> calls, State follow) throws ToolBusException
compile
in class ProcessExpression
ToolBusException
public boolean isEnabled() throws ToolBusException
StateElement
isEnabled
in interface StateElement
ToolBusException
public boolean contains(StateElement b)
StateElement
contains
in interface StateElement
b
- the StateElement
public ProcessInstance getProcess()
getProcess
in interface StateElement
public State gotoNextStateAndActivate()
gotoNextStateAndActivate
in interface StateElement
public State gotoNextStateAndActivate(StateElement b)
StateElement
gotoNextStateAndActivate
in interface StateElement
public void activate()
StateElement
activate
in interface StateElement
public ProcessInstance[] debugExecute() throws ToolBusException
StateElement
debugExecute
in interface StateElement
ToolBusException
|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |