Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Requirement Specification(Define a list of project specific requirements to be satisfied by the model)
Requirement Specification [message #1792700] Sun, 22 July 2018 13:30 Go to next message
Sneha Sahu is currently offline Sneha SahuFriend
Messages: 20
Registered: June 2018
Junior Member
Is there a possibility to define the requirements for a project anywhere in the model.
For example, suppose my requirement is 'Always count > 0' and my model is created in a manner that it stops when count becomes <=1.
Since I have created the model, I know that the requirement is already met by every state in my model. But is there a possibility that one can also list down the set of requirements that are or must be satisfied by the model?

Also I would like to understand the use of the tab 'Model Validation'. It would be helpful, if you could share some documents on the same along with sample codes.

Thanks,
Sneha Sahu

Re: Requirement Specification [message #1792765 is a reply to message #1792700] Mon, 23 July 2018 16:09 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
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.


Re: Requirement Specification [message #1792799 is a reply to message #1792765] Tue, 24 July 2018 09:15 Go to previous message
Sneha Sahu is currently offline Sneha SahuFriend
Messages: 20
Registered: June 2018
Junior Member
Well, that answer a lot of my questions.
Thank you for all the details. :)
Previous Topic:Issue with CDT Generation (windows)
Next Topic:guards & triggers
Goto Forum:
  


Current Time: Thu Oct 03 23:34:36 GMT 2024

Powered by FUDForum. Page generated in 0.03099 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top