Frequencies in forgetful timed automata

. A quantitative semantics for inﬁnite timed words in timed automata based on the frequency of a run is introduced in [6]. Unfortunately, most of the results are obtained only for one-clock timed automata because the techniques do not allow to deal with some phenomenon of convergence between clocks. On the other hand, the notion of forgetful cycle is introduced in [4], in the context of entropy of timed languages, and seems to detect exactly these convergences. In this paper, we investigate how the notion of forgetfulness can help to extend the computation of the set of frequencies to n -clock timed automata.


Introduction
Timed automata have been introduced in [1].This model is commonly used to represent real-time systems.A timed automaton is roughly a finite automaton equipped with a finite set of continuous clocks which evolve synchronously, are used in guards and can be reset along the transitions.The usual semantics of timed automata for infinite timed words is the Büchi semantics also presented in [1].Recently, several works propose to add quantitative aspects in verification problems, such as costs [2,5] or probabilities [9,3].
In particular, one can refine the acceptance condition by considering the proportion of time elapsed in accepting locations.A quantitative semantics for infinite timed words based on this notion of frequency has thus been introduced in [6].Lower and upper bounds of the set of frequencies of one-clock timed automata are computed using the corner-point abstraction, a refinement of the classical region abstraction, introduced in [7].These bounds can be used to decide the emptiness of the languages with positive frequencies and the universality for deterministic timed automata.Furthermore, the universality problem is proved to be non primitive recursive for non-deterministic timed automata with one clock and undecidable with several clocks.The techniques from [6] do not extend to timed automata with several clocks, and all counterexamples rely on some phenomenon of convergence between clocks along cycles.Beyond zenoness (when time converges along a run), other convergence phenomena between clocks were first discussed in [8].Similarly to zenoness, these convergences correspond to behaviors that are unrealistic from an implementability point of view.A way to detect cycles with no such convergences (called forgetful cycles) has been recently introduced in [4].This notion of forgetfulness was used to characterize timed languages with a non-degenerate entropy.
In this paper, we naturally propose to investigate how forgetfulness can be exploited to compute frequencies.First, we show that forgetfulness of a cycle in a one-clock timed automaton is equivalent to not forcing the convergence of the clock, that is the clock is reset or not bounded.Note that forgetfulness does not imply that all runs are non-Zeno.With this assumption, the set of frequencies can be exactly computed using the corner-point abstraction.Then, we show that in n-clock forgetful timed automata where time diverges necessarily along a run, the set of frequencies can also be computed thanks to the corner-point abstraction.On the one hand, the result for timed automata for which all cycles are forgetful (strong forgetfulness) is as constructive as the theorem of [6] over one-clock timed automata.On the other hand, to relax strong forgetfulness and consider timed automata whose simple cycles are forgetful, the proof relies on a set of canonical runs whose frequencies cover the set of all frequencies in the timed automaton.
Our contribution can also be compared with that of [7] on double priced timed automata, that is, timed automata with costs and rewards.Indeed, frequencies are a particular case of cost and reward functions.In [7], either a run of minimal ratio or an optimal family (i.e.ε-optimal runs for all ε > 0) is computed, whereas, assuming forgetfulness, the exact set of frequencies can be computed, not only the optimal ones.Our techniques might thus prove useful for double priced timed automata and maybe more generally in other contexts.
The paper is structured as follows.In the next section we introduce the model of timed automata, the quantitative semantics based on frequencies, forgetfulness and the corner-point abstraction as a tool to study frequencies.In Section 3, we propose a characterization of forgetfulness in one-clock timed automata and provide an expression for the set of frequencies for this restricted class.Last, Section 4 deals with n-clock timed automata and explains how to use forgetfulness to ensure that, when time diverges, the set of frequencies of a timed automaton and the set of ratios in its corner-point abstraction are equal.
All the details omitted, due to space constraints, in this paper, can be found in the Appendix.

Preliminaries
In this section, we recall the definition of timed automata with the quantitative semantics based on frequencies introduced in [6].Then the corner-point abstraction is presented, firstly to define forgetfulness, and secondly as a tool to compute frequencies in timed automata.

Timed automata and frequencies
Given a finite set X of clocks, a valuation is a mapping v : X → R + .The valuation associating 0 with all clocks is written 0 and v + t is the valuation defined, for every clock x of X by (v + t)(x) = v(x) + t.For X ⊆ X, v [X ←0] denotes the valuation equal to 0 for the clocks of X and equal to v for the other clocks.On the other hand, a guard over X is a finite conjunction of constraints of the form x ∼ c where x ∈ X, c ∈ N and ∼∈ {<, ≤, =, ≥, >}.The set of guards over X is noted G(X).Moreover, for a valuation v and a guard g, v satisfies g with the usual definition, is written v |= g.

