0% found this document useful (0 votes)
59 views26 pages

The UML Profile Technology

The document discusses UML profiles, which allow tailoring the UML metamodel to specific domains or platforms. Profiles define stereotypes that extend UML metaclasses and allow tagging models with additional information. Profiles guarantee models remain consistent with the UML standard even when extended. The document provides examples of how profiles define and apply stereotypes and extensions to UML models.

Uploaded by

soumen95
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views26 pages

The UML Profile Technology

The document discusses UML profiles, which allow tailoring the UML metamodel to specific domains or platforms. Profiles define stereotypes that extend UML metaclasses and allow tagging models with additional information. Profiles guarantee models remain consistent with the UML standard even when extended. The document provides examples of how profiles define and apply stereotypes and extensions to UML models.

Uploaded by

soumen95
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

UML Profiles

The UML Profile technology


SOFTEAM

144 Ave des Champs Elyses


75008 Paris, France
[email protected]

Eclipse ECESIS Project

UML Profiles

Context of this work

The present courseware has been elaborated in the context of


the MODELWARE European IST FP6 project
(http://www.modelware-ist.org/).
Co-funded by the European Commission, the MODELWARE
project involves 19 partners from 8 European countries.
MODELWARE aims to improve software productivity by
capitalizing on techniques known as Model-Driven Development
(MDD).
To achieve the goal of large-scale adoption of these MDD
techniques, MODELWARE promotes the idea of a collaborative
development of courseware dedicated to this domain.
The MDD courseware provided here with the status of open
source software is produced under the EPL 1.0 license.
Eclipse ECESIS Project

UML Profiles

UML Profiles : Table of content

Definition
Benefits & positioning VS MOF
History
Notation
Semantic & Mechanisms

Eclipse ECESIS Project

UML Profiles

Profiles (Definition)

A profile is used to tailor a


metamodel (like UML) to a specific
platform or domain

used to tag a design with information


that is not captured in UML

profile
Java

import

profile
EJB
profile
CORBA
profile
EAI

profile
Real-Time

profile
SPEM
profile
Telecom

Eclipse ECESIS Project

UML Profiles

Profiles (Definition)

A profile defines a coherent extension to UML in


order to adapt it to a specific target or domain.
Stereotypes allow to define extensions : Kind of
metaclasses that extend UML metaclasses.

Extension is expressed by a new specific notation

Tagged-values are defined as specific attributes of


stereotypes.

Eclipse ECESIS Project

UML Profiles

Profiles extension feature (benefits)

UML Profile is a restricted extension mechanism which :

1. Defines extensions that can be dynamically added to or

retracted from an existing model (extension flexibility)

2.Guarantees that the model will remain consistent with the


UML standard, even when extended by one or several
profiles. (Standard UML conformance)

Preserves UML semantics for the extended models


Extended models can be exchanged with or without their extensions

Eclipse ECESIS Project

Extending UML :
Standard conformance guarantee (benefits)

UML Profiles

MDA requires a high degree of formalization of the different models,


architectures, and methodologies
In addition, mappings have to be specified in detail
This involves highly skilled people, and implies a great risk to development.
It necessitates investments in time and money before starting development,
and getting ROI

Using UML profiles guarantees that the adapted models will still be legal UML
models
Many Standard Profile solutions exist for some PSMs or PIMS (examples :
CORBA, EJB, Test, SysML, Qos, CCM)
Some very important targets have not yet standard profiles, but on the shelf
solutions (RDB, C++, etc.)
Build on a common basis: low learning curve, existing tools, interoperability, etc.

Eclipse ECESIS Project

UML Profiles

Example of a profile based (benefits)


MDA configuration
Project
profile
<<profile>
> Analysis
Analyse
UML
UML
(projet)

<<profile>
>
UML
Design
Conception
UML
(projet)

<<profile>
>
Dveloppement
Development

Company
profile
<<profile>
> Analysis
Analyse
UML
UML

<<profile>
> DesignUML
Conception
UML

Standard
profile
<<profile>
>
Healthcare

<<profile>
>
RDB
modeling

<<profile>
> C++

Eclipse ECESIS Project

UML Profiles

UML for a specific purpose (benefits)


= a specific profile

Profiles exist for :

technical targets (C++, RDB, Java, CORBA, XML, Real Time,

etc.)
specific disciplines (Analysis, Design, etc.)
requirement analysis
tests (test for Java, test for EJB, test for C++, etc.)
metrics, quality checking, and profiles for managing
configuration management rules.

From early requirement down to final tests, UML

profiles can drive each specific discipline involved.

Eclipse ECESIS Project

UML Profiles

MOF/Profile alignment (benefits)

Core/MOF Package Profile


Stereotype (restricted usage)
Core/MOF Class
Core/MOF Property Property (was tagged definition)
Core/MOF Operation Operation
Core/MOF Constraint Constraint
Core/MOF association Association (restricted usage)
Core/MOF association Extension (specific "pattern")

Eclipse ECESIS Project

UML Profiles

Rationale for Using Profiles Vs MOF (benefits)

Profiles

Are used for extending the UML language (the reference


metamodel)
Are supported by UML Case tools
Guarantee the UML conformance of the extensions
Provide a dynamic extension capacity (i.e. extending an existing model)
Typical example: UML for a certain purpose

MOF extensions

Are used to create new metamodels


Apply to any metamodel
New models are created from MOF extensions (no existing model
updates)
Are supported by MetaCase tools or infrastructure.
Typical example: New metamodel (e.g. DSL, workflow, UML, etc.)

Eclipse ECESIS Project

UML Profiles

Profile: History

UML 1.0: (1999) Stereotypes and tagged values were

defined as specific strings attached to ModelElements.


Stereotypes were defined at the level of the model
itself.
UML1.4: (2002) The notion of UML profile was more
formally defined. Profiles organize Stereotypes, which
may contain tagged values. Tagged values can be directly
extend model elements, without stereotypes
UML 2.0: (2005) Stereotypes are now defined at M2
(metaclass level). The Profile notion is completely
formalized, in correspondence and conjunction with the
metamodel (MOF). A notation is defined, and the
extension capacity is formalized.

Eclipse ECESIS Project

UML Profiles

Profiles position within the UML2/MOF2 architecture


Superstructure

UML

M OF

Core

Profile

CWM

Infrastructure

Eclipse ECESIS Project

UML Profiles

Profile : Notations 1
profile

Abstract stereotype

Extension
link

stereotype

Metaclass
reference

constraint

Attribute = Tagged value


Eclipse ECESIS Project

UML Profiles

Profile : Notations 2

Defining the Clock stereotype

Applying the Clock stereotype on the StopWatch


class

Eclipse ECESIS Project

UML Profiles

Profile : Example (Usage of UML extensions)


Below is a user model example, with extensions. That example
supports extensions.
We will see how they are defined at the profile definition level.

<<persistent>>

PROFILE
Stereotype
Tagged Value
Operation

Customer
{storageMode = hash} Edit
<<identifier>> number :

Check
SQL
intGenerate

UML
Class
Attribute
Eclipse ECESIS Project

UML Profiles

Profile : Example (Definition of the UML extension)

Class

Constraint
{A persistent class, or one of its parent
classes must have at least one
<<identifier>> attribute}

<<stereotype>>
persistent
storageMode : KindOfStorage

Stereotype

generateSQL ()

Property

<<stereotype>>
identifier

Attribute (== tagged value)


Operation
The icon

is a property of the stereotype

Eclipse ECESIS Project

UML Profiles

Extending Metaclasses

A profile consists primarily of stereotypes

restricted metaclasses that can only be used to extend


existing metaclasses

profile EJB

metaclass
Component

enumeration
StateKind
stateless
stateful

{required}

stereotype
Bean

stereotype
Session

stereotype
Entity

state: StateKind

Eclipse ECESIS Project

UML Profiles

Applying a Profile
profile EJB

metaclass
Component

{required}

stereotype
Bean
apply

enumeration
StateKind
stateless
stateful

stereotype
Session
state: StateKind

stereotype
Entity

UserModel

session
Customer

state=stateless

name: String

Applying a profile makes the profile extension available to


the model packages to which it is applied.
Eclipse ECESIS Project

UML Profiles

Metamodel Excerpt

Package

Class

Association

PackageImport

Profile

Stereotype

Extension

ProfileApplication

Eclipse ECESIS Project

UML Profiles

Multiple Stereotypes

Several stereotypes can be applied to a model element.


A specific notation supports this feature
profile VM

profile EJB

metaclass
Interface

metaclass
Component

stereotype
Home

stereotype
Creator

stereotype
Remote

metaclass
Interface

date: String
apply

apply

UserModel

remote, creator
Customer

order
*

Order

Eclipse ECESIS Project

UML Profiles

Stereotype extension semantics

Extension is not to be confused with Generalization. It is indeed a


delegation pattern. Below, a MOF equivalent construct is shown. The
dynamic extensibility features of profiles are due to the capacity to
add links to stereotype instances on existing model elements

Eclipse ECESIS Project

UML Profiles

Extension semantics (VS Generalization)

ExtendedClass

<<stereotype>>

Extension

Class2

Semantics :
Extension can extend existing
ExtendedClass or subclass
instances.
Class2 instances can for example
also be extended by Extension

ExtendedClass

Extension

Class2

Usual Semantics :
There will exist once for all
separated Extension
instances, Class2 instances
and also ExtendedClassonly
instances

Eclipse ECESIS Project

UML Profiles

Extension semantics (1)

ExtendedClass1 ExtendedClass2 ExtendedClass1 ExtendedClass2

<<stereotype>>

<<stereotype>>

Extension

Extension

Semantics :
Extension can extend either
(exclusively) ExtendedClass1 or
ExtendedClass2. Extension does
not define a merge instance of
ExtendedClass1 and
ExtendedClass2

Usual Semantics :
Extension instance will always
be also instances of
ExtendedClass1 and
ExtendedClass2

Eclipse ECESIS Project

UML Profiles

Extension semantics (2)

ExtendedClass

<<stereotype>>

<<stereotype>>

Extension1

Extension2

Semantics :
An instance of
ExtendedClass will be able
to be simultaneously extended
by Extension1 and
Extension2

ExtendedClass

Extension1

Extension2

Usual Semantics :
There may exist separate
instance of Extension1
extending ExtendedClass
and Extension2 extending
ExtendedClass
Eclipse ECESIS Project

UML Profiles

Miscellaneous

An extension can be required. In this case, when a

profile is applied to a model, each element which


metaclass is extended by a required stereotype will
be extended by this stereotype.
A stereotype cannot inherit a metaclass, nor the
opposite
The extended metamodel is called the reference
metamodel. It is a read only metamodel.
Stereotype properties can have complex types (such
as classes/metaclasses)
Associations can exist, navigable from a stereotype
to a metaclass or stereotype.

Eclipse ECESIS Project

You might also like