A model for Real-time concurrent interaction protocols in component interfaces

VNU Journal of Science: Comp. Science & Com. Eng., Vol. 33, No. 1 (2017) 8-15  
A Model for Real-time Concurrent Interaction Protocols  
in Component Interfaces  
Van Hung Dang, Trinh Dong Nguyen, Hoang Truong Anh  
VNU University of Engineering and Technology, Hanoi, Vietnam  
Abstract  
Interaction Protocol specification is an important part for component interface specification. To use a  
component, the environment must conform to the interaction protocol specified in the interface of the  
component. We give a powerful technique to specify protocols which can capture the constraints on temporal  
order, concurrency, and timing. We also show that the problem of checking if a timed automaton conforms to a  
given real-time protocol is decidable and develop a decision procedure for solving the problem.  
Received 16 January 2017; Accepted 27 February 2017  
Keywords: Interaction Protocol, Timed Automata, Region Graph, Component Interface.  
1. Introduction*  
An interaction protocol specified in the  
interface of a component is a precondition on  
the temporal order on the use of services from  
the component. Fail to satisfy this precondition  
may lead to a system deadlock [2]. In real-time  
systems, when a service from a component  
takes a considerable time to carry out, too  
frequently calling to this service may lead to the  
error state too. So, we need to specify the  
minimum duration between two consecutive  
calls to the services that takes time, and this  
also plays a role of precondition on the  
consecutive calls to those services in the  
interaction protocols. Another possibility that  
we need to consider when specifying this kind  
of time constraints is that a component may be  
able to provide services in parallel. In this case,  
Component-based system architectures  
have been an efficient divide-and-conquer  
design technique for the development of  
complex real-time embedded systems. A key  
role in this technique is component interface  
modeling and specification. There have been  
many significant progresses towards  
a
comprehensive theory for interfaces, see for  
example [2, , 3, 5, 6, 7]. In those works  
different aspects of interfaces have been  
modeled and specified such as interaction  
protocols, contracts, concurrency, relations,  
synchnony and asynchrony. An approach that  
integrates all those aspects has been introduced  
in [4]. However, there has not been an intuitive  
and powerful model for real-time interaction  
protocols. This kind of model plays an crucial  
role in systems where a service from a  
component may take long time to finish.  
time  
constraints  
do  
not  
apply  
to  
concurrent services.  
Let us consider an example. Imagine that  
we have a software component that provide  
accesses to two files: one stores the information  
about products and the other stores the  
information about customers. To access to a  
_______  
*Corresponding author. E-mail.: dvh@vnu.edu.vn  
8
V.H. Dang et al. / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 33, No. 1 (2017) 8-15  
9
file, one needs to open it, and after use one  
needs to close it. Accesses to different files can  
be done in parallels, and access can be reads  
and writes such that all the reads should be  
2. General protocol model  
Let Σ, ꢀ = 1, … , 푘 be alphabets of service  
names for a component , and let Ω =  
Σ푖  
=1  
before writes. Let us denote by , , and  
the accesses open, read, write and close for  
be the alphabet of all service names that the  
component provides. Our intention is that  
services in each Σneed to be executed  
sequentially, and services in different Σand Σ푗  
the file 1 (for products), and by , , and  
the accesses open, read, write and close for  
the file 2 (for customers). To use the component  
we need to activate it by action , and we need  
to deactivate it by action after use. The  
interaction protocol could be specified by two  
regular expressions to express the condition on  
the temporal order between actions on each file.  
can be executed in parallel. Each Σ, ꢀ = 1, … , 푘  
can overlap another, but they must not be  
included in each other, i.e. Σis a maximal set  
of services that need to be executed in  
sequence. When 푘 = 1 there is no concurrency  
for the component. Each service in Ω may take  
time to finish. We specify this fact by a  
function 훿: Ω → ℝ. So, a service 푎 ∈ Ω takes  
훿(푎) time units to finish. An interaction  
protocol specifies a constraint on the temporal  
order on the services in each separate Σ, and  
this is modeled efficiently by a regular  
expression on Σ. Therefore, we define:  
These  
regular  
expressions  
could  
be  
(퐴(푂푊 퐶)퐹)and (퐴(푂푊 퐶)퐹).  
Does the execution 푊 푊 퐶퐹  
conform to this protocol? It does because it  
satisfies the restriction on the temporal order for  
each file. Now, assume that it takes 1 second  
for the read accesses, then the execution will  
satisfy the protocol if the delays between 푝  
Definition  
protocol) A real-time interaction protocol is a  
tuple 〈(훴1, 푅1), … , (훴, 푅), 훿〉, where  
→ ℝ, and is a regular expression  
1
(Real-time interaction  
and (not and ; these can be done in  
parallel), and and are more than 1  
second.  
=1  
훿:  
In this work, we propose a technique to  
specify real-time concurrent interaction  
protocols for component interfaces that is an  
efficient formalization of the specification from  
the example mentioned above, and define  
formally what we mean by saying a real-time  
execution conforms to an interaction protocol in  
our model. Then we develop a technique to  
check if a real-time system modeled by a timed  
automaton satisfies a real-time concurrent  
interaction protocol specified in the interface of  
a component.  
on for ꢀ = 1, … , 푘.  
Example. In the example introduced in the  
Introduction of this paper,  
1, 푅1) = ({퐴, 푂, 푅, 푊 , 퐶, 퐹},  
(퐴(푂푊 퐶)퐹)) 푎푛푑,  
2, 푅2) = ({퐴, 푂, 푅, 푊 , 퐶, 퐹},  
(퐴(푂푊 퐶)퐹)).  
훿(푅) = 훿(푅) = 1, and 훿(푋) = 0 for all  
other services .  
Let, in the sequel, for the simplicity of the  
presentation, for a regular expression we  
overload to denote also the language  
generated by , and when is the language  
generated by can be understood from the  
context. Note that a regular expression can  
always be represented by an automaton.  
This definition gives a simple syntax  
representation for real-time protocols. To  
understand the meaning of this representation  
The paper is organized as follows. The next  
section presents our general model for real-time  
concurrent interaction protocols. Section 3  
presents an algorithm to check if a timed  
automaton satisfies a protocol specification.  
The last section is the conclusion of our paper.  
V.H. Dang et al. / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 33, No. 1 (2017) 8-15  
10  
we need to define what to mean by saying a  
real-time execution conforms to a protocol in  
our model. We will use a timed automaton as  
our system model, and therefore, use a timed  
language to represent the behavior of  
our system.  
A timed word over an alphabet Ω is a  
sequence 푤 = (푎1, 푡1)(푎2, 푡2) … (푎, 푡), where  
푖−1 ≤ 푡for 0 < ꢀ ≤ 푛, 0 = 0. The intuition  
of this representation for a behavior is that the  
action takes place at time . Given a  
protocol as in Definition 1, how to mean that  
system, in order to use the services from , all  
the accepted behaviors of the system design  
need to conform to . The best model of real-  
time systems is timed automata model [1] to the  
best of our knowledge. Now the question of the  
pluggability of a real-time environment to  
component is to decide whether all the  
members of the timed language of a given  
timed automaton conform to the protocol .  
If it is the case, we write ꢃ ⊧ 휋 for short.  
conforms to ? Let us denote  
3. Checking the pluggability  
푢푛푡ꢀ푚푒푑(푤) = 푎12 … 푎. For a word 푥 ∈ Ω∗  
we denote 푥|Σ the projection of on Σ, i.e. the  
word obtained from by removing all the  
characters that do not belong to Σ.  
Definition 2 (Conformation) A timed  
word 푤 = (푎1, 푡1)(푎2, 푡2) … (푎, 푡) conforms  
protocol , denoted by 푤 ⊧ 휋, iff for all ꢀ ≤ 푘  
In this section we present a technique to  
solve the problem mentioned in the last section.  
Namely, we will prove that it is decidable if all  
the accepted behaviors of a timed automaton ꢃ  
conform to a real-time concurrent interaction  
protocol . Then we develop an algorithm to  
check if ꢃ ⊧ 휋. The algorithm serves for  
answering the question if the component can  
fit to our design. For simplicity, we now restrict  
ourselves to the case that the value of function  
in is integers.  
Since the concept of timed automata may  
not be familiar to some readers, we recall this  
concept from [1]. A timed automaton is a finite  
state machine with an additional set of clock  
variables and an additional set of clock  
constraints. A clock constraint over is  
defined by the following grammar:  
1. 푢푛푡ꢀ푚푒푑(푤)|Σ ∈ 푅, and  
2. let 푢푛푡ꢀ푚푒푑(푤)|Σ = 푎… 푎, then  
1
훿() for all < 푚.  
푙+1  
The first condition in the definition says  
that the temporal order between sequential  
services is allowed by the component and reach  
an acceptance state of the component, and the  
second condition says that the component has  
been given enough time for providing the  
services. According to this definition, the  
behavior  
(퐴, 0)(푂, 0)(푂, 0)(푅, .5)(푅, 1)(푊 , 2)  
=̂ 푥 ≤ 푛 | 푥 푛 | ¬휙 | 휙1 ∧ 휙2,  
where푥 ∈ 푋 and stands for a natural  
number. Let Φ(푋) denote the set of all  
clock constraints over .  
Definition 3 (Timed automata) A timed  
automaton is a tuple  
(푊 , 2)(퐶, 2)(퐶, 2)(퐹, 3)  
conforms to the protocol in Example 2.  
However,  
(퐴, 0)(푂, 0)(푂, 0)(푅, .5)(푅, 1)(푊 , 1.5)  
(푊 , 2)(퐶, 2)(퐶, 2)(퐹, 3)  
〈퐿, 푠, Σ, 푋, 퐸, ℱ〉, where  
does not as 1.5 1 < 훿(푅).  
is a finite set of locations,  
∈ 퐿is an initial location,  
Σ is a finite set of labels,  
is a finite set of clocks,  
From the semantics of a protocol , when  
no services can be executed in parallel 푘 = 0,  
and when there is no constraint for temporal  
order on Σand acceptance state the regular  
expression = Σ.  
퐸 ⊆ 퐿 × Σ × Φ(푋) × 2× 퐿is a finite set  
of transitions. An 푒 = 〈푠, 푎, 휙, 휆, 푠′〉 ∈ 퐸  
represents a transition from location to  
Given a component with the protocol  
specification in its interface, a design of a  
V.H. Dang et al. / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 33, No. 1 (2017) 8-15  
11  
location푠′, labeled with ; and 푠′ are  
called source and target locations of , and  
denoted by andrespectively; is a clock  
constraintover that must be satisfied  
when the transition is enabled, and 휆 ⊆ 푋  
is the set of clocks to be reset by when it  
takes place. In the sequel, we will use the  
subscript with and to indicate that 휙  
satisfies for all 1 ≤ ꢀ ≤ 푚, where =  
[휆↦ 0](휈푖−1 + 푖−1) for 1 ≤ ꢀ ≤ 푚.  
So, a behavior expresses that starts  
from the initial location , transits to ⃗⃗by  
1
taking 1 at time 1, then transits to ⃗⃗by  
2
taking 1 at time 2, and so on, and at last  
transits to ⃗⃗⃗⃗at time . Note that (휈푖−1  
+
푖−1) is the value of the clock variables  
just before ’s taking place, and is the value  
of the clock variables just after ’s taking  
place. The behavior expresses also that the  
system stays in the locationfor 푖−1  
and  
are  
associated  
to .  
ℱ ⊆ 퐿is the set of acceptance locations.  
In this paper, for simplicity, we only  
consider the deterministic timed automata, i.e.  
those timed automata which do not have more  
than one -labeled edge starting from a location  
for any label 푎 ∈ Σ.  
time units, and then transits to by ⃗⃗⃗⃗⃗for (1 ≤  
ꢀ ≤ 푚). If 휎 = (푒1, 휏1)(푒2, 휏2) … (푒, 휏) is a  
+1  
behavior of timed automaton , we call ⃗⃗⃗⃗a  
reachable location of and ⃗⃗⃗⃗⃗, 휈a  
(discrete) reachable state of . A behavior of  
A clock interpretation for a set of clock 푋  
is a mapping 휈: 푋 → 푅푒푎, i.e. assigns to  
each clock 푥 ∈ 푋 the value 휈(푥). A clock  
interpretation represents the values of all clocks  
in at a time point. We adopt the following  
denotations. 0always denotes the clock  
interpretation which maps from to {0}. For a  
clock interpretation and for 푡 ∈ 푅, + 푡  
denotes the clock interpretation which maps  
each clock 푥 ∈ 푋 to the value 휈(푥) + . For 휆 ⊆  
, [휆 ↦ 0]휈 is the clock interpretation which  
assigns 0 to each 푥 ∈ 휆 and agrees with over  
the rest of the clocks.  
A state of a timed automaton is a pair  
〈푠, 휈〉, where 푠 ∈ 퐿 and is a clock  
interpretation for . The fact that is in a state  
〈푠, 휈〉 at a time instant means that stays in  
location with all clock values agreeing with 휈  
at that instant.  
timed automaton is accepted iff ⃗⃗⃗⃗⃗ ∈ ℱ. Let  
= , for 1 ≤ ꢀ ≤ 푚, and 0 = 푠. Then the  
run corresponding to is the sequence:  
2
1
〈푠0, 휈0〉 →〈푠1, 휈1〉 →…  
1
2
〈푠, 휈〉.  
The finite language of is the set of all  
accepted behaviors of .  
In order to solve the emptiness problem for  
a timed automaton, Alur and Dill [1] have  
introduced a finite index equivalence relation  
over the state space of the automaton. The idea  
is to partition the set of the clock interpretations  
into a number of regions so that two clock  
interpretations in the same region will satisfy  
the same set of clock constraints.  
For each 푥 ∈ 푋, let be the largest integer  
constant occurring in a clock constraint for the  
clock variable of the timed automaton , i.e.  
{ |  
= max 푎 푒ꢀ푡ℎ푒푟푥 ≤ 푎 or  
The behavior of timed automata can be  
represented by timed words (or timed-stamped  
transition sequences). A behavior is a timed  
word  
.
푎occursinaclockconstraint  
of휙ofatransition푒 }.  
Let = max.  
For a real number , let 푓푟푎(푟) = 푟 ⌊푟⌋  
(⌊푟⌋ is the maximal integer number which is not  
greater than ) be the fractional part of . The  
equivalence relation over the set of clock  
interpretations is defined as follows: for two  
clock interpretations and 휈′, 휈 ≅ 휈′ iff the  
following three conditions are satisfied:  
휎 = (푒1, 휏1)(푒2, 휏2) … (푒, 휏), where ≥  
1 and ∈ 퐸, ⃗⃗⃗⃗⃗⃗ = for 1 ≤ ꢀ ≤ 푚 (with the  
1  
convention ⃗⃗⃗ = 푠), and where 0 = 휏0 ≤ 휏1 ≤  
0
2 ≤ ⋯ ≤ 휏, such that (휈푖−1 + 푖−1  
)
V.H. Dang et al. / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 33, No. 1 (2017) 8-15  
12  
1. For all x ∈ X either ν(x) > Kx ∧ ν′(x) >  
Kxor ⌊ν(x)⌋ = ⌊ν′(x)⌋.  
2. For all x, y ∈ X such that ν(x) ≤ Kx and  
ν(y) ≤ Ky, frac(ν(x)) ≤ frac(ν(y)) iff  
frac(ν′(x)) ≤ frac(ν′(y)).  
푀〈푠, 푎, 휙, 휆, 푠′〉 such that 훼′ satisfies  
and 훽 = [휆 ↦ 0]훼′,  
ℱ′ ⊆ 퐿′such that 푠′ ∈ ℱ′ iff 푠′ = 〈푠, 훼〉  
where 푠 ∈ ℱ and is a clock region.  
3. For all x ∈ X such that ν(x) ≤ Kx,  
frac(ν(x)) = 0 iff frac(ν′(x)) = 0.  
Note that ℛ(푀) is a ‘untimed’automaton,  
and we also denote its (untimed) language  
by ℒ(ℛ(푀)).  
When 휈 ≅ 휈′, it is not difficult to see that  
We can simplify the automata and ℛ(푀)  
such that all states (locations) are reachable and  
all states can lead to an acceptance state.  
We recall some results from the timed  
automata theory [1] that will be used in our  
checking procedure later. Let ℒ(푀) denote the  
-timed language (language of infinite timed  
words) generated by (by adding -transitions  
from a final state to itself we can extend the  
finite language of to the language).  
Theorem 1  
for any clock constraint occurring in a  
transition 푒 = 〈푠, 푎, 휙, 휆, 푠′〉 ∈ 퐸, satisfies 휙  
iff 휈′ satisfies .  
A clock region for is an equivalence  
class of the clock interpretations induced by .  
We denote by [휈] the clock region to which a  
clock interpretation belongs. From the  
definition of , a region is characterized by the  
integer part of the value of each clock when it  
is not greater than , by the order between the  
fraction part of the clocks when they are  
different from 0. Therefore, the number of  
1.For the timed automaton ,  
푢푛푡ꢀ푚푒푑(ℒ(푀)) = ℒ(ℛ(푀)). Therefore,  
clock regions is bounded by |푋|! ⋅ 2||  
the emptiness problem for is decidable.  
(2+ 2). A configuration is defined as  
… →〈푠, 휈is  
푋  
1
2
2
1, 휈1 →  
2. If 0, 휈0  
1
a pair 〈푠, 훼〉 where 푠 ∈ 퐿 and is a clock  
region. Based on the clock regions, the region  
automaton of , whose states are  
configurations of , and whose transitions are  
the combination of a time transition and a  
action transition from . There is a time  
transition from 〈푠, 훼〉 to 〈푠, 훽iff 훽 = 훼 + for  
some (here for 훼 = [휈] we define + 푡 =  
[휈 + 푡]).  
Definition 4 (Region automata) Given a  
timed automaton as in Definition 3, the  
region automaton of is the automaton  
ℛ(푀) = 〈퐿′, 푠′, 훴, 퐸′, ℱ′〉, where  
a run from the initial state of then  
〈푠0, [휈0]〉 →〈푠1, [휈1]〉 →… →〈푠, [휈]〉  
1
2
is a run of ℛ(푀), and reversely, if  
〈푠0, [휈0]〉 →〈푠1, [휈1]〉 →… →〈푠, [휈]〉  
1
2
is a run in ℛ(푀) then there are 1, … , 휏푚  
such  
that  
〈푠0, 휈0〉 →〈푠1, 휈1〉 →… →〈푠, 휈is  
1
2
1
2
a run from the initial state of .  
Let in the sequel, for an automaton the  
size of (the number of transitions and  
locations) be denoted by |푀|.  
Now, we return to the problem to decide if  
푢푛푡ꢀ푚푒푑(ℒ(ꢃ))|Σ ⊆ 푅for a given timed  
• The set of states 퐿′ consists of all  
configurations of ,  
푠′= 〈푠, [휈]〉whereis the clock  
valuation that assigns 0 to all clock  
variables in ,  
automaton . It turns out that this problem is  
solvable, and just a corollary of Theorem 1.  
Theorem 2 Given a regular expression 푖  
and a timed automaton the problem  
푢푛푡ꢀ푚푒푑(ℒ(ꢃ))|⊆ 푅is decidable in  
풪(|ℛ(ꢃ)|. |푅|) time.  
Proof. Let be an automaton that  
recognizes all the strings on Σthat do not  
belong to , i.e. an automaton that recognizes  
퐸′ is the set of transitions of ℛ(푀) such  
that a transition ((푠, 훼), 푎, (푠′, 훽)) ∈ 퐸′  
iff there is a timed transition from 〈푠, 훼〉  
to 〈푠, 훼′〉 and a transition in  
V.H. Dang et al. / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 33, No. 1 (2017) 8-15  
13  
Fig. 1. Transitions in and ꢃ′: 푎, 푏 ∈ Σ, ∈ Σ.  
̅
by a timed word from ℒ(ꢃ). If 훿(푎) = 0 for all  
푎 ∈ Σ, then the second condition for is satisfied  
trivially. Otherwise, Theorem 1 gives that this  
condition is violated if and only if there is a  
run  
the complement of . The synchronized  
product ℬ ×Σ ℛ(ꢃ) recognizes the language  
̅
̅
||ℒ(ℛ(ꢃ))  
({푤 | 푤|Σ ∈ 푅∧ 푤|Σ′ ∈  
ℒ(ℛ(ꢃ))}). It follows Theorem 1 that  
̅
̅
||ℒ(ℛ(ꢃ)) = 푅||푢푛푡ꢀ푚푒푑(ℒ(ꢃ)).  
The  
〈푠0, [휈0]〉 →〈푠1, [휈1]〉 →… →〈푠, [휈]〉  
in ℛ(ꢃ′) in which there are two transitions 푙  
and 푙+corresponding to resetting clocks in  
ꢃ′: = (〈푠, [휈]〉, 푎, 〈푠푙+1, [휈푙+1]〉 where 푎 ∈  
1
2
emptiness of the language generated by  
ℬ × ℛ(ꢃ) is decidable in 풪(|ℛ × ℛ(ꢃ)|)  
time. But ||푢푛푡ꢀ푚푒푑(ℒ(ꢃ)) is empty if and  
only if 푢푛푡ꢀ푚푒푑(ℒ(ꢃ))|Σ ⊆ 푅. Hence, the  
̅
Σ,  
(〈푠푙+, [휈푙+]〉, 푏, 〈푠푙++1, [휈푙++1]〉 where 푏 ∈  
Σ, 푙++1() = 0, and transitions  
푙+1() = 0,  
and  
푙+=  
theorem is proved.  
Now we consider the problem to decide if  
all the strings generated by satisfy the second  
item of Definition 2. Let ꢃ = 〈퐿, , Σ, 푋, 퐸, ℱ〉.  
Let Σ⊆ Σ. Let be a new clock variable,  
∈ 푋. Define ꢃ′ to be the automaton that is  
the same as except that transitions with label  
in Σwill have to reset the clock as well, i.e.  
ꢃ′ = 〈퐿, 푠, Σ, 푋 ∪ {}, 퐸′, ℱ〉, and 퐸′ = {푒′ =  
(푠, 푎, 휙, 퐶 ∪ {}, 푠′) | 푒 = (푠, 푎, 휙, 퐶, 푠′) ∈ 퐸 ∧  
푎 ∈ Σ} ∪ {푒′ = (푠, 푎, 휙, 퐶, 푠′) | 푒 =  
푙+1, … , 푒푙+1 do not have label in Σ(not  
corresponding to transitions in ꢃ′ resetting  
clock ) that makes the following condition  
satisfied: Let the run in ꢃ′ according to  
Theorem 1 corresponding to that path be  
푙+ℎ−1  
〈푠, 휈〉 →… →휏  
푙+ℎ−1  
〈푠푙+, 휈푙+〉 →〈푠푙++1, 휈푙++1  
푙+ℎ  
푙+ℎ  
Then, 푙+() + 푙+< 훿(푎). This implies the  
following: After having removed all non-  
reachable states from ℛ(ꢃ′), and adding time  
transitions (labeled with “time”) to ℛ(ꢃ′), we  
have that there is also a path in ℛ(ꢃ′)  
(푠, 푎, 휙, 퐶, 푠′) ∈ 퐸 ∧ 푎 ∈ Σ}We illustrate the  
difference of transitions in and ꢃ′ in Fig. 1.  
Since clock variable does not appear in  
any guard of , the automaton ꢃ′ generates  
the same timed language as does. Adding the  
clock variable is just for the purpose of  
counting time between two (consecutive)  
transitions in Σ. A clock valuation for ꢃ′ now  
is of the form 휈 ∪ {↦ 푣} for some 푣 ∈  
푅푒푎. Now we construct the region graph  
ℛ(ꢃ′) for ꢃ′, and analyze this graph to see if  
the second condition of Definition 2 is violated  
푙+ℎ−1  
〈푠, [휈]〉 → … →  
〈푠푙+, [휈푙+]〉 →푒  
〈푠푙+, [휈푙++ 푙+]〉 →〈푠푙++1, [휈푙++1]〉  
in which 푙+() + 푙+< 훿(푎) where 푎  
is the label of , and 푙+has label in Σ. A  
path in ℛ(ꢃ′) satisfying this condition is called  
“violation” path. Now, checking for the  
푙+ℎ  
V.H. Dang et al. / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 33, No. 1 (2017) 8-15  
14  
violation of the second condition of Definition  
nonreachable states. Search in ℛ(ꢃ′) for a  
single violation path. If such a path is found  
for some i, stop with the output “no”.  
2 from is done by searching in the graph of  
ℛ(ꢃ′) for a single path (not containing a loop)  
from to 푙+with the violation property as  
mentioned above (we call it violation path). If  
no such a path found, then the timed language  
ℒ(ꢃ) satisfies the condition. This can be done  
in 풪(|ℛ(ꢃ′)|2) time. Therefore, we have:  
5. Stop with the output “yes”.  
Note that a concurrent real-time system can  
be modeled as a timed automata network which  
is a synchronized product of a number of timed  
automata, where the concurrency can be  
expressed explicitly. A synchronized product of  
a number of timed automata is also a timed  
automaton, and hence, our algorithm works also  
on timed automata networks.  
Theorem 3 The problem “if a given timed  
automaton  
conforms to  
a
real-time  
concurrent interaction protocol ” is decidable  
in time 풪(|ℛ(ꢃ′)|2).  
We sumarizes our results in the following  
deciding procedure:  
Algorithm (Deciding if a timed automaton  
satisfies a real-time interaction protocol)  
Input:A real-time protocol 휋 =  
4. Conclusion  
We have proposed a simple but powerful  
technique to specify interaction protocols for  
the interface of components. Our model can  
specify many aspects for interaction: the  
temporal order between services, concurrency  
for services, and timing constraints. We also  
have shown that the problem of checking if a  
timed automaton conforms to a given real-time  
protocol is decidable, and developed a decision  
procedure for solving the problem. The  
complexity of the procedure is proportional to  
the size of the region graph of the input timed  
automaton which is acceptable for many cases  
(like the way that the tool UPAAL handles  
systems). We will incorporate this technique to  
our model for real-time component-based  
systems in our future work. We believe that our  
results can be extended to the cases in which  
systems are modeled by timed automata with  
parameters, i.e. timed automata where a  
parameter can appear in guards and can be reset  
by a transition.  
〈(Σ1, 푅1), … , (Σ, 푅), 훿〉,  
=1  
where 훿:  
Σ→ ℕ, and is a regular  
expression on Σfor ꢀ = 1, … , 푘.  
A timed automaton ꢃ = 〈퐿, , Σ, 푋, 퐸, ℱ〉 that  
satisfies Σ⊆ Σ for all ꢀ ≤ 푘.  
Output: “Yes” if ℒ(ꢃ) ⊧ 휋, “no” otherwise.  
Methods:  
1. Construct the region automaton of ,  
namely the automaton ℛ(ꢃ).  
2. For each ꢀ = 1, … , 푘 construct automata  
̅
that recognizes regular language .  
Then, construct the synchronized product  
ℛ(ꢃ) ×Σ and check if ℒ(ℛ(ꢃ) ×Σ )  
is empty. If ℒ(ℛ(ꢃ) ×Σ ) is not empty  
for some , stop with output “no”.  
3. If there is no time constraint in , i.e. is  
0 mapping on Σ, stop with output “yes”.  
4. For each ꢀ = 1, … , 푘, where is not a 0-  
mapping on Σ, construct the timed  
automaton  
ꢃ′ = 〈L, sI, Σ, X ∪ {ci}, E′, ℱ〉, where E′ =  
{e′ = (s, a, ϕ, C ∪ {ci}, s′) | e =  
Acknowledgments  
(s, a, ϕ, C, s′) ∈ E ∧ a ∈ Σi} ∪ {e′ =  
(s, a, ϕ, C, s′) | e = (s, a, ϕ, C, s′) ∈ E ∧  
a ∈ Σi}, and then construct the region graph  
ℛ(ꢃ′). Add all “time” transitions to ℛ(ꢃ′)  
and simplify it by removing all  
This research was funded by Vietnam  
National Foundation for Science and  
Technology Development (NAFOSTED) under  
grant number 102.03-2014.23.  
V.H. Dang et al. / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 33, No. 1 (2017) 8-15  
15  
He on the Occasion of His 70th Birthday,  
pages 136-150, 2013.  
[5] Hung Ledang and Dang Van Hung. Timing  
and concurrency specification in component-  
References  
[1] R. Alur and D.L. Dill. A Theory of Timed  
Automata.  
pages 183-235, 1994.  
Theoretical Computer Science,  
based  
real-time  
embedded  
systems  
[2] Luca de Alfaro and Thomas A. Henzinger.  
Interface Automata. In ACM Symposium on  
Foundation of Software Engineering (FSE), 2001.  
[3] Jifeng He, Zhiming Liu, and Xiaoshan Li.  
rCOS: A refinement calculus of object systems.  
Theor. Comput. Sci., 365(1-2):109-142, 2006.  
UNU-IIST TR 322.  
development. In TASE, pages 293-304.  
IEEE Computer Society, 2007.  
[6] Stavros Tripakis, Ben Lickly, Thomas A.  
Henzinger, and Edward A. Lee. On relational  
interfaces.  
In  
EMSOFT’09, pages 67-76.  
ACM, 2009.  
[7] Dang Van Hung. Toward a formal model for  
component interfaces for real-time systems. In  
Proceedings of the 10th international workshop  
on Formal methods for industrial critical  
systems, FMICS ’05, pages 106-114, New York,  
NY, USA, 2005. ACM.  
[4] Dang Van Hung and Hoang Truong. Modeling  
and specification of real-time interfaces with  
UTP. In  
Theories of Programming and  
Formal Methods - Essays Dedicated to Jifeng  
pdf 8 trang yennguyen 13/04/2022 6240
Bạn đang xem tài liệu "A model for Real-time concurrent interaction protocols in component interfaces", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfa_model_for_real_time_concurrent_interaction_protocols_in_co.pdf