though UPTA is less expressive than UML, they allow
more rigourous semantic definition. In our approach,
we suggest the use of UPPAAL timed automata for
specifying aspect models and their weaving without
extending the formalism.
To our best of knowledge the only attempt to com-
bine aspect-orientation and UPPAAL timed automata
has been suggested by Sarna and Vain (Sarna and
Vain, 2012). They provide an approach for including
aspects in the construction of test models by formal
refinements of UPTA specifications. The difference
to our paper is that they used aspects for refining the
system specification in place, whereas in this paper
aspects for extending the functionality of the system
with new features. Such an approach allows one to de-
fine features aspect-wise, while aspect weaving rules
provide discipline for structural modeling.
3 PRELIMINARIES OF UPTA
An UPTA model M is a closed network of extended
time automata A
1
, . . . , A
n
, that are called processes.
The processes are combined into a single system by
the CCS
1
parallel composition A
1
k . . . k A
n
(Bengts-
son and Yi, 2004, Sec. 5.1, pp. 25). Synchronous
communication between the processes is by hand-
shake synchronization links that are called channels.
Each channel has related to input (from the channel)
and output (to the channel) actions. The action al-
phabet is assumed to consist of symbols for input ac-
tions denoted ch?, output actions denoted ch!, where
ch denotes a channel name, and internal actions Act of
A
1
, . . . , A
n
. Asynchronous communication between
processes is done by shared variables.
Each UPTA process A
i
is given as a tuple
(L;E;V;Cl;Init;Inv;T L) where L is a finite set of lo-
cations, E is the set of edges defined by E ⊆ L ×
G(Cl;V ) × Sync × Act × L, where G(Cl;V ) is the set
of enabling conditions - guards. Sync ⊆ Σ is a set of
synchronisation actions over the channels the process
A
i
is linked to the network. In the graphical notation,
the locations are denoted by circles and edges by ar-
rows (see Figure 2). The set Act of internal actions
is a set of sequences of assignment actions with in-
teger and boolean expressions as well as with clock
resets r. V denotes the set of integer and boolean
variables. Cl denotes the set of real-valued clocks
(Cl ∩ V = ). Init ⊆ Act is a set of assignments
that assigns the initial values to variables and clocks.
Inv : L → I(Cl;V ) is a function that assigns an invari-
ant I to each location, I(Cl;V ) is the set of invariants
1
Calculus of Communicating Systems
over clocks Cl and variables V . T
L
: L → {ordinary,
urgent, committed} is the function that assigns the
type to each location of the automaton.
The semantics of UPTA M = A
1
k . . . k A
n
is given
in terms of labelled transition systems (LTS) (Bengts-
son and Yi, 2004). A state of a network is a pair hL, ui,
where L denotes a vector of current locations of the
network, one for each process A
1
, . . . , A
n
and u is a
clock assignment reflecting the current values of the
clocks in M. A network may perform two types of
transitions, delay transitions and discrete transitions.
Besides clock variables UPTA may have boolean
and integer variables, each with bounded domain and
initial value. Predicates over these variables can be
used as guards of the edges and they can be updated
using resets on the edges. The semantics of the mod-
els that include such variables is extended in natural
way, i.e. for an action transition to be enabled, the ex-
tended clock assignment must also satisfy all integer
guards on the corresponding edges and when a tran-
sition is taken the assignment is updated according to
the boolean, integer and clock resets.
To model atomic sequences of actions, e.g. atomic
broadcast or multicast, UPTA support a notion of
committed locations. A committed location is a lo-
cation where no delay is allowed. In a network, if any
process is in a committed location then only action
transitions starting from such a committed location
are allowed. Thus, processes in committed locations
may be interleaved only with processes in a commit-
ted location.
4 INTRODUCING ASPECTS IN
UPTA
As discussed in the introduction, the concerns of a
system are developed in weakly related parts (mod-
els) called aspects. An aspect model is composed of
a pointcut and an advice. Pointcuts identify points in
the execution model referred to as join points.
With respect to UPTA, a pointcut can be a guard
or set of guards applied to any combination of UPTA
elements (model fragments) that are accessible via
edges to which the pointcut guards are attached. Con-
sequently, a join point is a place in the base UPTA
model where the advice model is superimposed and
the pointcut defines under what conditions the advice
can be entered in the base model.
Both the base model and advice model are as-
sumed to be UPTA and this model class is conser-
vative under weaving operations described below. We
suggest four types of advice weaving: before, after,
around, and conditional. The first three follow the
ICSOFT-PT2014-9thInternationalConferenceonSoftwareParadigmTrends
160