Franck Cassez

Olivier H Roux

Structural Translation from Time Petri Nets to Timed Automata

In this paper, we consider Time Petri Nets (TPN) where time is associated with transitions. We give a formal semantics for TPNs in terms of Timed Transition Systems. Then, we propose a translation from TPNs to Timed Automata (TA) that preserves the behavioral semantics (timed bisimilarity) of the TPNs. For the theory of TPNs this result is two-fold: i) reachability problems and more generally TCTL model-checking are decidable for bounded TPNs; ii) allowing strict time constraints on transitions for TPNs preserves the results described in i). The practical applications of the translation are: i) one can specify a system using both TPNs and Timed Automata and a precise semantics is given to the composition; ii) one can use existing tools for analyzing timed automata (like Kronos, Uppaal or Cmc) to analyze TPNs. In this paper we describe the new feature of the tool Romeo that implements our translation of TPNs in the Uppaal input format. We also report on experiments carried out on various examples and compare the result of our method to state-of-the-art tool for analyzing TPNs.

Introduction

Petri Nets with Time. The two main extensions of Petri Nets with time are Time Petri Nets (TPNs) [START_REF] Merlin | A study of the recoverability of computing systems[END_REF] and Timed Petri Nets [START_REF] Ramchandani | Analysis of asynchronous concurrent systems by timed Petri nets[END_REF]. For TPNs a transition can fire within a time interval whereas for Timed Petri Nets it fires as soon as possible. Among Timed Petri Nets, time can be considered relative to places or transitions [START_REF] Sifakis | Performance Evaluation of Systems using Nets[END_REF][START_REF] Pezzé | Time Petri Nets: A Primer Introduction[END_REF]. The two corresponding subclasses namely P-Timed Petri Nets and T-Timed Petri Nets are expressively equivalent [START_REF] Sifakis | Performance Evaluation of Systems using Nets[END_REF][START_REF] Pezzé | Time Petri Nets: A Primer Introduction[END_REF]. The same classes are defined for TPNs i.e. T-TPNs and P-TPNs, but both classes of Timed Petri Nets are included in both P-TPNs and T-TPNs [START_REF] Pezzé | Time Petri Nets: A Primer Introduction[END_REF]. P-TPNs and T-TPNs are proved to be incomparable in [START_REF] Khansa | P-Time Petri Nets for manufacturing systems[END_REF]. Finally TPNs form a subclass of Time Stream Petri Nets [START_REF] Diaz | Time stream Petri nets: a model for timed multimedia information[END_REF] which were introduced to model multimedia applications.

The class T-TPNs is the most commonly-used subclass of TPNs and in this paper we focus on this subclass that will be henceforth referred to as TPN. For classical TPNs, boundedness is undecidable, and works on this model report undecidability results, or decidability under the assumption that the TPN is bounded (e.g. reachability in [START_REF] Popova | On time Petri nets[END_REF]). Recent work [START_REF] Abdulla | Timed Petri nets and BQOs[END_REF][START_REF] De Frutos Escrig | Decidability of properties of timed-arc Petri nets[END_REF] consider timed arc Petri nets where each token has a clock representing his "age". The authors prove that coverability and boundedness are decidable for this class of timed arc Petri nets by applying a backward exploration technique. However, they assume a lazy (non-urgent) behavior of the net: the firing of transitions may be delayed, even if that implies that some transitions are disabled because their input tokens become too old.

Verifying Time Petri Nets. The behavior of a TPN can be defined by timed firing sequences which are sequences of pairs (t, d) where t is a transition of the TPN and d ∈ R ≥0 . A sequence of transitions like ω = (t 1 , d 1 ) (t 2 , d 2 ) . . . (t n , d n ) . . . indicates that t 1 is fired after d 1 time units, then t 2 is fired after d 2 time units, and so on, so that transition t i is fired at absolute time i k=1 d k . A marking M is reachable in a TPN if there is a timed firing sequence ω from the initial marking M 0 to M. Reachability analysis of TPNs relies on the construction of the so-called States Class Graph (SCG) that was introduced in [START_REF] Berthomieu | An enumerative approach for analyzing time Petri nets[END_REF] and later refined in [START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF]. It has been recently improved in [START_REF] Lilius | Efficient state space search for time Petri nets[END_REF] by using partial-order reduction methods.

For bounded TPNs, the SCG construction obviously solves the marking reachability problem (Given a marking M, "Can we reach M from M 0 ?"). If one wants to solve the state reachability problem (Given M and v ∈ R ≥0 and a transition t, "Can we reach a marking M such that transition t has been enabled for v time units?") the SCG is not sufficient and an alternative graph, the strong state class graph is introduced for this purpose in [START_REF] Berthomieu | State class constructions for branching analysis of time Petri nets[END_REF]. The two previous graphs allow for checking LTL properties. Another graph can be constructed that preserves CTL * properties. Anyway none of the previous graphs is a good1 abstraction (accurate enough) for checking quantitative real-time properties e.g. "it is not possible to stay in marking M more than n time units" or "from marking M, marking M ′ is always reached within n time units". The two main (efficient) tools used to verify TPNs are Tina [START_REF] Berthomieu | The tool TINA -Construction of Abstract State Spaces for Petri Nets and Time Petri Nets[END_REF] and Romeo [START_REF] Gardey | Roméo: A tool for Time Petri Nets Analysis[END_REF]. Timed Automata. Timed Automata (TA) were introduced by Alur & Dill [START_REF] Alur | A theory of timed automata[END_REF] and have since been extensively studied. This model is an extension of finite automata with (dense time) clocks and enables one to specify real-time systems.

It has been shown that model-checking for TCTL properties is decidable [START_REF] Alur | A theory of timed automata[END_REF][START_REF] Henzinger | Symbolic model checking for real-time systems[END_REF] for TA and some of their extensions [START_REF] Bouyer | Are timed automata updatable? In CAV[END_REF]. There also exist several efficient tools like Uppaal [START_REF] Pettersson | Uppaal2k[END_REF], Kronos [START_REF] Yovine | Kronos: A Verification Tool for real-Time Systems[END_REF] and Cmc [START_REF] Laroussinie | CMC: A tool for compositional model-checking of real-time systems[END_REF] for model-checking TA and many real-time industrial applications have been specified and successfully verified with them.

Related Work. The relationship between TPNs and TA has not been much investigated. In [START_REF] Sifakis | Compositional specification of timed systems[END_REF] J. Sifakis and S. Yovine are mainly concerned with compositionality problems. They show that for a subclass of 1-safe Time Stream Petri Nets, the usual notion of composition used for TA is not suitable to describe this type of Petri Nets as the composition of TA. Consequently, they propose Timed Automata with Deadlines and flexible notions of compositions. In [START_REF] Bornot | Modeling urgency in timed systems[END_REF] the authors consider Petri nets with deadlines (PND) that are 1-safe Petri nets extended with clocks. A PND is a timed automaton with deadlines (TAD) where the discrete transition structure is the corresponding marking graph. The transitions of the marking graph are subject to the same timing constraints as the transitions of the PND. The PND and the TAD have the same number of clocks. They propose a translation of safe TPN into PND with a clock for each input arc of the initial TPN. It defines (by transitivity) a translation of safe TPN into TAD (that can be considered as standard timed automata). In [START_REF] Cortés | Peng Verification of Embedded Systems using a Petri Net based Representation[END_REF] the authors consider an extension of Time Petri Nets (PRES+) and propose a translation into hybrid automata. Correctness of the translation is not proved. Moreover the method is defined only for 1-safe nets.

