inria.meije.rc.sugarcubes
Interface ReactiveEngine

All Superinterfaces:
java.io.Serializable

public interface ReactiveEngine
extends java.io.Serializable

It is the interface used to access to the reactive environment in an atomic operation.


Method Summary
 void addProgram(Program aComponent)
          Allows one to dynamically add Programs into the reactive machine.
 void addTask(Task t, boolean beforeReaction)
          Allows the addition of inter-instant tasks.
 Identifier cubeDestructionIdentifier(java.lang.String aCubeName)
          Returns an Identifier referencing the destruction event of a Cube whose the name is given as argument, using the appropriate type of Identifers internally used by the machine.
 void generateEvent(Identifier eventName, Argument[] args)
          Generates an Event in the machine.
 Cube getCube()
          Returns the currently activated Cube.
 Program getFrozenProgram(java.lang.String instructionName)
          Retrieves the residual of a frozen program according to its name.
 Machine getMachine()
          Returns the reactive Machine itself.
 Identifier identifierFromString(java.lang.String aString)
          Returns an Identifier corresponding to the string parameter, using the appropriate type of Identifers internally used by the machine.
 void removeTask(Task t)
          Removes inter-instant tasks.
 

Method Detail

addProgram

public void addProgram(Program aComponent)
Allows one to dynamically add Programs into the reactive machine.
Programs are actually added at the next instant of execution. In addition, this method makes a copy of the program to add and then actually adds the copy.

addTask

public void addTask(Task t,
                    boolean beforeReaction)
Allows the addition of inter-instant tasks.
Tasks can be either added to be processed before the execution of an instant of the system, or after the execution of an instant.

cubeDestructionIdentifier

public Identifier cubeDestructionIdentifier(java.lang.String aCubeName)
Returns an Identifier referencing the destruction event of a Cube whose the name is given as argument, using the appropriate type of Identifers internally used by the machine.

generateEvent

public void generateEvent(Identifier eventName,
                          Argument[] args)
Generates an Event in the machine.
Actual generation only occurs at the next instant.

getCube

public Cube getCube()
Returns the currently activated Cube.

getFrozenProgram

public Program getFrozenProgram(java.lang.String instructionName)
Retrieves the residual of a frozen program according to its name.
A frozen program can only be extracted one time. After having be retrieved this methods only return Nothing for the same program.

getMachine

public Machine getMachine()
Returns the reactive Machine itself.
Warning: the usage of this method can lead to problems. Its purpose is essentially to ease the dynamic rebinding after code migration. Be aware that this method could lead to problems.

identifierFromString

public Identifier identifierFromString(java.lang.String aString)
Returns an Identifier corresponding to the string parameter, using the appropriate type of Identifers internally used by the machine.

removeTask

public void removeTask(Task t)
Removes inter-instant tasks.