Re[2]: asking about OCL



Re[2]: asking about OCL

From: John Daniels <jd_at_syntropy.co.uk>
Date: Wed, 17 May 2006 08:19:50 +0100
Message-ID: <659295851.20060517081950@syntropy.co.uk>
Hi Frédéric,

> PS: Ajaree's problem exists in UML: how to state in UML that there must
> have one and only one Model instance ?

Back in 1993 when working with Steve Cook on the Syntropy method we
tackled this problem - or one very closely related to it (although we
weren't using UML then, of course). Our solution, expressed in today's
UML terms, was to place a type in the model, called the "initial type"
and denoted by a stereotype, that has exactly one instance and
represents the model itself. All other instances can be navigated from
this initial instance, and constraints on the multiplicities indicate
the numbers of other instances in the model. This makes it trivial to
say "in a well-formed instance of this model there must be exactly one
instance of type A". Surprisingly, it was never a problem to find a
good name for this initial type related to the situation being
modelled.

--John
Received on Wed 17 May 2006 - 08:20:44 BST