In another line of work, Sava [START_REF] Sava | Sur la synthèse de la commande des systèmes à évènements discrets temporisés[END_REF] considers bounded TPN where the underlying Petri net is not necessarily safe and proposes an algorithm to translate the TPN into a timed automaton (one clock is needed for each transition of the original TPN). However, the author does not give any proof that this translation is correct (i.e. it preserves some equivalence relation between the semantics of the original TPN and the computed TA) and neither that the algorithm terminates (even if the TPN is bounded). [START_REF] Lime | State class timed automaton of a time Petri net[END_REF] of the state class graph construction that allows to build the state class graph of a bounded TPN as a timed automaton. They prove that this timed automaton and the TPN are timed-bisimilar and they also prove a relative minimality result of the number of clocks needed in the obtained automaton.

Lime and Roux proposed an extension in

The first two approaches are structural but are limited to Petri nets whose underlying net is 1-safe. The last two approaches rely on the computation of the entire (symbolic) state space of the TPN and are limited to bounded TPN. For example in [START_REF] Lime | State class timed automaton of a time Petri net[END_REF], a timed automaton is indeed computed from a TPN but this requires timing information that are collected by computing a State Class Graph. Moreover, if one uses tools for analyzing the timed automaton, the timing correspondence with the TPN we started with is not easy to infer: the clocks of the timed automaton do not have a "uniform" meaning2 in the TPN.

In this article, we consider a structural translation from TPN (not necessary bounded) to TA. The drawbacks of the previous translation are thus avoided because we do not need to compute a State Class Graph and have an easy correspondence of the clocks of our TA with the timing constraints on the transitions of the TPN we started with. It also extends previous results in the following directions: first we can easily prove that our translation is correct and terminates as it is a syntactic translation and it produces a timed automaton that is timed bisimilar to the TPN we started with. Notice that the timed automaton contains integer variables that correspond to the marking of the Petri net and that it may have an unbounded number of locations. However timed bisimilarity holds even in the unbounded case. In case the Petri net is bounded we obtain a timed automaton with a finite number of locations and we can check for TCTL properties of the original TPN. Second as it is a structural translation it does not need expensive computation (like the State Class Graph) to obtain a timed automaton. This has a practical application as it enables one to use efficient existing tools for TA to analyze the TPN.

Our Contribution. We first give a formal semantics for Time Petri Nets [START_REF] Merlin | A study of the recoverability of computing systems[END_REF] in terms of Timed Transition Systems. Then we present a structural translation of a TPN into a synchronized product of timed automata that preserves the semantics (in the sense of timed bisimilarity) of the TPN. This yields theoretical and practical applications of this translation : i) TCTL [START_REF] Alur | A theory of timed automata[END_REF][START_REF] Henzinger | Symbolic model checking for real-time systems[END_REF] model-checking is decidable for bounded TPNs and TCTL properties can now be checked (efficiently) for TPNs with existing tools for analyzing timed automata (like Kronos, Uppaal or Cmc); ii) allowing strict time constraints on transitions for TPNs preserves the previous result : this leads to an extension of the original TPN model for which TCTL properties can be decided; iii) one can specify a system using both TPNs and Timed Automata and a precise semantics is given to the composition; iv) as the translation is structural, one can use unboundedness testing methods to detect behavior leading to the unboundedness of a TPN. Some of the above mentioned results appeared in the preliminary version of this paper [START_REF] Cassez | Structural Translation of Time Petri Nets into Timed Automata[END_REF]. In this extended version we have added the proofs of some theorems and more importantly a section that deals with the implementation of our approach: i) we have implemented the structural translation of TPNs into Uppaal TAs in the tool Romeo; ii) we have compared our approach to existing tools for analyzing TPNs.

Outline of the paper. Section 2 introduces the semantics of TPNs in terms of timed transition systems and the basics of TA. In Section 3 we show how to build a synchronized product of TA that is timed bisimilar to a TPN. We show how it enables us to check for real-time properties expressed in TCTL in Section 4. In section 5 we describe the implementation of our translation in the tool Romeo, and report on experiments we have carried out with Uppaal to check properties of TPNs. Finally we conclude with our ongoing work and perspectives in Section 6.

2 Time Petri Nets and Timed Automata Notations. We denote by B A the set of mappings from A to B. If A is finite and |A| = n, an element of B A is also a vector in B n . The usual operators +, -, < and = are used on vectors of A n with A = N, Q, R and are the pointwise extensions of their counterparts in A. For a valuation ν ∈ A n , d ∈ A, ν +d denotes the vector (ν + d) i = ν i + d, and for A ′ ⊆ A, ν[A ′ → 0] denotes the valuation ν ′ with ν ′ (x) = 0 for x ∈ A ′ and ν ′ (x) = ν(x) otherwise. We denote C(X) for the simple constraints over a set of variables X. C(X) is defined to be the set of boolean combinations (with the connectives {∧, ∨, ¬}) of terms of the form x-x ′ ⊲⊳ c or x ⊲⊳ c for x, x ′ ∈ X and c ∈ N and ⊲⊳ ∈ {<, ≤, =, ≥, >}. Given a formula ϕ ∈ C(X) and a valuation ν ∈ A n , we denote by ϕ(ν) the truth value obtained by substituting each occurrence of x in ϕ by ν(x). For a transition system we write transitions as s a -→ s ′ and a sequence of transitions of the form s 0

a 1 -→ s 1 -→ • • • an --→ s n as s 0 w =⇒ s n with w = a 1 a 2 • • • a n .

Time Petri Nets

The model. Time Petri Nets were introduced in [START_REF] Merlin | A study of the recoverability of computing systems[END_REF] and extend Petri Nets with timing constraints on the firings of transitions.

Definition 1 (Time Petri Net) A Time Petri Net T is a tuple (P, T, • (.), (.) • , M 0 , (α, β)) where:

P = {p 1 , p 2 , • • • , p m } is a finite set of places and T = {t 1 , t 2 , • • • , t n }
is a finite set of transitions; • (.) ∈ (N P ) T is the backward incidence mapping; (.) • ∈ (N P ) T is the forward incidence mapping; M 0 ∈ N P is the initial marking; α ∈ (Q ≥0 ) T and β ∈ (Q ≥0 ∪ {∞}) T are respectively the earliest and latest firing time mappings.

Semantics of Time Petri Nets. The semantics of TPNs can be given in term of Timed Transition Systems (TTS) which are usual transition systems with two types of labels: discrete labels for events and positive reals labels for time elapsing. ν ∈ (R ≥0 ) n is a valuation such that each value ν i is the elapsed time since the last time transition t i was enabled. 0 is the initial valuation with ∀i ∈ [1..n], 0 i = 0. A marking M of a TPN is a mapping in N P and if M ∈ N P , M(p i ) is the number of tokens in place p i . A transition t is enabled in a marking M iff M ≥ • t. The predicate ↑ enabled(t k , M, t i ) ∈ B is true if t k is enabled by the firing of transition t i from marking M, and false otherwise. This definition of enabledness is based on [START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF][START_REF] Aura | A causal semantics for time Petri nets[END_REF] which is the most common one. In this framework, a transition t k is newly enabled after firing t i from marking M if "it is not enabled by M -• t i and is enabled by

