Re: Help -- what is allInstances when used in M2?

Date view Thread view Subject view Author view Attachment view

From: Gerrit Renker (
Date: Fri 24 Jan 2003 - 15:15:33 GMT

Dear Jos
thank you very much for taking me off the wrong track.
I have decided to put the problem up here, since my idea did not work
and I can not find convincing ideas in the literature. Maybe someone
else has a simple and elegant idea
of representing a Cartesian Product in a straightforward manner in UML,
I have run out of alternatives.

Aim: representation of mathematical relations (ie. subsets
     of a Cartesian Product). Here restricted to binary


  -----              -----
  | A |------------->| B |
  -----              -----

The idea is to regard class A as the set of objects of type A and B as
the set of objects of type B, the Cartesian Product
as the tuples (a,b) that are related via the directed association. The
intention is an extension that treats the association as a relation or
as Cartesian Product.
Mandel/Cengarle use a reified association (a class AB in the middle),
Akehurst uses inter alia patterns, but my point is that a relation is a
simple concept and should be able to be modeled with simple UML
constructs, a pattern involves several classes. 
My first approach was to use a stereotype on the AssociationClass model
element, but that is unelegant, since 
the constraint stating how instances of A and B make up the
tuples in the stereotyped association class has to be stated for each
use of the stereotype. This makes the introduction of a stereotype

I am interested if someone can come up with a better solution that
allows to represent relations graphically in UML models.

If not, a well-defined mechanism to connect between meta-model layers
in OCL would be desirable.

Gerrit Renker

 --- Jos Warmer <> wrote: > Gerrit,
> The Link metaclass defined in the UML 1.4 metamodel is a
> ModelElement.
> It is a _model_ of a link and it lives at the M1 level.
I am confused again, that would mean that Foundation::Core is M2 level,
while Behavioral_Elements::Common_Behaviour is M1.

Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

Date view Thread view Subject view Author view Attachment view