Some more LTL content.
1 \documentclass[a4paper, pagesize, DIV=calc, smallheadings]{article}
3 %\usepackage[latin1]{inputenc}
4 \usepackage{amsmath, amsthm, amssymb, amsfonts, verbatim}
7 \usepackage{algorithmic}
9 %\usepackage[T1]{fontenc}
13 \renewcommand{\familydefault}{\sfdefault}
14 \title{\uppercase{\textbf{\Large{A}\large{lgorithmic} \Large{V}\large{erification of} \Large{R}\large{eactive} \Large{S}\large{ystems}}\\
18 \uppercase{{\small{E}\scriptsize{UGEN} \small{S}\scriptsize{AWIN}}\\
19 {\em \small{U}\scriptsize{NIVERSITY OF} \small{F}\scriptsize{REIBURG}}\\
20 %{\em \small{C}\scriptsize{omputer} \small{S}\scriptsize{cience} \small{D}\scriptsize{epartment}}\\
21 {\em \small{G}\scriptsize{ERMANY}}}\\
22 %\texttt{\footnotesize{sawine@informatik.uni-freiburg.de}}
24 \date{\textsc{\hfill}}
26 \theoremstyle{definition} %plain, definition, remark
27 \newtheorem*{def:finite words}{Finite words}
28 \newtheorem*{def:infinite words}{Infinite words}
29 \newtheorem*{def:regular languages}{Regular languages}
30 \newtheorem*{def:regular languages closure}{Regular closure}
31 \newtheorem*{def:omega regular languages}{$\omega$-regular languages}
32 \newtheorem*{def:omega regular languages closure}{$\omega$-regular closure}
33 \newtheorem*{def:buechi automata}{Automata}
34 \newtheorem*{def:automata runs}{Runs}
35 \newtheorem*{def:automata acceptance}{Acceptance}
36 \newtheorem*{def:vocabulary}{Vocabulary}
38 \newtheorem{prop:vocabulary sat}{Proposition}
44 %\renewcommand\abstractname{Abstract}
46 Over the past two decades, temporal logic has become a very basic tool for spec-
47 ifying properties of reactive systems. For finite-state systems, it is possible to use
48 techniques based on B\"uchi automata to verify if a system meets its specifications.
49 This is done by synthesizing an automaton which generates all possible models of
50 the given specification and then verifying if the given system refines this most gen-
51 eral automaton. In these notes, we present a self-contained introduction to the basic
52 techniques used for this automated verification. We also describe some recent space-
53 efficient techniques which work on-the-fly.
57 \section{Introduction}
58 Program verification is a fundamental area of study in computer science. The broad goal
59 is to verify whether a program is ``correct''--i.e., whether the implementation of a program
60 meets its specification. This is, in general, too ambitious a goal and several assumptions
61 have to be made in order to render the problem tractable. In these lectures, we will focus
62 on the verification of finite-state reactive programs. For specifying properties of programs,
63 we use linear time temporal logic.
65 What is a reactive program? The general pattern along which a conventional program
66 executes is the following: it accepts an input, performs some computation, and yields an
67 output. Thus, such a program can be viewed as an abstract function from an input domain
68 to an output domain whose behaviour consists of a transformation from initial states to
71 In contrast, a reactive program is not expected to terminate. As the name suggests, such
72 systems “react” to their environment on a continuous basis, responding appropriately to
73 each input. Examples of such systems include operating systems, schedulers, discrete-event
74 controllers etc. (Often, reactive systems are complex distributed programs, so concurrency
75 also has to be taken into account. We will not stress on this aspect in these lectures—we
76 take the view that a run of a distributed system can be represented as a sequence, by
77 arbitrarily interleaving concurrent actions.)
79 To specify the behaviour of a reactive system, we need a mechanism for talking about
80 the way the system evolves along potentially infinite computations. Temporal logic
81 has become a well-established formalism for this purpose. Many varieties of temporal logic
82 have been defined in the past twenty years—we focus on propositional linear time temporal
85 There is an intimate connection between models of LTL formulas and languages of
86 infinite words—the models of an LTL formula constitute an ω-regular language over an
87 appropriate alphabet. As a result, the satisfiability problem for LTL reduces to checking
88 for emptiness of ω-regular languages. This connection was first explicitly pointed out in.
90 \section{$\omega$-regular languages}
91 \begin{def:finite words}
92 Let $\Sigma$ be a non-empty set of symbols, called the alphabet. $\Sigma^*$ is the set of all \emph{finite} words over $\Sigma$. A \emph{finite} word $w \in \Sigma^*$ is a \emph{finite} sequence $v_0,...,v_{n-1}$ of symbols from alphabet $\Sigma$ with length $n = |w|$. $\varepsilon$ denotes the empty word with length $|\varepsilon| = 0$.
93 \end{def:finite words}
95 \begin{def:regular languages}
96 The class of regular languages is defined recursively over an alphabet $\Sigma$:
98 \item $\emptyset$ is regular
99 \item $\{\varepsilon\}$ is regular
100 \item $\forall_{a \in \Sigma}:\{a\}$ is regular
102 \end{def:regular languages}
104 \begin{def:regular languages closure}
105 Let $L_{R_1}, L_{R_2} \in \Sigma^*$ be regular. The class of regular languages is closed under following operations:
108 \item $L_{R_1} \circ L_{R_2}$
109 \item $L_{R_1} \cup L_{R_2}$
110 \item $L_{R_1} \cap L_{R_2}$
111 \item $\overline{L}_{R_1}$ and therefore $L_{R_1} - L_{R_2}$
113 \end{def:regular languages closure}
115 \begin{def:infinite words}
116 $\Sigma^\omega$ is the set of all \emph{infinite} words over $\Sigma$. An \emph{infinite} word $w \in \Sigma^\omega$ is an \emph{infinite} sequence $v_0,...,v_\infty$ with length $\infty$. To address the elements of the infinite sequence $w$, we view the word as a function $w : \mathbb{N}_0 \to \Sigma$ with $w(i) = v_i$; thus $w(i)$ denotes the symbol at sequence position $i$ of word $w$; another notation used for $w(i)$ is $w_i$.
117 \end{def:infinite words}
119 \begin{def:omega regular languages}
120 Set $L$ is an $\omega$-language over alphabet $\Sigma$ iff $L \subseteq \Sigma^\omega$. Let $L_R \subseteq \Sigma^*$ be a non-empty regular finite language and $\varepsilon \notin L_R$. A set $L$ is $\omega$-regular iff $L$ is an $\omega$-language and $L = L_R^\omega$.
121 \end{def:omega regular languages}
123 \begin{def:omega regular languages closure}
124 Let $L_{\omega_1}, L_{\omega_2} \subseteq \Sigma^\omega$ be $\omega$-regular languages. The class of $\omega$-regular languages is closed under following operations:
126 \item $L_R \circ L_{\omega_1}$, but \emph{not} $L_{\omega_1} \circ L_R$
127 \item $L_{\omega_1} \cup L_{\omega_2}$, but only \emph{finitely} many times
129 \end{def:omega regular languages closure}
132 \section{B\"uchi automata}
133 \begin{def:buechi automata}
134 A non-deterministic B\"uchi automaton is a tuple $A = (\Sigma, S, S_0, \Delta, F)$, where $\Sigma$ is a finite non-empty \emph{alphabet}, $S$ is a finite non-empty set of \emph{states}, $S_0 \subseteq S$ is the set of \emph{initial states}, $F \subseteq S$ is the set of \emph{accepting states} and $\Delta: S \times \Sigma \times S$ is a \emph{transition relation}. When suitable we will use the arrow notation for the transitions, where $s \xrightarrow{a} s' \iff (s, a, s') \in \Delta$.
136 A deterministic B\"uchi automaton is a specialisation where the \emph{transition relation} $\Delta$ is a \emph{transition function} $\delta: S \times \Sigma \to S$ and the set $S_0$ of \emph{initial states} contains only a single state $s_0$.
138 Within this text \emph{automata/automaton} will refer to non-deterministic B\"uchi automata/automaton, unless otherwise noted.
139 \end{def:buechi automata}
141 \begin{def:automata runs}
142 Let $A = (\Sigma, S, S_0, \Delta, F)$ be an automaton, a run $\rho$ of $A$ on an infinite word $w = a_0,a_1,...$ over alphabet $\Sigma$ is a sequence $\rho = s_0,s_1,...$, where $s_0 \in S_0$ and $(s_i, a_i, s_{i+1}) \in \Delta$, for all $i \geq 0$. Again we may view the run sequence as a function $\rho : \mathbb{N}_0 \to S$, where $\rho(i) = s_i$ denotes the state at the $i^{th}$ sequence position.
143 \end{def:automata runs}
145 \begin{def:automata acceptance}
146 Let $A = (\Sigma, S, S_0, \Delta, F)$ be an automaton and let $\rho$ be a run of $A$, we define $inf(\rho) = \{s \in S \mid \exists^\omega{n \in \mathbb{N}_0}: \rho(n) = s\}$, where $\exists^\omega$ denotes the existential quantifier for infinitely many occurances, i.e., $s$ occurs infinitely often in $\rho$.
148 The run $\rho$ is \emph{accepting}, iff $inf(\rho) \cap F \neq \emptyset$, i.e., there exists an \emph{accepting state} which occurs infinitely often in the run $\rho$. The automaton $A$ \emph{accepts} an input word $w$, iff there exists a run $\rho$ of $A$ on $w$, such that $\rho$ is \emph{accepting}. The language $L_\omega(A)$ recognised by automaton $A$ is the set of all infinite words accepted by $A$.
149 \end{def:automata acceptance}
151 \section{Linear temporal logic}
153 Let $P$ be the countable set of \emph{atomic propositions}. The \emph{alphabet} of the language $L_{LTL}(P)$ is $P \cup \{\neg, \lor, X, U\}$. We define the $L_{LTL}(P)$-\emph{formulae} $\varphi$ using following productions:
154 \[\varphi ::= p \in P \,|\, \neg \varphi \,|\, \varphi \lor \varphi \,|\, X \varphi \,|\, \varphi U \varphi\]
156 \subsection*{Interpretation}
157 The intuition should go as follows: $\neg$ and $\lor$ correspond to the Boolean \emph{negation} and \emph{disjunction}, the unary temporal operator $X$ reads as \emph{next} and the binary temporal operator $U$ reads as \emph{until}.
159 LTL is interpreted over \emph{computation paths}, where a computation corrensponds to a model over a \emph{Kripke-frame} constructed by the order of natural numbers.
161 \subsection*{Semantics}
162 A \emph{model} is a function $M: \mathbb{N}_0 \to 2^P$ over \emph{frame} $F$. The frame constitutes a linear order over $\mathbb{N}_0$, which corresponds to the linear temporal progression from \emph{now/before} to \emph{later}. Therefore $M(i)$ assigns a set of \emph{positive atomic propositions} to each state of time instant $i$. Intuitively we say $p \in P$ is \emph{true} at time instant $i$, iff $p \in M(i)$.
164 A model $M$ \emph{satisfies} an LTL-formula $\varphi$ at time instant $i$ is denoted by $M,i \models \varphi$. Satisfaction of a formula $\varphi$ is defined inductively over the structure of $\varphi$:
166 \item $M,i \models p$ for $p \in P$ iff $p \in M(i)$
167 \item $M,i \models \neg \varphi$ iff not $M,i \models \varphi$
168 \item $M,i \models \varphi \lor \psi$ iff $M,i \models \varphi$ or $M,i \models \psi$
169 \item $M,i \models X \varphi$ iff $M,i+1 \models \varphi$
170 \item $M,i \models \varphi U \psi$ iff $\exists{k \geq i}: M,k \models \psi$ and $\forall{i \leq j < k}: M,j \models\varphi$
173 \begin{def:vocabulary}
174 Let $\varphi$ be a LTL-formula over atomic propositions $P$, we define the \emph{vocabulary} $Voc(\varphi)$ of $\varphi$ inductively:
176 \item $Voc(p) = \{p\}$ for $p \in P$
177 \item $Voc(\neg \varphi) = Voc(\varphi)$
178 \item $Voc(\varphi \lor \psi) = Voc(\varphi) \cup Voc(\psi)$
179 \item $Voc(X \varphi) = Voc(\varphi)$
180 \item $Voc(\varphi U \psi) = Voc(\varphi) \cup Voc(\psi)$
182 Let $M$ be a model and $\varphi$ a LTL-formula, we define model $M_{Voc(\varphi)}$:
183 \[\forall{i \in \mathbb{N}}: M_{Voc(\varphi)} = M(i) \cap Voc(\varphi)\]
186 \begin{prop:vocabulary sat}
187 Let $M$ be a model and $\varphi$ a LTL-formula, then following holds:
188 \[\forall{i \in \mathbb{N}}: M,i \models \varphi \iff M_{Voc(\varphi)},i \models \varphi\]
189 \end{prop:vocabulary sat}
191 \section{Model checking}
192 \begin{thebibliography}{99}
193 \bibitem{ref:ltl&büchi}
194 \uppercase{M{\footnotesize adhavan} M{\footnotesize ukund}.}
195 {\em Linear-Time Temporal Logic and B\"uchi Automata}.
196 Winter School on Logic and Computer Science, Indian Statistical Institute, Calcutta, 1997.
198 \bibitem{ref:handbook}
199 \uppercase{P{\footnotesize atrick} B{\footnotesize lackburn},
200 F{\footnotesize rank} W{\footnotesize olter and} J{\footnotesize ohan van} B{\footnotesize enthem}.}
201 {\em Handbook of Modal Logic (Studies in Logic and Practical Reasoning)}.
202 3rd Edition, Elsevier, Amsterdam, 2007.
204 \bibitem{ref:infpaths}
205 \uppercase{P{\footnotesize ierre} W{\footnotesize olper},
206 M{\footnotesize oshe} Y. V{\footnotesize ardi and}
207 A. P{\footnotesize rasad} S{\footnotesize istla}.}
208 {\em Reasoning about Infinite Computation Paths}.
209 In Proceedings of the 24th IEEE FOCS, 1983.
211 \end{thebibliography}