M ′ = M -• t i + t i
• " [START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF].

Formally this gives:

↑enabled(t k , M, t i ) = M -• t i + t i • ≥ • t k ∧ (M -• t i < • t k ) ∨ (t k = t i ) (1)
Definition 2 (Semantics of TPN) The semantics of a TPN T is a timed transition system S T = (Q, q 0 , →) where:

Q = N P × (R ≥0 ) n , q 0 = (M 0 , 0), -→ ∈ Q × (T ∪ R ≥0 ) × Q consists of

the discrete and continuous transition relations:

• the discrete transition relation is defined for all t i ∈ T by (M, ν)

t i -→ (M ′ , ν ′ ) iff:              M ≥ • t i ∧ M ′ = M -• t i + t i • α(t i ) ≤ ν i ≤ β(t i ) ν ′ k =    0 if ↑enabled(t k , M, t i ), ν k otherwise.
• the continuous transition relation is defined for all d ∈ R ≥0 by (M, ν)

ǫ(d) --→ (M, ν ′ ) iff:    ν ′ = ν + d ∀k ∈ [1..n], M ≥ • t k =⇒ ν ′ k ≤ β(t k )
A run of a time Petri net T is a (finite or infinite) path in S T starting in q 0 . The set of runs of T is denoted by

[[T ]]. The set of reachable markings of T is denoted Reach(T ). If the set Reach(T ) is finite we say that T is bounded.
As a shorthand we write (M, ν) -→ d e (M ′ , ν ′ ) for a sequence of time elapsing and discrete steps like (M, ν)

ǫ(d) --→ (M ′′ , ν ′′ ) e -→ (M ′ , ν ′ ).
This definition may need some comments. Our semantics is based on the common definition of [START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF][START_REF] Aura | A causal semantics for time Petri nets[END_REF] for safe TPNs.

First, previous formal semantics [START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF][START_REF] Lilius | Efficient state space search for time Petri nets[END_REF][START_REF] Pezzé | Time Petri Nets: A Primer Introduction[END_REF][START_REF] Aura | A causal semantics for time Petri nets[END_REF] for TPNs usually require the TPNs to be safe. Our semantics encompasses the whole class of TPNs and is fully consistent with the previous semantics when restricted to safe TPNs3 . Thus, we have given a semantics to multiple enabledness of transitions which seems the most simple and adequate. Indeed, several interpretations can be given to multiple enabledness [START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF].

Second, some variations can be found in the literature about TPNs concerning the firing of transitions. The paper [START_REF] Pezzé | Time Petri Nets: A Primer Introduction[END_REF] considers two distinct semantics: Weak Time Semantics (WTS) and Strong Time Semantics (STS). According to WTS, a transition can be fired only in its time interval whereas in STS, a transition must fire within its firing interval unless disabled by the firing of others. The most commonly used semantics is STS as in [START_REF] Merlin | A study of the recoverability of computing systems[END_REF][START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF][START_REF] Pezzé | Time Petri Nets: A Primer Introduction[END_REF][START_REF] Aura | A causal semantics for time Petri nets[END_REF]. Third, it is possible for the TPN to be zeno or unbounded. In the case it is unbounded, the discrete component of the state space of the timed transition system is infinite. If ∀i, α(t i ) > 0 then the TPN is non-zeno and the requirement that time diverges on each run is fulfilled. Otherwise, if the TPN is bounded and at least one lower bound is 0, the zeno or non-zeno property can be decided [START_REF] Henzinger | Symbolic model checking for real-time systems[END_REF] for the TPN using the equivalent timed automaton we build in section 3.

Timed Automata and Products of Timed Automata

Timed automata [START_REF] Alur | A theory of timed automata[END_REF] are used to model systems which combine discrete and continuous evolutions.

Definition 3 (Timed Automaton)

A Timed Automaton H is a tuple (N, l 0 , X, A, E, Inv) where: N is a finite set of locations; l 0 ∈ N is the initial location; X is a finite set of positive real-valued clocks; A is a finite set of actions;

E ⊆ N × C(X) × A × 2 X × N is a finite set of edges, e = l,
γ, a, R, l ′ ∈ E represents an edge from the location l to the location l ′ with the guard γ, the label a and the reset set R ⊆ X; and Inv ∈ C(X) N assigns an invariant to any location. We restrict the invariants to conjuncts of terms of the form c ≤ r for c ∈ X and r ∈ N.

The semantics of a timed automaton is also a timed transition system. Definition 4 (Semantics of a TA) The semantics of a timed automaton H = (N, l 0 , X, A, E, Inv) is a timed transition system S H = (Q, q 0 , →) with Q = N × (R ≤0 ) X , q 0 = (l 0 , 0) is the initial state and → consists of the discrete and continuous transition relations:

• the discrete transition relation if defined for all a ∈ A by (l, v) a -→ (l ′ , v ′ ) if: ∃ (l, γ, a, R, l ′ ) ∈ E s.t.        γ(v) = tt, v ′ = v[R → 0] Inv(l ′ )(v ′ ) = tt • the continuous transitions is defined for all t ∈ R ≥0 by (l, v) ǫ(t) --→ (l ′ , v ′ ) if:    l = l ′ v ′ = v + t and ∀ 0 ≤ t ′ ≤ t, Inv(l)(v + t ′ ) = tt A run of a timed automaton H is a path in S H starting in q 0 . The set of runs of H is denoted by [[H]].
Product of Timed Automata. It is convenient to describe a system as a parallel composition of timed automata. To this end, we use the classical composition notion based on a synchronization function à la Arnold-Nivat.

Let X = {x 1 , • • • , x n } be a set of clocks, H 1 , . . . , H n be n timed automata with H i = (N i , l i,0 , X, A, E i , Inv i ). A synchronization function f is a partial function from (A ∪ {•}) n ֒→ A
where • is a special symbol used when an automaton is not involved in a step of the global system. Note that f is a synchronization function with renaming. We denote by (H 1 | . . . |H n ) f the parallel composition of the H i 's w.r.t. f . The configurations of (H

1 | . . . |H n ) f are pairs (l, v) with l = (l 1 , . . . , l n ) ∈ N 1 ×. . .×N n and v = (v 1 , • • • , v n )
where each v i is the value of the clock x i ∈ X. Then the semantics of a synchronized product of timed automata is also a timed transition system: the synchronized product can do a discrete transition if all the components agree to and time can progress in the synchronized product also if all the components agree to. This is formalized by the following definition:

Definition 5 (Semantics of a Product of TA) Let H 1 , . . . , H n be n timed automata with H i = (N i , l i,0 , X, A, E i , Inv i ), and f a (partial) synchronization function (A∪{•}) n ֒→ A. The semantics of (H 1 | . . . |H n ) f is a timed transition system S = (Q, q 0 , →) with Q = N 1 × . . . × N n × (R ≥0 ) X ,
q 0 is the initial state ((l 1,0 , . . . , l n,0 ), 0) and → is defined by:

• (l, v) b -→ (l ′ , v ′ ) if there exists (a 1 , . . . , a n ) ∈ (A∪{•}) n s.t. f (a 1 , . . . , a n ) = b
and for any i we have: . If

