|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A session (over RMI) with a Rainbow server. Must be called
in a single-threaded fashion or Bad Things Will Happen. Obtain
sessions from a Server
object (like SimServer
) over
RMI.
(Note that the purpose of clear
() is to remove
any saved state hanging around and initialise a number of internal
variables. It must be used initially and between runs, which also
forces a recompilation every time, and it is good behaviour to use
it before finishing with the session object to ensure that the server
cleans up any surplus resources in a timely fashion.)
clear
()
compile
(rainbowModule)
compile
(anotherRainbowModule)
link
()
...all the compilation run from above...
setExecHandler
(handler)
initialise
()
step
()
step
()
...
step
()
clear
()
Notes:
...all the compilation run from above...
deadlock
(progressWatcher)
clear
()
Note that most designs that require an exec-handler are also not readily amenable to deadlock (or model-) checking.
...all the compilation run from above...
modelcheck
(formula,props,devMap,progressWatcher)
clear
()
Notes:
clear
()
compileAbstract
(rainbowModule,abstraction)
stepAbstract
()
stepAbstract
()
...
stepAbstract
()
clear
()
Note that this does not use the standard compilation sequence.
clear
()
compileAbstract
(rainbowModule,abstraction)
deadlockAbstract
(progressWatcher)
clear
()
Note that this does not use the standard compilation sequence.
clear
()
compileAbstract
(rainbowModule,abstraction)
modelcheckAbstract
(formula,props,progressWatcher)
clear
()
Note that this does not use the standard compilation sequence.
assemble
()resolveType
()read
()Server
server = (Server)Naming.lookup("//somehost/RainbowServer"); System.out.println("Connected to " + server.getVersion
());Session
s = server.getSession
(); s.clear
(); s.compile
(design.getRainbowCode(...)); s.link
(); s.setExecHandler
(new MyExecHandlerImpl());Status
status = s.initialise
(); updateWireLabels(status.events); // ... now I'll illustrate an action like run_until(42) ... while (status.time < 42) { status = s.step
(); } updateWireLabels(status.events);
Method Summary | |
void |
assemble(String rasmtext)
Assemble the RASM source into a module and add it to the list of things to execute. |
void |
clear()
Initialise this session object. |
void |
compile(String rainbowSource)
Compile the Rainbow source into a module and add it to the list of things to execute. |
void |
compileAbstract(String rainbowSource,
String abstraction)
Compile the Rainbow source into GCL and apply an abstract interpretation to its dataspace. |
DeadlockResult |
deadlock(ProgressWatcher watcher)
Check the current modules for deadlock. |
DeadlockResult |
deadlockAbstract(ProgressWatcher watcher)
Check the abstract system for deadlock. |
Status |
initialise()
Initialise the simulator. |
void |
link()
Link the list of modules to execute. |
ModelcheckResult |
modelcheck(String ctlStarFormula,
String[] propositions,
String[] deviceMap,
ProgressWatcher watcher)
Check the current modules to see if the given temporal formula is satisfied. |
ModelcheckResult |
modelcheckAbstract(String LTLFormula,
String[] propositions,
ProgressWatcher watcher)
Check the abstract system to see if it satisfies a temporal formula. |
Data |
read(Integer key)
Read the register indexed by the given key. |
Type |
resolveType(String type)
Resolve the string to a type against the list of modules to execute. |
void |
setExecHandler(ExecHandler execHandler)
Set the execution callback handler. |
Status |
step()
Perform one simulation step. |
Status |
stepAbstract()
Perform one step of an abstract simulation. |
Method Detail |
public void clear() throws RemoteException, RainbowException
public void assemble(String rasmtext) throws RemoteException, RainbowException
public void compile(String rainbowSource) throws RemoteException, RainbowException
public Type resolveType(String type) throws RemoteException, RainbowException
public void link() throws RemoteException, RainbowException
public void setExecHandler(ExecHandler execHandler) throws RemoteException
TclExec
public Status initialise() throws RemoteException, RainbowException
public Status step() throws RemoteException, RainbowException
public Data read(Integer key) throws RemoteException, RainbowException
public DeadlockResult deadlock(ProgressWatcher watcher) throws RemoteException, RainbowException
watcher
- Object to receive progress notifications, or null if
you don't want to receive them.public ModelcheckResult modelcheck(String ctlStarFormula, String[] propositions, String[] deviceMap, ProgressWatcher watcher) throws RemoteException, RainbowException
ctlStarFormula
- The temporal formula to check in CTL*.propositions
- Array of propositions referred to in the formula, each of which
will be parsed by Propositions
.deviceMap
- Description of what device/register is referred to by what
name in the propositions.watcher
- Object to receive progress notifications, or null if
you don't want to receive them.SpecParse
public void compileAbstract(String rainbowSource, String abstraction) throws RemoteException, RainbowException
rainbowSource
- The source to the Rainbow code to be abstractly interpreted.abstraction
- The abstraction to be applied (which will be parsed by Parse
.)public Status stepAbstract() throws RemoteException, RainbowException
public DeadlockResult deadlockAbstract(ProgressWatcher watcher) throws RemoteException, RainbowException
watcher
- Object to receive progress notifications, or null if
you don't want to receive them.public ModelcheckResult modelcheckAbstract(String LTLFormula, String[] propositions, ProgressWatcher watcher) throws RemoteException, RainbowException
LTLFormula
- Temporal formula to check.propositions
- Array of propositions referred to in the formula, each of which
will be parsed by Propositions
.watcher
- Object to receive progress notifications, or null if
you don't want to receive them.SpecParse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |