Rodin HandbookThis work is sponsored by the Deploy Project This work is sponsored by the ADVANCE 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 by using the example of a traffic light:
We have the event’s name , a parameter with the name , a guard with label grd1 and an action with label act1. An event can have an arbitrary number of parameters, guards and events. The guards specify when an event is allowed to occur, i.e. the event can only be executed if the values of the machine’s variables and parameters match the values listed in the guard. If this is the case, we say that the event is enabled. The actions describe what changes will then be applied 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 (), there are other forms of actions ( or ) which are explained in Section 3.2.4.4.3. The initialisation of the machine is a special form of event. It has neither parameters nor guards. Invariants must always be valid. To verify this, we must prove two things:
Rodin generates proof obligations for every invariant that can be affected by an event, i.e. the invariant contains variables that can be changed by an event. The name of the proof obligation is then
In the special case of an initialisation event, we cannot use the invariants because we do not make any assumptions about uninitialized machines. |