a i = •, then l ′ [i] = l[i] and v ′ [i] = v[i], . If a i ∈ A, then (l[i], v[i]) a i -→ (l ′ [i], v ′ [i]). • (l, v) ǫ(t) --→ (l, v ′ ) if for all i ∈ [1..n], every H i agrees on time elapsing i.e. (l[i], v[i]) ǫ(t) --→ (l[i], v ′ [i]).
We could equivalently define the product of n timed automata syntactically, building a new timed automaton from the n initial ones. In the sequel we consider a product (H 1 | . . . |H n ) f to be a timed automaton the semantics of which is timed bisimilar to the semantics of the product we have given in Definition 5.

From Time Petri Nets to Timed Automata

In this section, we build a synchronized product of timed automata from a TPN so that the behaviors of the two are in a one-to-one correspondence.

Translating Time Petri Nets into Timed Automata

We start with a TPN T = (P, T, • (.), (.)

• , M 0 , (α, β)) with P = {p 1 , • • • , p m } and T = {t 1 , • • • , t n }.
Timed Automaton for one Transition. We define one timed automaton A i for each transition t i of T (see Fig. 1.a). This timed automaton has one clock x i . Also the states of the automaton A i give the state of the transition t i : in state t the transition is enabled; in state t it is disabled and in Firing it is being fired. The initial state of each A i depends on the initial marking M 0 of the Petri net we want to translate. If M 0 ≥ • t i , then the initial state is t otherwise it is t. This automaton updates an array of integers p (s.t. p[i] is the number of tokens in place p i ) which is shared by all the A i 's. This is not covered by Definition 5, which is very often extended ( [START_REF] Pettersson | Uppaal2k[END_REF]) with integer variables (this does not affect the expressiveness of the model when the variables are bounded).

The Supervisor. The automaton for the supervisor SU is depicted on Fig. 1.b. The locations 1 to 3 subscripted with a "c" are assumed to be urgent or committed 4 which means that no time can elapse while visiting them. We denote by ∆

(T ) = (SU | A 1 | • • • | A n ) f
the timed automaton associated to the TPN T . The supervisor's initial state is 0. Let us define the synchronization t

[x i ≤ β(t i )] Firing t α(t i ) ≤ x i ≤ β(t i ) ?pre p := p -• t i p < • t i ?update ?post p := p + t i • p ≥ • t i ?update x i := 0 p ≥ • t i ?update p < • t i ?update ?update 0 1 c 2 c 3 c !pre !update !post !update (a)
The automaton A i for transition t i (b) Supervisor SU Fig. 1. Automata for the Transitions and the Supervisor function5 f with n + 1 parameters defined by:

• f (!pre, •, • • • , ?pre, •, • • • ) = pre i if ?pre is the (i + 1)th argument and all the other arguments are •, • f (!post, •, • • • , ?post, •, • • • ) = post i if ?post is the (i + 1)th argument and
all the other arguments are •, • f (!update, ?update, • • • , ?update) = update.

We will prove in the next subsection that the semantics of ∆(T ) is closely related to the semantics of T . For this we have to relate the states of T to the states of ∆(T ) and we define the following equivalence: Definition 6 (State Equivalence) Let (M, ν) and ((s, p), q, v) be, respectively, a state of S T and a configuration 6 . Then (M, ν) ≈ ((s, p), q, v) if:

                   s = 0, ∀i ∈ [1..m], p[i] = M(p i ), ∀k ∈ [1..n], q[k] =    t if M ≥ • t k , t otherwise ∀k ∈ [1..n], v[k] = ν k

Soundness of the Translation

We now prove that our translation preserves the behaviors of the initial TPN in the sense that the semantics of the TPN and its translation are timed bisimilar. We assume a TPN T and S T = (Q, q 0 , →) its semantics. Let A i be the automaton associated with transition t i of T as described by Fig. 1.a, SU the supervisor automaton of Fig. 1.b and f the synchronization function defined previously. The semantics of ∆(T ) = (SU

| A 1 | • • • | A n ) f is the TTS S ∆(T ) = (Q ∆(T ) , q ∆(T ) 0 , →).
Theorem 1 (Timed Bisimilarity) For (M, ν) ∈ S T and ((0, p), q, v) ∈ S ∆(T ) such that (M, ν) ≈ ((0, p), q, v) the following holds:

(M, ν) t i -→ (M ′ , ν ′ ) iff        ((0, p), q, v) w i =⇒ ((0, p ′ ), q ′ , v ′ ) with w i = pre i .update.post i .update and (M ′ , ν ′ ) ≈ ((0, p ′ ), q ′ , v ′ ) (2) (M, ν) ǫ(d) --→ (M ′ , ν ′ ) iff    ((0, p), q, v) ǫ(d) --→ ((0, p ′ ), q ′ , v ′ ) and (M ′ , ν ′ ) ≈ ((0, p ′ ), q ′ , v ′ ) (3)
Proof 1 We first prove statement [START_REF] Alur | A theory of timed automata[END_REF]. Assume (M, ν) ≈ ((0, p), q, v). Then as t i can be fired from (M, ν) we have:

(i) M ≥ • t i , (ii) α(t i ) ≤ ν i ≤ β(t i ), (iii) M ′ = M -• t i + t i •
, and (iv) ν ′ k = 0 if ↑enabled(t k , M, t i ) and ν ′ k = ν k otherwise. From (i) and (ii) and the state equivalence we deduce that q[i] = t and α(t i ) ≤ v[i] ≤ β(t i ). Hence ?pre is enabled in A i . In state 0 for the supervisor, !pre is the only possible transition. As the synchronization function f allows (!pre, •, • • • , ?pre, • • • , •) the global action pre i is possible. After this move ∆(T ) reaches state ((1, p 1 ),

q 1 , v 1 ) such that for all k ∈ [1..n], q 1 [k] = q[k], ∀k = i and q 1 [i] = Firing. Also p 1 = p -• t i and v 1 = v.
Now the only possible transition when the supervisor is in state 1 is an update transition where all the A i 's synchronize according to f . From ((1, p 1 ),

q 1 , v 1 ) we reach ((2, p 2 ), q 2 , v 2 ) with p 2 = p 1 , v 2 = v 1 . For all k ∈ [1..n], k = i, q 2 [k] = t if p 1 ≥ • t k and q 2 [k] = t otherwise. Also q 2 [i] = Firing.
The next global transition must be a post i transition leading to ((3, p 3 ), q 3 , v 3 ) with

p 3 = p 2 + t i • , v 3 = v 2 and for all k ∈ [1..n], q 3 [k] = q 2 [k], ∀k = i and q 3 [i] = t.
From this last state only an update transition leading to ((0, p 4 ), q 4 , v 4 ) is allowed, with p 4 = p 3 , v 4 and q 4 given by: for all k ∈

[1..n], q 4 [k] = t if p 3 ≥ • t k and t otherwise. v 4 [k] = 0 if q 3 [k] = t and q 4 [k] = t and v 4 [k] = v 1 [k] otherwise. We then just notice that q 3 [k] = t iff p -• t i < • t k and q 4 [k] = t iff p-• t i +t i • ≥ • t k . This entails that v 4 [k] = 0 iff ↑enabled(t k , p, t i ) and with (iv) gives ν ′ k = v 4 [k]. As p 4 = p 3 = p 2 +t i • = p 1 -• t i +t i • = p-• t i +t i • using (iii) we have ∀i ∈ [1..m], M ′ (p i ) = p 4 [i]. Hence we conclude that ((0, p 4 ), q 4 , v 4 ) ≈ (M ′ , ν ′ ).
The converse of statement ( 2) is straightforward following the same steps as the previous ones.

