Slides/Slides4.thy
author Christian Urban <urbanc@in.tum.de>
Fri, 01 Oct 2010 07:09:59 -0400
changeset 2505 bcd119bb854b
parent 2459 ac3470e1e5af
child 2748 6f38e357b337
permissions -rw-r--r--
minor experiments
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2459
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
(*<*)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
theory Slides4
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
imports "LaTeXsugar" "Nominal"
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
begin
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
notation (latex output)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  set ("_") and
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
  Cons  ("_::/_" [66,65] 65) 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
(*>*)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  \renewcommand{\slidecaption}{Nanjing, 31.~August 2010}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  \newcommand{\abst}[2]{#1.#2}% atom-abstraction
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
  \newcommand{\pair}[2]{\langle #1,#2\rangle} % pairing
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
  \newcommand{\susp}{{\boldsymbol{\cdot}}}% for suspensions
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
  \newcommand{\unit}{\langle\rangle}% unit
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
  \newcommand{\app}[2]{#1\,#2}% application
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
  \newcommand{\eqprob}{\mathrel{{\approx}?}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
  \newcommand{\freshprob}{\mathrel{\#?}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  \newcommand{\redu}[1]{\stackrel{#1}{\Longrightarrow}}% reduction
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
  \newcommand{\id}{\varepsilon}% identity substitution
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
  \newcommand{\bl}[1]{\textcolor{blue}{#1}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
  \newcommand{\gr}[1]{\textcolor{gray}{#1}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
  \newcommand{\rd}[1]{\textcolor{red}{#1}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
  \newcommand{\ok}{\includegraphics[scale=0.07]{ok.png}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
  \newcommand{\notok}{\includegraphics[scale=0.07]{notok.png}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
  \newcommand{\largenotok}{\includegraphics[scale=1]{notok.png}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
  \renewcommand{\Huge}{\fontsize{61.92}{77}\selectfont}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
  \newcommand{\veryHuge}{\fontsize{74.3}{93}\selectfont}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
  \newcommand{\VeryHuge}{\fontsize{89.16}{112}\selectfont}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
  \newcommand{\VERYHuge}{\fontsize{107}{134}\selectfont}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
  \newcommand{\LL}{$\mathbb{L}\,$}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
  \pgfdeclareradialshading{smallbluesphere}{\pgfpoint{0.5mm}{0.5mm}}%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
  {rgb(0mm)=(0,0,0.9);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
  rgb(0.9mm)=(0,0,0.7);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
  rgb(1.3mm)=(0,0,0.5);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
  rgb(1.4mm)=(1,1,1)}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
  \def\myitemi{\begin{pgfpicture}{-1ex}{-0.55ex}{1ex}{1ex}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
    \usebeamercolor[fg]{subitem projected}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
    {\pgftransformscale{0.8}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
    \pgftext{%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
      \usebeamerfont*{subitem projected}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
  \end{pgfpicture}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
  \begin{frame}<1>[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
  \frametitle{%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
  \begin{tabular}{@ {\hspace{-3mm}}c@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
  \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
  \huge Error-Free Programming\\[-1mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
  \huge with Theorem Provers\\[5mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
  \end{tabular}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
  Christian Urban
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
  \small Technical University of Munich, Germany\\[7mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
  \small in Nanjing on the kind invitation of\\ Professor Xingyuan Zhang
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
  and his group
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
  \frametitle{My Background}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
  \item researcher in Theoretical Computer Science\medskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
  \item programmer on a \alert<2->{software system} with 800 kloc (though I am 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
  responsible only for 35 kloc)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  \only<2->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
  \begin{textblock}{6}(2,11)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
  \draw (0,0) node[inner sep=2mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  {\color{darkgray}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
  \begin{minipage}{4cm}\raggedright
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  A theorem prover called {\bf Isabelle}.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
  \end{minipage}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  \end{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
  \only<3>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
  \begin{textblock}{6}(9,11)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
  \draw (0,0) node[inner sep=2mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
  {\color{darkgray}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
  \begin{minipage}{4cm}\raggedright
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
  Like every other code, this code is very hard to 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
  get correct.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
  \end{minipage}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
  \end{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
  \frametitle{Regular Expressions}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
  An example many (should) know about:\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
  \rd{\bf Regular Expressions:} 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
  \only<2>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
  \bl{[] $\;\;\;|\;\;\;$ c $\;\;\;|\;\;\;$  r$_1$$|$r$_2$  $\;\;\;|\;\;\;$  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
   r$_1$$\cdot$r$_2$ $\;\;\;|\;\;\;$ r$^*$}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
  \end{center}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
  \only<3->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
  \begin{tabular}{@ {}rrll@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
  \bl{r} & \bl{$::=$}  & \bl{NULL}            & \gr{(matches no string)}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
         & \bl{$\mid$} & \bl{EMPTY}           & \gr{(matches the empty string, [])}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
         & \bl{$\mid$} & \bl{CHR c}           & \gr{(matches the character c)}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
         & \bl{$\mid$} & \bl{ALT r$_1$ r$_2$} & \gr{(alternative, r$_1 |\,$r$_2$)}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
         & \bl{$\mid$} & \bl{SEQ r$_1$ r$_2$} & \gr{(sequential, r$_1\cdot\,$r$_2$)}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
         & \bl{$\mid$} & \bl{STAR r}          & \gr{(repeat, r$^*$)}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
  \end{center}\medskip}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
  \begin{textblock}{14.5}(1,12.5)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
  \only<2->{\gr{(a$\cdot$b)$^*$ \hspace{3mm}$\mapsto$\hspace{3mm} \{[], ab, abab, ababab, \ldots\}}\\}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
  \only<2->{\gr{x$\cdot$(0 $|$ 1 $|$ 2  \ldots  8 $|$ 9)$^*$ \hspace{3mm}$\mapsto$\hspace{3mm} 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
  \{x, x0, x1, \ldots, x00, \ldots, x123, \ldots\}}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
  \end{textblock}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
  \begin{frame}<1>[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
  \frametitle{RegExp Matcher}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
  Let's implement a regular expression matcher:\bigskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
  %%\draw[help lines, black] (-3,0) grid (6,3);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
  \draw[line width=1mm, red] (0.0,0.0) rectangle (4,2.3);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   166
  \node[anchor=base] at (2,1) 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
     {\small\begin{tabular}{@ {}c@ {}}\Large\bf Regular\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
                                      \Large\bf Expression \\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
                                      \Large\bf Matcher\end{tabular}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
  \coordinate (m1) at (0,1.5);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
  \draw (-2,2) node (m2) {\small\begin{tabular}{c}\bl{regular}\\[-1mm] \bl{expression}\end{tabular}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
  \path[overlay, ->, line width = 1mm, shorten <=-3mm] (m2) edge (m1);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   174
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   175
  \coordinate (s1) at (0,0.5);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   176
  \draw (-1.8,-0) node (s2) {\small\begin{tabular}{c}\bl{string}\end{tabular}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   177
  \path[overlay, ->, line width = 1mm, shorten <=-3mm] (s2) edge (s1);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   178
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179
  \coordinate (r1) at (4,1.2);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   180
  \draw (6,1.2) node (r2) {\small\begin{tabular}{c}\bl{true}, \bl{false}\end{tabular}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   181
  \path[overlay, ->, line width = 1mm, shorten >=-3mm] (r1) edge (r2);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   182
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   183
  \end{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   184
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   187
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   188
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   191
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   192
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   193
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   194
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   195
  \frametitle{RegExp Matcher}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   196
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   197
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   198
  {\bf input:} a \underline{list} of RegExps and a string \hspace{6mm}{\bf output:} true or false
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   199
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
  \only<2->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
  \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
  \bl{match [] []}                   & \bl{$=$} & \bl{true}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   204
  \bl{match [] \_}                   & \bl{$=$} & \bl{false}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   205
  \bl{match (NULL::rs) s}            & \bl{$=$} & \bl{false}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   206
  \bl{match (EMPTY::rs) s}           & \bl{$=$} & \bl{match rs s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   207
  \bl{match (CHR c::rs) (c::s)}      & \bl{$=$} & \bl{match rs s}\\         
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   208
  \bl{match (CHR c::rs) \_}          & \bl{$=$} & \bl{false}\\    
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   209
  \bl{match (ALT r$_1$ r$_2$::rs) s} & \bl{$=$} & \bl{match (r$_1$::rs) s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   210
                                     &          & \bl{\;\;\;\;orelse match (r$_2$::rs) s}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   211
  \bl{match (SEQ r$_1$ r$_2$::rs) s} & \bl{$=$} & \bl{match (r$_1$::r$_2$::rs) s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   212
  \bl{match (STAR r::rs) s}          & \bl{$=$} & \bl{match rs s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   213
                                     &          & \bl{\;\;\;\;orelse match (r::STAR r::rs) s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   214
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   215
  \end{center}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   216
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   217
  \onslide<3->{we start the program with\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
  \hspace{6mm}\bl{matches r s $=$ match [r] s}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   219
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   221
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   222
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   223
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   224
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   225
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   226
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   227
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   228
  \begin{frame}<1>[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   229
  \frametitle{Program in Scala}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   230
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   231
  \bl{\footnotesize
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   232
  \begin{tabular}{l}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   233
  sealed abstract class Rexp\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   234
  sealed case class Null extends Rexp\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   235
  sealed case class Empty extends Rexp\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   236
  sealed case class Chr(c: Char) extends Rexp\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   237
  sealed case class Alt(r1 : Rexp, r2 : Rexp) extends Rexp\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   238
  sealed case class Seq(r1 : Rexp, r2 : Rexp) extends Rexp\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
  sealed case class Star(r : Rexp) extends Rexp\medskip\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   240
  def match1 (rs : List[Rexp], s : List[Char]) : Boolean = rs match \{\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   241
  \hspace{3mm}case Nil @{text "\<Rightarrow>"} if (s == Nil) true else false\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   242
  \hspace{3mm}case (Null()::rs) @{text "\<Rightarrow>"} false\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   243
  \hspace{3mm}case (Empty()::rs) @{text "\<Rightarrow>"} match1 (rs, s)\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   244
  \hspace{3mm}case (Chr(c)::rs) @{text "\<Rightarrow>"} s match \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   245
  \hspace{6mm}\{ case Nil @{text "\<Rightarrow>"} false\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   246
  \hspace{8mm}case (d::s) @{text "\<Rightarrow>"} if (c==d) match1 (rs,s) else false \}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   247
  \hspace{3mm}case (Alt (r1, r2)::rs) @{text "\<Rightarrow>"} match1 (r1::rs, s) || match1 (r2::rs, s)\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   248
  \hspace{3mm}case (Seq (r1, r2)::rs) @{text "\<Rightarrow>"} match1 (r1::r2::rs, s) \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   249
  \hspace{3mm}case (Star (r)::rs) @{text "\<Rightarrow>"} match1 (r::rs, s) || match1 (r::Star (r)::rs, s)\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   250
  \}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   251
  \end{tabular}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   252
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   253
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   254
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   255
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   256
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   257
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   258
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   259
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   260
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   261
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   262
  \frametitle{Testing}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   263
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   264
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   265
  Every good programmer should do thourough tests: 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   266
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   267
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   268
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   269
  \begin{tabular}{@ {\hspace{-20mm}}lcl}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   270
  \bl{matches (a$\cdot$b)$^*\;$ []}     & \bl{$\mapsto$} & \bl{true}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   271
  \bl{matches (a$\cdot$b)$^*\;$ ab}   & \bl{$\mapsto$} & \bl{true}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   272
  \bl{matches (a$\cdot$b)$^*\;$ aba}  & \bl{$\mapsto$} & \bl{false}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   273
  \bl{matches (a$\cdot$b)$^*\;$ abab} & \bl{$\mapsto$} & \bl{true}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   274
  \bl{matches (a$\cdot$b)$^*\;$ abaa} & \bl{$\mapsto$} & \bl{false}\medskip\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   275
  \onslide<2->{\bl{matches x$\cdot$(0$|$1)$^*\;$ x}   & \bl{$\mapsto$} & \bl{true}}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   276
  \onslide<2->{\bl{matches x$\cdot$(0$|$1)$^*\;$ x0}  & \bl{$\mapsto$} & \bl{true}}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   277
  \onslide<2->{\bl{matches x$\cdot$(0$|$1)$^*\;$ x3}  & \bl{$\mapsto$} & \bl{false}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   278
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   279
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   280
 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   281
  \onslide<3->
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   282
  {looks OK \ldots let's ship it to customers\hspace{5mm} 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   283
   \raisebox{-5mm}{\includegraphics[scale=0.05]{sun.png}}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   284
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   285
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   286
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   287
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   288
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   289
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   290
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   291
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   292
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   293
  \frametitle{Testing}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   294
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   295
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   296
  \item While testing is an important part in the process of programming development\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   297
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   298
  \item we can only test a {\bf finite} amount of examples\bigskip\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   299
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   300
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   301
  \colorbox{cream}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   302
  {\gr{\begin{minipage}{10cm}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   303
  ``Testing can only show the presence of errors, never their
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   304
  absence'' (Edsger W.~Dijkstra)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   305
  \end{minipage}}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   306
  \end{center}\bigskip\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   307
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   308
  \item In a theorem prover we can establish properties that apply to 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   309
  {\bf all} input and {\bf all} output.\pause 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   310
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   311
  \item For example we can establish that the matcher terminates 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   312
  on all input.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   313
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   314
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   315
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   316
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   317
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   318
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   319
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   320
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   321
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   322
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   323
  \frametitle{RegExp Matcher}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   324
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   325
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   326
  We need to find a measure that gets smaller in each recursive call.\bigskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   327
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   328
  \onslide<1->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   329
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   330
  \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {\hspace{-9mm}}l@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   331
  \bl{match [] []}                   & \bl{$=$} & \bl{true} & \onslide<2->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   332
  \bl{match [] \_}                   & \bl{$=$} & \bl{false} & \onslide<2->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   333
  \bl{match (NULL::rs) s}            & \bl{$=$} & \bl{false} & \onslide<2->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   334
  \bl{match (EMPTY::rs) s}           & \bl{$=$} & \bl{match rs s} & \onslide<3->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   335
  \bl{match (CHR c::rs) (c::s)}      & \bl{$=$} & \bl{match rs s} & \onslide<4->{\ok}\\         
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   336
  \bl{match (CHR c::rs) \_}          & \bl{$=$} & \bl{false} & \onslide<2->{\ok}\\    
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   337
  \bl{match (ALT r$_1$ r$_2$::rs) s} & \bl{$=$} & \bl{match (r$_1$::rs) s} & \onslide<5->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   338
                                     &          & \bl{\;\;\;\;orelse match (r$_2$::rs) s}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   339
  \bl{match (SEQ r$_1$ r$_2$::rs) s} & \bl{$=$} & \bl{match (r$_1$::r$_2$::rs) s} & \onslide<6->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   340
  \bl{match (STAR r::rs) s}          & \bl{$=$} & \bl{match rs s} & \onslide<7->{\notok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   341
                                     &          & \bl{\;\;\;\;orelse match (r::STAR r::rs) s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   342
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   343
  \end{center}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   344
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   345
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   346
  \begin{textblock}{5}(4,4)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   347
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   348
  %%\draw[help lines, black] (-3,0) grid (6,3);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   349
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   350
  \coordinate (m1) at (-2,0);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   351
  \coordinate (m2) at ( 2,0);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   352
  \path[overlay, ->, line width = 0.6mm, color = red] (m1) edge (m2);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   353
  \draw (0,0) node[above=-1mm] {\footnotesize\rd{needs to get smaller}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   354
  \end{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   355
  \end{textblock}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   356
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   357
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   358
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   359
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   360
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   361
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   362
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   363
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   364
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   365
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   366
  \frametitle{Bug Hunting}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   367
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   368
  \only<1>{Several hours later\ldots}\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   369
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   370
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   371
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   372
  \begin{tabular}{@ {\hspace{-20mm}}lcl}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   373
  \bl{matches (STAR (EMPTY)) s}     & \bl{$\mapsto$} & loops\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   374
  \onslide<4->{\bl{matches (STAR (EMPTY $|$ \ldots)) s}   & \bl{$\mapsto$} & loops\\} 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   375
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   376
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   377
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   378
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   379
  \onslide<3->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   380
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   381
  \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   382
  \ldots\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   383
  \bl{match (EMPTY::rs) s}           & \bl{$=$} & \bl{match rs s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   384
  \ldots\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   385
  \bl{match (STAR r::rs) s}          & \bl{$=$} & \bl{match rs s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   386
                                     &          & \bl{\;\;\;\;orelse match (r::STAR r::rs) s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   387
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   388
  \end{center}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   389
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   390
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   391
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   392
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   393
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   394
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   395
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   396
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   397
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   398
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   399
  \frametitle{RegExp Matcher}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   400
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   401
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   402
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   403
  \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   404
  \bl{match [] []}                   & \bl{$=$} & \bl{true}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   405
  \bl{match [] \_}                   & \bl{$=$} & \bl{false}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   406
  \bl{match (NULL::rs) s}            & \bl{$=$} & \bl{false}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   407
  \bl{match (EMPTY::rs) s}           & \bl{$=$} & \bl{match rs s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   408
  \bl{match (CHR c::rs) (c::s)}      & \bl{$=$} & \bl{match rs s}\\         
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   409
  \bl{match (CHR c::rs) \_}          & \bl{$=$} & \bl{false}\\    
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   410
  \bl{match (ALT r$_1$ r$_2$::rs) s} & \bl{$=$} & \bl{match (r$_1$::rs) s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   411
                                     &          & \bl{\;\;\;\;orelse match (r$_2$::rs) s}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   412
  \bl{match (SEQ r$_1$ r$_2$::rs) s} & \bl{$=$} & \bl{match (r$_1$::r$_2$::rs) s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   413
  \bl{match (STAR r::rs) s}          & \bl{$=$} & \bl{match rs s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   414
                                     &          & \bl{\;\;\;\;orelse match (r::STAR r::rs) s}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   415
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   416
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   417
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   418
  \only<1>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   419
  \begin{textblock}{5}(4,4)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   420
  \largenotok
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   421
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   422
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   423
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   424
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   425
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   426
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   427
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   428
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   429
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   430
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   431
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   432
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   433
  \frametitle{Second Attempt}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   434
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   435
  Can a regular expression match the empty string?
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   436
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   437
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   438
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   439
  \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}ll@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   440
  \bl{nullable (NULL)}            & \bl{$=$} & \bl{false} & \onslide<2->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   441
  \bl{nullable (EMPTY)}           & \bl{$=$} & \bl{true}  & \onslide<2->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   442
  \bl{nullable (CHR c)}           & \bl{$=$} & \bl{false} & \onslide<2->{\ok}\\         
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   443
  \bl{nullable (ALT r$_1$ r$_2$)} & \bl{$=$} & \bl{(nullable r$_1$) orelse (nullable r$_2$)}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   444
    & \onslide<2->{\ok}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   445
  \bl{nullable (SEQ r$_1$ r$_2$)} & \bl{$=$} & \bl{(nullable r$_1$) andalso (nullable r$_2$)}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   446
    & \onslide<2->{\ok}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   447
  \bl{nullable (STAR r)}          & \bl{$=$} & \bl{true} & \onslide<2->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   448
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   449
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   450
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   451
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   452
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   453
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   454
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   455
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   456
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   457
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   458
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   459
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   460
  \frametitle{RegExp Matcher 2}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   461
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   462
  If \bl{r} matches \bl{c::s}, which regular expression can match the string \bl{s}?
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   463
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   464
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   465
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   466
  \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {\hspace{-10mm}}l@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   467
  \bl{der c (NULL)}            & \bl{$=$} & \bl{NULL} & \onslide<3->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   468
  \bl{der c (EMPTY)}           & \bl{$=$} & \bl{NULL} & \onslide<3->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   469
  \bl{der c (CHR d)}           & \bl{$=$} & \bl{if c=d then EMPTY else NULL} & \onslide<3->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   470
  \bl{der c (ALT r$_1$ r$_2$)} & \bl{$=$} & \bl{ALT (der c r$_1$) (der c r$_2$)} & \onslide<3->{\ok}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   471
  \bl{der c (SEQ r$_1$ r$_2$)} & \bl{$=$} & \bl{ALT (SEQ (der c r$_1$) r$_2$)} & \onslide<3->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   472
       &          & \bl{\phantom{ALT} (if nullable r$_1$ then der c r$_2$ else NULL)}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   473
  \bl{der c (STAR r)}          & \bl{$=$} & \bl{SEQ (der c r) (STAR r)} & \onslide<3->{\ok}\medskip\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   474
  \pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   475
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   476
  \bl{derivative r []}     & \bl{$=$} & \bl{r} & \onslide<3->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   477
  \bl{derivative r (c::s)} & \bl{$=$} & \bl{derivative (der c r) s} & \onslide<3->{\ok}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   478
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   479
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   480
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   481
  we call the program with\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   482
  \bl{matches r s $=$ nullable (derivative r s)}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   483
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   484
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   485
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   486
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   487
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   488
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   489
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   490
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   491
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   492
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   493
  \frametitle{But Now What?}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   494
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   495
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   496
  {\usefont{T1}{ptm}{b}{N}\VERYHuge{\rd{?}}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   497
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   498
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   499
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   500
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   501
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   502
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   503
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   504
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   505
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   506
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   507
  \frametitle{Testing}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   508
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   509
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   510
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   511
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   512
  \begin{tabular}{@ {\hspace{-20mm}}lcl}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   513
  \bl{matches []$^*$ []} & \bl{$\mapsto$} & \bl{true}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   514
  \bl{matches ([]$|$a)$^*$ a}  & \bl{$\mapsto$} & \bl{true}\medskip\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   515
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   516
  \bl{matches (a$\cdot$b)$^*\;$ []}     & \bl{$\mapsto$} & \bl{true}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   517
  \bl{matches (a$\cdot$b)$^*\;$ ab}   & \bl{$\mapsto$} & \bl{true}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   518
  \bl{matches (a$\cdot$b)$^*\;$ aba}  & \bl{$\mapsto$} & \bl{false}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   519
  \bl{matches (a$\cdot$b)$^*\;$ abab} & \bl{$\mapsto$} & \bl{true}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   520
  \bl{matches (a$\cdot$b)$^*\;$ abaa} & \bl{$\mapsto$} & \bl{false}\medskip\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   521
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   522
  \bl{matches x$\cdot$(0$|$1)$^*\;$ x}   & \bl{$\mapsto$} & \bl{true}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   523
  \bl{matches x$\cdot$(0$|$1)$^*\;$ x0}  & \bl{$\mapsto$} & \bl{true}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   524
  \bl{matches x$\cdot$(0$|$1)$^*\;$ x3}  & \bl{$\mapsto$} & \bl{false}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   525
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   526
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   527
 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   528
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   529
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   530
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   531
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   532
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   533
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   534
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   535
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   536
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   537
  \frametitle{Specification}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   538
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   539
  We have to specify what it means for a regular expression to match
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   540
  a string. 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   541
  %
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   542
  \only<2>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   543
  \mbox{}\\[8mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   544
  \bl{(a$\cdot$b)$^*$}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   545
  \hspace{7mm}\bl{$\mapsto$\hspace{3mm}\{[], ab, abab, ababab, \ldots\}}\bigskip\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   546
  \bl{x$\cdot$(0 $|$ 1 $|$ 2  \ldots  8 $|$ 9 )$^*$}\\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   547
  \hspace{7mm}\bl{$\mapsto$\hspace{3mm} 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   548
  \{x, x0, x1, \ldots, x00, \ldots, x123, \ldots\}}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   549
  %
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   550
  \only<3->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   551
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   552
  \begin{tabular}{rcl}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   553
  \bl{\LL (NULL)}            & \bl{$\dn$} & \bl{\{\}}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   554
  \bl{\LL (EMPTY)}           & \bl{$\dn$} & \bl{\{[]\}}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   555
  \bl{\LL (CHR c)}           & \bl{$\dn$} & \bl{\{c\}}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   556
  \bl{\LL (ALT r$_1$ r$_2$)} & \bl{$\dn$} & \onslide<4->{\bl{\LL (r$_1$) $\cup$ \LL (r$_2$)}}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   557
  \bl{\LL (SEQ r$_1$ r$_2$)} & \bl{$\dn$} & \onslide<6->{\bl{\LL (r$_1$) ; \LL (r$_2$)}}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   558
  \bl{\LL (STAR r)}          & \bl{$\dn$} & \onslide<8->{\bl{(\LL (r))$^\star$}}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   559
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   560
  \end{center}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   561
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   562
  \only<5-6>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   563
  \begin{textblock}{6}(2.9,13.3)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   564
  \colorbox{cream}{\bl{S$_1$ ; S$_2$ $\;\dn\;$ \{ s$_1$@s$_2$ $|$ s$_1$$\in$S$_1$ $\wedge$
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   565
                                                          s$_2$$\in$S$_2$ \}}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   566
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   567
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   568
  \only<7->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   569
  \begin{textblock}{9}(4,13)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   570
  \colorbox{cream}{\bl{$\infer{\mbox{[]} \in \mbox{S}^\star}{}$}}\hspace{3mm}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   571
  \colorbox{cream}{\bl{$\infer{\mbox{s}_1\mbox{@}\mbox{s}_2 \in \mbox{S}^\star}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   572
                      {\mbox{s}_1 \in \mbox{S} & \mbox{s}_2 \in \mbox{S}^\star}$}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   573
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   574
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   575
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   576
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   577
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   578
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   579
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   580
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   581
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   582
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   583
  \frametitle{Is the Matcher Error-Free?}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   584
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   585
  We expect that
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   586
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   587
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   588
  \begin{tabular}{lcl}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   589
  \bl{matches r s = true}  & \only<1>{\rd{$\Longrightarrow\,\,$}}\only<2>{\rd{$\Longleftarrow\,\,$}}% 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   590
  \only<3->{\rd{$\Longleftrightarrow$}} & \bl{s $\in$ \LL(r)}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   591
  \bl{matches r s = false} & \only<1>{\rd{$\Longrightarrow\,\,$}}\only<2>{\rd{$\Longleftarrow\,\,$}}%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   592
  \only<3->{\rd{$\Longleftrightarrow$}} & \bl{s $\notin$ \LL(r)}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   593
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   594
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   595
  \pause\pause\bigskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   596
  By \alert<4->{induction}, we can {\bf prove} these properties.\bigskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   597
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   598
  \begin{tabular}{lrcl}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   599
  Lemmas:  & \bl{nullable (r)}          & \bl{$\Longleftrightarrow$} & \bl{[] $\in$ \LL (r)}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   600
           & \bl{s $\in$ \LL (der c r)} & \bl{$\Longleftrightarrow$} & \bl{(c::s) $\in$ \LL (r)}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   601
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   602
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   603
  \only<4->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   604
  \begin{textblock}{3}(0.9,4.5)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   605
  \rd{\huge$\forall$\large{}r s.}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   606
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   607
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   608
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   609
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   610
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   611
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   612
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   613
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   614
  \begin{frame}<1->[t]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   615
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   616
  \mbox{}\\[-2mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   617
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   618
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   619
  \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}ll@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   620
  \bl{nullable (NULL)}            & \bl{$=$} & \bl{false} &\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   621
  \bl{nullable (EMPTY)}           & \bl{$=$} & \bl{true}  &\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   622
  \bl{nullable (CHR c)}           & \bl{$=$} & \bl{false} &\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   623
  \bl{nullable (ALT r$_1$ r$_2$)} & \bl{$=$} & \bl{(nullable r$_1$) orelse (nullable r$_2$)} & \\ 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   624
  \bl{nullable (SEQ r$_1$ r$_2$)} & \bl{$=$} & \bl{(nullable r$_1$) andalso (nullable r$_2$)} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   625
  \bl{nullable (STAR r)}          & \bl{$=$} & \bl{true} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   626
  \end{tabular}\medskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   627
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   628
  \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {\hspace{-10mm}}l@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   629
  \bl{der c (NULL)}            & \bl{$=$} & \bl{NULL} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   630
  \bl{der c (EMPTY)}           & \bl{$=$} & \bl{NULL} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   631
  \bl{der c (CHR d)}           & \bl{$=$} & \bl{if c=d then EMPTY else NULL} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   632
  \bl{der c (ALT r$_1$ r$_2$)} & \bl{$=$} & \bl{ALT (der c r$_1$) (der c r$_2$)} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   633
  \bl{der c (SEQ r$_1$ r$_2$)} & \bl{$=$} & \bl{ALT (SEQ (der c r$_1$) r$_2$)} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   634
       &          & \bl{\phantom{ALT} (if nullable r$_1$ then der c r$_2$ else NULL)}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   635
  \bl{der c (STAR r)}          & \bl{$=$} & \bl{SEQ (der c r) (STAR r)} &\smallskip\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   636
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   637
  \bl{derivative r []}     & \bl{$=$} & \bl{r} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   638
  \bl{derivative r (c::s)} & \bl{$=$} & \bl{derivative (der c r) s} & \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   639
  \end{tabular}\medskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   640
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   641
  \bl{matches r s $=$ nullable (derivative r s)}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   642
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   643
  \only<2>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   644
  \begin{textblock}{8}(1.5,4)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   645
  \includegraphics[scale=0.3]{approved.png}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   646
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   647
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   648
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   649
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   650
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   651
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   652
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   653
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   654
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   655
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   656
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   657
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   658
  \frametitle{Interlude: TCB}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   659
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   660
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   661
  \item The \alert{\bf Trusted Code Base} (TCB) is the code that can make your 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   662
  program behave in unintended ways (i.e.~cause bugs).\medskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   663
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   664
  \item Typically the TCB includes: CPUs, operating systems, C-libraries,
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   665
  device drivers, (J)VMs\ldots\bigskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   666
  \pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   667
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   668
  \item It also includes the compiler.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   669
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   670
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   671
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   672
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   673
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   674
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   675
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   676
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   677
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   678
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   679
  \begin{frame}<1-3>
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   680
  \frametitle{\LARGE\begin{tabular}{c}Hacking Compilers 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   681
  \end{tabular}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   682
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   683
  %Why is it so paramount to have a small trusted code base (TCB)?
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   684
  \bigskip\bigskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   685
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   686
  \begin{columns}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   687
  \begin{column}{2.7cm}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   688
  \begin{minipage}{2.5cm}%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   689
  \begin{tabular}{c@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   690
  \includegraphics[scale=0.2]{ken-thompson.jpg}\\[-1.8mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   691
  \footnotesize Ken Thompson\\[-1.8mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   692
  \footnotesize Turing Award, 1983\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   693
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   694
  \end{minipage}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   695
  \end{column}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   696
  \begin{column}{9cm}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   697
  \begin{tabular}{l@ {\hspace{1mm}}p{8cm}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   698
  \myitemi
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   699
  & Ken Thompson showed how to hide a Trojan Horse in a 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   700
  compiler \textcolor{red}{without} leaving any traces in the source code.\\[2mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   701
  \myitemi
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   702
  & No amount of source level verification will protect 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   703
  you from such Thompson-hacks.\\[2mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   704
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   705
  \myitemi
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   706
  & Therefore in safety-critical systems it is important to rely 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   707
  on only a very small TCB.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   708
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   709
  \end{column}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   710
  \end{columns}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   711
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   712
  \only<2>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   713
  \begin{textblock}{6}(4,2)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   714
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   715
  \draw (0,0) node[inner sep=3mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   716
  {\normalsize
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   717
  \begin{minipage}{8cm}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   718
  \begin{quote}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   719
  \includegraphics[scale=0.05]{evil.png}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   720
  \begin{enumerate}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   721
  \item[1)] Assume you ship the compiler as binary and also with sources.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   722
  \item[2)] Make the compiler aware when it compiles itself.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   723
  \item[3)] Add the Trojan horse.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   724
  \item[4)] Compile.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   725
  \item[5)] Delete Trojan horse from the sources of the compiler.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   726
  \item[6)] Go on holiday for the rest of your life. ;o)\\[-7mm]\mbox{}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   727
  \end{enumerate}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   728
  \end{quote}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   729
  \end{minipage}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   730
  \end{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   731
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   732
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   733
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   734
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   735
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   736
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   737
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   738
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   739
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   740
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   741
  \begin{frame}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   742
  \frametitle{\LARGE\begin{tabular}{c}An Example: Small TCB for\\[-2mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   743
  A Critical Infrastructure\end{tabular}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   744
  \mbox{}\\[-14mm]\mbox{}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   745
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   746
  \begin{columns}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   747
  \begin{column}{0.2\textwidth}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   748
  \begin{tabular}{@ {} c@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   749
  \includegraphics[scale=0.3]{appel.jpg}\\[-2mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   750
  {\footnotesize Andrew Appel}\\[-2.5mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   751
  {\footnotesize (Princeton)}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   752
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   753
  \end{column}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   754
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   755
  \begin{column}{0.8\textwidth}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   756
  \begin{textblock}{10}(4.5,3.95)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   757
  \begin{block}{Proof-Carrying Code}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   758
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   759
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   760
  \draw[help lines,cream] (0,0.2) grid (8,4);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   761
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   762
  \draw[line width=1mm, red] (5.5,0.6) rectangle (7.5,4);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   763
  \node[anchor=base] at (6.5,2.8) 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   764
     {\small\begin{tabular}{@ {}p{1.9cm}@ {}}\centering  user needs to run untrusted code\end{tabular}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   765
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   766
  \draw[line width=1mm, red] (0.5,0.6) rectangle (2.5,4);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   767
  \node[anchor=base] at (1.5,2.3) 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   768
     {\small\begin{tabular}{@ {}p{1.9cm}@ {}}\centering  code developer/ web server/ Apple 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   769
  Store\end{tabular}};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   770
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   771
  \onslide<4->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   772
  \draw[line width=1mm, red, fill=red] (5.5,0.6) rectangle (7.5,1.8);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   773
  \node[anchor=base,white] at (6.5,1.1) 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   774
     {\small\begin{tabular}{@ {}p{1.9cm}@ {}}\bf\centering proof- checker\end{tabular}};}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   775
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   776
  \node at (3.8,3.0) [single arrow, fill=red,text=white, minimum height=3cm]{\bf code};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   777
  \onslide<3->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   778
  \node at (3.8,1.3) [single arrow, fill=red,text=white, minimum height=3cm]{\bf LF proof};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   779
  \node at (3.8,1.9) {\small certificate};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   780
  }
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   781
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   782
  \onslide<2>{\node at (4.0,1.3) [text=red]{\begin{tabular}{c}\bf Highly\\\bf Dangerous!\end{tabular}};}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   783
  % Code Developer
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   784
  % User (runs untrusted code)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   785
  % transmits a proof that the code is safe
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   786
  % 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   787
  \end{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   788
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   789
  \end{block}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   790
  \end{textblock}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   791
  \end{column}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   792
  \end{columns}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   793
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   794
  \small\mbox{}\\[2.5cm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   795
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   796
  \item<4-> TCB of the checker is $\sim$2700 lines of code (1865 loc of\\ LF definitions; 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   797
  803 loc in C including 2 library functions)\\[-3mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   798
  \item<5-> 167 loc in C implement a type-checker
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   799
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   800
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   801
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   802
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   803
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   804
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   805
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   806
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   807
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   808
text {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   809
  \tikzstyle{every node}=[node distance=25mm,text height=1.5ex, text depth=.25ex]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   810
  \tikzstyle{node1}=[rectangle, minimum size=10mm, rounded corners=3mm, very thick, 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   811
                     draw=black!50, top color=white, bottom color=black!20]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   812
  \tikzstyle{node2}=[rectangle, minimum size=12mm, rounded corners=3mm, very thick, 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   813
                     draw=red!70, top color=white, bottom color=red!50!black!20]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   814
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   815
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   816
  \begin{frame}[squeeze]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   817
  \frametitle{Type-Checking in LF} 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   818
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   819
  \begin{columns}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   820
  \begin{column}{0.2\textwidth}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   821
  \begin{tabular}{@ {\hspace{-4mm}}c@ {}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   822
  \\[-4mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   823
  \includegraphics[scale=0.1]{harper.jpg}\\[-2mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   824
  {\footnotesize Bob Harper}\\[-2.5mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   825
  {\footnotesize (CMU)}\\[2mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   826
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   827
  \includegraphics[scale=0.3]{pfenning.jpg}\\[-2mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   828
  {\footnotesize Frank Pfenning}\\[-2.5mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   829
  {\footnotesize (CMU)}\\[2mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   830
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   831
  \onslide<-6>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   832
  {\footnotesize 31 pages in }\\[-2.5mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   833
  {\footnotesize ACM Transact.~on}\\[-2.5mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   834
  {\footnotesize Comp.~Logic.,~2005}\\}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   835
  \end{tabular}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   836
  \end{column}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   837
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   838
  \begin{column}{0.8\textwidth}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   839
  \begin{textblock}{0}(3.1,2)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   840
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   841
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   842
  \matrix[ampersand replacement=\&,column sep=7mm, row sep=5mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   843
  { \&[-10mm] 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   844
    \node (def1)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}}; \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   845
    \node (proof1) [node1] {\large Proof}; \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   846
    \node (alg1)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}}; \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   847
    
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   848
    \onslide<4->{\node {\begin{tabular}{c}\small 1st\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   849
    \onslide<4->{\node (def2)   [node2] {\large Spec$^\text{+ex}$};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   850
    \onslide<4->{\node (proof2) [node1] {\large Proof};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   851
    \onslide<4->{\node (alg2)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}};} \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   852
     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   853
    \onslide<5->{\node {\begin{tabular}{c}\small 2nd\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   854
    \onslide<5->{\node (def3)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   855
    \onslide<5->{\node (proof3) [node1] {\large Proof};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   856
    \onslide<5->{\node (alg3)   [node2] {\large Alg$^\text{-ex}$};} \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   857
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   858
    \onslide<6->{\node {\begin{tabular}{c}\small 3rd\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   859
    \onslide<6->{\node (def4)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   860
    \onslide<6->{\node (proof4) [node2] {\large\hspace{1mm}Proof\hspace{1mm}};} \&
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   861
    \onslide<6->{\node (alg4)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}};} \\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   862
  };
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   863
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   864
  \draw[->,black!50,line width=2mm] (proof1) -- (def1);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   865
  \draw[->,black!50,line width=2mm] (proof1) -- (alg1);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   866
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   867
  \onslide<4->{\draw[->,black!50,line width=2mm] (proof2) -- (def2);}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   868
  \onslide<4->{\draw[->,black!50,line width=2mm] (proof2) -- (alg2);}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   869
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   870
  \onslide<5->{\draw[->,black!50,line width=2mm] (proof3) -- (def3);}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   871
  \onslide<5->{\draw[->,black!50,line width=2mm] (proof3) -- (alg3);}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   872
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   873
  \onslide<6->{\draw[->,black!50,line width=2mm] (proof4) -- (def4);}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   874
  \onslide<6->{\draw[->,black!50,line width=2mm] (proof4) -- (alg4);}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   875
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   876
  \onslide<3->{\draw[white,line width=1mm] (1.1,3.2) -- (0.9,2.85) -- (1.1,2.35) -- (0.9,2.0);} 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   877
  \end{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   878
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   879
  \end{textblock}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   880
  \end{column}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   881
  \end{columns}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   882
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   883
  \only<2>{%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   884
  \begin{textblock}{2}(.1,12.85)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   885
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   886
  \draw[line width=1mm, red] (0,0) ellipse (1.5cm and 0.88cm);
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   887
  \end{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   888
  \end{textblock}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   889
  }
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   890
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   891
  \begin{textblock}{3}(14,3.6)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   892
  \onslide<4->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   893
  \begin{tikzpicture}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   894
  \node at (0,0) [single arrow, shape border rotate=270, fill=red,text=white]{2h};
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   895
  \end{tikzpicture}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   896
  \end{textblock}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   897
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   898
  \only<7->{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   899
  \begin{textblock}{14}(0.6,12.8)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   900
  \begin{block}{}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   901
  \small Each time one needs to check $\sim$31pp~of informal paper proofs.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   902
  You have to be able to keep definitions and proofs consistent.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   903
  \end{block}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   904
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   905
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   906
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   907
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   908
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   909
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   910
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   911
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   912
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   913
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   914
  \begin{frame}<1>[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   915
  \frametitle{Theorem Provers}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   916
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   917
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   918
  \item Theorem provers help with keeping large proofs consistent;
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   919
  make them modifiable.\medskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   920
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   921
  \item They can ensure that all cases are covered.\medskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   922
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   923
  \item Sometimes, tedious reasoning can be automated.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   924
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   925
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   926
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   927
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   928
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   929
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   930
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   931
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   932
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   933
  \begin{frame}<1>[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   934
  \frametitle{Theorem Provers}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   935
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   936
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   937
  \item You also pay a (sometimes heavy) price: reasoning can be much, much harder.\medskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   938
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   939
  \item Depending on your domain, suitable reasoning infrastructure
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   940
  might not yet be available.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   941
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   942
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   943
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   944
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   945
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   946
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   947
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   948
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   949
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   950
  \begin{frame}<1>[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   951
  \frametitle{Theorem Provers}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   952
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   953
  Recently impressive work has been accomplished proving the correctness
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   954
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   955
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   956
  \item of a compiler for C-light (compiled code has the same observable
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   957
  behaviour as the original source code),\medskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   958
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   959
  \item a mirco-kernel operating system (absence of certain 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   960
  bugs\ldots no nil pointers, no buffer overflows).
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   961
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   962
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   963
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   964
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   965
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   966
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   967
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   968
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   969
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   970
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   971
  \begin{frame}<1>[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   972
  \frametitle{Trust in Theorem Provers}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   973
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   974
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   975
  Why should we trust theorem provers? 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   976
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   977
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   978
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   979
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   980
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   981
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   982
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   983
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   984
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   985
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   986
  \begin{frame}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   987
  \frametitle{Theorem Provers}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   988
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   989
   \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   990
  \item Theorem provers are a \textcolor{red}{special kind} of software.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   991
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   992
  \item We do \textcolor{red}{\bf not} need to trust them; we only need to trust:
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   993
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   994
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   995
  \begin{quote}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   996
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   997
  \item The logic they are based on \textcolor{gray}{(e.g.~HOL)}, and\smallskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   998
  \item a proof checker that checks the proofs
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   999
  \textcolor{gray}{(this can be a very small program)}.\smallskip\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1000
  \item To a little extend, we also need to trust our definitions
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1001
  \textcolor{gray}{(this can be mitigated)}.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1002
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1003
  \end{quote}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1004
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1005
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1006
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1007
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1008
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1009
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1010
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1011
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1012
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1013
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1014
  \begin{frame}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1015
  \frametitle{Isabelle}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1016
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1017
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1018
  \item I am using the Isabelle theorem prover (development since 1990).\bigskip\bigskip\bigskip
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1019
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1020
  \item It follows the LCF-approach:
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1021
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1022
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1023
  \item Have a special abstract type \alert{\bf thm}.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1024
  \item Make the constructors of this abstract type the inference rules 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1025
  of your logic.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1026
  \item Implement the theorem prover in a strongly-typed language (e.g.~ML).
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1027
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1028
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1029
  $\Rightarrow$ everything of type {\bf thm} has been proved (even if we do not
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1030
  have to explicitly generate proofs).
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1031
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1032
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1033
  \only<1>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1034
  \begin{textblock}{5}(11,2.3)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1035
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1036
  \includegraphics[scale=0.18]{robin-milner.jpg}\\[-0.8mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1037
  \footnotesize Robin Milner\\[-0.8mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1038
  \footnotesize Turing Award, 1991\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1039
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1040
  \end{textblock}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1041
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1042
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1043
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1044
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1045
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1046
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1047
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1048
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1049
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1050
  \begin{frame}<1>[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1051
  \frametitle{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1052
  \begin{tabular}{c}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1053
  \mbox{}\\[23mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1054
  \LARGE Demo
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1055
  \end{tabular}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1056
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1057
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1058
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1059
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1060
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1061
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1062
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1063
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1064
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1065
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1066
  \frametitle{Future Research}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1067
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1068
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1069
  \item Make theorem provers more like a programming environment.\medskip\pause 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1070
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1071
  \item Use all the computational power we get from the hardware to
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1072
  automate reasoning (GPUs).\medskip\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1073
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1074
  \item Provide a comprehensive reasoning infrastructure for many domains and 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1075
  design automated decision procedures. 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1076
  \end{itemize}\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1077
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1078
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1079
  \begin{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1080
  \colorbox{cream}{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1081
  \begin{minipage}{10cm} 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1082
  \color{gray}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1083
  \small
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1084
  ``Formal methods will never have a significant impact until
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1085
   they can be used by people that don't understand them.''\smallskip\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1086
  \mbox{}\footnotesize\hfill attributed to Tom Melham
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1087
  \end{minipage}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1088
  \end{center}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1089
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1090
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1091
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1092
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1093
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1094
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1095
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1096
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1097
  \begin{frame}<1->[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1098
  \frametitle{Conclusion}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1099
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1100
  \begin{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1101
  \item The plan is to make this kind of programming the ``future''.\medskip\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1102
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1103
  \item Though the technology is already there\\ (compiler + micro-kernel os).\medskip\pause
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1104
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1105
  \item Logic and reasoning (especially induction) are important skills for 
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1106
  Computer Scientists.
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1107
  \end{itemize}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1108
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1109
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1110
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1111
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1112
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1113
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1114
text_raw {*
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1115
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1116
  \mode<presentation>{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1117
  \begin{frame}<1>[c]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1118
  \frametitle{
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1119
  \begin{tabular}{c}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1120
  \mbox{}\\[23mm]
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1121
  \alert{\LARGE Thank you very much!}\\
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1122
  \alert{\Large Questions?}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1123
  \end{tabular}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1124
  
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1125
  \end{frame}}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1126
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1127
*}
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1128
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1129
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1130
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1131
(*<*)
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1132
end
ac3470e1e5af slides of my talk
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1133
(*>*)