Re: A question on UML Profile and stereotype



Re: A question on UML Profile and stereotype

From: Pieter Van Gorp <pietervangorp_at_gmail.com>
Date: Thu, 18 Dec 2008 10:43:44 +0100
Message-ID: <15af5f050812180143o2af7e547x53804363b469b54c@mail.gmail.com>
Hi again,

On Thu, Dec 18, 2008 at 9:52 AM, Arnon Sturm <sturm@bgu.ac.il> wrote:
> I wonder in what level of the MOF architecture (i.e.,M1 or M2) profile and
> stereotype are defined and in what level these are applied.
Profile support can be built into any language.  However, I think you
are referring to UML profiles specifically.  Since UML supports the
profile mechanism, its metamodel (M2) contains specific metaclasses
for this purpose.  More specifically, in UML 1.5 you have the
Stereotype, TaggedValue and TagDefinition metaclasses.  These
metaclasses (M2) are instantiated when domain experts create specific
UML profiles (M1 elements).  Afterwards, application experts decorate
their application models (M1) with the profile elements (M1).

For example, when you want to have an <<entity>> stereotype, you
create in your application (or library) model (both M1), an element of
type Stereotype and give it the name ``entity''.  Since you may want
to apply this stereotype on UmlClass elements only, you can set the
``baseClass'' of this specific stereotype (M1) to ``UmlClass'' (an M2
element).  This makes it impossible to apply the <<entity>> stereotype
on attributes, methods, states, ...

> I'll appreciate getting any references on that issue.
In http://is.tm.tue.nl/staff/pvgorp/research/#gtvmt2006 we have
applied UML profiles at two levels of the MDE process:
(1). In Figure 3, you can see we have for example a stereotype with
name ``Conceptual Model'' and apply it for decorating a particular
model of a meeting scheduler (= a regular ``application model'').  All
elements defined in the model that is shown on Figure 3 is at the M1
level.  The UML metamodel (M2) is not changed or extended at all.  As
I explained before, the elements from the profile definition (M1) do
refer to M2 elements: the ``foreign key'' stereotype for example (node
n5 on Figure 3) refers to ``Classifier'' to restrict on what kind of
model elements it can be applied.
(2). In Figure 5, we apply stereotypes like <<create>>, <<bound>>,
<<copy>>, ... This time, the figure is not showing an ``application
model'' specific to a particular system.  Instead, the diagram shows a
part of a ``transformation model''.  As you know, in MDE, a
transformation is defined for all models in a specific modeling
language (and thus it is not specific to for example the meeting
scheduler example).  Still, the model shown on Figure 5 is at MOF
level 1: the transformation is modeled in standard UML and the
``create'' and other stereotypes are all defined as standard UML
elements too.

If you are not interested in transformation modeling
(http://dx.doi.org/10.1007/11880240_31), it is sufficient to
understand the first case but trying to understand the second case may
help you bypass some common misunderstandings early.

Kind regards,
-- 
Pieter Van Gorp
  Assistant Professor (Universitair Docent)
  Information Systems Group
  School of Industrial Engineering
  Eindhoven University of Technology (TU/e)
  Office: Pav.D12
  P.O. Box 513, 5600 MB Eindhoven
  The Netherlands
  Phone: +31 40 247 2062
  Skype ID: pvgorp
  Fax: +31 40 243 2612
  http://is.tm.tue.nl/staff/pvgorp/
  http://www.pietervangorp.com/
  http://motmot.sourceforge.net/
Received on Thu 18 Dec 2008 - 09:47:52 GMT