We now focus on statement [START_REF] Aura | A causal semantics for time Petri nets[END_REF]. According to the semantics of TPNs, a continuous transition (M, ν)

ǫ(d) --→ (M ′ , ν ′ ) is allowed iff ν = ν ′ + d and ∀k ∈ [1..n], (M ≥ • t k =⇒ ν ′ k ≤ β(t k )). As (M, ν) ≈ ((0, p), q, v), if M ≥ • t k then q[k
] = t and the continuous evolution for A k is constrained by the invariant x k ≤ β(t k ). Otherwise q[k] = t and the continuous evolution is unconstrained for A k . No constraints apply for the supervisor in state 0. Hence the result. 2

We can now state a useful corollary which enables us to do TCTL modelchecking for TPNs in the next section. We write ∆((M, ν)) = ((0, p), q, v) if (M, ν) ≈ ((0, p), q, v), ∆(t i ) = pre i .update.post i .update and also ∆(ǫ(d)) = ǫ(d). Just notice that ∆ is one-to-one and we can use ∆ -1 as well. Then we extend ∆ to transitions as: ∆((M, ν)

e -→ (M ′ , ν ′ )) = ∆((M, ν)) ∆(e) ---→ ∆((M ′ , ν ′ )) with e ∈ T ∪ R ≥0 (as ∆(t i ) is a word,

this transition is a four step transition in ∆(T )). Again we can extend ∆ to runs: if ρ ∈[[T ]] we denote ∆(ρ) the associated run in [[∆(T )]

]. Notice that ∆ -1 is only defined for runs σ of [[ ∆(T ) ]], the last state of which is of the form ((0, p), q, v) where the supervisor is in state 0. We denote this property last(σ) |= SU.0.

Corollary 1 ρ ∈[[T ]] ∧ σ = ∆(ρ) iff σ ∈[[∆(T )]] ∧last(σ) |= SU.0 . Proof 2
The proof is a direct consequence of Theorem 1. It suffices to notice that all the finite runs of ∆(T ) are of the form

σ = (s 0 , v 0 ) δ 1 -→(s ′ 0 , v ′ 0 ) w 1 -→ (s 1 , v 1 ) • • • δn -→ (s ′ n-1 , v ′ n-1 ) wn -→ (s n , v n ) (4)
with w i = pre i .update.post i .update, δ i ∈ R ≥0 , and using Theorem 1, if last(σ) |= SU.0, there exists a corresponding run ρ in T s.t. σ = ∆(ρ). 2

This property will be used in Section 4 when we address the problem of modelchecking TCTL for TPNs.

TCTL Model-Checking for Time Petri Nets

We can now define TCTL [START_REF] Henzinger | Symbolic model checking for real-time systems[END_REF] for TPNs. The only difference with the versions of [START_REF] Henzinger | Symbolic model checking for real-time systems[END_REF] is that the atomic propositions usually associated to states are prop-erties of markings. For practical applications with model-checkers we assume that the TPNs we check are bounded.

TCTL for TPNs.

Definition 7 (TCTL for TPN) Assume a TPN with n places, and m transitions T = {t 1 , t 2 , • • • , t m }. The temporal logic TPN-TCTL is inductively defined by: TPN-TCTL :

:=M ⊲⊳ V | false | t k + c ≤ t j + d | ¬ϕ | ϕ → ψ | ϕ ∃U ⊲⊳c ψ | ϕ ∀U ⊲⊳c ψ (5)
where M and false are keywords, ϕ, ψ ∈ TPN-TCTL, t k , t j ∈ T , c, d ∈ Z, V ∈ (N ∪ {∞}) n and7 ⊲⊳ ∈ {<, ≤, =, >, ≥}.

Intuitively the meaning of M ⊲⊳ V is that the current marking vector is in relation ⊲⊳ with V . The meaning of the other operators is the usual one. We use the familiar shorthands true = ¬false, ∃3 ⊲⊳c φ = true ∃U ⊲⊳c φ and ∀2 ⊲⊳c = ¬∃3 ⊲⊳c ¬φ.

The semantics of TPN-TCTL is defined on timed transition systems. Let T = (P, T, • (.), (.) • , M 0 , (α, β)) be a TPN and S T = (Q, q 0 , →) the semantics of

T . Let σ = (s 0 , ν 0 ) -→ d 1 a 1 • • • -→ dn an (s n , ν n ) ∈[[T ]].
The truth value of a formula ϕ of TPN-TCTL for a state (M, ν) is given in Fig. 2.

The TPN T satisfies the formula ϕ of TPN-TCTL, which is denoted by T |= ϕ, iff the first state of S T satisfies ϕ, i.e. (M 0 , 0) |= ϕ.

We will see that thanks to Corollary 1, model-checking TPNs amounts to model-checking timed automata.

Model-Checking for TPN-TCTL. Let us assume we have to model-check formula ϕ on a TPN T . Our method consists in using the equivalent timed automaton ∆(T ) defined in Section 3. For instance, suppose we want to check T |= ∀2 ≤3 (M ≥ (1, 2)). The check means that all the states reached within the next 3 time units will have a marking such that p 1 has more than one token and p 2 more than 2. Actually, this is equivalent to checking ∀2 ≤3 (SU.0

→ (p[1] ≥ 1 ∧ p[2] ≥ 2)) on the equivalent timed automaton. Notice that ∃3 ≤3 (M ≥ (1, 2)) reduces to ∃3 ≤3 (SU.0 ∧ (p[1] ≥ 1 ∧ p[2] ≥ 2)
). We can then define the translation of a formula in TPN-TCTL to standard TCTL for timed automata: we denote TA-TCTL the logic TCTL for timed automata.

(M, ν) |= M ⊲⊳ V iff M ⊲⊳ V (M, ν) |= false (M, ν) |= t k + c ≤ t j + d iff ν k + c ≤ ν j + d (M, ν) |= ¬ϕ iff (M, ν) |= ϕ (M, ν) |= ϕ → ψ iff (M, ν) |= ϕ implies (M, ν) |= ψ (M, ν) |= ϕ ∃U ⊲⊳c ψ iff ∃σ ∈[[T ]] such that        (s 0 , ν 0 ) = (M, ν) ∀i ∈ [1..n], ∀d ∈ [0, d i ), (s i , ν i + d) |= ϕ n i=1 d i ⊲⊳ c and (s n , v n ) |= ψ (M, ν) |= ϕ ∀U ⊲⊳c ψ iff ∀σ ∈[[T ]] we have        (s 0 , ν 0 ) = (M, ν) ∀i ∈ [1..n], ∀d ∈ [0, d i ), (s i , ν i + d) |= ϕ n i=1 d i ⊲⊳ c and (s n , v n ) |= ψ
∆(M ⊲⊳ V ) = n i=1 (p[i] ⊲⊳ Vi ) ∆(false) = false ∆(t k + c ⊲⊳ t j + d) = x k + c ⊲⊳ x j + d ∆(¬ϕ) = ¬∆(ϕ) ∆(ϕ → ψ) = SU.0 ∧ (∆(ϕ) → ∆(ψ)) ∆(ϕ ∃U ⊲⊳c ψ) = (SU.0 → ∆(ϕ)) ∃U ⊲⊳c (SU.0 ∧ ∆(ψ)) ∆(ϕ ∀U ⊲⊳c ψ) = (SU.0 → ∆(ϕ)) ∀U ⊲⊳c (SU.0 ∧ ∆(ψ))
SU.0 means that the supervisor is in state 0 and the clocks x k are the ones associated with every transition t k in the translation scheme.

