|Re: Requirement Specification [message #1792765 is a reply to message #1792700]
||Mon, 23 July 2018 16:09
| Ernesto Posse
Registered: March 2011
UML-RT (and UML for that matter) do not have an element specifically for specifying requirements. Nevertheless, there are some elements and some types of diagrams that you can use for requirements: Comments, Sequence Diagrams (or more generally Interaction Diagrams), and Use Case diagrams. |
Note, to enable full access to UML features that are not part of UML-RT such as Interaction Diagrams, you need to set the Architecture Viewpoint to "Advanced" (Right-click the Root element and select "Switch Architecture Viewpoint->Advanced ...".
Comments are the most basic form, and a comment can be attached to any UML element. Just right-click on an element->New Child->Comment. You can drag it to the corresponding diagram and add a link from the comment to the element. You can enter any text in the comment, including formal specifications such as "always count > 0". Note however that the tool doesn't interpret such comments in any way. If you want to enforce such requirements or analyze the model to verify them (e.g. with some model-checker), you'll have to use some third-party tool, and as far as I know there is no tool to do that yet. There is some research on the subject but nothing ready to use in production.
Alternatively you can use other diagrams like the ones I mentioned, such as sequence diagrams for specifying certain kinds of requirements. Sequence diagrams are useful for specifying the ordering of events. However, much like comments, these diagrams are used by Papyrus-RT only as "informational" and the tool doesn't interpret them or enforces them on the model. Again, some third-party tool might be needed to make use of these for the purpose of automatic analysis.
Another way of specifying requirements or constraints is to use OCL. See for example OCL Documentation.
As for the question "[...] is there a possibility that one can also list down the set of requirements that are or must be satisfied by the model?", well, that is impossible for *any* tool. How could any tool know or determine what a model or system should do? That's a question for the designer, not the tool. Now, there are theoretical approaches that could do something like that, if you narrow down what you mean by "requirements". For example, in theory, a UML-RT model may be converted into a (set of) LTL formulas, but in practice this would be unwieldy for anything other than tiny toy models. In any case, Papyrus-RT doesn't provide such capabilities.
Asking what requirements are satisfied by a given model doesn't make much sense. It would be a backwards way of looking at the development process, where someone sets the requirements and then the designer develops a system or model to satisfy them and can analyze the model to check whether those requirements are indeed satisfied. So the process starts with requirements, rather than starting with a model and obtaining requirements.
Perhaps what you have in mind is something else, like trying to ask what *constraints* are satisfied by the model in some state. There is research on the subject, but again, Papyrus-RT doesn't include any formal analysis capabilities.
As for the Model Validation tab, this displays results from a simple form of syntactic (structural) validation performed on UML-RT models when you right-click on an element in the model explorer and choose one of the actions in the Validation submenu. This essentially evaluates a set of OCL on the model to check for simple syntactic constraints on the model. However, this validation is incomplete (misses several kinds of incorrect constructions) and it doesn't do any semantic or behavioural validation. The code generator does perform some additional structural validation, but again, it is not semantic validation.
Powered by FUDForum
. Page generated in 0.02744 seconds