Working with Requirements should not be an isolated activity – they interact with many aspects of the development process: progress is tracked by checking how many requirements have been implemented; tests demonstrate that requirements are correctly implemented; elements of the system specification show how requirements will be realized; and much more.
Link UML/SysML elements with Requirements
We demonstrated in the past how requirements and formal specifications can be integrated. We also explained our vision of a similar integration with UML/SysML. A first implementation of such an integration is now available, realized as part of the openETCS project.
For now, the integration is only offered as part of the openETCS tool, rather than as an installable feature. There are technical reasons, as Papyrus, the component for UML/SysML, has very specific system requirements. So for now, please download and install openETCS (free), if you are interested in trying out this feature. This functionality is described in the openETCS documentation. Therefore, we will focus on the result here, rather than on the steps to get there.
Requirements and UML Model
As a simple example, we will create traces between requirements and a UML Use Case Diagram. As a preparation, we created a use case regarding ProR: Creating a new Requirement. We also created a UML model, containing an Actor, the Requirements Engineer. This is shown here:
In order to use the tracing plug-in, some data structures have to be created (the link type and its attributes), and the plug-in must be configured. This is all described in the openETCS documentation. Once this is done, linking is performed by dragging from the Model Explorer onto the Specification Editor. This results in a trace that behaves like a regular link in ProR:
You can see that a link has been created, with the label of the link target being a concise description of the target element (in this case, <Actor> Requirements Engineer). In the Properties View, you can see all the attributes of the UML element.
Of course, this functionality can be combined with other elements from ProR Essentials, specifically the Suspect Link Feature. This extends to the UML model. In other words, if the UML model element changes, than this is detected as well. Let’s try this out and rename the „Requirements Engineer“ to simply „User“. This is done in the UML model (the elements in ProR are read-only). After installing the Essentials and configuring suspect links, this is what you get after renaming the actor:
The link content got updated, and an exclamation mark is shown next to the Target Flag. If you had updated the link source (the use case title), the Source Flag would have been updated.
For now, the integration only shows a textual representation of the UML element. In the long run, it would be really powerful to incorporate the graphical representation of the model elements. Imagine showing a State Diagram in-line with the requirements text: Not as a pasted picture, but as a living model element, that seamlessly integrates both visually and functionally. That would be a huge step forward.