Signal automaton

From HandWiki
Short description: Field of computer science

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. [1]

Example

Before formally defining what a signal automaton is, an example will be given. Let one consider the language [math]\displaystyle{ \mathcal L }[/math] of signals, over a binary alphabet [math]\displaystyle{ \{A,B\} }[/math], which contains signals [math]\displaystyle{ \gamma }[/math] such that:

  • [math]\displaystyle{ A }[/math] appears in singular intervals. That is, the set of times [math]\displaystyle{ \{t\mid \gamma(t)=A\} }[/math] is discrete, and
  • [math]\displaystyle{ A }[/math] appears at least once during each interval of length one.

This language can be accepted by the automaton pictured nearby.

A signal automaton ensuring A holds discretely and at least once by time unit

As for finite automaton, incoming arrows represents initial locations and double circle represents accepting locations. However, contrary to finite automata, letters occurs in locations and not in transition. This is because letters are emitted continuously and transitions are taken discretely. The symbol [math]\displaystyle{ x }[/math] represents a clock. This clock allow to measure the time since the last time where [math]\displaystyle{ A }[/math] was emitted. Thus [math]\displaystyle{ x=0 }[/math] ensures that [math]\displaystyle{ A }[/math] is emitted discretely. And [math]\displaystyle{ 1\gt x }[/math] ensures that no more than a unit of time can pass without [math]\displaystyle{ A }[/math] occurring.

Formal definition

Signal automaton

