In model checking, a field of computer science, a region is a convex polytope in [math]\displaystyle{ \mathbb R^d }[/math] for some dimension [math]\displaystyle{ d }[/math], and more precisely a zone, satisfying some minimality property. The regions partition [math]\displaystyle{ \mathbb R^d }[/math].
The set of zones depends on a set [math]\displaystyle{ K }[/math] of constraints of the form [math]\displaystyle{ x\le c }[/math], [math]\displaystyle{ x\ge c }[/math], [math]\displaystyle{ x_1\le x_2+c }[/math] and [math]\displaystyle{ x_1\ge x_2+c }[/math], with [math]\displaystyle{ x_1 }[/math] and [math]\displaystyle{ x_2 }[/math] some variables, and [math]\displaystyle{ c }[/math] a constant. The regions are defined such that if two vectors [math]\displaystyle{ \vec x }[/math] and [math]\displaystyle{ \vec x' }[/math] belong to the same region, then they satisfy the same constraints of [math]\displaystyle{ K }[/math]. Furthermore, when those vectors are considered as a tuple of clocks, both vectors have the same set of possible futures. Intuitively, it means that any timed propositional temporal logic-formula, or timed automaton or signal automaton using only the constraints of [math]\displaystyle{ K }[/math] can not distinguish both vectors.
The set of region allows to create the region automaton, which is a directed graph in which each node is a region, and each edge [math]\displaystyle{ r\to r' }[/math] ensure that [math]\displaystyle{ r' }[/math] is a possible future of [math]\displaystyle{ r }[/math]. Taking a product of this region automaton and of a timed automaton [math]\displaystyle{ \mathcal A }[/math] which accepts a language [math]\displaystyle{ L }[/math] creates a finite automaton or a Büchi automaton which accepts untimed [math]\displaystyle{ L }[/math]. In particular, it allows to reduce the emptiness problem for [math]\displaystyle{ \mathcal A }[/math] to the emptiness problem for a finite or Büchi automaton. This technique is used for example by the software UPPAAL.[1]
Let [math]\displaystyle{ C=\{x_1,\dots,x_d\} }[/math] a set of clocks. For each [math]\displaystyle{ x\in\mathbb N }[/math] let [math]\displaystyle{ c_x\in\mathbb N }[/math]. Intuitively, this number represents an upper bound on the values to which the clock [math]\displaystyle{ x }[/math] can be compared. The definition of a region over the clocks of [math]\displaystyle{ C }[/math] uses those numbers [math]\displaystyle{ c_x }[/math]'s. Three equivalent definitions are now given.
Given a clock assignment [math]\displaystyle{ \nu }[/math], [math]\displaystyle{ [\nu] }[/math] denotes the region in which [math]\displaystyle{ \nu }[/math] belongs. The set of regions is denoted by [math]\displaystyle{ \mathcal R }[/math].
The first definition allow to easily test whether two assignments belong to the same region.
A region may be defined as an equivalence class for some equivalence relation. Two clocks assignments [math]\displaystyle{ \nu_1 }[/math] and [math]\displaystyle{ \nu_2 }[/math] are equivalent if they satisfy the following constraints:[2]:{{{1}}}
The first kind of constraints ensures that [math]\displaystyle{ \nu_1 }[/math] and [math]\displaystyle{ \nu_2 }[/math] satisfies the same constraints. Indeed, if [math]\displaystyle{ \nu_1(x)=0.5 }[/math] and [math]\displaystyle{ \nu_2(x)=1 }[/math], then only the second assignment satisfies [math]\displaystyle{ x=1 }[/math]. On the other hand, if [math]\displaystyle{ \nu_1(x)=0.5 }[/math] and [math]\displaystyle{ \nu_2(x)=0.6 }[/math], both assignment satisfies exactly the same set of constraint, since the constraints use only integral constants.
The second kind of constraints ensures that the future of two assignments satisfy the same constraints. For example, let [math]\displaystyle{ \nu_1=\{x\mapsto 0.5, y\mapsto 0.6\} }[/math] and [math]\displaystyle{ \nu_2=\{x\mapsto 0.5, y\mapsto 0.4\} }[/math]. Then, the constraint [math]\displaystyle{ y=1\land x\lt 1 }[/math] is eventually satisfied by the future of [math]\displaystyle{ \nu_1 }[/math] without clock reset, but not by the future of [math]\displaystyle{ \nu_2 }[/math] without clock reset.
While the previous definition allow to test whether two assignments belong to the same region, it does not allow to easily represents a region as a data structure. The third definition given below allow to give a canonical encoding of a region.
A region can be explicitly defined as a zone, using a set [math]\displaystyle{ S }[/math] of equations and inequations satisfying the following constraints:
Since, when [math]\displaystyle{ c }[/math] and [math]\displaystyle{ c' }[/math] are fixed, the last constraint is equivalent to [math]\displaystyle{ x\sim y+c-c' }[/math].
This definition allow to encode a region as a data structure. It suffices, for each clock, to state to which interval it belongs and to recall the order of the fractional part of the clocks which belong in an open interval of length 1. It follows that the size of this structure is [math]\displaystyle{ O\left(\sum\log(c_k)+|C|\log(|C|)\right) }[/math] with [math]\displaystyle{ |C| }[/math] the number of clocks.
Let us now give a third definition of regions. While this definition is more abstract, it is also the reason why regions are used in model checking. Intuitively, this definition states that two clock assignments belong to the same region if the differences between them are such that no timed automaton can notice them. Given any run [math]\displaystyle{ r }[/math] starting with a clock assignment [math]\displaystyle{ \nu }[/math], for any other assignment [math]\displaystyle{ \nu' }[/math] in the same region, there is a run [math]\displaystyle{ r' }[/math], going through the same locations, reading the same letters, where the only difference is that the time waited between two successive transition may be different, and thus the successive clock variations are different.
The formal definition is now given. Given a set of clock [math]\displaystyle{ C }[/math], two assignments two clocks assignments [math]\displaystyle{ \nu_1 }[/math] and [math]\displaystyle{ \nu_2 }[/math] belongs to the same region if for each timed automaton [math]\displaystyle{ \mathcal A }[/math] in which the guards never compare a clock [math]\displaystyle{ x }[/math] to a number greater than [math]\displaystyle{ c_x }[/math], given any location [math]\displaystyle{ \ell }[/math] of [math]\displaystyle{ \mathcal A }[/math], there is a timed bisimulation between the extended states [math]\displaystyle{ (\ell,\nu_1) }[/math] and [math]\displaystyle{ (\ell,\nu_2) }[/math]. More precisely, this bisimulation preserves letters and locations but not the exact clock assignments.[1]:7
Some operations are now defined over regions: Resetting some of its clock, and letting time pass.
Given a region [math]\displaystyle{ \alpha }[/math] defined by a set of (in)equations [math]\displaystyle{ S }[/math], and a set of clocks [math]\displaystyle{ C'\subseteq C }[/math], the region similar to [math]\displaystyle{ \alpha }[/math] in which the clocks of [math]\displaystyle{ C' }[/math] are restarted is now defined. This region is denoted by [math]\displaystyle{ \alpha[C'\mapsto 0] }[/math], it is defined by the following constraints:
The set of assignments defined by [math]\displaystyle{ \alpha[C'\mapsto 0] }[/math] is exactly the set of assignments [math]\displaystyle{ \nu[C'\mapsto0] }[/math] for [math]\displaystyle{ \nu\in\alpha }[/math].
Given a region [math]\displaystyle{ \alpha }[/math], the regions which can be attained without resetting a clock are called the time-successors of [math]\displaystyle{ \alpha }[/math]. Two equivalent definitions are now given.
A clock region [math]\displaystyle{ \alpha' }[/math] is a time-successor of another clock region [math]\displaystyle{ \alpha }[/math] if for each assignment [math]\displaystyle{ \nu\in\alpha }[/math], there exists some positive real [math]\displaystyle{ t_{\nu,\alpha'}\gt 0 }[/math] such that [math]\displaystyle{ \nu+t_{\nu,\alpha'}\in\alpha' }[/math].
Note that it does not mean that [math]\displaystyle{ \alpha+t_{\nu,\alpha'}=\alpha' }[/math]. For example, the region [math]\displaystyle{ \alpha }[/math] defined by the set of constraint [math]\displaystyle{ \{0\lt x\lt 1, 0\lt y\lt 1, x\lt y\} }[/math] has the time-successor [math]\displaystyle{ \alpha' }[/math] defined by the set of constraint [math]\displaystyle{ \{0\lt x\lt 1, y=1\} }[/math]. Indeed, for each [math]\displaystyle{ \nu\in\alpha }[/math], it suffices to take [math]\displaystyle{ t_{\nu,\alpha'}=1-\nu(y) }[/math]. However, there exists no real [math]\displaystyle{ t }[/math] such that [math]\displaystyle{ \alpha+t=\alpha' }[/math] or even such that [math]\displaystyle{ \alpha+t\subseteq\alpha' }[/math]; indeed, [math]\displaystyle{ \alpha }[/math] defines a triangle while [math]\displaystyle{ \alpha' }[/math] defines a segment.
The second definition now given allow to explicitly compute the set of time-successor of a region, given by its set of constraints.
Given a region [math]\displaystyle{ \alpha }[/math] defined as a set of constraints [math]\displaystyle{ S }[/math], let us define its set of time-successors. In order to do so, the following variables are required. Let [math]\displaystyle{ T\subseteq S }[/math] the set of constraints of [math]\displaystyle{ S }[/math] of the form [math]\displaystyle{ x_i=c_i }[/math]. Let [math]\displaystyle{ Y\subseteq C }[/math] the set of clocks [math]\displaystyle{ y }[/math] such that [math]\displaystyle{ S }[/math] contains the constraint [math]\displaystyle{ y\gt c_y }[/math]. Let [math]\displaystyle{ Z\subseteq C\setminus Y }[/math] the set of clocks [math]\displaystyle{ \{z\} }[/math] such that there are no constraints of the form [math]\displaystyle{ \{x\}\lt \{z\} }[/math] in [math]\displaystyle{ S }[/math].
If [math]\displaystyle{ T }[/math] is empty, [math]\displaystyle{ \alpha }[/math] is its own time successor. If [math]\displaystyle{ Y=C }[/math], then [math]\displaystyle{ \alpha }[/math] is the only time-successor of [math]\displaystyle{ \alpha }[/math]. Otherwise, there is a least time-successor of [math]\displaystyle{ \alpha }[/math] not equal to [math]\displaystyle{ \alpha }[/math]. The least time-successor, if [math]\displaystyle{ T }[/math] is non-empty, contains:
If [math]\displaystyle{ T }[/math] is empty, the least time-successor is defined by the following constraints:
There are at most [math]\displaystyle{ |C|!2^{|C|}\prod_{x\in C}(2c_x+2) }[/math] regions, where [math]\displaystyle{ |C| }[/math] is the number of clocks.[2]:203
Given a timed automaton [math]\displaystyle{ \mathcal A }[/math], its region automaton is a finite automaton or a Büchi automaton which accepts untimed [math]\displaystyle{ L }[/math]. This automaton is similar to [math]\displaystyle{ \mathcal A }[/math], where clocks are replaced by region. Intuitively, the region automaton is contructude as a product of [math]\displaystyle{ \mathcal A }[/math] and of the region graph. This region graph is defined first.
The region graph is a rooted directed graph which models the set of possible clock valuations during a run of a timed-autoamton. It is defined as follows:
Let [math]\displaystyle{ \mathcal A=\langle \Sigma,L,L_0,C,F,E\rangle }[/math] a timed automaton. For each clock [math]\displaystyle{ x\in C }[/math], let [math]\displaystyle{ c_x }[/math] the greatest number [math]\displaystyle{ c }[/math] such that there exists a guard of the form [math]\displaystyle{ x\sim c }[/math] in [math]\displaystyle{ \mathcal A }[/math]. The region automaton of [math]\displaystyle{ \mathcal A }[/math], denoted by [math]\displaystyle{ R(\mathcal A) }[/math] is a finite or Büchi automaton which is essentially a product of [math]\displaystyle{ \mathcal A }[/math] and of the region graph defined above. That is, each state of the region automaton is a pair containing a location of [math]\displaystyle{ \mathcal A }[/math] and a region. Since two clocks assignment belonging to the same region satisfies the same guard, each region contains enough information to decide which transitions can be taken.
Formally, the region automaton is defined as follows:
Given any run [math]\displaystyle{ r=(\ell_0,\nu_0)\xrightarrow[t_1]{\sigma_1}(\ell_1,\nu_1)\dots }[/math] of [math]\displaystyle{ \mathcal A }[/math], the sequence [math]\displaystyle{ (\ell_0,[\nu_0])\xrightarrow{\sigma_1}(\ell_1,[\nu_1])\dots }[/math] is denoted [math]\displaystyle{ [r] }[/math], it is a run of [math]\displaystyle{ R(\mathcal A) }[/math] and is accepting if and only if [math]\displaystyle{ r }[/math] is accepting[2]:207. It follows that [math]\displaystyle{ L(R(\mathcal A))=\operatorname{Untime}(L(\mathcal A)) }[/math]. In particular, [math]\displaystyle{ \mathcal A }[/math] accepts a timed-word if and only if [math]\displaystyle{ R(\mathcal A) }[/math] accepts a word. Furthermore, an accepting run of [math]\displaystyle{ \mathcal A }[/math] can be computed from an accepting run of [math]\displaystyle{ R(\mathcal A) }[/math].
Original source: https://en.wikipedia.org/wiki/Region (model checking).
Read more |