defined in Lines 18-27 follow the transitions defini-
tion of the Agent Annex specification of the exercise
Agent. Finally, in Lines 29-33, we show the asso-
ciation of rewards to the respective states or transi-
tions. After modeling the respective PTA modules,
we can perform exhaustive probabilistic verification
of the model, and generate probabilistic guarantees
for the satisfaction of the functional and QoS require-
ments listed in Section 3.1.
The verification results are tabulated in Table 2.
The requirements are formulated as PCTL queries
and the model-checking method is Digital Clocks.
Since PRISM, by default, returns the value for
the (single) initial state of the model while model
checking, we employ filters to verify our properties
over all states. Requirement R1 ensures that if a fall
event occurs due to a low pulse for user1 (Jim), and
the tracker is operational, then the tracker initiates
the communication between the respective fall and
pulse agents associated with user Jim (the request can
be assigned to any of the agent sockets depending
on availability), and the probability that one of them
sends an alert to caregiver indicating that there is “fall
due to low pulse” is greater than 0.999 provided that
at least one of the sockets of each agent is functional.
Assuming that the communication via tracker takes
less time, the requirement is satisfied within 10
time units. Similarly, for R2, we verify for user2
(Mary) that in case of fire and fall events occurring
simultaneously, an alert indicating both events is
raised and sent within 10 time units, provided that the
tracker has not failed. In case of R3, R4 and R5, we
verify the functionality of the exercise agent serving
Jim. By R3, we establish that the exercise session
is scheduled only if the corresponding health agent
indicates that the user’s pulse level is normal. R4
indicates that the initial exercise category is chosen
based on user preferences and health condition. By
verifying R5, we show that if a high pulse devia-
tion occurs during the exercise sub-session, a low
intensity exercise is chosen in the next sub-session,
irrespective of user preferences. In R6, we illustrate
a similar function as in R2, but assuming that the
tracker has failed. In this case, the functionality is
met by direct communication between the agents,
which takes more time than the communication via
tracker (it is shown that this requirement is satisfied
within 20 time units). Next, in R7, we assume a fall
event of user2, and one failed fall agent; then, a fall
alert is raised and sent to the caregiver by either one
of the redundant fall agents. PRISM shows that this
requirement is satisfied within 20 time units.
Listing 3: An excerpt of the PRISM Model of an Exercise
Agent.
1 p t a
2 co n s t d o u b le w1 = 1 . 0 ;
3 co n s t d o u b le w2 = 1 . 0 ;
4 f o r m u l a u t i l i t y 1 = w1 ∗ ( u _ s a t ) +w2 ∗ ( ss_ comp ) ;
5 f o r m u l a sys _ r e w 1 = u t i l i t y 1 ;
6 f o r m u l a sys _ r e w 1 = s y s_r e w 1 + u t i l i t y 1 ;
7 mod ule E x c _ a g e n t1
8 s : [ 0 . . 6 ] i n i t 0 ;
9 / / s t a t e s 0 −I d l e , 1−Op , 2−Comm, 3−Ex c_ sc , 4−Ex1 ,
10 5− Ex2 , 6− F a i l
11 c a l _ e x c _ u 1 : [ 0 . . 1 ] i n i t 0 ; u 1 _ q u i t : [ 0 . . 1 ] i n i t 0;
12 ss_ com : [ 0 . . 1 ] i n i t 0 ; e x c _ s p l i t : [ 0 . . 2 ] i n i t 0 ;
13 e x c _ r e c : [ 0 . . 2 ] i n i t 0 ;
14 x : c l o c k ;
15 i n v a r i a n t
16 ( s =1 => x <=2 )
17 e n d i n v a r i a n t
18 [ 1 ] s =0 & c a l _ e x c _ u 1 =1 −> 0 . 9 9 9 : ( s ’ = 1 ) & ( x ’= 0 ) +
19 0 . 0 0 1 : ( s ’ = 6 ) &(x ’ = 0 ) ;
20 [ 2 ] s =1 & x=2 −> ( s ’ = 2 ) & ( x ’ = 0 ) ;
21 [ 3 ] s =2 & h _ s t a t _ u 1 =1 −> ( s ’ = 3 ) & ( x ’ = 0 ) ;
22 [ 4 ] s =3 & u 1 _ p r e f =1 & u 1 _ d i s _ h i s =1 &e x c _ s p l i t =0
23 −> ( s ’ = 4 ) & ( e x c _ r e c ’ = 1 ) & ( e x c _ s p l i t ’ = 2 ) & ( x ’ = 0 ) ;
24 [ r 1 ] s =4 &(x = 5 | u 1 _ q u i t =1) & h _ s t a t _ u 1 =1 & e x c _ s p l i t
25 < 2 −> ( s ’ = 3 ) & ( e x c _ s p l i t ’ = e x c _ s p l i t +1) & ( x ’ = 0 ) ;
26 [ 5 ] s =3 & e x c _ s p l i t >0 & e x c _ s p l i t <2 & sy s_r ew1 >
27 sy s _r e w2 −> ( s ’ = 3 ) & ( e x c _ s p l i t ’= e x c _ s p l i t +1 ) & ( x ’ = 0 ) ;
28 en dm od ule
29 r e w a r d s
30 s =4 & ( u 1 _ s a t =0 | u 1 _ s a t =1) &(s s_ com = 1 | ss_co m = 0 ) :
31 s y s_r e w 1 ;
32 [ r 1 ] t r u e : s y s _ r ew1 ;
33 e n d r e war d s
7 RELATED WORK
Modern AAL systems are designed to tackle numer-
ous functions, and to cater for multiple, distributed
users, which makes the system design more complex,
and calls for design-time formal analysis.
Some related work is directed towards provid-
ing formalisms for agents in terms of various log-
ics (Che et al., 2006; Luo et al., 2005). However,
some others have proceeded further to develop spec-
ification languages/methodologies for agent systems.
Some examples include CASL (Shapiro et al., 2002),
DESCARTES (Medina and Urban, 2007), etc. These
methodologies employ different formalisms, however
some of them are complex and are not expressive
enough, like in case of CASL. For DESCARTES,
tool support for executing the specifications is also
provided. Although the approach is promising, the
DESCARTES language is still missing constructs to
specify adaptive capabilities of agents, nor it provides
an analysis framework for MAS. One of the other
common approaches, popular in industry also, is the
Agent UML (Bauer et al., 2001) one. The approach
does not specify the architectural constructs of the
system, and lacks formal analysis, unlike the frame-
work that we present in this paper. Few works have
considered the specification and formal analysis of
agent behavior in architecture description languages
(Oquendo, 2004). The AADL-based modeling frame-
work for multi-agent systems, which we propose in
Architecture Modelling and Formal Analysis of Intelligent Multi-Agent Systems
123