Notes.
1 \documentclass[9pt]{beamer}
5 \usecolortheme{dolphin}
6 %\usecolortheme{seagull}
8 \usepackage{amsmath, amsthm, amssymb, amsfonts, verbatim}
14 \usetikzlibrary{automata}
15 \usepackage{subfigure}
17 \renewcommand{\emph}{\textit}
18 \renewcommand{\em}{\it}
20 \newcommand{\cross}{\ding{55}}
21 \newcommand{\M}{\mathcal{M}}
22 \newcommand{\N}{\mathbb{N}_0}
23 \newcommand{\F}{\mathcal{F}}
24 \newcommand{\Fs}{\mathbb{F}}
25 \newcommand{\Prop}{\mathcal{P}}
26 \newcommand{\A}{\mathcal{A}}
27 \newcommand{\X}{\mathcal{X}}
28 \newcommand{\U}{\mathcal{U}}
29 \newcommand{\V}{\mathcal{V}}
30 \newcommand{\dnf}{\mathsf{dnf}}
31 \newcommand{\consq}{\mathsf{consq}}
33 \theoremstyle{definition} %plain, definition, remark, proof, corollary
34 \newtheorem*{def:finite words}{Finite words}
35 \newtheorem*{def:infinite words}{Infinite words}
36 \newtheorem*{def:regular languages}{Regular languages}
37 \newtheorem*{def:regular languages closure}{Regular closure}
38 \newtheorem*{def:omega regular languages}{$\omega$-regular languages}
39 \newtheorem*{def:omega regular languages closure}{$\omega$-regular closure}
40 \newtheorem*{def:buechi automata}{Automaton}
41 \newtheorem*{def:automata runs}{Run}
42 \newtheorem*{def:inf}{Infinite occurrences}
43 \newtheorem*{def:automata acceptance}{Acceptance}
44 \newtheorem*{def:automata language}{Recognised language}
45 \newtheorem*{def:general automata}{Generalised automaton}
46 \newtheorem*{def:general acceptance}{Acceptance}
47 \newtheorem*{def:syntax}{Syntax}
50 \newtheorem*{def:vocabulary}{Vocabulary}
51 \newtheorem*{def:frames}{Frame}
52 \newtheorem*{def:models}{Model}
53 \newtheorem*{def:satisfiability}{Satisfiability}
54 \newtheorem*{def:fs closure}{Closure}
55 \newtheorem*{def:atoms}{Atoms}
56 \newtheorem*{def:rep function}{Representation function}
57 \newtheorem*{def:next}{Next function}
58 \newtheorem*{def:dnf}{Disjunctive normal form}
59 \newtheorem*{def:positive formulae}{Positive formulae}
60 \newtheorem*{def:consq}{Logical consequences}
61 \newtheorem*{def:partial automata}{Partial automata}
64 \newtheorem{prop:vocabulary sat}{Proposition}[section]
65 \newtheorem{prop:general equiv}{Proposition}[section]
66 \newtheorem{prop:computation set=language}{Proposition}[section]
69 \newtheorem{thm:model language}{Theorem}[section]
70 \newtheorem{cor:mod=model language}{Corollary}[thm:model language]
71 \newtheorem{cor:mod=program language}[cor:mod=model language]{Corollary}
72 \newtheorem{thm:model checking}{Theorem}[section]
73 \newtheorem{lem:dnf}{Lemma}[section]
74 \newtheorem{lem:consq}[lem:dnf]{Lemma}
76 \title[Algorithmic Verification]{Algorithmic Verification of Reactive Systems}
78 \institute[University of Freiburg]
80 Research Group for Foundations in Artificial Intelligence\\
81 Computer Science Department\\
82 University of Freiburg
84 \date[SS 2011]{Seminar: Automata Constructions in Model Checking}
85 \subject{Model Checking}
91 \frametitle{Motivation}
92 \framesubtitle{Model Checking}
94 %\only<1>{\colorbox{black}{\makebox(35,10){\color{white} $\M \models \varphi$}}}
95 \only<1>{\[\M \models \varphi\]}
96 \only<2->{Given a program $P$ and specification $\varphi$:\\
97 \colorbox{black}{\makebox(150,10){\color{white} does every run of $P$ satisfy $\varphi$?}}}
102 \frametitle{Motivation}
105 \subfigure{\includegraphics[width=100pt,height=70pt]{images/intel.jpg}}
106 \subfigure{\includegraphics[width=100pt,height=70pt]{images/airbag.jpg}}
107 \subfigure{\includegraphics[width=100pt,height=70pt]{images/atc.jpg}}
112 \frametitle{Infinity}
113 \framesubtitle{Word as function}
116 \begin{tikzpicture}[shorten >=1pt, node distance=1.5cm, semithick, >=stealth
117 ,accepting/.style={fill, gray!50!black, text=white}]
118 \node[state, initial, initial text=] (s_0) {$a$};
119 \node[state] (s_1) [right of= s_0] {$b$};
120 \node[state] (s_2) [right of= s_1] {$a$};
121 \node[state] (s_i) [right of= s_2] {$a$};
123 (s_0) edge node {} (s_1)
124 (s_1) edge node {} (s_2);
126 (s_2) edge node {} (s_i);
132 \frametitle{Automata}
133 \framesubtitle{Example 1/2}
137 \begin{tikzpicture}[shorten >=1pt, node distance=2cm, auto, semithick, >=stealth
138 %every state/.style={fill, draw=none, gray, text=white},
139 ,accepting/.style={fill, gray!50!black, text=white}
140 %initial/.style ={gray, text=white}]%, thick]
142 \node[state,initial, initial text=] (q_0) {$q_0$};
143 \node[state] (q_1) [above right of= q_0] {$q_1$};
144 \node[state,accepting](q_2) [below right of= q_1] {$q_2$};
146 (q_0) edge node {$a$} (q_1)
147 edge [loop above] node {$b$} ()
148 (q_1) edge node {$b$} (q_2)
149 edge [loop above] node {$a$} ()
150 (q_2) %edge node {$a$} (q_1)
151 edge node {$b$} (q_0);
152 \draw[->] (q_2) .. controls +(up:1cm) and +(right:1cm) .. node[above] {$a$} (q_1);
155 \visible<2-3>{$w_1 = \overline{bbaa} \implies \rho_1 = q_0q_0\overline{q_0q_1q_1q_2}$}\\
156 \visible<3>{$w_2 = bb\overline{ab} \implies \rho_2 = q_0q_0\overline{q_1q_2}$}\\
158 \visible<4>{Accepts all inputs with infinite occurrences of $ab$.}
162 \begin{tikzpicture}[shorten >=1pt, node distance=2cm, auto, semithick, >=stealth
163 %every state/.style={fill, draw=none, gray, text=white},
164 ,accepting/.style={fill, gray!50!black, text=white}
165 %initial/.style ={gray, text=white}]%, thick]
167 \node[state,initial, initial text=] (q_0) {$q_0$};
168 \node[state] (q_1) [above right of= q_0] {$q_1$};
169 \node[state,accepting](q_2) [below right of= q_1] {$q_2$};
172 edge [loop above] node {$b$} ()
174 edge [loop above] node {$a$} ()
175 (q_2) %edge node {$a$} (q_1)
176 edge node {$b$} (q_0);
179 (q_0) edge node {$a$} (q_1)
180 (q_1) edge node {$b$} (q_2);
181 \draw[->] (q_2) .. controls +(up:1cm) and +(right:1cm) .. node[above] {$a$} (q_1);
185 \visible<2->{$w_1 = \overline{\textcolor{green}{b}ba\textcolor{green}{a}} \implies \rho_1 = q_0q_0\overline{q_0q_1q_1\textcolor{green}{q_2}}$}\\
186 \visible<3->{$w_2 = bb\overline{\textcolor{green}{ab}} \implies \rho_2 = q_0q_0\overline{q_1\textcolor{green}{q_2}}$}\\
188 \visible<4>{Accepts all inputs with infinite occurrences of $ab$.}
195 \frametitle{Automata}
196 \framesubtitle{Example 2/2 (Complement)}
202 \begin{tikzpicture}[shorten >=1pt, node distance=2cm, auto, semithick, >=stealth
203 %every state/.style={fill, draw=none, gray, text=white},
204 ,accepting/.style={fill, gray!50!black, text=white}
205 %initial/.style ={gray, text=white}]%, thick]
207 \node[state,initial, initial text=, accepting] (q_0) {$q_0$};
208 \node[state, accepting] (q_1) [above right of= q_0] {$q_1$};
209 \node[state](q_2) [below right of= q_1] {$q_2$};
211 (q_0) edge node {$a$} (q_1)
212 edge [loop above] node {$b$} ()
213 (q_1) edge node {$b$} (q_2)
214 edge [loop above] node {$a$} ()
215 (q_2) %edge node {$a$} (q_1)
216 edge node {$b$} (q_0);
217 \draw[->] (q_2) .. controls +(up:1cm) and +(right:1cm) .. node[above] {$a$} (q_1);
224 \begin{tikzpicture}[shorten >=1pt, node distance=2cm, auto, semithick, >=stealth
225 %every state/.style={fill, draw=none, gray, text=white},
226 ,accepting/.style={fill, gray!50!black, text=white}
227 %initial/.style ={gray, text=white}]%, thick]
229 \node[state,initial, initial text=, accepting] (q_0) {$q_0$};
230 \node[state, accepting] (q_1) [above right of= q_0] {$q_1$};
231 \node[state](q_2) [below right of= q_1] {$q_2$};
234 edge [loop above] node {$b$} ()
236 edge [loop above] node {$a$} ();
239 (q_0) edge node {$a$} (q_1)
240 (q_1) edge node {$b$} (q_2)
241 (q_2) edge node {$b$} (q_0);
242 \draw[->] (q_2) .. controls +(up:1cm) and +(right:1cm) .. node[above] {$a$} (q_1);
243 \end{tikzpicture} \color{red}
247 \only<3->{ \setcounter{subfigure}{0}
248 \subfigure[Complement automaton \cross]
250 \begin{tikzpicture}[shorten >=1pt, node distance=2cm, auto, semithick, >=stealth
251 %every state/.style={fill, draw=none, gray, text=white},
252 ,accepting/.style={fill, gray!50!black, text=white}
253 %initial/.style ={gray, text=white}]%, thick]
255 \node[state,initial, initial text=, accepting] (q_0) {$q_0$};
256 \node[state, accepting] (q_1) [above right of= q_0] {$q_1$};
257 \node[state](q_2) [below right of= q_1] {$q_2$};
260 edge [loop above] node {$b$} ()
262 edge [loop above] node {$a$} ();
264 (q_0) edge node {$a$} (q_1)
265 (q_1) edge node {$b$} (q_2)
266 (q_2) edge node {$b$} (q_0);
267 \draw[->] (q_2) .. controls +(up:1cm) and +(right:1cm) .. node[above] {$a$} (q_1);
268 \end{tikzpicture} \color{red}
274 \subfigure[Complement automaton \checkmark]
276 \label{fig:complement automaton}
277 \begin{tikzpicture}[shorten >=1pt, node distance=2cm, auto, semithick, >=stealth
278 ,accepting/.style={fill, gray!50!black, text=white}]
279 \node[state, initial, initial text=] (q_0) {$q_0$};
280 \node[state, accepting] (q_1) [above right of= q_0] {$q_1$};
281 \node[state, accepting](q_2) [below right of= q_1] {$q_2$};
283 (q_0) edge node {$a$} (q_1)
284 edge node {$b$} (q_2)
285 edge [loop above] node {$a, b$} ()
286 (q_1) edge [loop above] node {$a$} ()
288 edge [loop above] node {$b$} ();
289 \end{tikzpicture}\color{green}
293 Accepts all inputs with finite many $ab$.
295 %\caption{Automata from Example \ref{ex:automaton}}
301 \frametitle{Automata}
302 \framesubtitle{Definition}
303 \begin{def:buechi automata}
304 A non-deterministic B\"uchi automaton is a tuple $\A = (\Sigma, S, S_0, \Delta, F)$ with:
306 \item $\Sigma$ is a finite \emph{alphabet}.
307 \item $S$ is a finite set of \emph{states}.
308 \item $S_0 \subseteq S$ is the set of \emph{initial states}.
309 \item $\Delta: S \times \Sigma \times S$ is a \emph{transition relation}.
310 \item $F \subseteq S$ is the set of \emph{accepting states}.
312 \end{def:buechi automata}
316 \frametitle{Automata}
318 \begin{def:automata runs}
319 Let $\A = (\Sigma, S, S_0, \Delta, F)$ be an automaton:
321 \item A run $\rho$ of $\A$ on an infinite word $w = a_0,a_1,...$ is a sequence $\rho = s_0,s_1,...$:
324 \item $(s_i, a_i, s_{i+1}) \in \Delta$, for all $i \geq 0$.
326 \item Alternative view of a run $\rho$ as a function $\rho : \N \to S$, with $\rho(i) = s_i$.
328 \end{def:automata runs}
329 \visible<2->{\[w_1 = \overline{\textcolor{green}{b}ba\textcolor{green}{a}} \implies \rho_1 = q_0q_0\overline{q_0q_1q_1\textcolor{green}{q_2}}\]
330 \[w_2 = bb\overline{\textcolor{green}{ab}} \implies \rho_2 = q_0q_0\overline{q_1\textcolor{green}{q_2}}\]}
334 \frametitle{Automata}
335 \framesubtitle{Acceptance}
337 Let $\A = (\Sigma, S, S_0, \Delta, F)$ be an automaton and let $\rho$ be a run of $\A$:
339 \item $\exists^\omega$ denotes the existential quantifier for \emph{infinitely} many occurrences.
340 \item $inf(\rho) = \{s \in S \mid \exists^\omega{n \in \N}: \rho(n) = s\}$.
344 \begin{def:automata acceptance}
345 Let $\A = (\Sigma, S, S_0, \Delta, F)$ be an automaton and let $\rho$ be a run of $\A$:
347 \item $\rho$ is \emph{accepting} iff $inf(\rho) \cap F \neq \emptyset$.
348 \item $\A$ \emph{accepts} an input word $w$ iff there exists a run $\rho$ of $\A$ on $w$, such that $\rho$ is accepting.
350 \end{def:automata acceptance}
354 \frametitle{Automata}
355 \framesubtitle{Language}
356 \begin{def:automata language}
357 Let $\A = (\Sigma, S, S_0, \Delta, F)$ be an automaton:
359 \item $L_\omega(\A) = \{w \in \Sigma^\omega \mid \A \text{ accepts } w\}$, we say $\A$ recognises language $L_\omega(\A)$.
360 \item Language $L$ is \emph{B\"uchi-recognisable} iff there is an automaton $\A$ with $L = L_\omega(\A)$.
362 \end{def:automata language}
366 \frametitle{Generalised Automata}
367 \begin{def:general automata}
368 A \emph{generalised B\"uchi automaton} is a tuple $\A_G = (\Sigma, S, S_0, \Delta, \{F_i\}_{i<k})$:
370 \item $\{F_i\}$ is a finite set of sets for a given $k$.
371 \item Each $F_i \subseteq S$ is a finite set of accepting states.
373 \end{def:general automata}
375 \begin{def:general acceptance}
376 Let $\A_G = (\Sigma, S, S_0, \Delta, \{F_i\}_{i<k})$ be a generalised automaton and let $\rho$ be a run of $\A_G$:
378 \item $\rho$ is \emph{accepting} iff $\forall{i < k}: inf(\rho) \cap F_i \neq \emptyset$.
379 \item $\A_G$ \emph{accepts} an input word $w$ iff there exists a run $\rho$ of $\A_G$ on $w$, such that $\rho$ is accepting.
381 \end{def:general acceptance}
383 \begin{prop:general equiv}
384 Let $\A_G = (\Sigma, S, S_0, \Delta, \{F_i\}_{i < k})$ be a generalised automaton and let $\A_i = (\Sigma, S, S_0, \Delta, F_i)$ be non-deterministic automata:
385 \[L_\omega(\A_G) = \bigcap_{i < k} L_\omega(\A_i)\]
386 \end{prop:general equiv}
390 \setbeamercolor{normal text}{bg=black, fg=white}
391 \setbeamercolor{frametitle}{fg=white!30!black}
392 \usebeamercolor*{normal text}
393 \usebeamercolor*{frametitle}
395 \frametitle{Linear Temporal Logic}
396 \framesubtitle{Motivation 1/2}
399 \visible<2->{``It is \emph{always} dark.''\\}
400 \visible<3->{``It is \emph{currently} dark.''\\}
401 \visible<4->{``It will \emph{eventually} be dark.''\\}
402 \visible<5->{``It is dark \emph{until} someone puts the light on.''}
408 \frametitle{Linear Temporal Logic}
409 \framesubtitle{Motivation 2/2}
413 \colorbox{black}{\makebox(50,10){It is dark}} \colorbox{orange}{\makebox(30,10){until}} \colorbox{black!30}{\makebox(50,10){there is light}}\\
415 \colorbox{black}{\makebox(50,10){$p_0$}} \colorbox{orange}{\makebox(30,10){$\U$}} \colorbox{black!30}{\makebox(50,10){$p_1$}}}
421 \frametitle{Linear Temporal Logic}
422 \framesubtitle{Syntax}
424 Let $\Prop$ be the countable set of \emph{atomic propositions}, LTL-formulae $\varphi$ are defined using following productions:
425 \[\varphi ::= p \in \Prop \,|\, \neg \varphi \,|\, \varphi \lor \varphi \,|\, \X \varphi \,|\, \varphi \U \varphi\]
427 \item $\neg, \lor$ corresponds to the Boolean \emph{negation} and \emph{disjunction}.
428 \item $\X$ reads \emph{next}.
429 \item $\U$ reads \emph{until}.
435 \frametitle{Linear Temporal Logic}
436 \framesubtitle{Semantics}
438 An LTL-\emph{frame} is a tuple $\F = (S, R)$:
440 \item $S = \{s_i \mid i \in \N\}$ is the set of states.
441 \item $R = \{(s_i, s_{i+1}) \mid i \in \N\}$ is the accessibility relation.
446 An LTL-\emph{model} is a tuple $\M = (\F, V)$:
448 \item $\F$ is a \emph{frame}.
449 \item $V: S \to 2^\Prop$ is a \emph{valuation function}.
450 \item Intuitively we say $p \in \Prop$ is \emph{true} at time instant $i$ iff $p \in V(i)$.
456 \frametitle{Linear Temporal Logic}
457 \framesubtitle{Model Example}
460 \begin{tikzpicture}[shorten >=1pt, node distance=2.5cm, auto, semithick, >=stealth
461 ,accepting/.style={fill, gray!50!black, text=white}]
462 \node[state, initial, initial text=] (s_0) {$\{p_0\}$};
463 \path (s_0) [late options={label=below:$s_0$}];
464 \node[state] (s_1) [right of= s_0] {$\{p_0, p_2\}$};
465 \path (s_1) [late options={label=below:$s_1$}];
466 \node[state] (s_2) [right of= s_1] {$\{p_1\}$};
467 \path (s_2) [late options={label=below:$s_2$}];
468 \node[state] (s_i) [right of= s_2] {$\{p_1\}$};
469 \path (s_i) [late options={label=below:$s_i$}];
471 (s_0) edge node {$R$} (s_1)
472 (s_1) edge node {$R$} (s_2);
474 (s_2) edge node {$R$} (s_i);
480 \frametitle{Linear Temporal Logic}
481 \framesubtitle{Satisfiability}
482 \begin{def:satisfiability}
483 A model $\M = (\F, V)$ \emph{satisfies} a formula $\varphi$ at time instant $i$ is denoted by $\M,i \models \varphi$:
485 \item $\M,i \models p$ for $p \in \Prop \iff p \in V(i)$
486 \item $\M,i \models \neg \varphi \iff$ not $\M,i \models \varphi$
487 \item $\M,i \models \varphi \lor \psi \iff \M,i \models \varphi$ or $\M,i \models \psi$
488 \item $\M,i \models \X \varphi \iff \M,i+1 \models \varphi$
489 \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$
491 \end{def:satisfiability}
495 \frametitle{Model Checking}
496 \framesubtitle{Definition 1/2}
498 %\only<1>{\colorbox{black}{\makebox(35,10){\color{white} $\M \models \varphi$}}}
499 \only<1>{\[\M \models \varphi\]}
500 \only<2->{Given a program $P$ and specification $\varphi$:\\
501 \colorbox{black}{\makebox(150,10){\color{white} does every run of $P$ satisfy $\varphi$?}}}
506 \frametitle{Model Checking}
507 \framesubtitle{Definition 2/2}
508 \begin{thm:model checking}
509 \label{thm:model checking}
510 Let $\A_P$ be the automaton for program $P$ and let $\A_\varphi$ be the automaton for formula $\varphi$.\\
511 P satisfies $\varphi$ iff:
513 \item $L_\omega(\A_P) \subseteq L_\omega(\A_\varphi)$.
514 \item $L_\omega(\A_P) \cap L_\omega(\A_{\neg \varphi}) = \emptyset$.
516 \end{thm:model checking}
520 \frametitle{On-the-fly Methods}
521 \framesubtitle{A bit more information about this}
525 \begin{frame}[allowframebreaks]
526 \frametitle<presentation>{Literature}
527 \begin{thebibliography}{10}
529 \beamertemplatearticlebibitems
530 \bibitem{ref:ltl&büchi}
532 \newblock {\em Linear-Time Temporal Logic and B\"uchi Automata}.
533 \newblock Winter School on Logic and Computer Science, Indian Statistical Institute, Calcutta, 1997.
535 \beamertemplatearticlebibitems
536 \bibitem{ref:alternating verification}
538 \newblock {\em Alternating Automata and Program Verification}.
539 \newblock Computer Science Today, Volume 1000 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, 1995.
541 \beamertemplatebookbibitems
542 \bibitem{ref:handbook}
543 Patrick Blackburn and Frank Wolter and Johan van Benthem.
544 \newblock {\em Handbook of Modal Logic}.
545 \newblock 3rd Edition, Elsevier, Amsterdam, Chapter 11 P. 655-720 and Chapter 17 P. 975-989, 2007.
547 \end{thebibliography}