uk.ac.man.cs.rainbow.simulator.rasm
Class StatelessDevice
java.lang.Object
|
+--uk.ac.man.cs.rainbow.simulator.Instruction
|
+--uk.ac.man.cs.rainbow.simulator.rasm.StatelessDevice
- All Implemented Interfaces:
- Serializable
- public class StatelessDevice
- extends Instruction
Mark thread as stateless.
This sets an internal flag in the thread which allows state
characterisation of the device to be optimised by saying that the
device will never have any state.
In the implementation, this avoids a string copy and a
hash-table lookup, as well as allowing an appreciable compression
in the size of state vector generated. This instruction should
only ever be used where the thread is known
systematically to be statelss, as is the case with many
of the devices in the standard library and some user-defined
Green devices (like functions and tables.)
Also incorporates the action of the StaticStackBase
instruction.
-
-
- See Also:
LabelDevice
,
DeclareDeviceWithState
,
StaticStackBase
,
StateEnumerator.characterise(Data[])
, Serialized Form
StatelessDevice
public StatelessDevice()
StatelessDevice
public StatelessDevice(RASMCode code)
toString
public String toString()
- Overrides:
toString
in class Object
execute
protected boolean execute(RASMThread thread)
- Description copied from class:
Instruction
- Make this instruction execute in the given context.
- Overrides:
execute
in class Instruction
- Following copied from class:
uk.ac.man.cs.rainbow.simulator.Instruction
- Throws:
RainbowException
- All sorts of things can go wrong during execution...