Money Money History
→
loc Acnt.
(* observed attributes *)
op h | Hd : i
: Id.Acnt OId
→
obs Emp .
(* Local messages *)
op
Chgl : Id.Acnt Money
→
ChgLm .
(* observed messages *)
op
Deb : Id.Acnt Money Date
→
DEB.
op
Crd : Id.Acnt Money Date
→
CRD.
op
Trs : Id.Acnt Id.Acnt Money Date
→
TRS.
vars
B, L, W, D : Money ; C : Id.Acnt .
endo
.
2.2 CO-NETS Component Behaviors
On the basis of a given component structure, we de-
fine the notion of component specification as a CO-
NET in the following straightforward way.
• CO-NETS places are precisely defined by associ-
ating with each message declaration or method
one (message) place, that is, such messages places
contain associated message instances sent or re-
ceived by objects but not yet performed. Also,
with each object sort a (object) place is associated.
• CO-NETS transitions reflect the effect of messages
on object states they are addressed to. Conditions
may be associated to them restricting their appli-
cation.
Application to the Account and Customer Com-
ponents. The associated CO-NETS account compo-
nent is depicted in the left-hand side of Figure 1. This
component is composed of current accounts as a su-
perclass and saving accounts as a subclass (where the
interest could be increased through
Tinc
and money
be moved from a saving account to a current account
using
Tmvt
). The right-side of this figure represents
the customer component. As described above, in this
net in addition to the object place
ACNT
that contains
all account instances three message places namely
ChgL
,
DEB
and
CRD
have been conceived.
2.3 CO-NETS Component Interactions
By taking benefit of explicit component interfaces
(i.e. observed attributes and import / export mes-
sages), we present how interacting behaviorally dif-
ferent components, leading to cooperative informa-
tion systems composed of several truly distributed and
independent yet cooperating CO-NETS components.
As depicted in Figure 2, the general schema of ’ex-
ternal’ transitions reflect this communication where
Just relevant external parts of component states enter
into contacts with observed messages and resulting
(under conditions) in: (1) the messages ms
i
1
, .., ms
i
r
being consumed; (2) states of some external parts
of objects participating in the communication being
changed; and (3) new external messages (that may in-
volve deletion/creation ones) being sent to objects at
different components, namely ms
h
1
, .., ms
h
r
.
. . . .
. . . .
Condition
. .
. .
. .
t
hId
k
|bs
k
1
: v
k
1
, ...i
hId
l
|bs
l
1
: v
l
1
, ...i
Bs(obj
1
)
Bs(obj
p
)
Mes
o
i
1
Mes
o
i
q
Mes
o
h
1
Mes
o
h
r
ms
i
1
ms
i
q
ms
h
1
ms
h
r
⊕
i
hId
1
i
|bss
1
i
i
⊕
j
hId
p
j
|bss
p
j
i
⊕
i
hId
1
i
|
bss
′
1
i
i
⊕
j
hId
p
j
|bss
′
p
j
i
Figure 2: The Inter-component interaction pattern.
Application to the Running Example. In Figure 3
the interaction of the two components is described us-
ing exclusively their observed features. We note here
that besides those explicitly defined as observed fea-
tures, attributes as functions are also observed, but
their contents cannot be accessed either at local or at
this interaction level. This concerns in particular the
Pin attribute as function. Here are some comments
on this observed interaction behaviour. The transition
Twrd
, for instance, captures the sending of a withdraw
order from the customer, namely
C-Deb(C,A,M)
, that
have to be received by the withdraw message in the
concerned account (i.e. the account of this customer
as account hold). This means that we have to select
from the observed account attribute through the read-
arc the inscription:hA|Hd : Ci.
2.4 Animating and Validating CO-NETS
Specifications
One of the most advantage of the CO-NETS approach
is its operational semantics expressed in rewriting
logic; moreover, by introducing the state splitting /
recombining axiom there is a natural exhibition of
intra-object concurrency. More precisely, each tran-
sition is governed by a corresponding rewrite rule in-
terpreted in rewrite logic (Meseguer, 1992) (or more
precisely an instantiation of this logic we refer to as
CO-NETS rewrite theory. The main ideas consist in:
(1) associating with each marking mt its correspond-
ing place p as a pair (p, mt); (2) introducing a new
multiset generated by a union operator we denote by
⊗ for reflecting CO-NETS states as multisets over dif-
ferent pairs (p
i
, mt
i
), , that is, a CO-NETS state is de-
scribed as (p
1
, mt
1
) ⊗ (p
1
, mt
2
) ⊗ ...; (3) allowing the
distributivity of ⊗ over ⊕ for exhibiting a maximal
of concurrency, that is, if mt
1
and mt
2
are two mark-
ing multisets then we always have: (p, mt
1
⊕ mt
2
) =
(p, mt
1
) ⊗ (p, mt
2
); (4) enabling object states’ split-
ICEIS 2007 - International Conference on Enterprise Information Systems
154