Region (model checking)

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 .

The set of zones depends on a set of constraints of the form , , and , with and some variables, and a constant. The regions are defined such that if two vectors and belong to the same region, then they satisfy the same constraints of . 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 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 ensure that is a possible future of . Taking a product of this region automaton and of a timed automaton which accepts a language creates a finite automaton or a Büchi automaton which accepts untimed . In particular, it allows to reduce the emptiness problem for to the emptiness problem for a finite or Büchi automaton. This technique is used for example by the software UPPAAL.[1]

Definition edit

Let   a set of clocks. For each   let  . Intuitively, this number represents an upper bound on the values to which the clock   can be compared. The definition of a region over the clocks of   uses those numbers  's. Three equivalent definitions are now given.

Given a clock assignment  ,   denotes the region in which   belongs. The set of regions is denoted by  .

Equivalence of clocks assignment edit

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   and   are equivalent if they satisfy the following constraints:[2]: 202 

  •   iff  , for each   and   an integer, and ~ being one of the following relation =, < or .
  •   iff  , for each  ,  ,  ,   being the fractional part of the real  , and ~ being one of the following relation =, < or .

The first kind of constraints ensures that   and   satisfies the same constraints. Indeed, if   and  , then only the second assignment satisfies  . On the other hand, if   and  , 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   and  . Then, the constraint   is eventually satisfied by the future of   without clock reset, but not by the future of   without clock reset.

Explicit definition of a region edit

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   of equations and inequations satisfying the following constraints:

  • for each  ,   contains either:
    •   for some integer  
    •   for some integer  ,
    •  ,
  • furthermore, for each pair of clocks  , where   contains constraints of the form   and  , then   contains an (in) equality of the form   with   being either =, < or .

Since, when   and   are fixed, the last constraint is equivalent to  .

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   with   the number of clocks.

Timed bisimulation edit

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   starting with a clock assignment  , for any other assignment   in the same region, there is a run  , 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  , two assignments two clocks assignments   and   belongs to the same region if for each timed automaton   in which the guards never compare a clock   to a number greater than  , given any location   of  , there is a timed bisimulation between the extended states   and  . More precisely, this bisimulation preserves letters and locations but not the exact clock assignments.[1]: 7 

Operation on regions edit

Some operations are now defined over regions: Resetting some of its clock, and letting time pass.

Resetting clocks edit

Given a region   defined by a set of (in)equations  , and a set of clocks  , the region similar to   in which the clocks of   are restarted is now defined. This region is denoted by  , it is defined by the following constraints:

  • each constraints of   not containing the clock  ,
  • the constraints   for  .

The set of assignments defined by   is exactly the set of assignments   for  .

Time-successor edit

Given a region  , the regions which can be attained without resetting a clock are called the time-successors of  . Two equivalent definitions are now given.

Definition edit

A clock region   is a time-successor of another clock region   if for each assignment  , there exists some positive real   such that  .

Note that it does not mean that  . For example, the region   defined by the set of constraint   has the time-successor   defined by the set of constraint  . Indeed, for each  , it suffices to take  . However, there exists no real   such that   or even such that  ; indeed,   defines a triangle while   defines a segment.

Computable definition edit

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   defined as a set of constraints  , let us define its set of time-successors. In order to do so, the following variables are required. Let   the set of constraints of   of the form  . Let   the set of clocks   such that   contains the constraint  . Let   the set of clocks   such that there are no constraints of the form   in  .

If   is empty,   is its own time successor. If  , then   is the only time-successor of  . Otherwise, there is a least time-successor of   not equal to  . The least time-successor, if   is non-empty, contains:

  • the constraints of  
  •  ,
  •  , and
  • for each   such that   does not belong to  , the constraint  .

If   is empty, the least time-successor is defined by the following constraints:

  • the constraints of   not using the clocks of  ,
  • the constraint  , for each constraint   in  , with  .

Properties edit

There are at most   regions, where   is the number of clocks.[2]: 203 

Region automaton edit

Given a timed automaton  , its region automaton is a finite automaton or a Büchi automaton which accepts untimed  . This automaton is similar to  , where clocks are replaced by region. Intuitively, the region automaton is contructude as a product of   and of the region graph. This region graph is defined first.

Region graph edit

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:

  • its nodes are regions,
  • its root is the initial region  , defined by the set of constraints  ,
  • the set of edges are  , for   a time-successor of  .

Region automaton edit

Let   a timed automaton. For each clock  , let   the greatest number   such that there exists a guard of the form   in  . The region automaton of  , denoted by   is a finite or Büchi automaton which is essentially a product of   and of the region graph defined above. That is, each state of the region automaton is a pair containing a location of   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:

  • its alphabet is  ,
  • its set of states is  ,
  • its set of states is   with   the initial region,
  • its set of accepting states is  ,
  • its transition relation   contains  , for  , such that   and   is a time-successor of  .

Given any run   of  , the sequence   is denoted  , it is a run of   and is accepting if and only if   is accepting[2]: 207 . It follows that  . In particular,   accepts a timed-word if and only if   accepts a word. Furthermore, an accepting run of   can be computed from an accepting run of  .

References edit

  1. ^ a b Bengtsson, Johan; Yi, Wang L (2004). "Timed Automata: Semantics, Algorithms and Tools". Lectures on Concurrency and Petri Nets. Lecture Notes in Computer Science. Vol. 3098. pp. 87–124. doi:10.1007/978-3-540-27755-2_3. ISBN 978-3-540-22261-3.
  2. ^ a b c Alur, Rajeev; Dill, David L (April 25, 1994). "A theory of timed automata" (PDF). Theoretical Computer Science. 126 (2): 183–235. doi:10.1016/0304-3975(94)90010-8.