HOME

TheInfoList



OR:

In
model checking In computer science, model checking or property checking is a method for checking whether a finite-state model of a system meets a given specification (also known as correctness). This is typically associated with hardware or software system ...
, a subfield of
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
, 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 A stopwatch is a timepiece designed to measure the amount of time that elapses between its activation and deactivation. A large digital version of a stopwatch designed for viewing at a distance, as in a sports stadium, is called a stop clock. ...
. 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 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 ...
,
signal automaton 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 ...
,
timed propositional temporal logic In model checking, a field of computer science, timed propositional temporal logic (TPTL) is an extension of propositional linear temporal logic (LTL) in which variables are introduced to measure times between two events. For example, while LTL allo ...
and
clock temporal logic A clock or a timepiece is a device used to measure and indicate time. The clock is one of the oldest human inventions, meeting the need to measure intervals of time shorter than the natural units such as the day, the lunar month and the ...
. They are also used in programs such as
UPPAAL UPPAAL is an integrated tool environment for modeling, validation and verification of real-time systems modeled as networks of timed automata, extended with data types (bounded integers, arrays etc.). It has been used in at least 17 case studie ...
which implement timed automata. Generally, the model of a system uses many clocks. Those multiple clocks are required in order to track a bounded number of events. All of those clocks are synchronized. That means that the difference in value between two fixed clocks is constant until one of them is restarted. In the language of electronics, it means that clock's
jitter In electronics and telecommunications, jitter is the deviation from true periodicity of a presumably periodic signal, often in relation to a reference clock signal. In clock recovery applications it is called timing jitter. Jitter is a significa ...
is null.


Example

Let us assume that we want to modelize an elevator in a building with ten floors. Our model may have n clocks c_,\dots,c_, such that the value of the clock c_i is the time someone had wait for the elevator at floor i. This clock is started when someone calls the elevator on floor i (and the elevator was not already called on this floor since last time it visited that floor). This clock can be turned off when the elevator arrives at floor i. In this example, we actually need ten distinct clocks because we need to track ten independent events. Another clock s may be used to check how much time an elevator spent at a particular floor. A model of this elevator can then use those clocks to assert whether the elevator's program satisfies properties such as "assuming the elevator is not kept on a floor for more than fifteen seconds, then no one has to wait for the elevator for more than three minutes". In order to check whether this statement holds, it suffices to check that, in every run of the model in which the clock s is always smaller than fifteen seconds, each clock c_i is turned off before it reaches three minutes.


Definition

Formally, a set X of clocks is simply a finite set. Each element of a set of clock is called a clock. Intuitively, a clock is similar to a variable in
first-order logic First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quanti ...
, it is an element which may be used in a logical formula and which may takes a number of differente values.


Clock valuations

A clock valuation or clock interpretation \nu over X=\ is usually defined as a function from X to the set of non-negative real. Equivalently, a valuation can be considered as a point in \mathbb R_^n. The initial assignment \nu_0 is the constant function sending each clock to 0. Intuitively, it represents the initial time of the program, where each clocks are initialized simultaneously. Given a clock assignment \nu, and a real t\ge0, \nu+t denotes the clock assignment sending each clock x\in C to \nu(x)+t. Intuitively, it represents the valuation \nu after which t time units passed. Given a subset r\subseteq C of clocks, \nu \rightarrow 0/math> denotes the assignment similar to \nu in which the clocks of r are reset. Formally, \nu \rightarrow 0/math> sends each clock x\in r to 0 and each clock x\not\in r to \nu(x).


Inactive clocks

The program
UPPAAL UPPAAL is an integrated tool environment for modeling, validation and verification of real-time systems modeled as networks of timed automata, extended with data types (bounded integers, arrays etc.). It has been used in at least 17 case studie ...
introduce the notion of inactive clocks. A clock is inactive at some time if there is no possible future in which the clock's value is checked without being reset first. In our example above, the clock c_i is considered to be inactive when the elevator arrive at floor i, and remains inactive until someone call the elevator at floor i. When allowing for inactive clock, a valuation may associate a clock x to some special value \bot to indicate that it is inactive. If \nu(x)=\bot then (\nu+t)(x) also equals \bot.


Clock constraint