Theorem 2 Let T be a TPN and ∆(T ) the equivalent timed automaton. Let (M, ν) be a state of S T and ((s, p), q, v) = ∆((M, ν)) the equivalent state of S ∆(T ) (i.e. (M, ν) ≈ ((s, p), q, v)). Then ∀ϕ ∈ TPN-TCTL:

(M, ν) |= ϕ iff ((s, p), q, v) |= ∆(ϕ).
Proof 3 The proof is done by structural induction on the formula of TPN-TCTL. The cases of M ⊲⊳ V , false, t k + c ≤ t j + d, ¬ϕ and ϕ → ψ are straightforward. We give the full proof for ϕ ∃U ⊲⊳c ψ (the same proof can be carried out for ϕ ∀U ⊲⊳c ψ).

Only if part. Assume (M, ν) |= ϕ ∃U ⊲⊳c ψ. Then by definition, there is a run

ρ in [[T ]] s.t.: ρ = (s 0 , ν 0 ) -→ d 1 a 1 (s 1 , ν 1 ) • • • -→ dn an (s n , ν n ) and (s 0 , ν 0 ) = (M, ν), n i=1 d i ⊲⊳ c, ∀i ∈ [1..n], ∀d ∈ [0, d i ), (s i , ν i + d) |= ϕ and (s n , ν n ) |= ψ. With corollary 1, we conclude that there is a run σ = ∆(ρ) in [[S ∆(T ) ]] s.t. σ =((l 0 , p 0 ), q0 , v 0 )) =⇒ d 1 w 1 ((l 1 , p 1 ), q1 , v 1 )) • • • • • • =⇒ dn wn ((l n , p n ), qn , v n ))
and ∀i ∈ [1.

.n], ((l i , p i ), qi , v i )) ≈ (s i , ν i ) (this entails that l i = 0.)

Since (s n , ν n ) ≈ ((l n , p n ), qn , v n ))
, using the induction hypothesis on ψ, we can assume

(s n , ν n ) |= ψ iff ((l n , p n ), qn , v n )) |= ∆(ψ)
((l i , p i ), qi , v i ) satisfy ∆(ϕ).
As for all i ∈ [1.

.n], we have ((l i , p i ), qi , v i )) ≈ (s i , ν i ), with the induction hypothesis on ϕ, we have ∀i ∈ [1.

.n], ((l i , p i ), qi , v i )) |= ∆(ϕ). Moreover, again applying theorem 1, we obtain for all d ∈ [0, d i ): ((l i , p i ), qi , v i +d)) ≈ (s i , ν i +d); applying the induction hypothesis again we conclude that for all d ∈ [0, d i ) ((l i , p i ), qi , v i +d)) |= ∆(ϕ). Hence ((l 0 , p 0 ), q0 , v 0 )) |= (SU.0 → ϕ) ∃U ⊲⊳c (SU.0 ∧ ψ).

If part. Assume ((l 0 , p 0 ), q0 , v 0 )) |= (SU.0 → ∆(ϕ)) ∃U ⊲⊳c (SU.0 ∧ ∆(ψ)).

Then there is a run

σ =((l 0 , p 0 ), q0 , v 0 )) =⇒ d 1 w 1 ((l 1 , p 1 ), q1 , v 1 )) • • • • • • =⇒ dn wn ((l n , p n ), qn , v n )) with ((l n , p n ), qn , v n )) |= SU.0∧∆(ψ) and ∀i ∈ [1..n], ∀d ∈ [0, d i ), ((l i , p i ), qi , v i )) |= (SU.0 → ∆(ϕ)). As ((l n , p n ), qn , v n ))
|= SU.0, we can use corollary 1 and we know there exists a run in

[[T ]] ρ = ∆ -1 (σ) = (s 0 , ν 0 ) → d 1 a 1 (s 1 , ν 1 ) • • • → dn an (s n , ν n ) with ∀i ∈ [1..n], ((l i , p i ), qi , v i )) ≈ (s i , ν i ). The induction hypothesis on SU.0 ∧ ∆(ψ) and ((l n , p n ), qn , v n )) |= S.0 ∧ ∆(ψ) implies (s n , ν n ) |= ψ.
For all the intermediate states of ρ we also apply the induction hypothesis: each ((l i , p i ), qi , v i )) is equivalent to (s i , ν i ) and all the states In this section we describe some properties of our translation and important implementation details. Then we report on examples we have checked using our approach and Uppaal.

(s i , ν i + d), d ∈ [0, d i ) satisfy ϕ. Hence (s 0 , ν 0 ) |= ϕ ∃U ⊲⊳c ψ.

Translation to Uppaal input format

The first step in using our approach is to translate an existing TPN into a product of TA. For this we use the tool Romeo [START_REF] Gardey | Roméo: A tool for Time Petri Nets Analysis[END_REF] that has been developed for the analysis of TPNs (state space computation and "on the fly" modelchecking of reachability properties with a zone-based forward method and with the State Class Graph method). Romeo has a GUI (see Fig. 3) to "draw" Timed Petri Nets and now an export to Uppaal feature that implements our translation of a TPN into the equivalent TA in Uppaal input format 8 .

The textual input format for TPN in Romeo is XML and the timed automaton is given in the ".xta" Uppaal input format 9 . The translation gives one timed automaton for each transition and one automaton for the supervisor SU as described in Section 3. The automata for each transition update an array of integers M[i] (which is the number of tokens10 in place i in the original TPN). For example, the enabledness and firing conditions of a transition t i such that • t i = (1, 0, 0) and t i • = (0, 0, 1), are respectively implemented by M[0] ≥ 1 and M[2] := M[2] + 1. Instead of generating one template automaton for each transition, we generate as many templates as types of transitions in the original TPN: the type of a transition is the number of input places and output places. For the example of Fig. 3, there are only three types of transitions (one input place to one output place, one to two and two to one) and three templates in the Uppaal translation. Then one of these templates is instantiated for each transition of the TPN we started with. An example of a Uppaal template for transitions having one input place and one output place is given in Fig. 4; integers B1 and F1 give respectively the index of the unique input place of the transition, and the index of the output place. The timing constraints of the transition are given by dmin and dmax. We can handle as well transitions with input and output arcs with arbitrary weights (on the examples of Fig. 4 the input and output weights are 1).

In our translation, each transition of the TPN is implemented by a TA with one clock. The synchronized product thus contains as many clocks as the number of transitions of the TPN. At first sight one can think that the translation we have proposed is far too expensive w.r.t. to the number of clocks to be of any use when using a model-checker like Uppaal: indeed the model-checking of TA is exponential in the number of clocks. Nevertheless we do not need to keep track of all the clocks as many of them are not useful in many states.

