1

I want to express the relationship between object diagrams and class diagrams in terms of the MOF Layer Model.

As an Object Diagram (OD) is an instance of a Class Diagram (CD), I conclude that an OD must be on a Layer below a CD (e.g. OD in M0 and CD in M1).

What confuses me is that both, Object Diagrams and Class Diagrams seem to be in the M1 layer as they're both instances of the UML-metamodel which is in the M2-layer.

What am I missing here?

sroidl
  • 100
  • 6
  • 1
    I did not delve much in that matter but from my POV OD is not an instance of a CD but simply standing asside (it just should contain objects rather than classes). There is also almost no limit to what can go into a diagram. Means: a class diagram may contain objects (which in rare cases makes sense). – qwerty_so Feb 28 '15 at 13:19

1 Answers1

3

AFAIK for the purpose of diagram interchange in a MOF container the diagram relationships are not defined (nor needed) and thus do not impose any layer constraints.

This is where I drew my conclusion from:

1.

uml-diagrams.org: Class and Object Diagrams Overview says:

...Object diagram could be considered as instance level class diagram which shows instance specifications of classes and interfaces (objects), slots with value specifications, and links (instances of association)...

2.

uml-diagrams.org: Object Diagram says:

Object diagram was defined in now obsolete UML 1.4.2 Specification as...

UML 2.4 specification simply provides no definition of object diagram...

Note, that UML 2.5 standard hierarchy of diagrams (see UML 2.5 diagrams overview), shows class diagrams and object diagrams as completely unrelated...

...I really have a headache with all this mess-up… OMG please fix it!

3.

omg.org: Diagram Definition, Version 1.0, July 2012 says:

Figure 7.2 - Example of Diagram Definition Architecture For UML

enter image description here

9.3.1 Diagram Interchange → Classifier Descriptions → Diagram [Class]

Diagram is an abstract container of a graph of diagram elements...

...It can also be owned by elements of the abstract syntax model, or by no element at all...

...a diagram may reference a model element from an abstract syntax model, in which case the whole diagram is considered a depiction of that element (e.g., an activity diagram is a depiction of a UML activity).

Alternatively, a diagram without such a reference is simply a layout container for its diagram elements (e.g., a class diagram is a container for UML class shapes and edges)

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
xmojmr
  • 8,073
  • 5
  • 31
  • 54
  • Uups. I just made an edit and right after I figured out it was nonsense so I undid it. Sorry :-[ – qwerty_so Mar 01 '15 at 11:12
  • @ThomasKilian yes, that's original Kirill Fakhroutdinov's funny comment, quoted as-it-is – xmojmr Mar 01 '15 at 11:26
  • 1
    At first I thought you put your own comment in and then remembered that they also had their own opinion about OMG (I had been reading on connectors once). Next time I'll think before I type xD – qwerty_so Mar 01 '15 at 11:31