prm
i
parameter, depending on that parameter’s
direction being in or out, respectively. If prm
i
is a
bidirectional parameter (inout), values may be passed
to and from it. Since UML pins may not be
bidirectional, two pins are required to every inout
parameter: these will be called prm
i
_in
and prm
i
_out
.
That’s the case of prm
K
in Figure 11.
Arg
i
, for i from 1 to N, is the argument passed to
prm
i
. Arg
i
’s type and multiplicity are represented by
Targ
i
and Marg
i
, respectively. Similarly to caller,
arg
i
may represent a variable, a parameter of the
activity, or the result pin of an upstream action.
Result is the pin that yields the value returned by
the action. If f is a property, result yields the value of
that property in the instance provided by caller. If f is
an operation, result yields the value returned by the
operation. Result´s type and multiplicity are
represented by Tf and Mf, respectively.
Destination represents the element that receives
the result of the action. Also depending on the
topology of the activity containing the action, it might
be a variable, an output (out, inout or return)
parameter of the activity, or a pin of a downstream
action (a subsequent self or prm
i
).
The Bound Action
The reproduction of the templated action within the
bound element will be termed bound action and
represented as in Figure 14. In that figure, the
elements that may differ from their original
counterparts are marked with ‘
’ (in some cases
reduced to a ‘’, due to typewriting constraints).
Figure 14: The bound action.
4.4 Compilability Criteria
This section states how compilability assessment
rules are elicited out of the whole set of UML
Activity’s well-formedness constraints. It must be
noted that such criteria will be applied to the bound
action. Only constraints belonging to both the
following sets are relevant:
Those being defined for the constructs that
build up the archetypal action; i.e., well-
formedness constraints of: Object Node, Pin,
Object Flow, Structural Feature Action, Call
Action and Object Action;
Those referencing elements that UML defines
as parameterable in a template (therefore,
substitutable in a binding).
(Farinha, 2015) lists those constraints and
formulates them in terms of the archetypal action. The
holding of those constraints in the templated action
are stated as premises and the holding in the bound
action are the hypotheses, which are proved on the
basis of the premises and that FC holds. I.e., it is
shown that, being a the archetypal action:
rule {Compilability rules},
rule (a
T
), FC (a
T
, a
) ⊢ rule (a
).
5 RELATED WORK
For classifier template parameters only, UML allows
the specification of constraining classifiers, which
will act as required contracts that substituting
classifiers must fulfil. This provides compatibility
assurance between the substituted and the substituting
classifiers, but limits the applicability of templates,
because these classifiers must inherit some common
supertype and/or implement common interfaces.
(Cuccuru et al., 2009) presents a way to contour the
need for such common supertype/interface, but
imposes the need for a common template. Although
that solution actually increases the applicability of
templates, applicability is even greater using FC,
because there is no need of any kind of common
ancestor as long as every member of the substituted
classifier is substituted by a member of the
substituting classifier (Cts
Cnf
). Furthermore,
constraining classifiers only provide compatibility for
classifier parameters, while FC works for any kind of
parameterable element.
(Caron and Carré, 2004) also proposes a set of
rules, additional to that of UML, to ensure that
template instances are well-formed. However, the
proposed rules overlook several aspects, such as
multiplicity, staticity, and visibility. FC takes such
aspects under consideration.
(Vanwormhoudt et al., 2015) proposes an
extension to the UML Template concept called
Aspectual Template (AT). Instead of having multiple
parameters, ATs have a single parameter, which
exposes a model as a whole. Associated to ATs, a set
of constraints ensures that the target model fragment
is conformant with the AT parameter. However, AT’s
constraints overlook multiplicities and the static