Rodin HandbookThis work is sponsored by the Deploy Project This work is licensed under a Creative Commons Attribution 3.0 Unported License |
2.7.3 EventsWe saw in Section 2.4 what an event basically looks like using the example of a traffic light:
We have the event’s name The guards specify when an event might occur, i.e. under which combinations of the values of the machine’s variables and the parameters. The actions describe what changes apply to the variables. Only the variables that are explicitly mentioned in the actions are affected. All the other variables keep their old values. Beside the simple assignment ( The initialization of the machine is a special form of event. It has neither parameters nor guards. Now our aim is to prove that the invariants always hold. To do this, we must prove two things:
Rodin generates proof obligations for every invariant that can be changed by an event, i.e. the invariant contains variables changed by an event. The name of the proof obligation is then
In the special case of an initialization, we cannot use the invariants because we do not make any assumptions about uninitialized machines. |