Timed automaton
In automata theory, a timed automaton is a finite automaton extended with a finite set of real-valued clocks. During a run of a timed automaton, clock values increase all with the same speed. Along the transitions of the automaton, clock values can be compared to integers. These comparisons form guards that may enable or disable transitions and by doing so constrain the possible behaviors of the automaton. Further, clocks can be reset. Timed automata are a sub-class of a type hybrid automata. Timed automata can be used to model and analyse the timing behavior of computer systems, e.g., real-time systems or networks. Methods for checking both safety and liveness properties have been developed and intensively studied over the last 20 years.
It has been shown that the state reachability problem for timed automata is decidable,[1] which makes this an interesting sub-class of hybrid automata. Extensions have been extensively studied, among them stopwatches, real-time tasks, cost functions, and timed games. There exists a variety of tools to input and analyse timed automata and extensions, including the model checkers UPPAAL, Kronos, and the schedulability analyser TIMES. These tools are becoming more and more mature, but are still all academic research tools.
Example
Before formally defining what a timed automaton is, some examples are given.
Consider the language [math]\displaystyle{ \mathcal L }[/math] of timed words [math]\displaystyle{ w }[/math] over the unary alphabet [math]\displaystyle{ \{a\} }[/math] such that there is an [math]\displaystyle{ a }[/math] during the first time unit, and there is less than one time unit between two successive [math]\displaystyle{ a }[/math]. A timed automaton recognizing this language, pictured nearby, uses a single clock [math]\displaystyle{ x }[/math], which should never be equal to one. This clock counts the time since the start of the run if no [math]\displaystyle{ a }[/math] were emitted, or from the last [math]\displaystyle{ a }[/math] emitted otherwise. This means that each time an [math]\displaystyle{ a }[/math] is emitted, this clock is reset to zero.
Consider the language [math]\displaystyle{ \mathcal L }[/math] of timed words [math]\displaystyle{ w }[/math] over the binary alphabet [math]\displaystyle{ \{a,b\} }[/math] such that each [math]\displaystyle{ a }[/math] is followed by a [math]\displaystyle{ b }[/math] in the next time unit. The timed automaton recognizing this language, pictured nearby, recalls whether or not there was an [math]\displaystyle{ a }[/math] that was not yet followed by a [math]\displaystyle{ b }[/math]. If it is not the case, it accepts the run, otherwise it rejects it. Furthermore, when there is such a [math]\displaystyle{ a }[/math], it has a clock [math]\displaystyle{ x }[/math] that records the time elapsed since the first such [math]\displaystyle{ a }[/math] was emitted. In this case, a [math]\displaystyle{ b }[/math] cannot be emitted if the clock is at least equal to one, and thus the run fails.
Formal definition
Timed automaton
Formally, a timed automaton is a tuple [math]\displaystyle{ \mathcal A=\langle \Sigma,L,L_0,C,F,E\rangle }[/math] that consists of the following components:
- [math]\displaystyle{ \Sigma }[/math] is a finite set called the alphabet or actions of [math]\displaystyle{ \mathcal A }[/math].
- [math]\displaystyle{ L }[/math] is a finite set. The elements of [math]\displaystyle{ L }[/math] are called the locations or states' of [math]\displaystyle{ \mathcal A }[/math].
- [math]\displaystyle{ L_0\subseteq L }[/math] is the set of start locations.
- [math]\displaystyle{ C }[/math] is a finite set called the clocks of [math]\displaystyle{ \mathcal A }[/math].
- [math]\displaystyle{ F\subseteq L }[/math] is the set of accepting locations.
- [math]\displaystyle{ E\subseteq L\times \Sigma\times\mathcal B(C)\times\mathcal P(C)\times L }[/math] is a set of edges, called transitions of [math]\displaystyle{ \mathcal A }[/math], where
- [math]\displaystyle{ \mathcal B(C) }[/math] is the set of clock constraints involving clocks from [math]\displaystyle{ C }[/math], and
- [math]\displaystyle{ \mathcal P(C) }[/math] is the powerset of [math]\displaystyle{ C }[/math].
An edge [math]\displaystyle{ (\ell,\sigma,g,r,\ell') }[/math] from [math]\displaystyle{ E }[/math] is a transition from locations [math]\displaystyle{ \ell }[/math] to [math]\displaystyle{ \ell' }[/math] with action [math]\displaystyle{ \sigma }[/math], guard [math]\displaystyle{ g }[/math] and clock resets [math]\displaystyle{ r }[/math].
Extended state
A pair with a location [math]\displaystyle{ \ell }[/math] and a clock valuation [math]\displaystyle{ \nu }[/math] is called either an extended state or a state.
Note that the word state is thus ambiguous, since, depending on the author, it may mean either a pair or an element of [math]\displaystyle{ L }[/math]. For the sake of the clarity, this article will use the term location for element of [math]\displaystyle{ L }[/math] and the term extended location for pairs.
Here lies one of the biggest difference between timed automata and finite automata. In a finite automaton, at some point of the execution, the state is entirely described by the number of letter read and by a finite number of possible values, which are actually called "states". That means that, given a state and a suffix of the word to read, the remaining of the run is totally determined. Thus, the word "finite" in the name "finite automata". However, as it is explained in the section "run" below, in order to resume clocks are used to determine which transitions can be taken. Thus, in order to know the state of the automaton, you must both know in which location you are, and the clock valuation.
Run
Given a timed word [math]\displaystyle{ w=(\sigma_1,t_1),(\sigma_2,t_2),\dots, }[/math] with [math]\displaystyle{ \sigma_i\in\Sigma }[/math], [math]\displaystyle{ (t_i)_{i} }[/math] an increasing sequence of non-negative number, and a timed automaton [math]\displaystyle{ \mathcal A }[/math] as above, a run is a sequence of the form [math]\displaystyle{ (\ell_0,\nu_0)\xrightarrow[t_1]{\sigma_1}(\ell_1,\nu_1)\dots }[/math] satisfying the following constraint:
- (initialization) [math]\displaystyle{ \ell_0\in L_0 }[/math]
- (consecution), for all [math]\displaystyle{ i\ge1 }[/math], there exists an edge in [math]\displaystyle{ E }[/math] of the form [math]\displaystyle{ \langle\ell_{i-1},\sigma_i,g_i,r_i,\ell_i\rangle }[/math] such that:
- we assume that [math]\displaystyle{ t_i-t_{i-1} }[/math] time units passed, and at this time, the guard is satisfied. I.e. [math]\displaystyle{ \nu_{i-1}+t_i-t_{i-1} }[/math] satisfies [math]\displaystyle{ g_i }[/math],
- the new clock valuation [math]\displaystyle{ \nu_i }[/math] corresponds to [math]\displaystyle{ \nu_{i-1} }[/math], in which [math]\displaystyle{ t_i-t_{i-1} }[/math] time units passed and in which the clocks of [math]\displaystyle{ r_i }[/math] where reset. Formally, [math]\displaystyle{ \nu_i=(\nu_{i-1}+t_i-t_{i-1})[r_i\rightarrow 0] }[/math].
The notion of accepting run is defined as in finite automata for finite words and as in Büchi automata for infinite words. That is, if [math]\displaystyle{ w }[/math] is finite of length [math]\displaystyle{ n }[/math], then the run is accepting if [math]\displaystyle{ \ell_{n}\in F }[/math]. If the word is infinite, then the run is accepting if and only if there exists an infinite number of position [math]\displaystyle{ i }[/math] such that [math]\displaystyle{ \ell_i\in F }[/math].
Deterministic timed automaton
As in the case of finite and Büchi automaton, a timed automaton may be deterministic or non-deterministic. Intuitively, being deterministic has the same meaning in each of those case. It means that the set of start locations is a singleton, and that, given a state [math]\displaystyle{ s }[/math], and a letter [math]\displaystyle{ a }[/math], there is only one possible state which can be reached from [math]\displaystyle{ s }[/math] by reading [math]\displaystyle{ a }[/math]. However, in the case of timed automaton the formal definition is slightly more complex. Formally, a timed automaton is deterministic if:
- [math]\displaystyle{ L_0 }[/math] is a singleton
- for each pair of transitions [math]\displaystyle{ (\ell,\sigma,g,r,\ell') }[/math] and [math]\displaystyle{ (\ell,\sigma,g',r',\ell'') }[/math], the set of clocks valuations satisfying [math]\displaystyle{ g }[/math] is disjoint from the set of clocks valuations satisfying [math]\displaystyle{ g' }[/math].
Closure property
The class of languages recognized by non-deterministic timed automata is:
- closed under union, indeed, the disjoint union of two timed automata recognize the union of the language recognized by those automata.
- closed under intersection.[2]
- not closed under complement.[3]
Problems and their complexity
The computational complexity of some problems related to timed automata are now given.
The emptiness problem for timed automata can be solved by constructing a region automaton and checking whether it accepts the empty language. This problem is PSPACE-complete.[1]:207
The universality problem of non-deterministic timed automaton is undecidable, and more precisely Π11. However, when the automaton contains a single clock, the property is decidable; however, it is not primitive recursive.[3] This problem consists of deciding whether every word is accepted by a timed automaton.
See also
- Alternating timed automaton: an extension of timed automaton with universal transitions.
Notes
- ↑ 1.0 1.1 Rajeev Alur, David L. Dill. 1994 A Theory of Timed Automata. In Theoretical Computer Science, vol. 126, 183–235, pp. 194–1955
- ↑ Modern Applications Of Automata, page 118
- ↑ 3.0 3.1 Lasota, SƗawomir; Walukiewicz, Igor (2008). "Alternating Timed Automata". ACM Transactions on Computational Logic 9 (2): 1–26. doi:10.1145/1342991.1342994.
Original source: https://en.wikipedia.org/wiki/Timed automaton.
Read more |