From Requirements to Formal Specification Using UML and B
Résumé
It is essential to write requirements for every system. They specify what the system is to do, and they are not supposed to say how the system is to achieve those results - that is the responsibility of the design. Requirements must be readable by the different stakeholders. But in addition, they must define exactly and completely the system behaviour. Therefore, they must be consistent. To ensure this last property, the only solution is to use formal methods. But formal notations are recognized as being unreadable and difficult to apply by the customer. We propose a method for the elicitation of requirements and the expression of formal specifications. The approach, expressed in a five-step process, does not introduce a new language but builds on known techniques: the UML semi-formal technique and the B formal technique. It gives methodological support for requirements elicitation and specification development, including the definition of the system tests. The approach is developed on a vending machine case study.