Linear Time Property
   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 syst ...
, a branch of
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, linear time properties are used to describe requirements of a model of a
computer system A computer is a machine that can be programmed to automatically carry out sequences of arithmetic or logical operations (''computation''). Modern digital electronic computers can perform generic sets of operations known as ''programs'', wh ...
. Example properties include "the vending machine does not dispense a drink until money has been entered" (a safety property) or "the computer program eventually terminates" (a liveness property). Fairness properties can be used to rule out unrealistic paths of a model. For instance, in a model of two traffic lights, the liveness property "both traffic lights are green infinitely often" may only be true under the unconditional fairness constraint "each traffic light changes colour infinitely often" (to exclude the case where one traffic light is "infinitely faster" than the other). Formally, a linear time property is an
ω-language In formal language theory within theoretical computer science, an infinite word is an infinite-length sequence (specifically, an ω-length sequence) of symbols, and an ω-language is a set of infinite words. Here, ω refers to the first infinite o ...
over the
power set In mathematics, the power set (or powerset) of a set is the set of all subsets of , including the empty set and itself. In axiomatic set theory (as developed, for example, in the ZFC axioms), the existence of the power set of any set is po ...
of "atomic propositions". That is, the property contains sequences of sets of propositions, each sequence known as a "word". Every property can be rewritten as "''P'' and ''Q'' both occur" for some safety property ''P'' and liveness property ''Q''. An invariant for a system is something that is true or false for a particular state. Invariant properties describe an invariant that every reachable state of a model must satisfy, while persistence properties are of the form "eventually forever some invariant holds".
Temporal logic In logic, temporal logic is any system of rules and symbolism for representing, and reasoning about, propositions qualified in terms of time (for example, "I am ''always'' hungry", "I will ''eventually'' be hungry", or "I will be hungry ''until'' I ...
s such as
linear temporal logic In logic, linear temporal logic or linear-time temporal logic (LTL) is a modal logic, modal temporal logic with modalities referring to time. In LTL, one can encode formula (logic), formulae about the future of path (graph theory), paths, e.g., a c ...
describe types of linear time properties using formulae. This article is about
propositional A proposition is a statement that can be either true or false. It is a central concept in the philosophy of language, semantics, logic, and related fields. Propositions are the object s denoted by declarative sentences; for example, "The sky ...
linear-time properties and cannot handle predicates about program states, so it cannot define a property like: ''the current value of y determines the number of times that x toggles between 0 and 1 before termination.'' The more general formalism used in
Safety and liveness properties Properties of an execution of a computer program—particularly for concurrent and distributed systems—have long been formulated by giving safety properties ("bad things don't happen") and liveness properties ("good things do happen"). A progra ...
can handle this.


Definition

Let ''AP'' be a set of atomic propositions. A word over 2^ (the
power set In mathematics, the power set (or powerset) of a set is the set of all subsets of , including the empty set and itself. In axiomatic set theory (as developed, for example, in the ZFC axioms), the existence of the power set of any set is po ...
of ''AP'') is an infinite sequence of sets of propositions, such as w:=\\\empty \^\omega (for the atomic propositions AP=\). A linear time (LT) property over ''AP'' is a subset of (2^)^\omega i.e. a set of words. An example of an LT property over the set \ is "the set of words that contain ''a'' infinitely often". The word ''w'' is in this set, because ''a'' is contained in \, which occurs infinitely often. A word not in this set is x:=\(\\empty)^\omega, as ''a'' only occurs once (in the first set). An LT property is an
ω-language In formal language theory within theoretical computer science, an infinite word is an infinite-length sequence (specifically, an ω-length sequence) of symbols, and an ω-language is a set of infinite words. Here, ω refers to the first infinite o ...
over the alphabet \Sigma=2^ (and vice versa). We denote by ''pref''(''w'') the finite prefixes of ''w'' (i.e. \ in the above case). The closure of an LT property ''P'' is: :\mathit(P):=\


Applications

Using the theory of
finite-state machine A finite-state machine (FSM) or finite-state automaton (FSA, plural: ''automata''), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number o ...
s, a program or computer system can be modelled by a
Kripke structure A Kripke structure is a variation of the transition system, originally proposed by Saul Kripke, used in model checking to represent the behavior of a system. It consists of a graph whose nodes represent the reachable states of the system and whose ...
. LT properties then describe restrictions on the traces (outputs) of a Kripke structure. For instance, if two
traffic light Traffic lights, traffic signals, or stoplights – also known as robots in South Africa, Zambia, and Namibia – are signaling devices positioned at intersection (road), road intersections, pedestrian crossings, and other locations in order t ...
s at an intersection are represented by a Kripke structure then the atomic propositions may be the possible colours of each light and it may be desirable that the traces satisfy the LT property "the traffic lights cannot both be green at the same time" (to avoid car collisions). If every trace of the Kripke structure ''TS'' is a trace of ''TS'' then every LT property that ''TS'' satisfies is satisfied by ''TS''. This is useful in model checking to allow abstraction: if a simplified model of the system satisfies an LT property then the actual model of the system will satisfy it as well.


Classification of linear time properties


Safety properties

A safety property is informally of the form "a bad thing does not happen". For instance, if a system models an
automated teller machine An automated teller machine (ATM) is an electronic telecommunications device that enables customers of financial institutions to perform financial transactions, such as cash withdrawals, deposits, funds transfers, balance inquiries or account ...
(ATM) then such a property is "money should not be dispensed unless a PIN has been entered". Formally, a safety property is an LT property such that any word that violates the property has a "bad prefix", for which no word with that prefix satisfies the property. That is, :\forall \sigma\in (2^)^\omega\setminus P\ \exists \text\ \hat \sigma: P\cap \ =\empty In the ATM example, a ''minimal'' bad prefix is a finite set of steps carried out in which money is dispensed in the last step and a PIN is not entered at any step. To verify a safety property, it is sufficient to consider only the finite traces of a Kripke structure and check whether any such trace is a bad prefix. An LT property ''P'' is a safety property if and only if \mathit(P)=P.


Invariant properties

An invariant property is a type of safety property in which the condition only refers to the current state. For instance, the ATM example is not an invariant because we cannot tell whether the property is violated by seeing that the current state is "dispense money", only by seeing that the current state is "dispense money" and no previous state was "read PIN". An example of an invariant is the traffic light condition "the traffic lights cannot both be green at the same time" above. Another is "the variable ''x'' is never negative", in a model of a computer program. Formally, an invariant is of the form: :P=\ for some
propositional logic The propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. Sometimes, it is called ''first-order'' propositional logic to contra ...
formula \Phi. A Kripke structure satisfies an invariant if and only if every reachable state satisfies the invariant, which can be checked by a
breadth-first search Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next dept ...
or
depth-first search Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible al ...
. Safety properties can be verified inductively using invariants.


Liveness properties

A liveness property is informally of the form "something good eventually happens". Formally, ''P'' is a liveness property if \mathit(P)=(2^)^* i.e. any finite string can be continued to a valid trace. An example of a liveness property is the previous LT property "the set of words that contain ''a'' infinitely often". No finite prefix of a word can prove that the word does not satisfy this property, as the word could continue on to have infinitely many ''a''s. In terms of computer programs, useful liveness properties include "the program eventually terminates" and, in
concurrent computing Concurrent computing is a form of computing in which several computations are executed '' concurrently''—during overlapping time periods—instead of ''sequentially—''with one completing before the next starts. This is a property of a syst ...
, "every
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management * Business process, activities that produce a specific s ...
must eventually be served".


Persistence properties

A persistence property is a liveness property of the form "eventually forever \Phi". That is, a property of the form: :P=\


Relation between safety and liveness properties

No LT property other than (2^)^\omega (the set of all words over 2^) is both a safety and a liveness property. Though not every property is a safety property or a liveness property (consider "''a'' occurs exactly once"), every property is the intersection of a safety and a liveness property. In
topology Topology (from the Greek language, Greek words , and ) is the branch of mathematics concerned with the properties of a Mathematical object, geometric object that are preserved under Continuous function, continuous Deformation theory, deformat ...
, the set of all words (2^)^\omega can be equipped with the
metric Metric or metrical may refer to: Measuring * Metric system, an internationally adopted decimal system of measurement * An adjective indicating relation to measurement in general, or a noun describing a specific type of measurement Mathematics ...
: :d(w,x):=\inf \ Then a safety property is a
closed set In geometry, topology, and related branches of mathematics, a closed set is a Set (mathematics), set whose complement (set theory), complement is an open set. In a topological space, a closed set can be defined as a set which contains all its lim ...
and a liveness property is a
dense set In topology and related areas of mathematics, a subset ''A'' of a topological space ''X'' is said to be dense in ''X'' if every point of ''X'' either belongs to ''A'' or else is arbitrarily "close" to a member of ''A'' — for instance, the ...
.


Fairness properties

Fairness properties are
precondition In computer programming, a precondition is a condition or predicate that must always be true just prior to the execution of some section of code or before an operation in a formal specification. If a precondition is violated, the effect of the ...
s imposed on a system to rule out unrealistic traces. Unconditional fairness is of the form "every process gets its turn infinitely often". Strong fairness is of the form "every process gets its turn infinitely often if it is enabled infinitely often". Weak fairness is of the form "every process gets its turn infinitely often if it is continuously enabled from a particular point". In some systems, a fairness constraint is defined by a set of states, and a "fair path" is one that passes through some state in the fairness constraint infinitely often. If there are multiple fairness constraints, then a fair path must pass infinitely often through one state per constraint. A program "fairly satisfies" an LT property ''P'' with respect to a set of fairness conditions if for every path, either the path fails a fairness condition or it satisfies ''P''. That is, the property ''P'' is satisfied for all fair paths. A fairness property is realizable for a Kripke structure if every reachable state has a fair path starting from that state. So long as a set of fairness conditions are realizable, they are irrelevant to safety properties.


Temporal logic

Temporal logic In logic, temporal logic is any system of rules and symbolism for representing, and reasoning about, propositions qualified in terms of time (for example, "I am ''always'' hungry", "I will ''eventually'' be hungry", or "I will be hungry ''until'' I ...
s such as
computation tree logic Computation tree logic (CTL) is a branching-time logic, meaning that its model of time is a tree-like structure in which the future is not determined; there are different paths in the future, any one of which might be an actual path that is reali ...
(CTL) can be used to specify some LT properties. All
linear temporal logic In logic, linear temporal logic or linear-time temporal logic (LTL) is a modal logic, modal temporal logic with modalities referring to time. In LTL, one can encode formula (logic), formulae about the future of path (graph theory), paths, e.g., a c ...
(LTL) formulae are LT properties. By a counting argument, we see that any logic in which each formula is a finite string cannot represent all LT properties, as there must be countably many formulae but there are uncountably many LT properties.


Notes


References

* * * * * *


Further reading

* * {{cite book , last=Pnueli , first=Amir , author-link=Amir Pnueli , year=1986 , chapter=Applications of temporal logic to the specification and verification of reactive systems: A survey of current trends , title=Current Trends in Concurrency , editor1= J. W. Bakker , editor2= W.-P. Roever, editor3= G. Rozenberg , publisher = Springer , series=Lecture Notes in Computer Science , volume=224 , pages=510–584, doi=10.1007/BFb0027047 , isbn=978-3-540-16488-3 Model checking