An instruction can be activated (activ method), reset
(reset method), or forced to terminate (terminate
method). Each activation returns TERM, STOP, or
SUSP, three return codes defined in the
ReturnCodes interface:
TERM (for ``terminated'') means that execution of the
instruction is completed. Thus, activating it at following instants
will have no effect and will again return TERM.
STOP (for ``stopped'') means that execution of the instruction
is stopped at a stable state for the current instant, and could
progress at the next instant upon activation.
SUSP (for ``suspended'') means that execution of the
instruction has not reached a stable state for the current instant, and has to
resume during that instant. This is for example the case when
awaiting for an event not yet generated (see section
5): execution suspends to give other components
the opportunity to generate it.
A call to the terminate method forces an instruction to
completely terminate and therefore to return TERM when activated. A
call to the reset method resets the instruction in its initial
state.
Instruction implements Cloneable and thus instruction
clones are available by the clone method.
Finally, equality of two instructions (equals method) and
the toString method to print an instruction, are implemented.