# Timed automaton

Last updated

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.

## Contents

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 ${\displaystyle {\mathcal {L}}}$ of timed words ${\displaystyle w}$ over the unary alphabet ${\displaystyle \{a\}}$ such that there is an ${\displaystyle a}$ during the first time unit, and there is less than one time unit between two successive ${\displaystyle a}$. A timed automaton recognizing this language, pictured nearby, uses a single clock ${\displaystyle x}$, which should never be equal to one. This clock counts the time since the start of the run if no ${\displaystyle a}$ were emitted, or from the last ${\displaystyle a}$ emitted otherwise. This means that each time an ${\displaystyle a}$ is emitted, this clock is reset to zero.

Consider the language ${\displaystyle {\mathcal {L}}}$ of timed words ${\displaystyle w}$ over the binary alphabet ${\displaystyle \{a,b\}}$ such that each ${\displaystyle a}$ is followed by a ${\displaystyle b}$ in the next time unit. The timed automaton recognizing this language, pictured nearby, recalls whether or not there was an ${\displaystyle a}$ that was not yet followed by a ${\displaystyle b}$. If it is not the case, it accepts the run, otherwise it rejects it. Furthermore, when there is such a ${\displaystyle a}$, it has a clock ${\displaystyle x}$ that records the time elapsed since the first such ${\displaystyle a}$ was emitted. In this case, a ${\displaystyle b}$ 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 ${\displaystyle {\mathcal {A}}=\langle \Sigma ,L,L_{0},C,F,E\rangle }$ that consists of the following components:

• ${\displaystyle \Sigma }$ is a finite set called the alphabet or actions of ${\displaystyle {\mathcal {A}}}$.
• ${\displaystyle L}$ is a finite set. The elements of ${\displaystyle L}$ are called the locations or states' of ${\displaystyle {\mathcal {A}}}$.
• ${\displaystyle L_{0}\subseteq L}$ is the set of start locations.
• ${\displaystyle C}$ is a finite set called the clocks of ${\displaystyle {\mathcal {A}}}$.
• ${\displaystyle F\subseteq L}$ is the set of accepting locations.
• ${\displaystyle E\subseteq L\times \Sigma \times {\mathcal {B}}(C)\times {\mathcal {P}}(C)\times L}$ is a set of edges, called transitions of ${\displaystyle {\mathcal {A}}}$, where
• ${\displaystyle {\mathcal {B}}(C)}$ is the set of clock constraints involving clocks from ${\displaystyle C}$, and
• ${\displaystyle {\mathcal {P}}(C)}$ is the powerset of ${\displaystyle C}$.

