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
clocks
, such that the value of the clock
is the time someone had wait for the elevator at floor
. This clock is started when someone calls the elevator on floor
(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
. In this example, we actually need ten distinct clocks because we need to track ten independent events. Another clock
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
is always smaller than fifteen seconds, each clock
is turned off before it reaches three minutes.
Definition
Formally, a set
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
over
is usually defined as a function from
to the set of non-negative real. Equivalently, a valuation can be considered as a point in
.
The initial assignment
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
, and a real
,
denotes the clock assignment sending each clock
to
. Intuitively, it represents the valuation
after which
time units passed.
Given a subset
of clocks,