![](bg2.png)
we present briefly the P-UML design language.
Then, we present its well-formedness rules. Finally
we define the P-UML formal semantics by
translating its meta-model to a Z specification.
2 RELATED WORKS
2.1 Pattern Representation Languages
Fontoura et al., (Fontoura et al., 2001) proposed a
UML-based notation whose aim is to facilitate
pattern instantiation. The notation is composed of an
extended class diagram and an adapted activity
diagram (called “instantiation diagram”). The
extended class diagram is enriched with the tagged
values and stereotypes to show the variable parts of
a pattern (called hot-spots). One limit of this
notation is its lack of support for patterns
traceability; it does not keep track of the
correspondence between the elements of a pattern
and the application instantiating it. In addition, it
does not express how to compose patterns
The UML profile of Sanada (Sanada and Adams,
2002) aims to be comprehensive and well-defined. It
defines four stereotypes for design patterns and three
tags. It has the advantage of showing the pattern
participant roles. However, it lacks concepts to
identify the roles played by reused methods. Similar
to the UML profile of Fontoura et al., this notation
also does not facilitate patterns composition.
The notation proposed by Dong et al. (Dong,
2002) (Dong et al., 2007) focuses on design pattern
composition. It defines new tagged values that are
used to hold the pattern name, and the role names of
the classes, the attributes and the operations in the
pattern. Overall, this notation represents the
structure, participant roles and collaborations in a
pattern. However, it focuses more on pattern
composition than on pattern instantiation in a
particular application. For instance, it does not
visually distinguish between the hook and template
methods in a pattern.
The profile proposed by Arnaud et al. (Arnaud et
al., 2007) covers three views: functional, dynamic
and static. The functional view is materialized by a
use case diagram. This diagram begins the
instantiation process and any designer reusing a
pattern has to select a functionality variant from the
use case diagram. The dynamic view is modelled by
the sequence diagram as defined in UML 2.0. The
static view, modelled by a class diagram, is based on
the use of packages. In fact, design patterns are
presented with very elementary separated packages
which contain one or two classes. Each package is
relative to one use case. This may complicate the
diagram and makes its comprehension difficult.
Moreover, the class diagram proposed by Arnaud et
al. does not show the pattern participant roles, nor
does it express hook and template methods.
In summary, none of the proposed languages
shows simultaneously the pattern participants, their
roles, the meta-patterns and the hot-spots. In
addition, none of them has a formal semantics
making the design language clear and non
ambiguous.
2.2 Design Pattern Formalizations
The formalization of design patterns has been treated
either by defining a new language or by translating
them to existing formal languages.
As an example of works that propose the
definition of a new specification language specific
for pattern reuse, we find Taibi (Taibi T. and Taibi
F., 2006) who proposes the formalization of patterns
using a Balanced Pattern Specification Language
(BPSL) that uses both First Order Logic (FOL) and
Temporal Logic of Actions (TLA) in order to
specify the structural as well as behavioural aspects
of patterns. Another example adopting this approach
is the work of Dey (Dey and Bhattcharya, 2010)
who proposes FSDP (Formal Specification of
Design Pattern). The FSDP language formalizes the
textual content of the UML class diagram. Thus, the
classes, methods and attributes are represented, and
the behaviour is represented through relationships,
association and cardinality of the participating
classes. This work combines the work of Taibi
(Taibi T. and Taibi F., 2006) and (Dong, 2002), thus
it formalizes the roles that pattern participants play
in a composition. This formal language represents
only the structure; however the interactions which
are modelled through the sequence diagram and
method calls are ignored.
On the other hand, other researchers used
existing formal languages and methods such as B
and Object-Z to specify patterns (cf., (Blazy et al.,
2002), (Kim and Carrington, 2006)). Among these
works, Kim et al., (Kim and Carrington, 2004)
formalizes patterns using Object-Z. For this, they
rely on the meta-model of patterns, expressed in
UML. Thus, each pattern is considered as a pattern
role model. In fact, the role describes the pattern
participants which could be: a class, an attribute, an
operation and a relationship between classes. Note
that, since the role meta-model is formalized in
Object-Z, then the consistency constraints which
ICEIS2013-15thInternationalConferenceonEnterpriseInformationSystems
198