Formally, a signal automaton is a tuple [math]\displaystyle{ \mathcal A=\langle \Sigma,L,L_0,C,F,\alpha,\beta,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{ C }[/math] is a finite set called the clocks of [math]\displaystyle{ \mathcal A }[/math].
  • [math]\displaystyle{ L_0\subseteq L }[/math] is the set of start locations.
  • [math]\displaystyle{ F\subseteq L }[/math] is the set of accepting locations.
  • [math]\displaystyle{ \alpha:L\to\Sigma }[/math] which associates a letter to each location.
  • [math]\displaystyle{ \beta:L\to\mathcal B(C) }[/math] which associate a clock constraints to each location, and
  • [math]\displaystyle{ E\subseteq L\times\mathcal P(C)\times L }[/math] is a set of edges, called transitions of [math]\displaystyle{ \mathcal A }[/math], where
    • [math]\displaystyle{ \mathcal P(C) }[/math] is the powerset of [math]\displaystyle{ C }[/math].

An edge [math]\displaystyle{ (\ell,r,\ell') }[/math] from [math]\displaystyle{ E }[/math] is a transition from locations [math]\displaystyle{ \ell }[/math] to [math]\displaystyle{ \ell' }[/math] which reset the clocks of [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 means 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 signal-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 now in which location you are, and the clock valuation.

Run

As for finite automata, a run is essentially a sequence of locations, such that there exists a transition between two locations. However, two differences must be emphasized. The letter is not determined by the transition but by the locations; this is due to the fact that the letters are emitted continuously while transitions are taken discretely. Some time elapses while in a location; the clock constraints labelling a location or its successor may constraint the time spent in a single location.

A run is a sequence of the form [math]\displaystyle{ \xrightarrow[\nu_0]{C}(\ell_0,I_0)\xrightarrow[\nu_1]{r_1}(\ell_1,I_1)\dots }[/math] satisfying some constraints. Before stating those constraints, some notations are introduced. The sequences are discrete but represents continuous events. A continuous version of the sequences [math]\displaystyle{ (\sigma_i) }[/math], [math]\displaystyle{ (\nu_i) }[/math], [math]\displaystyle{ (\ell_i) }[/math] are now introduced. Let [math]\displaystyle{ i\ge0 }[/math] integral and [math]\displaystyle{ t\in I_i }[/math], then

  • let [math]\displaystyle{ \sigma'_t }[/math] be equal to [math]\displaystyle{ \sigma_i }[/math],
  • let [math]\displaystyle{ \nu'_t }[/math] be [math]\displaystyle{ \nu_i+t-\lceil I_i\rceil }[/math] with [math]\displaystyle{ \lceil I_i\rceil }[/math] being the lower bound of the interval [math]\displaystyle{ I_i }[/math],
  • let [math]\displaystyle{ \ell'_t=\ell_i }[/math].

The constraints satisfied by run are, for each [math]\displaystyle{ i\ge0 }[/math] integral and [math]\displaystyle{ t\ge0 }[/math] real:

  • [math]\displaystyle{ \ell_0\in L_0 }[/math],
  • [math]\displaystyle{ (\ell_i,r_i,\ell_{i+1})\in E }[/math],
  • [math]\displaystyle{ \nu_{i+1}=(\nu_i+\mid I_i\mid)[r_i\rightarrow 0] }[/math],
  • [math]\displaystyle{ \nu'_t\models\beta(\ell'_t) }[/math].

The signal defined by this run is the function [math]\displaystyle{ \sigma' }[/math] defined above. It is said that the run defined above is a run for the signal [math]\displaystyle{ \sigma' }[/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].

Accepted signals and language

A signal [math]\displaystyle{ \gamma }[/math] is said to be accepted by a signal automaton [math]\displaystyle{ \mathcal A }[/math] if there exists a run of [math]\displaystyle{ \mathcal A }[/math] on [math]\displaystyle{ \gamma }[/math] accepting it. The set of signals accepted by [math]\displaystyle{ \mathcal A }[/math] is called the language accepted by [math]\displaystyle{ \mathcal A }[/math] and is denoted by [math]\displaystyle{ \mathcal{S(A)} }[/math].

Deterministic signal automaton

As in the case of finite and Büchi automaton, a signal-automaton may be deterministic or non-deterministic. Intuitively, being deterministic as the same meaning in each of those case. It means that the set of start locations is a singleton, and that, given an extended state [math]\displaystyle{ s }[/math], and a letter [math]\displaystyle{ a }[/math], there is only one possible extended state which can be reached from [math]\displaystyle{ s }[/math] by reading [math]\displaystyle{ a }[/math]. More precisely, either it is possible to stay in the location longer, or there is at most one possible successor location.

Formally, this can be defined as follows:

  • [math]\displaystyle{ L_0 }[/math] is a singleton
  • for each location [math]\displaystyle{ \ell\in L }[/math], for each transition [math]\displaystyle{ (\ell,r,\ell')\in E }[/math], the two following zones are disjoint:
    • the zone defined by the clock constraint [math]\displaystyle{ \beta(\ell) }[/math],
    • the zone defined by the clock constraint [math]\displaystyle{ \beta(\ell') }[/math] where the constraints on clocks of [math]\displaystyle{ r }[/math] are removed,
  • for each location transitions [math]\displaystyle{ (\ell,r',\ell')\in E }[/math] and [math]\displaystyle{ (\ell,r'',\ell'')\in E }[/math], the two following zones are disjoint:
    • the zone defined by the clock constraint [math]\displaystyle{ \beta(\ell') }[/math] where the constraints on clocks of [math]\displaystyle{ r' }[/math] are removed,
    • the zone defined by the clock constraint [math]\displaystyle{ \beta(\ell'') }[/math] where the constraints on clocks of [math]\displaystyle{ r'' }[/math] are removed,

Simplified signal automata

Depending on the authors, the exact definition of signal automata may be slightly different. Two such definitions are now given.

Half-open intervals

In order to simplify the definition of a run, some authors requires that each interval of a run is right-closed and left-open. This restrict automata to accept only signals whose underlying partition satisfies the same property. However, it ensures that at each time [math]\displaystyle{ t\ge0 }[/math], [math]\displaystyle{ \lim_{t\leftarrow x^+}f(x)=f(t) }[/math] for [math]\displaystyle{ f }[/math] representing any of the function [math]\displaystyle{ \sigma' }[/math], [math]\displaystyle{ \nu' }[/math] or [math]\displaystyle{ \ell' }[/math] introduced above.

Bipartite signal automaton

A bipartite signal automaton is a signal automaton in which the run alternates between open intervals and singular intervals (i.e. intervals which are singletons). It ensures that the graph underlying the automaton is a bipartite graph, and thus that the set of locations can be partitioned into [math]\displaystyle{ \{L^o,L^s\} }[/math], the set of open locations and of singular locations. Since the first interval contains 0, it can not be an open location, it follows that [math]\displaystyle{ L_0\subseteq L^s }[/math]. In order to ensure that each singular location is indeed singular, for each location [math]\displaystyle{ \ell }[/math], there must be a clock [math]\displaystyle{ x_\ell }[/math] which is reset when entering [math]\displaystyle{ \ell }[/math] and such that the clock constraint of [math]\displaystyle{ \ell }[/math] contains [math]\displaystyle{ x=0 }[/math].

Any signal automaton can be transformed into an equivalent bipartite signal automaton. It suffices to replace each location [math]\displaystyle{ \ell }[/math] by a pair of locations [math]\displaystyle{ (\ell^o,\ell^s) }[/math] and introduce a new clock [math]\displaystyle{ x }[/math], such that for each [math]\displaystyle{ \ell }[/math], [math]\displaystyle{ x_{\ell^s}=x }[/math].

Nearby is pictured a bipartite automaton equivalent to the signal automaton from the example section. Rectangle states represents singular locations.

A bipartite signal automaton ensuring A holds discretely and at least once by time unit

Synchronization of automata

The notion of product of finite automaton is extended to signal automaton. However, such a product is called a synchronization of automaton to emphasize the fact that the time should pass similarly in both automata considered. The main difference between synchronization and product is that, when two finite automata read the same word, they take transition simultaneously. This is not the case anymore for signal automata, since they can take transition at arbitrary time. Thus, the transition relation of a signal automaton may allow transition to be taken in one or two automata.

Let [math]\displaystyle{ \mathcal A^1=\langle \Sigma,L^1,L^1_0,C^1,F^1,\alpha^1,\beta^1,E^1\rangle }[/math] and [math]\displaystyle{ \mathcal A^2=\langle \Sigma,L^2,L^2_0,C^2,F^2,\alpha^2,\beta^2,E^2\rangle }[/math] two signal automata, their synchronization is the signal automaton [math]\displaystyle{ \mathcal A 1\otimes\mathcal A^2=\langle\Sigma,\{(\ell^1,\ell^2)\in L^1\otimes L^2\mid \alpha^1(\ell^1)=\alpha^2(\ell^2)\},L^1_0\otimes L^2_0,C^1\cup C^2,F^1\otimes F^2,(\ell^1,\ell^2)\mapsto\alpha^1(\ell^1),(\ell^1,\ell^2)\mapsto\beta^1(\ell^1)\land\beta^2(\ell^2),E\rangle }[/math], where [math]\displaystyle{ E }[/math] contains the following transitions:

  • [math]\displaystyle{ ((\ell^1,\ell^2),r^1,(\ell^{\prime1},\ell^2) }[/math] for [math]\displaystyle{ (\ell^1,r,\ell^{\prime1})\in E^1 }[/math], and similarly for [math]\displaystyle{ E^2 }[/math],
  • [math]\displaystyle{ ((\ell^1,\ell^2),r^1\cup r^2,(\ell^{\prime1},\ell^{\prime2}) }[/math] for [math]\displaystyle{ (\ell^1,r,\ell^{\prime1})\in E^1 }[/math] and [math]\displaystyle{ (\ell^2,r,\ell^{\prime2})\in E^2 }[/math].

Difference with timed automata

Timed automata is another extension of finite automata, which adds a notion of time to words. We now state some of the main differences between timed automata and signal automata.

In timed automata, letters are emitted on the transitions and not in the locations. As explained above when comparing signal automata to finite automata, letters are emitted on transitions when the words are emitted discretely, as for words and timed-words while they are emitted on locations when letters are emitted continuously, as for signals.

In timed automata, guards are only checked on transitions. This simplifies the definition of deterministic automaton, since it means that the constraint must be satisfied before the clocks are restarted.

See also

Notes

  1. Brihaye, Thomas; Geeraerts, Gilles; Ho, Hsi-Ming; Monmege, Benjamin (2017). "Timed-Automata-Based Verification of MITL over Signals". 24th International Symposium on Temporal Representation and Reasoning (TIME 2017) 90: 7:1–7:19. doi:10.4230/LIPIcs.TIME.2017.7.