An Introduction to UML Profiles
Lidia Fuentes-Fernández and AntonioVallecilloMoreno
1. Introduction (1/3)
Model: description of a system written in a well-defined
language.
Object Management Group (OMG): defines several
modeling languages, among which UML is the one most widely accepted and used.
UML: visual language for specifying, constructing and
documenting the artifacts of systems.
1. Introduction (2/3)
a general purpose modeling language that can be applied
to all application domains.
Situations, however, in which a general language may not
be appropriate for modeling applications of some specific domains.
OMG defines two possible approaches for defining
domain specific languages.
1. Introduction (3/3)
First: definition of a new language using the mechanisms
provided by OMG for defining object-based visual languages.
Second: UML provides a set of extension mechanisms
for specializing its elements, allowing customized extensions of UML for particular application domains.
2. OMG’s Metamodel Architecture (1/2)
Metamodeling: mechanism used to define graphical
languages.
OMG defines a four-layered architecture:
Layer M0: Instances. Layer M1: The model of the system.
2. OMG’s Metamodel Architecture (2/2)
Layer M2: The model of the model (the metamodel).
Layer M3: The model of M2 (the meta-metamodel). The modeling language defined for describing the M3 elements is called MOF (Meta-Object Facility).
3. UML Profiles (1/4)
UML can easily be customized by using a set of extension
mechanisms that UML itself provides.
UML Profiles: defines a set of UML artifacts that allows
the specification of an MOF model
UML Profile package is included in UML 2.0
3. UML Profiles (2/4)
Why customize a metamodel? To add semantics left unspecified in the metamodel (such as how to deal with priority when receiving signals in a state machine).
To add semantics that do not exist in the metamodel (such as
defining a timer, clock, or continuous time)
To add constraints that restrict the way you can use the
metamodel and its constructs
3. UML Profiles (2/4)
UML Profiles are defined in terms of three basic
mechanisms:
Stereotypes: is defined by a name and by the set of metamodel
elements it can be attached to.
Constraints: can be associated to stereotypes, imposing
restrictions on elements
Tagged values: is an additional meta-attributes that is attached to
a Stereotype. It has a name and a type.
3. UML Profiles (4/4)
Two Stereotypes: Weighed and
Colored. Classes and associations can be Colored Notation for extension is an arrow pointing from a stereatype to the extended class.
stereotypes Tagged values
4. Definition of UML Profiles
Brief guidelines for the definition and use of UML
Profiles 1. First, define the set of elements that will comprise the system, and the relationships between them. 2. Once you have your metamodel you are ready to define the UML Profile. 3. Define the attributes that appear in the metamodel as tagged values.
5. MDA and UML Profiles (1/2)
MDA (Model Driven Architecture) : initiative that
supports the definition of models as first class elements for the design and implementation of systems.
MDA defines three conceptual levels: Computational Independent Model(CIM):
Platform Independent Model(PIM):
Platform Specific Model(PSM):
5. MDA and UML Profiles (2/2)
MDA advantage: It allows software engineers to define
automatic transformations from PIMs to PSMs.
PIM + PSM+ Transformation rules = Automated System UML Profiles can be used to describe the platform
model and the transformation rules between models.
If UML Profiles is used to specify the model of specific
platforms, it will guarantee that the derived models will be consistent with UML
6. Conclusions
UML Profiles UML Profiles & MDA