Inactive clocks

When a transition in a TPN is disabled, there is no need to store the value of the clock for this transition: this was already used in the seminal paper of B. Berthomieu and M. Diaz [START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF]. Accordingly when the TA of a transition is in location t (not enabled) we do not need to store the value of the clock: this means that many of the clocks can often be disregarded.

In Uppaal there is a corresponding notion of inactive clock : Definition 9 (Uppaal inactive clock) Let A be a timed automaton. Let x be a clock of A and ℓ be a location of A. If on all path starting from (ℓ, v) in S A , the clock x is always reset before being tested then the clock x is inactive in location ℓ. A clock is active if it is not inactive.

A consequence of the notion of inactive clocks in Uppaal is that at location ℓ the DBM that represents the constraints on the clocks will only contain the active clocks. The next proposition (which is easy to prove on the timed automaton of a transition) states that our translation is effective w.r.t. active clocks reduction i.e. that when a TA of a transition is not in state t (enabled) the corresponding clock is considered inactive by Uppaal.

Proposition 1 Let A i be the timed automaton associated with transition t i of a TPN T (see Fig. 1, page 10). The clock x i of A i is inactive in locations Firing and t.

The current version of Uppaal (3.4.7) computes active clocks syntactically for each automaton of the product. When the product automaton is computed "on the fly" (for verification purposes), the set of active clocks for a product location is simply the union of the set of active clocks of each component. Again without difficulty we obtain the following theorem:

Theorem 3 Let T be a TPN and ∆(T ) the equivalent product of timed automata (see section 3). Let M be a (reachable) marking of S T and ℓ the equivalent11 location in S ∆(T ) . The number of active clocks in ℓ is equal to the number of enabled transitions in the marking M.

Thanks to this theorem and to the active clocks reduction feature of Uppaal the model-checking of TCTL properties on the network of timed automata given by our translation can be efficient. Of course there are still examples with a huge number of transitions, all enabled at any time that we will not be able to analyze, but those examples cannot be handled by any existing tool for TPN.

In the next subsection we apply our translation to some recent and non trivial examples of TPNs that can be found in [START_REF] Gardey | Roméo: A tool for Time Petri Nets Analysis[END_REF].

Tools for analyzing TPNs

One feature of Romeo is now to export a TPN to Uppaal or Kronos but it was originally developed to analyze directly TPNs and has many built-in capabilities: we refer to Romeo Std for the tool Romeo with these capabilities [START_REF] Gardey | Roméo: A tool for Time Petri Nets Analysis[END_REF]. Tina [START_REF] Berthomieu | The tool TINA -Construction of Abstract State Spaces for Petri Nets and Time Petri Nets[END_REF] Regarding time performance Romeo Std and Tina give almost the same results. Moreover with Romeo Std and Tina, model-checking LTL or CTL properties will usually be faster than using Romeo +Uppaal: those tools implement efficient algorithms to produce the (A)SCG needed to perform LTL or CTL model-checking. On one hand it is to be noticed that both Romeo Std and Tina need 1) to produce a file containing the (A)SCG; and then 2) to run a model-checker on the obtained graph to check for the (LTL, CTL or CTL * ) property. This can be prohibitive on very large examples as the ones we use in Table 7.

On the other hand neither Romeo Std nor Tina are able to check quantitative properties such as quantitative liveness (like property of equation ( 6) below) and TCTL which in general cannot be encoded with an observer (when this possible we can translate such a quantitative property into a problem of marking reachability).

Checking a liveness quantitative property on T g .

Let us consider the TPN T g of Fig. 6. The response (liveness) property, where M[i] is the marking of the place P i , cannot be checked with Tina (nor with Romeo Std) and can easily be checked with our method using the translation and Uppaal. This property means that if we do not fire T 1 before 3 t.u. then it is unavoidable that at some point in the future there is a marking with a token in P 2 and in P 4 . In Uppaal we can use the response property template P --> Q which corresponds to ∀2(P =⇒ ∀3Q). Using our TPN-TCTL translation we obtain: To our knowledge, the translation of TPNs to TA implemented in Romeo is currently the only existing method allowing the checking of these properties (quantitative liveness and the Uppaal subset of TCTL) on TPNs.

∀2 (M[1] > 0 ∧ M[3] > 0 ∧ T 1 .x > 3) =⇒ ∀3(M[2] > 0 ∧ M[4] > 0) (6)
P 1 P 2 P 3 P 4 T 1 [0, 4] T 2 [2, 2]
T 3 [START_REF] Berthomieu | The tool TINA -Construction of Abstract State Spaces for Petri Nets and Time Petri Nets[END_REF][START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF] T 4

[1, 3]

• •

Fig. 6. The TPN T g

Experimental results

As a preamble we just point out that our translation is syntactic and the time to translate a TPN into an equivalent product of TA is negligible. This is in contrast with the method used in Tina and Romeo Std where the whole state space has to be computed in order to build some graph (usually very large) and later on, a model-checker has to be used to check the property on the graph. In For all these examples we check a safety property that is true so that Uppaal must explore the whole state space of the TPN; we can then compare the computation time and memory requirements for Uppaal and Tina.

Cyclic and periodic tasks.

This set of examples we call Real-time classical examples consists of cyclic and periodic synchronized tasks (like the alternate bit protocol modeled in [START_REF] Berthomieu | Modeling and verification of time dependent systems using time Petri nets[END_REF]).

On these examples we check the k-boundedness property of the TPN and also the property P : ∀2(SU.0 =⇒ M[1] ≤ 10). k-boundedness is checked by setting the maximum value 12 of the array M to k: in case the bound is hit for one transition, the module verifyta of Uppaal will issue a warning "State discarded" indicating which M[i] was above the bound k. If no warning is issued, all the places are bounded by k. We check property P to force Uppaal to explore the whole state space of the system. In the sequel we will check for 20-boundedness of the TPNs. If the result is "Property P is satisfied" and no warning "State discarded" has been issued we are sure that 1) the TPN is bounded and 2) Uppaal has scanned the whole state space of the TPN. The results of the use of Uppaal to check these properties are given in Table 7.

All the examples of this category are bounded and satisfy property P .

Except two cases (oex5,t3) Uppaal uses less memory than Tina whereas Tina is faster. This can be due to initial allocation of memory. Also as those case studies are rather small the measured time may not be meaningful. As we will see in the section Large examples below, it turns out that memory is the limiting factor when we want to model-check large examples.

Producers/Consumers examples.

We also experimented on i-Producers/j-Consumers examples (PiCj) where the degree of concurrency is usually very high. The results are given in Table 7.

The time required to check a property with Uppaal depends on the number of clocks simultaneously enabled in the TPN. Thus the producers-consumers P6C7 for which there are always at least 10 transitions simultaneously enabled is a particularly unfavourable case. Of course, it is difficult to generalize from these results since they are highly dependent on the TPN and on the property that we check on it. However, they give an idea of the time and space required for the verification and also shows that our method can be used on non trivial examples. All these examples are bounded and P is satisfied. Again Uppaal uses far less memory than Tina.

Large examples.

