Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
research:software:lrp [2016/12/21 15:52] – [Advanced Features] jfabry | research:software:lrp [2016/12/21 16:48] – [Advanced Features] jfabry | ||
---|---|---|---|
Line 209: | Line 209: | ||
=== Exit transitions === | === Exit transitions === | ||
+ | |||
+ | In a nested machine it is possible to define transitions that go to a state of the parent machine, effectively exiting the nested machine. Such transitions are like normal transactions, | ||
+ | |||
+ | A simple example is as follows. As soon as the '' | ||
+ | < | ||
+ | (machine root | ||
+ | (var out := [false]) | ||
+ | (state one | ||
+ | (machine nested | ||
+ | (state onen) | ||
+ | (exit goout onen-> | ||
+ | (event goout [out])) | ||
+ | (onentry (spawn nested onen)) | ||
+ | ) | ||
+ | (state two) | ||
+ | ) | ||
+ | (spawn root one) | ||
+ | </ | ||
=== Eventless transitions === | === Eventless transitions === | ||
- | === User interface: | + | It can become tedious for transitions to need an event as a trigger, since it requires the definition of an event as a separate statement. This is especially tedious when the transition is the only that references that event. To ease this tedium, transitions also accept a block instead of an event name. This block should return true for the transition to trigger. |
+ | |||
+ | Eventless transitions are in fact syntactic sugar: an event is generated and added to the machine, with as action block the block that was specified in the transition, and the transition instead then refers to that event. | ||
+ | |||
+ | === User interface: | ||
+ | The LRP user interface allows for the user to force a machine in a given state. By right-clicking on a state in the visualisation a menu appears, with the option to '' | ||
+ | Transition to and jump to also combine with concurrency (see above for concurrency): | ||
==== Downloads ==== | ==== Downloads ==== | ||