Rodin Handbook![]() This 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.9.3 Fixing ProblemsBefore proceeding, we will fix the problems shown in Figure 2.16. Let’s take a look at the warning stating that the event label “celebrity” is misused (“Inconsistent use of event label celebrity”). Double-click on this warning to open the Celebrity_1 machine. The line with the error is already underlined in yellow1. This error is produced by the event called celebrity. The problem is that the event is not declared as a refinement. To solve the problem, add an Event-B Refines Event Relationship child which will add a new entry in the REFINES section. To do so, right-click in the empty space to the left of the word celebrity or place your cursor directly to the left of the small green arrow (
This declares that the event is a refinement of an event with the same name in the abstract machine (3.2.4.1). This is the case here, so we can now save the project and the warning should disappear. The three remaining warnings state that witnesses (3.2.4.4.4) are missing. Double click on the warning to open the concrete model (here Celebrity_2). Then add an Event-B Witness child to the event called celebrity. A default witness wit1 has been created, with a default value
Edit the content and save the file. One warning will disappear, and only two will remain.
The following section (2.9.4) shows the corrected Celebrity_2 machine. Footnotes
|