Book a Demo

Author Topic: Edge - Classifier to Instances  (Read 5576 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Edge - Classifier to Instances
« on: January 14, 2007, 08:38:30 pm »
In [size=13]Collections, Containers, Composites & Nest
[/size]
I discuss my view that the Nesting connector is an alternate notation for the physical nesting of one element within another in the browser.

In a similar vein, I'm interested in graphically showing how a classifier is linked to its instances.  Can anyone suggest a suitable relationship to express this?

I've come up with a Realization stereotyped as «instance», but I'm not particularly enamoured with it...
I realize that the actual name does that job, but I can suppress portions of it so that it isn't necessarily obvious.

What I'm after is conceptually a link that if I place the Classifier on the same diagram as its instances, will graphically make that link.

Thoughts?
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Edge - Classifier to Instances
« Reply #1 on: January 15, 2007, 08:22:55 am »
First, as far as the idea of having something like this goes, I think it's great. Particularly for large, complex, or highly formalized (in the sense of being subject to audit at least) it would be good to have this in one's bag of tricks.

Off the top of my head, here's a couple of approaches. I have not put a lot of thought into them, nor am I particularly advocating them. If all these do is spark discussion, they've completely satisfied my expectations.

If you want something uncluttered, and that easily lose its meaning and get confused with something else, you'll need to come up with a change in notation, something that's not subject to loss if the diagram properties are changed.

Perhaps you could tweak the lines of the «instance» to have a different pattern. That would be easy, and visually distinct. However, I'm not completely convinced that EA handles stereotyped connectors as well as it could. Diagrams might also look a bit too foreign.

Another approach would be to modify the ends of the connectors. Perhaps you could reuse the composition (or aggregation) notation. This would not carry exactly the same semantics as it usually does, since it is connecting a class with its instances. Another possibility is to use the notation of the nesting connector, to indicate that the instances are 'contained' by the class definition. Finally, you could use a new notation.

Fiddling around with the notation of a connector seems drastic at first, but OMG themselves has shown it is possible and usable. Consider the SPEM as an example, which Sparx has in draft. The above are considerably less drastic, since we are not modifying or replacing the underlying constraints of the UML metamodel.

What say all?
No, you can't have it!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Edge - Classifier to Instances
« Reply #2 on: January 15, 2007, 06:24:49 pm »
Paolo,

I'd use a dependency from instance to classifier. The UML 2.0 Infrastructure has an example of this with the <<snapshot>> stereotype (Fig 7.8)

HTH,

Neil
« Last Edit: January 15, 2007, 06:25:06 pm by KP »
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Edge - Classifier to Instances
« Reply #3 on: January 15, 2007, 09:03:43 pm »
Quote
Paolo,

I'd use a dependency from instance to classifier. The UML 2.0 Infrastructure has an example of this with the <<snapshot>> stereotype (Fig 7.8)

HTH,

Neil
Good call Neil.

It seems like if one constrains the instance (that is, formally gives an attribute a value) one should use «snapshot» but if the instance is unconstrained one should use «instanceOf».

It's also clarified for Darren and I when you should use Dependency (the implementation of a Specification) and Realization (the implementation of a Contract Specification).

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!