An edge ${\displaystyle (\ell ,\sigma ,g,r,\ell ')}$ from ${\displaystyle E}$ is a transition from locations ${\displaystyle \ell }$ to ${\displaystyle \ell '}$ with action ${\displaystyle \sigma }$, guard ${\displaystyle g}$ and clock resets ${\displaystyle r}$.

### Extended state

A pair with a location ${\displaystyle \ell }$ and a clock valuation ${\displaystyle \nu }$ 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 ${\displaystyle L}$. For the sake of the clarity, this article will use the term location for element of ${\displaystyle L}$ 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 ${\displaystyle w=(\sigma _{1},t_{1}),(\sigma _{2},t_{2}),\dots ,}$ with ${\displaystyle \sigma _{i}\in \Sigma }$, ${\displaystyle (t_{i})_{i}}$ an increasing sequence of non-negative number, and a timed automaton ${\displaystyle {\mathcal {A}}}$ as above, a run is a sequence of the form ${\displaystyle (\ell _{0},\nu _{0}){\xrightarrow[{t_{1}}]{\sigma _{1}}}(\ell _{1},\nu _{1})\dots }$ satisfying the following constraint:

• (initialization) ${\displaystyle \ell _{0}\in L_{0}}$
• (consecution), for all ${\displaystyle i\geq 1}$, there exists an edge in ${\displaystyle E}$ of the form ${\displaystyle \langle \ell _{i-1},\sigma _{i},g_{i},r_{i},\ell _{i}\rangle }$ such that:
• we assume that ${\displaystyle t_{i}-t_{i-1}}$ time units passed, and at this time, the guard is satisfied. I.e. ${\displaystyle \nu _{i-1}+t_{i}-t_{i-1}}$ satisfies ${\displaystyle g_{i}}$,
• the new clock valuation ${\displaystyle \nu _{i}}$ corresponds to ${\displaystyle \nu _{i-1}}$, in which ${\displaystyle t_{i}-t_{i-1}}$ time units passed and in which the clocks of ${\displaystyle r_{i}}$ where reset. Formally, ${\displaystyle \nu _{i}=(\nu _{i-1}+t_{i}-t_{i-1})[r_{i}\rightarrow 0]}$.

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 ${\displaystyle w}$ is finite of length ${\displaystyle n}$, then the run is accepting if ${\displaystyle \ell _{n}\in F}$. If the word is infinite, then the run is accepting if and only if there exists an infinite number of position ${\displaystyle i}$ such that ${\displaystyle \ell _{i}\in F}$.

### 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 ${\displaystyle s}$, and a letter ${\displaystyle a}$, there is only one possible state which can be reached from ${\displaystyle s}$ by reading ${\displaystyle a}$. However, in the case of timed automaton the formal definition is slightly more complex. Formally, a timed automaton is deterministic if:

• ${\displaystyle L_{0}}$ is a singleton
• for each pair of transitions ${\displaystyle (\ell ,\sigma ,g,r,\ell ')}$ and ${\displaystyle (\ell ,\sigma ,g',r',\ell '')}$, the set of clocks valuations satisfying ${\displaystyle g}$ is disjoint from the set of clocks valuations satisfying ${\displaystyle g'}$.

## 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 Π1
1
. 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.

## Notes

1. Rajeev Alur, David L. Dill. 1994 A Theory of Timed Automata. In Theoretical Computer Science, vol. 126, 183–235, pp. 194–1955
2. Lasota, SƗawomir; Walukiewicz, Igor (2008). "Alternating Timed Automata". ACM Transactions on Computational Logic . 9 (2): 1–26. arXiv:. doi:10.1145/1342991.1342994. S2CID   12319.

## Related Research Articles

In the theory of computation, a branch of theoretical computer science, a pushdown automaton (PDA) is a type of automaton that employs a stack.

Automata theory is the study of abstract machines and automata, as well as the computational problems that can be solved using them. It is a theory in theoretical computer science. The word automata comes from the Greek word αὐτόματος, which means "self-acting, self-willed, self-moving". An automaton is an abstract self-propelled computing device which follows a predetermined sequence of operations automatically. An automaton with a finite number of states is called a Finite Automaton (FA) or Finite-State Machine (FSM). The figure on the right illustrates a finite-state machine, which is a well-known type of automaton. This automaton consists of states and transitions. As the automaton sees a symbol of input, it makes a transition to another state, according to its transition function, which takes the previous state and current input symbol as its arguments.

In probability theory and statistics, a Gaussian process is a stochastic process, such that every finite collection of those random variables has a multivariate normal distribution, i.e. every finite linear combination of them is normally distributed. The distribution of a Gaussian process is the joint distribution of all those random variables, and as such, it is a distribution over functions with a continuous domain, e.g. time or space.

In computer science and automata theory, a deterministic Büchi automaton is a theoretical machine which either accepts or rejects infinite inputs. Such a machine has a set of states and a transition function, which determines which state the machine should move to from its current state when it reads the next input character. Some states are accepting states and one state is the start state. The machine accepts an input if and only if it will pass through an accepting state infinitely many times as it reads the input.

In the theory of computation, a branch of theoretical computer science, a deterministic finite automaton (DFA)—also known as deterministic finite acceptor (DFA), deterministic finite-state machine (DFSM), or deterministic finite-state automaton (DFSA)—is a finite-state machine that accepts or rejects a given string of symbols, by running through a state sequence uniquely determined by the string. Deterministic refers to the uniqueness of the computation run. In search of the simplest models to capture finite-state machines, Warren McCulloch and Walter Pitts were among the first researchers to introduce a concept similar to finite automata in 1943.

In automata theory, a finite-state machine is called a deterministic finite automaton (DFA), if

In automata theory, a deterministic pushdown automaton is a variation of the pushdown automaton. The class of deterministic pushdown automata accepts the deterministic context-free languages, a proper subset of context-free languages.

In computer science, in particular in automata theory, a two-way finite automaton is a finite automaton that is allowed to re-read its input.

In formal language theory, an alphabet is a non-empty set of symbols/glyphs, typically thought of as representing letters, characters, or digits but among other possibilities the "symbols" could also be a set of phonemes. Alphabets in this technical sense of a set are used in a diverse range of fields including logic, mathematics, computer science, and linguistics. An alphabet may have any cardinality ("size") and depending on its purpose maybe be finite, countable, or even uncountable.

In quantum computing, quantum finite automata (QFA) or quantum state machines are a quantum analog of probabilistic automata or a Markov decision process. They provide a mathematical abstraction of real-world quantum computers. Several types of automata may be defined, including measure-once and measure-many automata. Quantum finite automata can also be understood as the quantization of subshifts of finite type, or as a quantization of Markov chains. QFAs are, in turn, special cases of geometric finite automata or topological finite automata.

In computer science, more specifically in automata and formal language theory, nested words are a concept proposed by Alur and Madhusudan as a joint generalization of words, as traditionally used for modelling linearly ordered structures, and of ordered unranked trees, as traditionally used for modelling hierarchical structures. Finite-state acceptors for nested words, so-called nested word automata, then give a more expressive generalization of finite automata on words. The linear encodings of languages accepted by finite nested word automata gives the class of visibly pushdown languages. The latter language class lies properly between the regular languages and the deterministic context-free languages. Since their introduction in 2004, these concepts have triggered much research in that area.

In computer science and mathematical logic, an infinite-tree automaton is a state machine that deals with infinite tree structures. It can be seen as an extension of top-down finite-tree automata to infinite trees or as an extension of infinite-word automata to infinite trees.

In mathematics, lifting theory was first introduced by John von Neumann in a pioneering paper from 1931, in which he answered a question raised by Alfréd Haar. The theory was further developed by Dorothy Maharam (1958) and by Alexandra Ionescu Tulcea and Cassius Ionescu Tulcea (1961). Lifting theory was motivated to a large extent by its striking applications. Its development up to 1969 was described in a monograph of the Ionescu Tulceas. Lifting theory continued to develop since then, yielding new results and applications.

In automata theory, a co-Büchi automaton is a variant of Büchi automaton. The only difference is the accepting condition: a Co-Büchi automaton accepts an infinite word if there exists a run, such that all the states occurring infinitely often in the run are in the final state set . In contrast, a Büchi automaton accepts a word if there exists a run, such that at least one state occurring infinitely often in the final state set .

In theoretical computer science and formal language theory, a weighted automaton or weighted finite-state machine is a generalization of a finite-state machine in which the edges have weights, for example real numbers or integers. Finite-state machines are only capable of answering decision problems; they take as input a string and produce a Boolean output, i.e. either "accept" or "reject". In contrast, weighted automata produce a quantitative output, for example a count of how many answers are possible on a given input string, or a probability of how likely the input string is according to a probability distribution. They are one of the simplest studied models of quantitative automata.

In representation theory of mathematics, the Waldspurger formula relates the special values of two L-functions of two related admissible irreducible representations. Let k be the base field, f be an automorphic form over k, π be the representation associated via the Jacquet–Langlands correspondence with f. Goro Shimura (1976) proved this formula, when and f is a cusp form; Günter Harder made the same discovery at the same time in an unpublished paper. Marie-France Vignéras (1980) proved this formula, when and f is a newform. Jean-Loup Waldspurger, for whom the formula is named, reproved and generalized the result of Vignéras in 1985 via a totally different method which was widely used thereafter by mathematicians to prove similar formulas.

In model checking, a subfield of computer science, a clock is a mathematical object used to model time. More precisely, a clock measures how much time passed since a particular event occurs, in this sense, a clock is more precisely an abstraction of a stopwatch. In a model of some particular program, the value of the clock may either be the time since the program was started, or the time since a particular event occurred in the program. Those clocks are used in the definition of timed automaton, signal automaton, timed propositional temporal logic and clock temporal logic. They are also used in programs such as UPPAAL which implement timed automata.

In automata theory, a field of computer science, a signal automaton is a finite automaton extended with a finite set of real-valued clocks. During a run of a signal 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.

In automata theory, an alternating timed automaton (ATA) is a mix of both timed automaton and alternating finite automaton. That is, it is a sort of automata which can measure time and in which there exists universal and existential transition.

In model checking, a field of computer science, a region is a convex polytope in for some dimension , and more precisely a zone, satisfying some minimality property. The regions partition .