An atomic clock constraint is simply a term of the form x\sim c, where x is a clock, \sim is a comparison operator, such as <, ≤, = ≥, or >, and c\in\mathbb N is an integral constant. In our previous example, we may use the atomic clock constraints c_i\le180 to state that the person at floor i waited for less than three minutes, and s>15 to state that the elevator stayed at some floor for more than fifteen seconds. A valuation \nu satisfies an atomic clock valuation x\sim c if and only if \nu(x)\sim c. A clock constraint is either a finite
conjunction Conjunction may refer to: * Conjunction (grammar), a part of speech * Logical conjunction, a mathematical operator ** Conjunction introduction, a rule of inference of propositional logic * Conjunction (astronomy), in which two astronomical bodies ...
of atomic clock constraint or is the constant "true" (which can be considered as the empty conjunction). A valuation \nu satisfies a clock constraint \bigwedge_^nx_i\sim_ic_i if it satisfies each atomic clock constraint x_i\sim_ic_i.


Diagonal constraint

Depending on the context, an atomic clock constraint may also be of the form x_i\sim x_j+c. Such a constraint is called a diagonal constraint, because x_1=x_2+c defines a diagonal line in \mathbb R_^2. Allowing diagonal constraints may allow to decrease the size of a formula or of an automaton used to describe a system. However, algorithm's complexity may increase when diagonal constraints are allowed. In most system using clocks, allowing diagonal constraint does not increase the expressivity of the logic. We now explain how to encode such constraint with Boolean variable and non-diagonal constraint. A diagonal constraint x_i\sim x_j+c may be simulated using non-diagonal constraint as follows. When x_j is reset, check whether x_i\sim c holds or not. Recall this information in a Boolean variable b_ and replace x_i\sim x_j+c by this variable. When x_i is reset, set b_ to true if \sim is < or ≤ or if \sim is = and c=0. The way to encode a Boolean variable depends on the system which uses the clock. For example,
UPPAAL UPPAAL is an integrated tool environment for modeling, validation and verification of real-time systems modeled as networks of timed automata, extended with data types (bounded integers, arrays etc.). It has been used in at least 17 case studie ...
supports Boolean variables directly. Timed automata and signal automata can encode a Boolean value in their locations. In
clock temporal logic A clock or a timepiece is a device used to measure and indicate time. The clock is one of the oldest human inventions, meeting the need to measure intervals of time shorter than the natural units such as the day, the lunar month and the ...
over timed words, the Boolean variable may be encoded using a new clock x_, whose value is 0 if and only if b_ is false. That is, x_ is reset as long as x_ is supposed to be false. In
timed propositional temporal logic In model checking, a field of computer science, timed propositional temporal logic (TPTL) is an extension of propositional linear temporal logic (LTL) in which variables are introduced to measure times between two events. For example, while LTL allo ...
, the formula x_i.\phi, which restart x_i and then evaluates \phi, can be replaced by the formula x_i.((x_i\sim x_j+c\implies\phi_\top)\land(\neg x_i\sim x_j+c\implies\phi\bot)), where \phi_\top and \phi_\bot are copies of the formulas \phi, where x_i\sim x_j+c are replaced by the true and false constant respectively.


Sets defined by clock constraints

A clock constraint defines a set of valuations. Two kinds of such sets are considered in the literature. A
zone Zone or The Zone may refer to: Places Climate and altitude zones * Death zone (originally the lethal zone), altitudes above a certain point where the amount of oxygen is insufficient to sustain human life for an extended time span * Frigid zone, ...
is a non-empty set of valuations satisfying a clock constraint. Zones and clock constraints are implemented using difference bound matrix. Given a model M, it uses a finite number of constants in its clock constraints. Let K be the greatest constant used. A
region In geography, regions, otherwise referred to as zones, lands or territories, are areas that are broadly divided by physical characteristics (physical geography), human impact characteristics (human geography), and the interaction of humanity and t ...
is a non-empty zone in which no constraint greater than K are used, and furthermore, such that it is minimal for the inclusion.


See also

*
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 ...
*
Signal automaton 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 ...
*
Clock temporal logic A clock or a timepiece is a device used to measure and indicate time. The clock is one of the oldest human inventions, meeting the need to measure intervals of time shorter than the natural units such as the day, the lunar month and the ...
*
Timed propositional temporal logic In model checking, a field of computer science, timed propositional temporal logic (TPTL) is an extension of propositional linear temporal logic (LTL) in which variables are introduced to measure times between two events. For example, while LTL allo ...


Notes

{{DEFAULTSORT:Model Checking Automata (computation) Model checking