BRICSRS-94-45Andersenetal.:AutomaticSynthesisofRealTimeSystems
BRICS
Basic Research in Computer Science
Automatic Synthesis of Real Time Systems
Jørgen H. Andersen K˚are J. Kristoffersen Kim G. Larsen
Jesper Niedermann
BRICS Report Series RS-94-45
ISSN 0909-0878 December 1994
Copyright c 1994, BRICS, Department of Computer Science University of Aarhus. All rights reserved.
Reproduction of all or part of this work is permitted for educational or research use on condition that this copyright notice is included in any copy.
See back inner page for a list of recent publications in the BRICS Report Series. Copies may be obtained by contacting:
BRICS
Department of Computer Science University of Aarhus
Ny Munkegade, building 540 DK - 8000 Aarhus C
Denmark
Telephone: +45 8942 3360 Telefax: +45 8942 3255
Internet: BRICS@daimi.aau.dk
Automatic Synthesis of Real Time Systems
Jrgen H. Andersen Kare J. Kristoersen Kim G. Larsen Jesper Niedermann
BRICS
yDepartment of Math. & Comp. Sc., Aalborg University
Abstract
This paper presents a method for automatically constructing real time systems directly from their specications. The model{construction prob- lem is considered for implicit specications of the form:
(A1j:::jAnjX) satS
whereS is a real time (logical) specication,A1:::Anare given (regular) timed agents and the problem is to decide whether there exists (and if possible exhibit) a real time agent X which when put in parallel with
A
1 :::A
nwill yield a network satisfyingS. The method presented proceeds in two steps: rst, the implicit specication of X is transformed into an equivalent direct specication of X second, a model for this direct specication is constructed (if possible) using a direct model construction algorithm. A prototype implementation of our method has been added to the real time verication tool EPSILON.
Introduction
During the last few years the area of real time systems has received a lot of attention from the research community. In particular, a variety of specication formalisms has emerged allowing real time properties to be expressed explicitly.
These specication formalisms may roughly be divided into two groups, namely:
real time logics (e.g. RT89, HNSY92]) and real time process algebras (e.g.
Wan90, NRJV90]).
Central to the ongoing research has been the construction of model{checking algorithms i.e. algorithms for deciding whether a given real time system satis- es a given specication. A number of model{checking algorithms exists for real timed logical specications ACD90] and more recently algorithms for model{
checking1timed process algebraic specications have been given Cer92, LW93].
This work has been partially supported by the European Communities under CONCUR2, BRA 7166.
yBasic Research in Computer Science, Centre of the Danish National Research Foundation
1In process algebra model{checking consists of checking a suitable behavioural relationship (bisimilarity, say) between the implementation and the specication.
In this work, we deal with the more ambitious goal of model{construction:
i.e. given a real time specication (logical or process algebraic) we want to automatically synthesize a real time system satisfying the specication (if such a system exists). Moreover, we consider the model{construction problem in the setting of implicit specications, i.e.:
(
A
1j:::
jA
njX
)satS
(1) The requirement of (1) represents a certain stage in a top{down development of a network satisfying a given overall specicationS
: namely, the stage where some componentsA
1:::A
nhave already been constructed, but for the comple- tion of the development one componentX
remains to be constructed. We callS
an implicit specication ofX
as it species the behaviour ofX
in a certain context.In this paper we present a method for automatically constructing the com- ponent
X
(if possible) such that (1) is met. Our method is applicable to logical as well as process algebraic specications and proceeds in two steps: First, the implicit specicationS
is (eectively) transformed into a direct specicationS
0describing the sucient and necessary requirement toX
in order for (1) to hold i.e.:X
satS
0 if and only if (A
1j:::
jA
njX
)satS
(2) Second, a real time system satisfyingS
0is generated (if possible) using a direct model{construction algorithm.Our work can be seen as a real time extension of existing model{constructing algorithms for nite{state systems. For
n
= 0 the model{construction problem for (1) extends classical model{construction methods. ForS
a process algebraic specication the model{construction problem for (1) is a real time extension of the equation solving problem studied in LX90b, Shi, Par89, LQ90]. ForS
a logical specication our work is related to and extends the work on contexts as property transformers studied in LX91, LS92].Our method assumes that the network components
A
1:::A
n andX
are all regular timed agents Wan90] or equivalently one{clock timed automata AD90]. For reasons of clarity we have chosen to present our solution method in a somewhat simplied setting:|T
he notion of parallel composition used in this paper is simply that of interleaving on actions however our method extends smoothly to a wide range of existing notions of parallel compositions through parameterization on a so called synchronization function|T
he specication language considered is a timed extension of the well{known Hennessy{Milner Logic HM85] however our method extends to a recur- sive (and very expressive) extension of this logic using already developed and well understood techniques LX90a, LX91, JLJL93]. Also, our method is appli- cable to implicit model{construction based on process algebraic specications by exhibition of suitable characteristic properties.
In the concluding remarks the above suggested extensions will be discussed in more details. Also, a prototype implementation of the implicit model{
construction method for the full extensions has been given and is available as part of the EPSILON tool CGL93].
Delay Transitions:
h
Av
i;(!d) hAv
+d
iActionTransitions:
h X
i
l
iu
i]:a
i:A
iv
i;a!i hA
i0i ifv
2l
iu
i]h
Av
i;a!hA
0v
0ih
Nv
i;a!hA
0v
0i ifN
def=A
Table 1: Operational Semantics for Regular Timed Agents
1 Timed Processes and Timed Logic
Regular Timed Agents
LetAbe a xed set of actions range over by
abc:::
. We denote byR
>0 the set of positive reals ranged over bydd
1d
2:::d
0d
00:::
. SimilarlyR
denotes the set of non{negative reals,N
denotes the set of natural numbers (including 0), andD denotes the setf(d
)jd
2R
>0g. Regular timed agents are terms of the following grammar:A
::= Xni=1
l
iu
i]:a
i:A
i jN
where
l
iu
i 2N
,a
i 2 A andN
ranges over a nite set of agent identi- ers For each agent identier we assume a dening equationN
def=A
. We shall usenil
to denote the empty summation, and on occasions we will use the expanded notationl
1u
1]:a
1:A
1++l
nu
n]:a
n:A
n for the general sum- mation. Also, we shall omit trailingnil
's hence 45]:a
denotes the agent 45]:a:nil
. The maximum delayM
(A
) of an agentA
is dened recursively asM
(Pni=1l
iu
i]:a
i:A
i) = maxfu
iM
(A
i)ji
= 1:::n
g, andM
(N
) =M
(A
) whereN
def=A
.Intuitively, the term Pni=1
l
iu
i]:a
i:A
i describes an agent which is able to perform the actiona
i between the time boundsl
i andu
i after which the agent will perform according toA
i. Formally, the semantics of regular timed agents are given in terms of aA Dlabelled transition system, where the congurations are pairs of the form hAv
i, withv
2R
denoting the amount by which the agentA
has been delayed. The transitions between congurations are either delay{ or action{transitions and are given by the rules of Table 1. Thus, we adopt the two{phase functioning priciple NSY91] present in most real{time process algebras: i.e. the behaviour of a system is regarded as being split in two alternating phases, one where all components agree to let time progress, and one where the components compute.Delay Transitions:
h
Av
i;(!d) hAv
+d
iActionTransitions:
h
A
iv
ii a;!h
A
0i0ih
A
1jA
ijA
nv
i;a!hA
1jA
0ijA
nv v
i:= 0]i Table 2: Operational Semantics for NetworksTimed Networks
Syntactically a timed network agent is a parallel composition of a number of regular timed agents thus network agents are terms of the following grammar:
N
::= (A
1j:::
jA
n)Behaviourally, we shall simply assume that a network agent interleaves compo- nents actions, whereas components are required to synchronize with respect to delay. Formally, a network conguration is a pairh
Av
i, whereA
=A
1j:::
jA
nis a network and
v
= (v
1:::v
n) is a delay vector, indicating how much each component of the network has been delayed. The transitions between network congurations are given by Table 2, where ford
2R
>0,v
+d
denotes the delay vector (v
1+d:::v
n+d
), andv v
i := 0] denotes the delay vector obtained by replacingv
i with 0 in the vectorv
.Example 1.1
Consider the network agents 02]:a
j23]:b
andnil
j23]:b
. The possible congurations involving these two networks are indicated by the two coordinate systems in Figure 1 thus in the left coordinate system thex
{axis indicates the delay of 23]:b
and they
{axis gives the delay of 02]:a
. Using the inference rules of Tables 1 and 2 we can infer the following transitions from the initial network conguration (see also Figure 1):A
=h02]:a
j23]:b
(00)i;(1!:5)B
=h02]:a
j23]:b
(1:
51:
5)i;a!C
=hnil
j23]:b
(01:
5)i;(1)!D
=hnil
j23]:b
(12:
5)i;b!Timed Logic
The specication language used in this presentation is the Extended Timed Modal Logic introduced in HLY92], here referred to as TL. The logic is an extension of the well known Hennessy{Milner Logic HM85], and the formulae of the logic are given by the following abstract syntax:
::= ttj1^2 j: jha
ij9lu
]0 1 2 3 1
2
[0,2]a
[2,3]b
e(1)
b
1 2 3 [2,3]b
1
a 2
ε(1.5)
a enabled b enabled a and b enabled
0
nil
A B
C D
Figure 1: Transition Sequence
We shall freely use as abbreviation for:tt,
1_2 for:(:1^:2),a
]for:h
a
i:and 8lu
]for:9lu
]:.For the interpretation of TL we dene the satisfaction relation j= between network congurations
K
and TL formulae inductively as follows:i
)K
j= tt , trueii
)K
j=1^2 ,K
j=1 andK
j=2iii
)K
j=: , notK
j=iv
)K
j=ha
i , 9K
0:K
;a!K
0andK
0j=v
)K
j=9lu
] , 9K
0d:d
2lu
] andK
;(!d)K
0 andK
0j= We shall often writeA
j= for hA
0i j= , where 0 is the (initial) delay vector with all components being 0. In this case we say that the networkA
satises the property.Example 1.2
Consider the network 02]:a
j23]:b
from Example 1.1. Then it is easily seen that this network satises the formula812]ha
i811]hb
itt. To see this simply observe that wheneverx
212] we can infer the following transition sequence:h0
2]:a
j23]:b
(xx
)i;a!hnil
j23]:b
(0x
)i;(1)!h
nil
j23]:b
(1x
+ 1)i;b!2
2 Symbolic Processes and Model Checking
Using the by now well{known region technique of Alur and Dill ACD90] one may obtain an algorithm for model{checking: i.e. an algorithm for deciding whether a given network agent satises a TL formula. The region technique provides an abstract interpretation of network agents suciently complete that all information necessary for model{checking with respect to TL is maintained.
At the same time the abstract interpretation yields a nite{state symbolic repre- sentation of networks thus enabling standard algorithmic model{checking tech- niques to be applied.
For
t
2R
, letbt
cdef= maxfn
2N
jn
t
g denote the integral part oft
, and letft
gdef=t
;bt
c denote its fractional part. We now recall from ACD90]:Denition 2.1
Letm
2N
n be a delay vector. Thenuv
2R
n are equivalent with respect tom
, denoted byu :
=v
ifFor each
i
= 1:::n
,u
i> m
i iv
i> m
i,For each
i
= 1:::n
such thatu
im
i1. b
u
ic=bv
ic2. f
u
ig= 0 i fv
ig= 0For each
ij
= 1:::n
such thatu
im
i andu
jm
j, it is the case thatf
u
igfu
jg i fv
igfv
jgObserve that
R
n= :
= is nite. Forv
2R
n, we denote byv
] the equivalence class ofv
under=. The equivalence classes determined by:
= are called regions:
(see Figure 2).For model{checking with respect to TL it is important to note that integer delays of equivalent delay vectors are again equivalent. Thus, whenever
u :
=v
thenu
+n :
=v
+n
whenevern
2N
. Hence, we may without ambiguity writeu
]+n
for the regionu
+n
]. In general, it can be shown (see e.g. LW93]) that two equivalent delay vectorsu
andv
go through the same future regions i.e.f
u
+d
]jd
2R
g=fv
+d
]jd
2R
g. Moreover,u
andv
also agree on the order in which these regions are visited according to the following notion of successor region (see Figure 2):Denition 2.2
Let =v
] be a region. Then the successor region succ() is the regionv
0], where:v
i0=8
<
:
v
i+ minf1;fv
jgjj
= 1:::n
g if 8i:
fv
ig>
0v
i+ minf1;fv
jgjj
= 1:::n
g=
2 if 9i:
fv
ig= 0 We denote bysucck() the region obtained by applying succk
times to .Now, it may be shown that the future regions from a delay vector
u
are precisely the regionsu
]succ1(u
])succ2(u
])succ3(u
]):::
and that they are visited in this order. For a region andn
a natural number we shall byn
denote the unique successor number such that
+n
= succn(). Thus, whend
ranges between two integer boundsl
andu
the delay vectorv
+d
resides in regions between succlv](v
]) and succuv ](v
]). Also, as agents enable actions within integer bounds, two network congurations with identical network agent and equivalent delay vectors agree on the action transitions they can perform in the following sense:Lemma 2.3
LetA
be a network agent andu :
=v
. If hAu
i ;a!hA
0u
0i, then alsohAv
i;a!hA
0v
0i for somev
0 such thatv
0=: u
0.γΑ γΒ
γC γD
[2,3]b [0,2]a
The gure illustrates four typical dyadic regions:
A=f(00)g
B =f(xy)j0<xy<1x<y g
C =f(xy)j0<xy<1x=y g
D=f(xy)j0<x<1y= 1g
Now using Denition 2.2 it follows that succ(A) = C and succ(B) = D. In general successor regions are determined by following 45o lines upwards to the right.
Figure 2: Regions and Their Successors
Based on the above observations it can be concluded that network congu- rations with equivalent delay vectors satisfy the same TL formulae:
Theorem 2.4
LetA
be a network agent,uv
two delay vectors, and a TL formula. Then ifu :
=v
the following holds:h
Au
ij= , hAv
ij=To obtain the model{checking algorithm we extract a nite{state symbolic semantics of network congurations, by identifying congurations with equiv- alent delay vector. Thus symbolic network congurations (or simply symbolic states) are pairs of the form
A
], whereA
is a network agent and is a ={:
equivalence class with respect to the delay vectorM
(A
) = (M
(A
1):::M
(A
n)).As network agents have only nitely many sub-terms 2, and there are only nitely many regions with respect to
M
(A
) it follows that the set of symbolic states reachable fromA
] is nite. The transitions between symbolic states are either un{quantied delay transitions (labelled ) or action transitions and are dened by the axiom and rule of Table 3. Moreover, symbolic transitions may be computed eectively. This rests on an eective representation of re- gions3 allowing eective computation of a representative of a region as well as eective computation of the region from a delay vector. Also, due to Lemma 2.3, it suces to consider a single representativev
ofwhen inferring symbolic action transitions.We may now give an alternative interpretation of TL based on the above symbolic semantics of networks.
i
)A
]j= tt , trueii
)A
]j=1^2 ,A
]j=1 andA
]j=2iii
)A
]j=: , notA
]j=iv
)A
]j=ha
i , 9B
]: A
];a!B
] andB
]j=v
)A
]j=9lu
] , 9l
k
u
: A
succk()]j=2with the usual application of unfolding in the case of recursive denition
3The obvious eective representation of a region is as a linear inequation system. An alternative eective representation where each region has a canonical representation is given in GL94, God94].
Delay Transitions:
A
];!A
succ()]ActionTransitions:
h
Av
i;a!hBu
iA v
]];a!B u
]]Table 3: Symbolic Semantics of Networks
0 1 2 3
1 2
[0,2]a
[2,3]b 1 2 3 [2,3]b
a enabled b enabled a and b enabled
nil
A B
C D
E F G
a
Figure 3: Symbolic Transitions
Clearly, due to the nite{state nature of the symbolic semantics of networks, the above symbolic interpretation is decidable using classical nite{state model{
checking techniques. Moreover, the symbolic interpretation of TL is closely related to the standard interpretation as stated in the following theorem:
Theorem 2.5
LetA
be a network agent,v
a delay vector, anda TL formula.Then the following equivalence holds:
A v
]]j= , hAv
ij=It follows that model{checking of network congurations with respect to TL formulae is decidable.
Example 2.6
Figure 3 indicates some symbolic states and transitions asso- ciated with the network 02]:a
j23]:b
. Note thatA
;!2B
,A
;!3C
andA
;!4D
, and thatf234gare precisely the successor numbers associated with the delay interval 12] when considering stateA
. Using the symbolic interpre- tation of TL it can now easily be checked that 02]:a
j23]:b
does indeed satisfy81
2]ha
i811]hb
itt. 23 Symbolic Contexts
We want to decompose logical properties required of a network agent into nec- essary and sucient properties of one of its agents. More precisely, for any given regular agents
A
1:::A
n and any given TL formula, we want to nd a formula such that the following holds:(
A
1j:::
jA
njA
)j= if and only ifA
j= (3) Clearly, the component property will in general depend on the overall prop- erty as well as the agentsA
1:::A
n. In the next section we shall dene a property transformerW, that | given the network agentA
= (A
1j:::
jA
n) and the property | will construct a property = W(A
) satisfying the requirement of (3).In (3), the property
expresses constraints on transitions of the complete network (A
1j:::
jA
njA
), whereas constrains transitions of the component agentA
. Thus, in order to solve the above decomposition problem we must have a way of interrelating transitions of a network with transitions of one of its components. To achieve this we provide a symbolic operational semantics of the network contextsC
= (A
1j:::
jA
nj ]) in terms of action transducers.That is, a network context is semantically viewed as an object which consumes actions from its component agent and produces actions for the external envi- ronment, thus acting as an interface between the two. Obviously, we expect the new operational semantics of network contexts to be consistent with the existing operational semantics of network agents. That is, if the component agent
A
has ana
transition, and the context (A
1j:::
jA
nj ]) can consume this action while producing the actionb
, then we expect the combined network (A
1j:::
jA
njA
) to have ab
{transition.The idea of modelling contexts as action transducers has already been pur- sued for nite state systems LX90a, LX91]. In our real{time setting we need in addition to take into account the delay of the context agents
A
1:::A
n as well as the delay of the component to be placed in the hole ]. However, as our transductional semantics is intended to provide the basis of an eective transformation of properties, we deal with delays in a symbolic manner using regions. Thus, formally, a symbolicn
+ 1{ary network context is a pair of theform: h
(
A
1j:::
jA
nj ])(v
1:::v
nv
)]iHere (
v
1:::v
nv
)]is ann
+1{ary region with (v
1:::v
n) giving delay information ofA
1:::A
nandv
providing the delay information of the ]{component. The transductions between symbolic network contexts is given by the axioms and rule of Table 4. For being ann
+ 1{ary region (v
1:::v
nv
)],# denotes the unary regionv
] 4. Forv
= (v
1:::v
n) ann
{ary delay vector andu
a non{negative real,
vu
denotes then
+ 1{ary delay vector (v
1:::v
nu
).Transductions may be inferred in two ways depending on whether the ]{
component \participates" in the transduction or not. Thus for action trans-
4In the unary case regions are either integer points nn], open intervals ]nn+ 1 or open innite intervals ]m , wheremis the maximum delay bound.
h
A
j ]i;!hA
j ]succ()iif succ()#= succ(#)h
A
j ]i;0!h
A
j ]succ()iif succ()#=#ActionTransductions:
h
A
j ]vu
]i;aa!hA
j ]v
0]ih
Av
i ;a!hBw
ih
A
j ]vu
]i ;a0!h
B
j ]wu
]iTable 4: Symbolic Transduction Semantics of Contexts
ductions the rst axiom of Table 4 requires the ]{component to perform the
a
{action (after which the ]{delay is reset to 0). In the second action transduc- tion rule, thea
{action is performed entirely by the network contextA
without any involvement of the ]{component. This is modelled by a transduction us- ing a unique 0{action (i.e. 0 62 A). The symbolic semantics is extended in the obvious way to 0{actions byA
];0!A
00] if and only ifA
0 =A
and 0 = . Delay transductions model progression to a successor region. The two delay transduction axioms reect that the projected ]{region may either remain unchanged or change to its (unary) successor region.Example 3.1
In Figure 4 three types of transductions for the network 02]:a
j ] are illustrated. As clearlyB# = succ(A#) and E# =D#, it follows from Table 4that: h
(0
2]:a
j ])Ai
;!
h(0
2]:a
j ])Bi
h(
nil
j ])Di
;!
0
h(
nil
j ])Ei
h(0
2]:a
j ])Ci a
;!
0
h(
nil
j ])Di
2
The following Lemma demonstrates that the transductional semantics of contexts does indeed provide the key to relating symbolic transitions of a net- work and its component:
Lemma 3.2
LetA
= (A
1j:::
jA
n) be ann
{ary network agent,A
a regular timed agent, ann
+ 1{ary region, and let 2 Af g. Then the following equivalence holds: hA
jA
i;!hA
0jA
00i[0,2]a
[] []
nil
( )
χχ( )
χ0 a( )
0γΑ γΒ
γC
γD γE
γ ^
Figure 4: Context Transductions if and only if
h
A
j ]i;! hA
0j ]0i and hA
#i;!hA
00#i for = or = 0.4 Contexts as Property Transformers
As shown in the previous Lemma 3.2, contexts relate symbolic transitions of networks with symbolic transitions of their components. To facilitate the trans- formation of logical properties we extend our logic TL with a modality explicitly concerned with symbolic delay transitions (;!). Syntactically, we add the fol- lowing production to the syntax for formulae:
::=We refer to the extended logic as TL. Formulae with no occurrence of9
lu
]{modalities are called pure and the corresponding sublogic is refered to as TLp. Semantically, we interpret formulae
with respect to (standard) network congurations as well as symbolic network congurations thus extending the two existing interpretations of TL:h
Au
ij= , hAv
ij= for somev
2succ(u
])A
]j= ,A
succ()]j=It is straightforward to show that with these semantic denitions both Theorem 2.4 and Theorem 2.5 generalize to TL. Furthermore, for any given network conguration, the original (interval) delay modalities of TL can be expressed using the new{modality in the following way:
h
Av
ij=9lu
] , hAv
ij= u_v]k l
k
For
C
=A
j ]] ann
+1{ary context anda TL{formula we now dene the transformed formulaW(C
) as follows:i
) W(C
tt) = ttii
) W(C
1^2) =W(C
1)^W(C
2)iii
) W(C
:) =:W(C
)iv
) W(C
ha
i) = _C a;a C! 0
h
a
iW(C
0) _ _C a;!
0
C0
W(
C
0)v
) W(C
9lu
]) =W(C
_uk=l
k
)vi
) W(C
) =8
>
<
>
:
W(
C
0) ifC
;!0C
0W(
C
0) ifC
;!C
0Note that W(
C
) is always a pure TLformula. The following Theorem and Corollary shows that the transformer W does indeed yield the sucient and necessary requirement to a networks component in order that the network itself satisfy a given property:Theorem 4.1
LetC
=A
j ]] be ann
+ 1{ary context. Then the following equivalence holds for any regular timed agentA
:A
jA
]j= ,A
#]j=W(C
)Corollary 4.2
LetC
=A
j ]] be ann
+ 1{ary context. Then the following equivalence holds for any regular timed agentA
, whenevervu
2:h
A
jAvu
ij= , hAu
ij=W(C
)Corollary 4.3
LetA
= (A
1j:::
jA
n) be ann
{ary network, and letA
be a regular timed agent. Then the following equivalence holds:(
A
1j:::
jA
njA
)j= ,A
j=W(A
j ]0]])Example 4.4
Using W we may now compute the necessary and sucient re-quirement to the component
A
in order that 02]:a
jA
satises=812]ha
i811]hb
itt.After some calculations based on the transductional semantics of 0
2]:a
j ] (part of which is illustrated in Example 3.1) we get the following:W
h0
2]:a
j ]0]i=2
2
h
b
itt_ha
i2hb
itt ^ 32hb
itt_ha
i2hb
itt ^4
2
h
b
itt_ha
i2hb
itt2
Using the easily established fact that (
A
1j:::
jA
n) and (A
1j:::
jA
njnil
) sat- isfy the same formulae the transformerW can also be used to obtain an alter- native model{checking algorithm:Corollary 4.5
LetA
= (A
1j:::
jA
n) be ann
{ary network, and let be a TLformula. Then the following equivalence holds:(
A
1j:::
jA
n)j= ,nil
j=W(A
j ]0]])To decide whether the agent
nil
satises a property is particularly easy asnil
satises no ha
i formula and alla
] formulae alsonil
satises formulae9
lu
],8lu
]and precisely ifnil
satises.Example 4.6
To decide 02]:a
j23]b
satises the property=812]ha
i811]hb
itt we should simply certify thatnil
satises the following transformed property (obtained after some calculations):W
h0
2]:a
j23]:b
j ]0]i=2
2(tt_h
b
itt)_ha
i2(tt_hb
itt) ^3
2(tt_h
b
itt)_ha
i2(tt_hb
itt) ^4
2(tt_h
b
itt)_ha
i2(tt_hb
itt)Now, using the simplication rules pointed out above (i.e. simplify all modali- ties) it is obvious that
nil
satises the above property. 25 Direct Model Construction
In this section we provide an algorithm that given a pure TL{formula
will decide whetheris satisable by some regular agent. Moreover ifis satisable the algorithm will construct a satisfying agent. The technique applied is based on classical tableau methods applied for modal logic (see e.g. HC68]). To simplify this part of the presentation we use an alternative version of TLp with no negation but with all dual operators included (i.e. ,_anda
]).Let ;be the set of all unary regions of the form
nn
] and ]nn
+ 1, wheren
2N
. Then a problem ! is a nite subset of ;TLp. We say that a problem! is satisable if there exists a regular timed agent
A
such thatA
] j= whenever ()2!. In this case we callA
a solution to !. It follows from the results of the previous sections that ifA
is a solution to an initial problem of the formf(O)gwhere O=f0gthenA
j=.A problem ! is called simple if whenever (
)2 ! then is of the formh
a
i ora
] i.e. all conjunctions, disjunctions and {modalities have been resolved. As we shall see in the following it is particularly easy to decide satis- ability of simple problems. However, we rst provide a reduction mechanism for transforming problems into simple ones. The reduction relation betweenproblems is dened as the least relation satisfying the following axioms5:
i
) !]f(tt)g !ii
) !]f(1^2)g !f(1)gf(2)giii
) !]f(1_2)g !f(1)giv
) !]f(1_2)g !f(2)gv
) !]f()g !f(succ())gAs the use of always strictly decreases the total size of the formulae in ! it is clear that any reduction sequence from ! must be nite. In fact any problem determines a nite reduction tree with the leaves being the irreducible reductions of ! i.e. !0 is an irreducible reduction of ! if !? !0 and !06. Now it follows directly from the semantic denition of the various operators of TLp that there is a close connection between the satisability of a problem and its irreducible reductions:
Lemma 5.1
A problem is satis able if and only if one of its irreducible reduc- tions is satis able.Moreover, it is clear from the denition of that any irreducible problem is either simple or contains a pair of the form (
) in which case it is obviously not satisable. Thus, we are left with the problem of deciding satisability of simple problems.First we dene for
a
2A,2;and ! a problem the projected problem !aas follows:
!a =f(O
)j(a
])2!g>From the symbolic interpretation of
a
]it follows directly that wheneverA
is a solution to ! andA
];a!A
0O], thenA
0is a solution to !a. Moreover, when =]nn
+ 1,A
0 is also a solution to !ann] and !an+1n+1] as regular agents enable actions within closed integer{bound intervals.Theorem 5.2
Let! be a simple problem. Then ! is satis able if and only if whenever(nn
]ha
i)2! thenn(O
)o !ann] (4) is satis able, and whenever(]nn
+ 1ha
i)2! thenn(O
)o !ann] !]ann+1 !an+1n+1] (5) is satis able.Proof:
Then{direction: follows directly from the symbolic interpretation of formulae and the comments above.If{direction: For (
ha
i)2! letA
(hai) be a regular timed agent satisfying5
]denotes disjoint union of sets.
(4) if
=nn
] and (5) if =]nn
+ 1. Letl
nn]=u
nn]=n
,l
]nn+1=n
andu
]nn+1=n
+ 1. Then the agentA
dened as:A
= X(hai)2
l
u
]:a:A
(hai)satises !. 2
It now follows from the properties of and Theorem 5.2 that satisability of problems is decidable: to determine satisablity of a problem ! rst (non{
deterministically) reduce it to a simple problem !0and then use the construction of Theorem 5.2. This leaves the satisability of the problems in (4) and (5) to be settled. However, as these problems all have strictly smaller maximum modal depth than !0 (and !) we can apply the method recursively, with termination guaranteed.
Example 5.3
In order to synthesize the missing componentA
in Example 4.4 we should determine satisability of the problem:! =n(O
2^3^4)owhere
=2hb
itt_ha
i2hb
itt. Now using the axioms for we obtain:!?
n(1
1])(]12)(22])o?n(1
1]2hb
itt)(]122hb
itt)(22]2hb
itt)o?n(2
2]hb
itt)(]23hb
itt)(33]hb
itt)o= !0Now | as
nil
obviously satisesf(Ott)g| we obtain from the proof of The- orem 5.2 that the following agent:A
= 22]:b
+ 23]:b
+ 33]:b
satises !0 and hence !. 2
Concluding Remarks
The presentation of this paper has been based on a somewhat simplied setting, and we want here to comment in slightly more detail on how our results extends.
The logic TL considered may be extended with constructs for dening prop- erties recursively. The symbolic interpretation of TL extends easily to this re- cursive extension, thus providing the basis for decidability of model{checking.
As for transforming recursive properties the techniques given in LX90a, LX91]
can be directly applied. Our direct model{construction method extends to maximal recursively dened properties using the techniques of JLJL93].
The notion of parallel composition considered in this paper is simply that of interleaving of actions. However, our results extend to a variety of paral- lel compositions via parameterization on a synchronization function as stud- ied in HL89]. Thus, we may consider parameterized network of the form