These examples are very large and with Tina we can only compute the SCG for the first one. For the larger ones, Tina uses two much memory and after a while swapping becomes predominant. For the example Gros1, after 10 hours the Tina process had only used 300 seconds of CPU time and was using almost all the virtual memory. No output was produced. The same happened for the examples Gros2, Gros3. On these examples, Uppaal was able to check boundedness and the property P even if the last example (Gros3) required ten hours of computation: the maximum amount of memory needed is 150MB and no swapping occurred. As it is generally admitted in the verification community, memory is the limiting factor because you cannot afford many Gigabytes of memory whereas you can wait for a couple of hours. In this way our method seems to be helpful in many cases and worth using. We run verifyta -q -H 65536,65536 -S 1 -s file ''property P '' which is the default.

b We run tina -W -s 0 file which is the default and generates the SCG. c As the memory consumption is very high, swapping becomes dominant and after 300 sec. when the 1GB RAM is full; the process was killed after 36000 sec. and within this time only 800 sec. were used by Tina and the rest was spent on I/O by the swap process. d This is virtual memory usage when the process was killed.

e In this case Uppaal uses more memory than Tina: this may be due to memory allocation at the beginning of the process. • TCTL model checking is decidable for bounded TPNs. Moreover efficient algorithms used in Uppaal [START_REF] Pettersson | Uppaal2k[END_REF] and Kronos [START_REF] Yovine | Kronos: A Verification Tool for real-Time Systems[END_REF] are exact for the class of TA obtained with our translation (see recent results [START_REF] Bouyer | Untameable timed automata! In STACS[END_REF] by P. Bouyer); • it is decidable whether a TA is non-zeno or not [START_REF] Henzinger | Symbolic model checking for real-time systems[END_REF] and thus our result provides a way to decide non-zenoness for bounded TPNs; • lastly, as our translation is structural, it is possible to use a model-checker to find sufficient conditions of unboundedness of the TPN.

These results enable us to use algorithms and tools developed for TA to check quantitative properties on TPNs. For instance, it is possible to check real-time properties expressed in TCTL on bounded TPNs. The tool Romeo [START_REF] Gardey | Roméo: A tool for Time Petri Nets Analysis[END_REF] that has been developed for the analysis of TPN (state space computation and "on the fly" model-checking of reachability properties) implements our translation of a TPN into the equivalent TA in Uppaal input format.

Our approach turns out to be a good alternative to existing methods for verifying TPNs:

• with our translation and Uppaal we were able to check safety properties on very large TPNs that cannot be handled by other existing tools; • we also extend the class of properties that can be checked on TPNs to real-time quantitative properties.

Note also that using our translation, we can take advantage of all the features of a tool like Uppaal: looking for counter examples is usually much faster than checking a safety property. Moreover if a safety property is false, we will obtain a counter example even for unbounded TPNs (if we use breadth-first search).

Fig. 2 .

 2 Fig. 2. Semantics of TPN-TCTL Definition 8 (From TPN-TCTL to TA-TCTL) Let ϕ be a formula of TPN-TCTL. Then the translation ∆(ϕ) of ϕ is inductively defined by:

2

 2

Fig. 3 .

 3 Fig. 3. A TPN for a Producer/Consumer example in Romeo 5 Implementation

Fig. 5 .

 5 Fig.5. What can we do with the different tools and approaches?

(

  SU.0 and M[1]>0 and M[3]>0 and T_1.x>3) --> (SU.0 and M[2]>0 and M[4]>0)

Fig. 7 . 6 Conclusion

 76 Fig. 7. Experimental Results: checking a safety property (that is true) 6 Conclusion

Table 5 .

 5 is another state-of-the-art tool to analyze TPNs with Uppaal template (from "Export to Uppaal" feature of Romeo) some more capabilities than Romeo Std: it allows to produce an Atomic State Class Graph (ASCG) on which CTL * properties can be checked. Using Romeo Std or Tina is a matter of taste as both tools give similar results on TPNs. 3 gives a comparison in terms of the classes of property (LTL, CTL, TCTL, Liveness) the tools can handle. The columns Uppaal and Kronos in Romeo give the combined capabilities obtained when using our structural translation and the corresponding (timed) model-checker.

	M[B1]<1 update?	M[B1]<1 update?	true , M[B1]>0 update?
		enable
	notenable	true , M[B1]>0
		update?	x<=dmax
		x:=0
		x>=dmin, x<=dmax
	post! M[F1]:=M[F1]+1	pre! M[B1]:=M[B1]-1
		update?
		firing
	Fig. 4. A

  Table 7 the time column for Tina refers to the time needed to generate the SCG whereas in the time column for Uppaal we give the overall time to check a property. The tests have been performed on a Pentium-PC 2GHz with 1GB of RAM running Linux and with Tina 2.7.2 and Uppaal 3.4.7 and Romeo 2.5.0. Hereafter we give the results on three types of examples: classical cyclic or periodic synchronized tasks, producers/consumers and large real-time examples.

  File #places #trans. Romeo +Uppaal a Tina b Time (s) Mem. (MB) Time (s) Mem. (MB)

		oex1	12	12	0.04	1.3	0.02	1.3
		oex5 e	29	23	0.32	3.7	0.00	1.3
	Real Time Classical	oex7	22	20	1.0	8.9	3.66	162.5
	Examples	oex8	31	21	9.50	10	3.53	160
		t001	44	39	5.92	10.5	0.13	13.3
		t3 e	56	50	1.18	5	0.0	1.3
		P3C5	14	13	0.47	5	0.13	7
		P4C5	15	14	1.41	7.5	0.27	20
	Producers Consumers	P5C5	16	15	1.22	7.5	0.24	16
		P6C7	21	20	26.33	50.8	3.8	111
		P10C10 32	31	1.86	15	0.60	18
		Gros0	80	72	416	74	20	458
		Gros1	89	80	780	52	N/A c	≥ 1300 d
	Large examples	Gros2 116	105	5434	88	N/A c	≥ 1300 d
		Gros3 143	130	36300	150	N/A c	≥ 1300 d
	a

The use of observers is of little help as it requires to specify a property as a TPN; thus it is hard to specify properties on markings.

Assume you manage to prove that a property P is false on the timed automaton associated with a TPN and this happens because clock x (in the TA) has a particular value. There is no easy way of feeding this information back in terms of timing constraints on the transitions of the TPN.

If we accept the difference with[START_REF] Lilius | Efficient state space search for time Petri nets[END_REF] in the definition of the reset instants for newly enabled transitions.

In SU , committed locations can be simulated by adding an extra variable: see[START_REF] Tripakis | Timed diagnostics for reachability properties[END_REF] Appendix A for details.

The first element of the vector refers to the supervisor move.

(s, p) ∈ {0, 1 c , 2 c , 3 c } × N m is the state of SU , q gives the product location of A 1 | • • • | A n , and v[i], i ∈ [1..n] gives the value of the clock x i .

The use of ∞ in V allows us to handle comparisons like M (p 1 ) ≤ 2 ∧ M (p 2 ) ≥ 3 by writing M ≤ (2, ∞) ∧ M ≥ (0, 3).

The last version of Uppaal (3.4.7) is required to read the files produced by Romeo.

see www.uppaal.com for further information about Uppaal.

The actual meaning of M [i] is given by a table that is available in the Romeo tool via the "Translate/Indices =⇒ Place/Transition" menu; the table gives the name of the place represented by M [i] as well as the corresponding information for transitions.

See Definition 6.

Thus we check that for all place i, M [i] ≤ k.