Definition 1 (timed automaton).
A timed automaton is a tuple A = (L, L 0 , F, Σ, X, E) such that: L is a finite set of locations, L 0 ⊆ L is the set of initial locations, F ⊆ L is the set of accepting locations, Σ is a finite alphabet, X is a finite set of clocks and The semantics of a timed automaton A is given as a timed transition system + is the set of accepting states and →⊆ S ×(R + ×Σ)×S is the transition relation composed of all moves of the form ( , v) τ,a − − → ( , v ) such that τ > 0 and there exists an edge ( , g, a, X , A run of a timed automaton A is a finite or infinite sequence of moves starting in an initial state.In the sequel, unless otherwise stated, the run is assumed to be infinite.Thus, an infinite run ρ = s 0 τ0,a0 . Note that, as in [6], the limit sup is an arbitrary choice.In the sequel, our goal is to compute the set of frequencies of the infinite runs of A, which is written Freq(A).To do so, we sometimes distinguish Freq Z (A) and Freq nZ (A) which respectively denote the sets of frequencies of the Zeno and non-Zeno runs of A.
For example, Fig. 1 represents a timed automaton A with F = { 1 } (accepting locations are colored in gray), such that Freq(A) = Freq nZ (A) = [0, 1[.Indeed, there is no Zeno runs in A and there is an underlying constraint along the cycle which ensures that delays elapsed in the accepting location are decreasing.This implies that frequencies of an infinite run in A is of the form 0<x<1,a,{y} 0<x<1,a,{x} y=1,a,{y} Fig. 1.A timed automaton A to illustrate the notion of frequency.

Corner-point abstraction and forgetfulness
Given the maximal constant M appearing in a timed automaton A, the usual region abstraction forms a partition of the valuations over X, the clocks of A.
In the following definition, t and {t} are respectively the integer part and the fractional part of the real t.The region equivalence ≡ A over valuations of X is defined as follows: and {v(x)} = 0 iff {v (x)} = 0 and (iii) for every pair of clocks (x, y) ∈ X 2 such that v(x) ≤ M and v(y) ≤ M , {v(x)} ≤ {v(y)} iff {v (x)} ≤ {v (y)}.The equivalence classes of this relation are called regions and Reg A denotes the set of regions for the timed automaton A. For each valuation v of the clocks of A, there is a single region containing v, denoted by R(v).A region R is a time-successor of a region R if there exists v ∈ R and t ∈ R + such that v + t ∈ R and R = R.The set of the time-successors of a region is naturally ordered, and the mapping timeSucc : Reg A → Reg A associates with any region, its first time-successor.
The particular case of the region {⊥ X } where all the clocks are larger than M is fixed as follows : timeSucc({⊥ X }) = {⊥ X }.Given a timed automaton, one can build a timed automaton having only region guards while preserving the set of frequencies.In fact, we need to extend the guards with constraints of the form x − y ∼ c where x, y ∈ X, c ∈ N and ∼∈ {<, ≤, =, ≥, >}, but both models are known to be equivalent.In the sequel, timed automata are thus assumed to be split in regions and all the transitions can be fired.Moreover, in order to take into account that zero delays are not allowed in the semantics, transitions with a constraint of the form x = 0 are removed and transitions with a punctual constraint (of the form x = c) arrive directly in the time-successor (with constraint x > c) if x is not reset.
The corner-point abstraction is a refinement of the region abstraction, where states are formed of a region with one of its extremal points.Thus, an A-pointed region (pointed region for short) is a pair (R, α) where R is a region and α an integer valuation (∈ (N ≤M ∪ ⊥) X , ⊥ if the clock is not bounded in this region) belonging to the closure of R (for the usual topology), in this case, α is said to be a corner of R. The set of A-pointed regions is written Reg• A .The operations defined on the valuations of a set of clocks are extended in a natural way to the corners, with the convention that M + 1 = ⊥ and ⊥ + 1 = ⊥.Then the timeSucc function can be extended to pointed regions: Using this mapping, the construction of the corner-point abstraction is very similar to the usual region automaton.Definition 3 (corner-point abstraction).The corner-point abstraction of a timed automaton A (corner-point of A for short) is the finite automaton is the set of accepting states, Σ cp = Σ ∪{ε}, and E cp ⊆ L cp ×Σ cp ×L cp is the finite set of edges defined as the union of discrete transitions and idling transitions: In particular, as a consequence of ⊥ + 1 = ⊥, there is an idling loop on each state whose region is {⊥ X }.The projection of a (finite or infinite) run ρ = ( 0 , v 0 ) τ0,a0 , is the set of runs of A cp such that for all indices i, the i-th discrete transition goes from a state ( i , R(v i + τ i ), α) to a state ( i+1 , R(v i+1 ), α ) and for all clocks x ∈ X, the number µ i (x) of idling transitions of the form ( , R, α) ε − → ( , R, α + 1) since the last reset of x has to be equal to v i (x) + τ i or v i (x) + τ i .Note that if x is bounded in a region R(v i + τ i ), then µ i (x) can be recovered from the associated corner α.Given ε > 0, we say that a (finite or infinite) run ρ mimics up to ε > 0 a (finite or infinite) run π in Proj(ρ) if, for all indices i, the i-th discrete transition of π goes from a state In the sequel we often consider cycles of the graph of A (cycles of A for short), that is some sequences 0 1 • • • n = 0 such that for all 0 ≤ i ≤ n − 1 there exists an edge from i to i+1 in A. Similarly to runs, we define the projection of a cycle C of A, denoted by Proj(C).If C is a simple cycle with no region ⊥ X , Proj(C) is the subgraph of A cp covered by the projection of any finite run of A along C. If C is a simple cycle with some regions ⊥ X , we simply add the idling loops associated with each states of the form ( , {⊥ X }, ⊥ X ).To define the projection of a cycle C which is not simple, we first unfold the timed automaton A to obtain an equivalent simple cycle.
Forgetfulness was originally defined in [4] using the orbit graph.We choose here to give an alternative definition of forgetfulness based on the corner-point abstraction, which is less succinct, but will show useful for computing frequencies.

Definition 4 (forgetfulness).
-A cycle C in a timed automaton is forgetful if Proj(C) is strongly connected; -A timed automaton is forgetful if all its simple cycles are forgetful; -A timed automaton is strongly forgetful if all its cycles are forgetful.
Roughly speaking, forgetful cycles are cycles where some choices of current delays cannot impact forever on the future delays.These cycles can forget previous delays in their long term behaviors.Fig. 1 represents a timed automaton, inspired by [8], that is not forgetful.Indeed, the projection of the single cycle of this timed automaton is the subgraph with bold edges in its corner-point represented in Fig. 2, it is clearly not strongly connected.In fact, if from location 1 an a is read with x close to 0, it becomes impossible to read an a with x close to 1 in the future.More precisely, delays in 1 are smaller and smaller.Note that in Fig. 2, we did not draw the edges labelled by ε which lead to states from which no discrete transition can be fired in the future.0 ,{0}, r 0 ,((0,1) 2 ,{x}={y}), r 0 ,((0,1) 2 ,{x}={y}), r 1 ,((0,1) 2 ,{x}>{y}), We then define the notion of aperiodicity of a forgetful cycle and forgetful aperiodic timed automata.

Definition 5 (aperiodicity).
-A forgetful cycle C in a timed automaton is aperiodic if for all k ∈ N, the cycle obtained by the concatenation of k iterations of C is forgetful.-A forgetful timed automaton is aperiodic if all its simple cycles are aperiodic; Strong forgetfulness trivially implies aperiodicity, whereas forgetfulness does not.Indeed Fig. 3 represents a timed automaton which is forgetful and periodic.The summary of its corner-point illustrates the periodicity.The cycle formed of two iterations of the simple cycle is not strongly connected, it has two distinct connected components.The projection of a forgetful cycle C in A cp is strongly connected, then given any state s of A cp in Proj(C), there are some simple cycles containing s. Intuitively, such a cycle corresponds to a number of iterations of C in A, this is the number of non-consecutive occurrences of states sharing the same location of A as s.Thus, we can characterize the aperiodicity of a forgetful cycle by a notion of pseudo aperiodicity of its projection.The characterization ( * ) of aperiodicity allows one to check it in the corner-point abstraction.The notion of aperiodicity will be a key for the relaxation of strong forgetfulness in the second part of Section 4.3.

The corner-point abstraction as a tool for frequencies
In the corner-point, the idling transitions which do not change the current region correspond to an elapse of one time unit.In the same way as in [6], these abstract delays are used to abstract the frequencies in a timed automaton by ratios in its corner-point abstraction.To do so, the corner-point is equipped with costs and rewards as follows: the reward of a transition is 1 if it is of the form ( , R, α) ε − → ( , R, α ) and 0 otherwise; the cost of a transition is 1 if the reward is 1 and the location is accepting and 0 otherwise.
In particular, the loops on the states whose region is {⊥ X } have reward 1.
Thanks to these costs and rewards, the ratio of an infinite run of the cornerpoint can be defined, similarly to the frequency in the timed automaton, as the limit sup of the ratios of the accumulated costs over the accumulated rewards.An infinite run in the corner-point is said reward-converging (resp.reward-diverging) if the accumulated reward is finite (resp.not bounded).This notion is close to zenoness of runs in a timed automaton even if some Zeno runs could be projected to reward-diverging runs in the corner-point abstraction and, the other way around, non-Zeno runs could be projected to reward-converging runs.Thus, we write Rat(A cp ), Rat r−d (A cp ) and Rat r−c (A cp ) for the sets of the ratios of the infinite runs in A cp , the reward-diverging runs in A cp and the reward-converging ones.We also say reward-diverging for a cycle of A cp whose accumulated reward is positive.A cycle of A cp is said accepting (resp.non-accepting) if all its locations are accepting (resp.non-accepting) and it is said mixed if it has both accepting and non-accepting locations.
In the sequel, we often use the following results established in [6] and [7].

Lemma 1 ([6]
).For every run ρ in a one-clock timed automaton A, there are two runs π and π in Proj(ρ) respectively minimizing and maximizing the ratio such that: These runs are respectively called the contraction and the dilatation of ρ.
where m i and M i are the minimal and the maximal ratios for reward-diverging cycles in In particular, the latter lemma implies by induction that any run in A cp can be mimicked in A up to any ε > 0.
3 Computation of the set of frequencies in a one-clock timed automaton One-clock timed automata have simpler clock behaviors than the general model.
In fact, having a single clock in a timed automaton is quite close to forgetfulness in the sense that each time the clock is reset, the timed automaton forgets all the timing information.In this section, we present a new characterization of forgetfulness and we show the equivalence between forgetfulness and strong forgetfulness when there is a single clock.Last, we propose an expression for the set of frequencies of forgetful one-clock timed automata.
In a one-clock timed automaton, a reset of the clock along a cycle is linked to forgetfulness.The following lemma states the precise characterization of forgetful cycles inspired by this observation.
Proposition 2. Let C be a cycle of a one-clock timed automaton.Then, C is forgetful if and only if the clock is reset or not bounded along C.
In fact, Proposition 2 implies that the cycle obtained by concatenation of any sequence of forgetful cycles in a one-clock timed automaton is also forgetful.Indeed, if the clock is reset or not bounded along each cycle of the sequence, it is clearly the case for the sequence itself.
Corollary 1.A one-clock timed automaton is forgetful iff it is strongly forgetful.
Recall that, as illustrated in Fig. 1, Corollary 1 (as well as Proposition 2) does not hold for n-clock timed automata.
Let us now consider the set of the frequencies in a one-clock timed automaton.By Lemma 2, if there are only non-Zeno runs in a timed automaton, then the set of the frequencies equals to the set of the ratios in the corner-point.Firstly, the particular case where a timed automaton has a reward-converging cycle in its corner-point containing both accepting and non-accepting locations is easy to treat as stated in the following proposition.Otherwise: Proof.The first part of Theorem 1 is established in Proposition 3, let us now assume that there is no mixed reward-converging cycles in A cp .By Lemma 2, for non-Zeno runs: Freq nZ (A) = Rat r−d (A cp ).The rest of the proof is based on the following lemma dealing with plain reward-converging cycles.Back to the proof of the second part of Theorem 1, the inclusion from right to left is straightforward from the non-Zeno case and Lemma 4.
Thanks to the equality in the non-Zeno case, the inclusion from left to right is only needed for the subset Freq Z (A).Let thus ρ be a Zeno run.It can be projected on a reward-converging run in the corner-point.This projection necessarily ends in a strongly connected subgraph of the corner-point having zero rewards and containing only accepting locations or only non-accepting locations.We study the case where all the locations of the end are non-accepting, the other case is symmetric.By Lemma 4, the prefix of ρ corresponding to the prefix of the projection before the infinite suffix in the subgraph has a frequency smaller than M (C) for a cycle C having a reward-converging projection.To conclude, the frequency of ρ is smaller than the prefix because all the locations of the suffix are non-accepting.
Note that if the timed automaton is not forgetful, the form of the set of the frequencies can be very different from the expression given in Theorem 1. Fig. 4 gives an example of non-forgetful timed automaton such that Freq(A) = forgetful timed automata is that the accumulated delays in 2 cannot diverge, therefore it is not possible to increase the frequency as much as necessary.In particular, there is no infinite run of frequency 1.More generally, this example illustrates a simple manner to obtain, for the set of frequencies, any finite union of open intervals included in [0, 1].

Extension to n-clock timed automata
There is a real gap between one-clock timed automata and n-clock timed automata.For example, in [10], the reachability problem for one-clock timed automata is proved to be NLOGSPACE-complete, whereas it becomes NP-hard with two clocks.As an other example, the language inclusion problem which is undecidable in the general case [1], becomes decidable with at most one clock [11].In this section, we use forgetfulness and time divergence to compute the set of frequencies in n-clock timed automata.Note that these assumptions are strong but can be justified by implementability concerns.

Forgetfulness in n-clock timed automata
The goal is to find some reasonable assumptions to obtain a class of timed automata whose sets of frequencies are exactly sets of ratios of their corner-point abstractions.We do not want to complexity our problem dealing with Zeno runs as we did in one-clock timed automata for which the Zeno case is already nontrivial.More precisely, we want to extend the result Freq nZ (A) = Rat r−d (A cp ) of [6], from one-clock timed automata to n-clock timed automata.To do so, we first assume that timed automata are strongly non-Zeno, that is in every cycle there is one clock which is reset and lower guarded by a positive constant.This implies that there is no reward-converging run in its corner-point (strong reward-divergence [7]).For one-clock timed automata strong non-zenoness is strictly stronger than forgetfulness and implies that Freq(A) = Freq nZ (A) = Rat r−d (A cp ).Unfortunately, this assumption is not sufficient for n-clock timed automata.For example, the timed automaton in Fig. 5, taken from [6], is strongly non-Zeno and such that Freq(A) =]0, 1] = {0} ∪ {1} = Rat(A cp ).In fact, this timed automaton is a typical example of forgetful timed automaton.Delays in 1 have to be larger and larger along cycles, which ensures that frequency 0 cannot be reached in A. On the contrary, in A cp , either the accumulated reward in 1 is 0 (ratio 0) or there is one idling transition with reward 1 from a state of A cp with location 1 and in the future, there always are such transitions in states of the form ( 1 , R, α) (ratio 1).Therefore, except over one-clock timed automata, forgetfulness and strong reward-divergence are not comparable.
The following theorem is the first illustration of the utility of forgetfulness to compute the set of frequencies in timed automata with several clocks.Theorem 2. Let A be a strongly non-Zeno and forgetful timed automaton.Then Freq(A) ⊆ Rat(A cp ).
Proof (sketch).The idea is that the infinite run consisting in an infinite iteration of the cycle of minimal ratio in A cp has a ratio smaller than the frequency of any infinite run in A. Symmetrically, there is a run of ratio larger than the frequency of any infinite run in A. The theorem is thus straightforward if there is a single SCC in A cp .Otherwise, forgetfulness is the key to obtain the inclusion Freq(A) ⊆ Rat(A cp ) instead of simple bounds.Indeed, given an infinite run ρ ending in an SCC of A, by forgetfulness of the cycles, all the projections of ρ end in the same SCC of A cp .The proof can thus be done in this SCC by neglecting the prefix thanks to time divergence.
In the sequel, we see how strongly non-zenoness and forgetfulness can be useful to obtain the other inclusion.The problem is not trivial even under these assumptions and the proof techniques could certainly be interesting in different contexts.This section allows to understand several subtleties of forgetfulness.

Techniques to compute the frequencies
In this section, we explain the technical aspects which allow the extension to n-clock timed automata.First, thanks to Lemma 3 we know that any infinite run in a corner-point A cp can be mimicked up to any ε > 0. This lemma implies that respective lower and upper bounds of the sets of ratios and frequencies are equal, but as seen with the timed automaton in Fig. 5, Freq(A) can be very different from Rat(A cp ) when A is not forgetful.Second, the following lemma established in [12] expresses the preservation of some barycentric relations between valuations along cycles.

Lemma 5 ([12]
).Let A be a timed automaton and an edge ( , g, a, X , ) such that ( , v) → ( , v ) and ( , w) → ( , w Naturally, this lemma can be extended to finite sequences of edges by induction. The combination of both lemmas helps us to prove that if along a given cycle one can go from every corner to a fixed corner α, then along this cycle one can go as close to α as necessary in A. This way of reducing the distance to corners is the key for the extension to n-clock timed automata.Indeed, when time diverges (non-zenoness), if an infinite run ρ in A mimics an infinite run π of A cp up to ε converging to 0 along ρ (i.e. for all ε there is a suffix of ρ which mimics the corresponding suffix of π up to ), then freq A (ρ) = Rat(π).Lemma 6.Let A be a timed automaton and ρ = ( 0 , v 0 ) τ0,a0 r be a finite run of A. If given a corner α n of the region r and for all ( 0 , r, α) there is a finite run from ( 0 , r, α) to ( 0 , r, α n ) in Proj(ρ), then for all ε > 0, there exists ρ = ( 0 , v 0 ) Proof.Let us start by fixing, for all corners α, a valuation v ε α in r which is very close to α. Thanks to these valuations, we then define a barycentric expression for v 0 .Let Ω r the set of the corners of r.As the closure of r is the convex hull of Ω r (for the usual topology of R X ), there exists (v ε α ∈ r) α∈Ωr and (λ α ∈ [0, 1]) α∈Ωr such that α∈Ωr λ α = 1, v 0 = α∈Ωr λ α v ε α and ||v ε α − α|| < ε.By assumptions, there are some paths in Proj(ρ) going from each α to α n .Thanks to Lemma 3, there are some finite runs from each of our valuations v ε α very close to the corners α to some valuations v ε α,αn very close to a common corner α n .Formally, there exists (v ε α,αn ∈ r) α∈Ωr and some finite runs (ρ α ) α∈Ωr from ( 0 , v ε α ) to ( 0 , v ε α,αn ) in A with ||v ε α,αn − α n || < ε.Then, by Lemma 5, there is a finite run ρ from ( 0 , v 0 ) to the state with location 0 and the valuation equal to the barycenter of the valuations v ε α,αn which is very close to α n by the triangle inequality.Formally, there is a finite run ρ from ( 0 , v 0 = α∈Ωr λ α v ε α ) to ( 0 , α∈Ωr λ α v ε α,αn ).To conclude, ρ is as needed because, by the triangle inequality, To use Lemma 6, we need to find a cycle in A cp which allows, in some sense, to synchronize all the corners of a region to a common one.Indeed, each run in A cp corresponds to a run in A, the existence of ρ is not a real constraint.Moreover, Lemma 6 does not depend on forgetfulness of timed automata.The following lemma illustrates how forgetfulness can help to use Lemma 6.

Lemma 7.
Let A be a timed automaton, X its set of clocks and a sequence (c i ) 1≤i≤K with K = 2 |X|+1 , of forgetful cycles containing the location of A such that all the cycles obtained by concatenation of the cycles of a subsequence (c k ) 1≤i≤k≤j≤K are forgetful.Then for all pairs of corners (α, α ) of the region R associated to , there is a finite run of the form ( , R, α) R, α ) such that for all indices i, π i corresponds to one iteration of c i .
Proof.Abusing notations we write π ∈ Proj(c) for "π corresponds to one iteration of c" Consider the subset construction with s 0 = {( , R, α)} and First, there are at most |X| + 1 corners in R, hence there are at most K = 2 |X|+1 subsets of ( , R, all) := {( , R, α) | α corner of R}.Second, by forgetfulness of the c i 's, if s i = ( , R, all) then for all j > i, s j = ( , R, all).Third, there is no other cycles in the subset construction.Indeed, if there exists indices i < j such that s i = s j = ( , R, all) := {( , R, α) | α corner of R} then the cycle obtained by concatenation of cycles c i+1 , • • • , c j is not forgetful, which contradicts strong forgetfulness.
As a consequence, the subset construction loops in ( , R, all) forever after a cycle-free prefix whose length is thus smaller than K. Hence, there is a finite run of the form ( , R, α) In the next sections we use these two lemmas to prove that our assumptions are sufficient to ensure the existence of such synchronizing cycles along infinite runs that we want to mimic in A.

Frequencies in n-clock forgetful timed automata
We first consider the case of strongly forgetful timed automata.Thanks to Lemma 6 and by observing the consequences of forgetfulness of all the cycles in a timed automaton, we obtain a theorem which is as constructive as the corresponding result for one-clock timed automata from [6].Theorem 3. Let A be a strongly non-Zeno strongly forgetful timed automaton.Then, for every infinite run π in the corner-point of A, there exists an infinite run ρ π in A such that π ∈ Proj(ρ π ) and freq A (ρ π ) = Rat(π).
The idea is to prove, for every run π in A cp , the existence of synchronizing cycles infinitely often along π which allow to mimic it up to an ε converging to 0.
Proof.Along the infinite run π of A cp , there is a pair ( , R) which appears infinitely often, possibly with different corners.Let ( , R, α i ) i∈N be a sequence of the occurrences of ( , R) and (π i ) i∈N the sequence of factors of π leading respectively from ( , R, α i ) to ( , R, α i+1 ).Each π i corresponds to a forgetful cycle c i in A hence by Lemma 7, for all pairs (α, α ) of corners of the region R, there is a finite run of the form ( , R, α) and such that for all indices i, π corresponds to one iteration of c i .In particular, this finite run belongs to the projections of exactly the same runs as , for any corner β n of the region R and for all ( , R, α) there is a finite run from ( , R, α) to ( , R, β n ) in Proj(ρ).Hence, Lemma 6 can be applied to such finite runs.Then, for any ε and given ρ i a mimicking of π until ( , R, α i ), Lemma 6 ensures the existence of a extension of ρ i to ρ i+K mimicking π until ( , R, α i+K ), such that ||v − α i+K || < ε where v is the last valuation of ρ i+K .In words, it is possible to fix some finite factors along π which allow to go as close as necessary from a corner of π along a mimicking ρ.Out of these factors, the distance to the corners of π can be preserved (Lemma 3).To conclude, these factors can be placed infinitely often to allow the convergence of the distance to the corner of π to 0, but as rarely as necessary to be neglected in the computation of the frequency.Theorem 3 implies that the set of ratios Rat(A cp ) is included in the set of frequencies Freq(A).This implies, together with Theorem 2, that if A is a strongly non-Zeno and strongly forgetful timed automaton, then Freq(A) is equal to Rat(A cp ).Strong forgetfulness is a realistic assumption from an implementability point of view, but is not satisfactory because of its difficulties to be checked.Indeed, checking if a cycle is forgetful can be done thanks to the corner-point, but there is an unbounded number of cycles in a timed automaton and we do not know any property which would allow, in general, to avoid to check them all.As a consequence, it is important to relax this assumption.We did not succeed in proving that strong forgetfulness can be relaxed in Theorem 3. Nevertheless, the inclusion Rat(A cp ) ⊆ Freq(A) still holds when strong forgetfulness is replaced by forgetfulness and aperiodicity, both of which can be checked on the corner-point abstraction.
Theorem 4. Let A be a strongly non-Zeno, forgetful and aperiodic timed automaton.Then, Rat(A cp ) ⊆ Freq(A).
Proof (sketch).The idea is to prove that, for every rat ∈ Rat(A cp ), there exists an infinite run π rat in A cp of ratio rat and such that there exists a infinite run ρ π of A with freq A (ρ π ) = Rat(π rat ) and π rat ∈ Proj(ρ π ).Thanks to Lemma 2 and by reward-divergence, we have the following expression for the set of the ratios Rat(A cp ) = Rat r−d (A cp ) = Si∈SCC [m i , M i ].In fact, for all i, each value rat ∈ [m i , M i ] is the ratio of a run π rat in A cp which alternates with the suitable proportions some cycles c i of ratio m i and C i of ratio M i in S i .The prefix to go to c i and the finite runs to go from a cycle to the other are neglected in the computation of the ratio by performing sufficiently many iterations at each step.Such a π rat can be mimicked up to any ε > 0 (Lemma 3).We thus use Lemmas 7 and 6 to decrease ε.The finite runs to go from C i to c i are simply concatenated with 2 |X|+1 iterations of c i .The cycle c i corresponds, in A cp to a cycle (simple or a concatenation of a single simple cycle) ĉi .Aperiodicity entails that the concatenations of ĉi are forgetful.Hence, Lemma 7 ensures that the finite run constituted of 2 |X|+1 iterations of c i is synchronizing and Lemma 6 that ε can decrease each time that π rat goes from C i to c i .
We thus obtain the following result as a corollary of Theorems 2 and 4.
Corollary 2. Let A be a strongly non-Zeno, forgetful and aperiodic timed automaton.Then, Freq(A) = Rat(A cp ).
Strong forgetfulness implies aperiodicity, hence Theorem 3 cannot help to established this equality in a more general case.However, note that Theorem 4 does not imply Theorem 3. In Theorem 3, not only the inclusion Rat(A cp ) ⊆ Freq(A) is established, but also for all infinite runs π in A cp there exists an infinite run ρ in A with π ∈ Proj(ρ) and freq A (ρ) = Rat(π).In Theorem 4, this is only proved for some infinite runs π of A cp .

Discussion about assumptions
As explained above, our will to relax the strong forgetfulness is due to its difficulties to be checked.Strong forgetfulness clearly implies at once forgetfulness and aperiodicity, but a first open question is whether the other implication is true.Indeed, we did not find any example of forgetful aperiodic timed automaton which is non-strongly forgetful.We think that, either there are some one but probably with more than two clocks which is difficult to visualize, or the implication is true and proving this statement could lead to fundamental advances in the understanding of the corner-point abstraction.
An other open question is whether the hypothesis of aperiodicity in Theorem 4 can be relaxed.We use this hypothesis in the proof, but could not find counterexamples.We built some examples of periodic timed automata as in Fig. 3 , but periodic timed automata seem to be degenerated and in particular, based on punctual guards which implies bijections between runs in the timed automaton and those in its corner-point abstraction.

Conclusion
A quantitative semantics based on frequencies has recently been proposed for timed automata in [6].In this paper, we used the notion of forgetfulness introduced in [4] to extend the results about frequencies in timed automata.On the one hand, thanks to forgetfulness we can compute the set of frequencies in one-clock timed automata even with Zeno behaviors, whereas only the bounds of this set was computed in [6].On the other hand, with forgetfulness and timedivergence inspired by [7], we compute the set of frequencies in a class of n-clock timed automata, whereas techniques of [6] were not applicable.In the future, we would like to investigate more deeply the difference between forgetfulness and strong forgetfulness with the hope to extend Theorem 3.Moreover, Theorem 2 is less constructive than the equivalent result for one-clock timed automata which use notions of contraction and dilatation of a run.It would be interesting to see if forgetfulness could help to extend these constructions to n-clock timed automata.Finally, our main tool presented in Lemma 6 can be easily used for the scheduling problem in timed automata with costs and rewards studied in [7].Thus, we can prove that in strongly non-Zeno forgetful timed automata, there is always an infinite run whose ratio is optimal.We hope that Lemma 6, which is fundamental, will be useful for a lot of problems for which the corner-point is suitable.

Proof of Proposition 3
The considered cycle is in the projection of a cycle C which is forgetful, then by Proposition 2, either x is reset or x is not bounded along C. As the guards of C are some regions and there is a reward-converging cycle in Proj(C), either all the guards are 0 < x < 1 (if x is reset) or all the guards are x > M (if x is not bounded).Then, the accumulated delay can be as small as necessary, but a delay close to 1 can be elapsed at each iteration because x is bounded and hence x is reset.Moreover, zero delays being forbidden, this delay can be elapsed in any location along C. As a consequence, by alternating delays in accepting and non-accepting locations with the appropriate proportions before ending by a very small accumulated delay, we can construct a Zeno run with any frequency in ]0, 1[.For the same reason, the two runs respectively maximizing and minimizing the ratio along C (dilatation and contraction) are reward-diverging and are respectively of frequency 1 and 0. Thanks to Lemma 2 which expresses the set of frequencies of non-Zeno runs, the set of frequencies Freq nZ (A) is equal to [0, 1].To conclude, note that frequencies 0 and 1 are not possible for Zeno runs because zero delays are forbidden, cycles in Proj(C) are mixed and no delay can be neglected in Zeno runs.

Proof of Lemma 4
Let C be a cycle such that Proj(C) contains a non-accepting reward-converging cycle.C being forgetful and zero delays being forbidden, there is also a rewarddiverging cycle in Proj(C).In particular, there is some non-Zeno runs ending in C and they all have frequency 0. As a consequence, only Zeno runs are considered in the sequel of the proof.
Let ρ be a Zeno run in A ending in C. The cycle C is forgetful, hence Proj(C) is strongly connected.Let ρ 0 be a prefix of ρ whose projection ends in a state ( , r, α) of a reward-converging cycle in Proj(C).Note that, in this case, any state ( , r, α ) belongs to a reward-converging cycle of Proj(C) too.In particular, the dilatation of ρ 0 , which is the run in Proj(ρ 0 ) which maximizes the ratio, ends in such a state.The dilatation thus has a ratio smaller than M (C).As a consequence of Lemma 1, ρ 0 has a frequency smaller than M (C).The locations of C are non-accepting, hence the frequency of ρ is strictly smaller than M (C) too.
Moreover for any ε > 0, a prefix π ε 0 ending in a reward-converging cycle of Proj(C) and such that M (C) − ε < Rat(π ε 0 ) ≤ M (C) can be built by definition of M (C).Then, π 0 can be mimicked up to ε by a prefix ρ ε 0 (Lemma 3) and then this prefix can be prolongated with an accumulated delay smaller than ε to obtain an infinite run ρ ε ending in C and having a projection ending in a reward-converging cycle of Proj(C).Such a run can thus be constructed with a frequency as close as necessary to M (C).As a consequence, the value M (C) is the strict upper bound of the frequencies of infinite runs ending in C.
Finally, we can construct an infinite run with any frequency in 0, M (C) by iterating as much as necessary in C with delays close to 1 (C is forgetful hence any delay 0 < d < 1 is possible at each iteration) in order to decrease the frequency as much as necessary.
The second item of the Lemma 4 can be proved in the same way.
the finite run to go from a cycle to the other are neglected in the computation of the ratio by multiplying the number of iterations in both cycles at each step, by a common integer.If rat is a real number, there exists a rational increasing sequence converging to it, and the same construction can be done by following the successive proportions corresponding to the elements of the sequence.π rat can be mimicked up to ε for any ε > 0 (Lemma 3).However this is not sufficient to ensure that there exists a run ρ π of A with freq A (ρ π ) = Rat(π rat ) and π rat ∈ Proj(ρ π ).Then, we extend in π rat , the finite run π Ci,ci to go from C i to c i by a finite run π c K i with K = 2 |X|+1 which iterates K times c i in A cp .We thus want to prove that it allows to mimic π rat up to an ε converging to 0. This finite prolongation has a constant length and will be neglected in the computation of the ratio in the same way as π Ci,ci even if it means to increase the numbers of iterations of C i and c i at each step.
The cycle c i is in the projection of a cycle (simple or a concatenation of a single simple cycle) ĉi .ĉi is forgetful and aperiodic by assumption (the concatenation of an aperiodic cycle is aperiodic), that is all the concatenations of ĉi 's are forgetful.Then, thanks to Lemma 7, for all pairs of states ( , R, α) and ( , R, α ) of Proj(ĉ i ), there is a run π α,α from ( , R, α) to ( , R, α ) corresponding to 2 |X|+1 iterations of ĉi .In particular, π α,α and π for any corner α n of the region R associated to and for all ( , R, α) there is a finite run from ( , R, α) to ( , R, α n ) in Proj(ρ).In other words, Lemma 6 can be applied to such finite runs.Hence, by building π rat in A cp as explain above and replacing the finite runs π Ci,ci to go from C i to c i by the concatenation π Ci,ci π c 2 |X|+1 i , π rat can be mimicked up to an ε decreasing (as much as needed) at each round (i.e. each time that we go from C i to c i ).

Proposition 1 .
A forgetful cycle C is aperiodic if and only if ( * ) the greatest common divisor, over the simple cycles D of Proj(C), of the numbers of iterations of C corresponding to D, is 1.

Proposition 3 .
Let A be a forgetful one-clock timed automaton.If there is a mixed reward-converging cycle in its corner-point A cp , then Freq Z (A) =]0, 1[ and Freq nZ (A) = [0, 1].Now, for the general case, it is possible to consider only timed automata which do not have such cycles in their corner-point.This allows us to give a general expression for the set of frequencies of a forgetful one-clock timed automaton.For readability, let us define some notations.Given C a cycle of A having a reward-converging cycle in its projection, we write p(C) for the set of ratios of cycle-free prefixes ending in reward-converging cycles of Proj(C) and c(C) for the set of ratios of co-reachable reward-diverging cycles.By convention, we let max(∅) = −1 and min(∅) = 2.Then, we defineM (C) = max(p(C) ∪ c(C)), m(C) = min(p(C) ∪ c(C)), M (A cp ) = max{M (C) | C acc. cycleof A with a r.-c.cycle in Proj(C)} and m(A cp ) = min{m(C) | C non-acc.cycle of A with a r.-c.cycle in Proj(C)}.Theorem 1.Let A be a forgetful one-clock timed automaton.If there is a mixed reward-converging cycle in A cp , then Freq Z (A) =]0, 1[ and Freq nZ (A) = [0, 1].

Lemma 4 .
Let C be a cycle of a one-clock forgetful timed automaton A: -If Proj(C) contains a non-accepting reward-converging cycle, then the set of frequencies of the infinite runs of A ending in C is 0, M (C) .-If Proj(C) contains an accepting reward-converging cycle , then the set of frequencies of the infinite runs of A ending in C is m(C), 1 .