Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Reg Exp Layers by association to class (OCL)
Reg Exp Layers by association to class (OCL) [message #1769741] Thu, 03 August 2017 06:17 Go to next message
André Spindler is currently offline André SpindlerFriend
Messages: 3
Registered: August 2017
Junior Member
Hi there, I'm new to UML/OCL/Papyrus an the lack of forum exchange about this gives me a feeling I might be on the wrong path:

Working on a class diagramm I would like to layer a) all objects that are members of a composition and b) all interfaces that inherit from another interface. That is, I would say, layering by direct and indirect association.

In papyrus I could do this by simply adding elements to a layer. More convenient would be the use of Reg Exp Layers, which select all elements returning TRUE on an OCL boolean expression.

But I would also like to put all (downwards?) associated elements of 'myclass' on that layer. Any suggestions?

Thank you.

PS: Cross post from Stackoverflow (with no answers)
Re: Reg Exp Layers by association to class (OCL) [message #1769850 is a reply to message #1769741] Fri, 04 August 2017 08:19 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I saw your stackoverflow question because you tagged it as "ocl" even though it has almost nothing to do with OCL. Since nobody is answering...

While layers may allow you to fold multiple logical diagrams into a single diagram, it seems very misguided.

I find that once diagrams get non-trivial, it is helpful to draw one diagram showing the inheritance architecture, another the containment architecture and perhaps further diagrams for the construction/destruction, communication architectures. Forcing a positional sharing with layers seems to create an undesirable limitation. Remember a UML Diagram is a view of the underlying Model. You may have many Diagrams for different views.

Regards

Ed Willink

Re: Reg Exp Layers by association to class (OCL) [message #1769871 is a reply to message #1769741] Fri, 04 August 2017 10:42 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi André,

your approach is very common in the domains CAD, PCB design and other incarnations of graphical design. Different annotations of the design are separated using layers.

Well as written before both, CAD and PCB design is graphic design. Your drawings look very much like the product these represent. Given that, it is the natural approach using layers to annotate the drawings of the product.

With UML/SysML the diagrams in general do not represent something visible. The diagrams do not look like the products these represent. The level of abstraction is completely different. The approach Ed sketched in his post for me proved[1] much more powerful in the domain of systems engineering. So I advise you to follow this approach.

/Carsten


[1] based on my experience with BridgePoint (https://xtuml.org/) a systems engineering tool that, at the time I used it only supported the layer approach.

[Updated on: Fri, 04 August 2017 11:35]

Report message to a moderator

Re: Reg Exp Layers by association to class (OCL) [message #1769960 is a reply to message #1769871] Mon, 07 August 2017 06:47 Go to previous messageGo to next message
André Spindler is currently offline André SpindlerFriend
Messages: 3
Registered: August 2017
Junior Member
Allright, thank you. I can well follow your answers. Although what I am doing is also closely related to software development, I wasn't quite aware to be so totally in that world using UML. We are modeling something more "real", a facility structure. And we are, too, integrating different roles/views in that model. At this point all my classes have more or less direct associations in real live.

An example: "A box is an asset. An example of a box is a cardbox. Boxes are also geometric objects, for example cuboids which would make them rectangles in the horizontal projection. Boxes are storaging devices. A storaging devices has an empty volume, ... . Boxes can be made out of... ."

So there are some main classes/interfaces representing different views and everythin that is an asset can also take a role in each of the other views. For the development of the model I would have found it convenient to use the layering functionality but it is also, of course, possible to make a single model for each view.

Thanks again for your support.
André
Re: Reg Exp Layers by association to class (OCL) [message #1769966 is a reply to message #1769960] Mon, 07 August 2017 07:04 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

You seem to misunderstand UML.

"to make a single model for each view"

You can of course do this, but it seems very undesirable. You could aim to have one Model with one or more Packages to capture your underlying design. You may then have many Diagrams each of which provides a view of your Model to suit some particular purpose. Perhaps you have not investigated the various Create Diagram facilities properly.

Regards

Ed Willink
Re: Reg Exp Layers by association to class (OCL) [message #1769975 is a reply to message #1769966] Mon, 07 August 2017 09:00 Go to previous message
André Spindler is currently offline André SpindlerFriend
Messages: 3
Registered: August 2017
Junior Member
You're right, Ed. "A single diagram for each view" is what I should have said. Meant it at least.

Thank you again.

André
Previous Topic:SysML ball and socket notation for standard Ports?
Next Topic:Clean Diagram command
Goto Forum:
  


Current Time: Fri Apr 26 04:07:21 GMT 2024

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

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

Back to the top