Slides/slides01.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Thu, 31 Mar 2016 16:50:37 +0100
changeset 157 1fe44fb6d0a4
parent 103 ffe5d850df62
child 197 a35041d5707c
permissions -rw-r--r--
cleaned up scala code
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
     1
\documentclass[dvipsnames,14pt,t]{beamer}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
\usepackage{slides}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
     3
\usepackage{langs}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
\usepackage{graph}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
     5
%\usepackage{grammar}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
     6
\usepackage{soul}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
     7
\usepackage{data}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
     8
\usepackage{proof}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
% beamer stuff 
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    11
\renewcommand{\slidecaption}{Canterbury, 22.2.2016}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
\newcommand{\bl}[1]{\textcolor{blue}{#1}}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    14
\newcommand\grid[1]{%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    15
\begin{tikzpicture}[baseline=(char.base)]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    16
  \path[use as bounding box]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    17
    (0,0) rectangle (1em,1em);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    18
  \draw[red!50, fill=red!20]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    19
    (0,0) rectangle (1em,1em);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    20
  \node[inner sep=1pt,anchor=base west]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    21
    (char) at (0em,\gridraiseamount) {#1};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    22
\end{tikzpicture}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    23
\newcommand\gridraiseamount{0.12em}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    24
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    25
\makeatletter
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    26
\newcommand\Grid[1]{%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    27
  \@tfor\z:=#1\do{\grid{\z}}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    28
\makeatother	
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    29
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    30
\newcommand\Vspace[1][.3em]{%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    31
  \mbox{\kern.06em\vrule height.3ex}%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    32
  \vbox{\hrule width#1}%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    33
  \hbox{\vrule height.3ex}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    34
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    35
\def\VS{\Vspace[0.6em]}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    36
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    37
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    38
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
\begin{document}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
\begin{frame}[t]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
\frametitle{%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
  \begin{tabular}{@ {}c@ {}}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
  \\
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    45
  \Large POSIX Lexing with Derivatives\\[-1.5mm] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    46
  \Large of Regular Expressions\\[-1mm] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    47
  %\normalsize Or, How to Find Bugs with the\\[-5mm] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    48
  %\normalsize Isabelle Theorem Prover
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
  \end{tabular}}\bigskip\bigskip\bigskip
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
  \normalsize
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
  \begin{center}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    53
  \begin{tabular}{c}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    54
  \small Christian Urban\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    55
  \small King's College London\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    56
  \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    57
  \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    58
  Joint work with Fahad Ausaf and Roy Dyckhoff
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
  \end{tabular}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
  \end{center}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
\end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
  \begin{frame}[c]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
  \begin{center}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    69
  \includegraphics[scale=0.2]{isabelle.png}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
  \end{center}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    71
  \mbox{}\\[-20mm]\mbox{}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    72
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    73
  \begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    74
  \item Isabelle interactive theorem prover; 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    75
  some proofs are automatic -- most however need help
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    76
  \item the learning curve is steep; you often have to fight the 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    77
  theorem prover\ldots no different in other ITPs
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    78
  \end{itemize}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    79
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    80
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    81
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    82
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    83
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    84
\begin{frame}[c]
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    85
\frametitle{Why Bother?}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    86
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    87
Surely regular expressions must have been implemented and 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    88
studied to death, no?
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    89
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    90
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    91
\begin{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    92
\begin{axis}[
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    93
    xlabel={{\tt a}s},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    94
    ylabel={time in secs},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    95
    enlargelimits=false,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    96
    xtick={0,5,...,30},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    97
    xmax=30,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    98
    ymax=35,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
    99
    ytick={0,5,...,30},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   100
    scaled ticks=false,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   101
    axis lines=left,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   102
    width=8cm,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   103
    height=6cm, 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   104
    legend entries={Python,Ruby},  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   105
    legend pos=north west,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   106
    legend cell align=left  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   107
]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   108
\addplot[blue,mark=*, mark options={fill=white}] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   109
  table {re-python.data};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   110
\addplot[brown,mark=pentagon*, mark options={fill=white}] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   111
  table {re-ruby.data};  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   112
\end{axis}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   113
\end{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   114
\end{center}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   115
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   116
evil regular expressions: \bl{$({\tt a}?)^n \cdot {\tt a}^n$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   117
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   118
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   119
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   120
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   121
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   122
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   123
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   124
\frametitle{\Large Isabelle Theorem Prover}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   125
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   126
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   127
\item started to use Isabelle after my PhD (in 2000)
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   128
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   129
\item the thesis included a rather complicated 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   130
  ``pencil-and-paper'' proof for a 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   131
  termination argument (sort of $\lambda$-calculus)\medskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   132
 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   133
\item me, my supervisor, the examiners did not find any problems\medskip 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   134
 \begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   135
  \begin{tabular}{@ {}c@ {}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   136
  \includegraphics[scale=0.38]{barendregt.jpg}\\[-2mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   137
  \footnotesize Henk Barendregt
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   138
  \end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   139
  \hspace{2mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   140
  \begin{tabular}{@ {}c@ {}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   141
  \includegraphics[scale=0.20]{andrewpitts.jpg}\\[-2mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   142
  \footnotesize Andrew Pitts
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   143
  \end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   144
  \end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   145
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   146
\item people were building their work on my result      
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   147
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   148
\end{itemize}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   149
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   150
\end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   151
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   152
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   153
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   154
\begin{frame}[t]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   155
\frametitle{\Large Nominal Isabelle}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   156
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   157
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   158
\item implemented a package for the Isabelle prover 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   159
in order to reason conveniently about binders 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   160
 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   161
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   162
\large\bl{$\lambda \alert{x}.\,M$} \hspace{10mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   163
\bl{$\forall \alert{x}.\,P\,x$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   164
\end{center}\bigskip\bigskip\bigskip\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   165
\bigskip\bigskip\bigskip\pause\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   166
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   167
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   168
\item when finally being able to formalise the proof from my PhD, I found that the main result
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   169
      (termination) is correct, but a central lemma needed to
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   170
      be generalised
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   171
\end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   172
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   173
\only<2->{
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   174
\begin{textblock}{3}(13,5)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   175
\includegraphics[scale=0.33]{skeleton.jpg}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   176
\end{textblock}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   177
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   178
\begin{textblock}{3}(5.3,7)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   179
\onslide<1->{
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   180
\begin{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   181
\node at (0,0) [single arrow, shape border rotate=90, fill=red,text=red]{\mbox{a}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   182
\end{tikzpicture}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   183
\end{textblock}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   184
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   185
\begin{textblock}{3}(8.7,7)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   186
\onslide<1->{
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   187
\begin{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   188
\node at (0,0) [single arrow, shape border rotate=90, fill=red,text=red]{\mbox{a}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   189
\end{tikzpicture}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   190
\end{textblock}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   191
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   192
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   193
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   194
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   195
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   196
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   197
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   198
\frametitle{\Large Variable Convention}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   199
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   200
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   201
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   202
\begin{bubble}[10cm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   203
  \color{gray}  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   204
  \small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   205
  {\bf\mbox{}Variable Convention:}\\[1mm] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   206
  If $M_1,\ldots,M_n$ occur in a certain mathematical context
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   207
  (e.g. definition, proof), then in these terms all bound variables 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   208
  are chosen to be different from the free variables.\\[2mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   209
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   210
  \footnotesize\hfill Barendregt in ``The Lambda-Calculus: Its Syntax and Semantics''
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   211
\end{bubble}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   212
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   213
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   214
\mbox{}\\[-8mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   215
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   216
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   217
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   218
\item instead of proving a property for \alert{\bf all} bound
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   219
variables, you prove it only for \alert{\bf some}\ldots?
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   220
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   221
\item feels like it is used in 90\% of papers in PT and FP
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   222
(9.9\% use de-Bruijn indices)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   223
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   224
\item this is mostly OK, but in some corner-cases you can use it
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   225
to prove \alert{\bf false}\ldots we fixed this!
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   226
\end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   227
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   228
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   229
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   230
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   231
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   232
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   233
\frametitle{}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   234
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   235
\begin{tabular}{c@ {\hspace{2mm}}c}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   236
\\[6mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   237
\begin{tabular}{c}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   238
\includegraphics[scale=0.11]{harper.jpg}\\[-2mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   239
{\footnotesize Bob Harper}\\[-2mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   240
{\footnotesize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   241
\end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   242
\begin{tabular}{c}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   243
\includegraphics[scale=0.37]{pfenning.jpg}\\[-2mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   244
{\footnotesize Frank Pfenning}\\[-2mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   245
{\footnotesize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   246
\end{tabular} &
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   247
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   248
\begin{tabular}{p{6cm}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   249
\raggedright
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   250
{published a proof in\\ {\bf ACM Transactions on Computational Logic}, 2005,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   251
$\sim$31pp}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   252
\end{tabular}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   253
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   254
\\[0mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   255
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   256
\begin{tabular}{c}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   257
\includegraphics[scale=0.36]{appel.jpg}\\[-2mm] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   258
{\footnotesize Andrew Appel}\\[-2.5mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   259
{\footnotesize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   260
\end{tabular} &
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   261
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   262
\begin{tabular}{p{6cm}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   263
\raggedright
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   264
{relied on their proof in a\\ {\bf security} critical application}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   265
\end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   266
\end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   267
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   268
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   269
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   270
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   271
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   272
\begin{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   273
\frametitle{Proof-Carrying Code}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   274
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   275
\begin{textblock}{10}(2.5,2.2)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   276
\begin{block}{Idea:}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   277
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   278
\begin{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   279
\draw[help lines,cream] (0,0.2) grid (8,4);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   280
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   281
\draw[line width=1mm, red] (5.5,0.6) rectangle (7.5,4);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   282
\node[anchor=base] at (6.5,2.8) 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   283
     {\small\begin{tabular}{@ {}p{1.9cm}@ {}}\centering  user: untrusted code\end{tabular}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   284
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   285
\draw[line width=1mm, red] (0.1,0.6) rectangle (2.1,4);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   286
  \node[anchor=base] at (1.1,2.3) 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   287
     {\small\begin{tabular}{@ {}p{1.9cm}@ {}}\centering  developer ---\\ web server\end{tabular}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   288
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   289
\onslide<3->{
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   290
  \draw[line width=1mm, red, fill=red] (5.5,0.6) rectangle (7.5,1.8);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   291
  \node[anchor=base,white] at (6.5,1.1) 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   292
     {\small\begin{tabular}{@ {}p{1.9cm}@ {}}\bf\centering proof- checker\end{tabular}};}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   293
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   294
  \node at (3.6,3.0) [single arrow, fill=red,text=white, 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   295
                      minimum height=3.4cm]{\bf code};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   296
  \onslide<2->{
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   297
  \node at (3.6,1.3) [single arrow, fill=red,text=white, 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   298
                      minimum height=3.4cm]{\bf certificate};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   299
  \node at (3.6,1.9) {\small\color{gray}{\mbox{}\hspace{-1mm}a proof in LF}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   300
}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   301
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   302
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   303
\end{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   304
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   305
\end{block}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   306
\end{textblock}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   307
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   308
\begin{textblock}{15}(2,12)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   309
\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   310
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   311
\item<3-> Appel's checker is $\sim$2700 lines of code (1865 loc of\\ LF definitions; 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   312
803 loc in C including 2 library functions)\\[-3mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   313
\item<3-> 167 loc in C implement a type-checker
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   314
\end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   315
\end{textblock}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   316
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   317
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   318
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   319
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   320
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   321
  \begin{frame}<2->[squeeze]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   322
  \frametitle{} 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   323
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   324
  \begin{columns}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   325
  \tikzstyle{every node}=[node distance=25mm,text height=1.5ex, text depth=.25ex]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   326
  \tikzstyle{node1}=[rectangle, minimum size=10mm, rounded corners=3mm, very thick, 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   327
                     draw=black!50, top color=white, bottom color=black!20]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   328
  \tikzstyle{node2}=[rectangle, minimum size=12mm, rounded corners=3mm, very thick, 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   329
                     draw=red!70, top color=white, bottom color=red!50!black!20]
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   330
  
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   331
  \begin{column}{0.8\textwidth}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   332
  \begin{textblock}{0}(1,2)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   333
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   334
  \begin{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   335
  \matrix[ampersand replacement=\&,column sep=7mm, row sep=5mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   336
  { \&[-10mm] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   337
    \node (def1)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}}; \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   338
    \node (proof1) [node1] {\large Proof}; \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   339
    \node (alg1)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}}; \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   340
    
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   341
    \onslide<4->{\node {\begin{tabular}{c}\small 1st\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   342
    \onslide<4->{\node (def2)   [node2] {\large Spec$^\text{+ex}$};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   343
    \onslide<4->{\node (proof2) [node1] {\large Proof};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   344
    \onslide<4->{\node (alg2)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}};} \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   345
     
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   346
    \onslide<5->{\node {\begin{tabular}{c}\small 2nd\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   347
    \onslide<5->{\node (def3)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   348
    \onslide<5->{\node (proof3) [node1] {\large Proof};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   349
    \onslide<5->{\node (alg3)   [node2] {\large Alg$^\text{-ex}$};} \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   350
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   351
    \onslide<6->{\node {\begin{tabular}{c}\small 3rd\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   352
    \onslide<6->{\node (def4)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   353
    \onslide<6->{\node (proof4) [node2] {\large\hspace{1mm}Proof\hspace{1mm}};} \&
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   354
    \onslide<6->{\node (alg4)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}};} \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   355
  };
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   356
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   357
  \draw[->,black!50,line width=2mm] (proof1) -- (def1);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   358
  \draw[->,black!50,line width=2mm] (proof1) -- (alg1);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   359
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   360
  \onslide<4->{\draw[->,black!50,line width=2mm] (proof2) -- (def2);}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   361
  \onslide<4->{\draw[->,black!50,line width=2mm] (proof2) -- (alg2);}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   362
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   363
  \onslide<5->{\draw[->,black!50,line width=2mm] (proof3) -- (def3);}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   364
  \onslide<5->{\draw[->,black!50,line width=2mm] (proof3) -- (alg3);}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   365
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   366
  \onslide<6->{\draw[->,black!50,line width=2mm] (proof4) -- (def4);}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   367
  \onslide<6->{\draw[->,black!50,line width=2mm] (proof4) -- (alg4);}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   368
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   369
  \onslide<3->{\draw[white,line width=1mm] (1.1,3.2) -- (0.9,2.85) -- (1.1,2.35) -- (0.9,2.0);} 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   370
  \end{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   371
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   372
  \end{textblock}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   373
  \end{column}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   374
  \end{columns}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   375
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   376
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   377
  \begin{textblock}{3}(12,3.6)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   378
  \onslide<4->{
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   379
  \begin{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   380
  \node at (0,0) [single arrow, shape border rotate=270, fill=red,text=white]{2h};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   381
  \end{tikzpicture}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   382
  \end{textblock}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   383
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   384
  \begin{textblock}{0}(0.4,12.8)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   385
  \onslide<6->{
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   386
  \begin{bubble}[11cm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   387
  \small Each time one needs to check $\sim$31pp~of 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   388
  informal paper proofs.
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   389
  You have to be able to keep definitions 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   390
  and proofs consistent.
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   391
  \end{bubble}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   392
  \end{textblock}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   393
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   394
  \end{frame}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   395
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   396
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   397
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   398
%  \begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   399
%  \frametitle{\Large Lessons Learned}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   400
%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   401
%  \begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   402
%  \item using a theorem prover we were able to keep a large 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   403
%  proof consistent with changes in the definitions\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   404
%  \item it took us some 10 days to get to the error\ldots
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   405
%  probably the same time Harper and Pfenning needed to \LaTeX{}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   406
%  their paper\bigskip 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   407
%  \item once there, we ran circles around them
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   408
%  \end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   409
%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   410
%  \end{frame}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   411
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   412
  
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   413
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   414
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   415
  \begin{frame}[c]
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   416
  \frametitle{Real-Time Scheduling} 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   417
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   418
  \begin{textblock}{11}(1,3)
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   419
  \begin{tabular}{@{\hspace{-10mm}}l}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   420
  \begin{tikzpicture}[scale=1.1]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   421
  \node at (-2.5,-1.5) {\textcolor{white}{a}};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   422
  \node at (8,4) {\textcolor{white}{a}};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   423
  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   424
    
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   425
  \only<1>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   426
   \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   427
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   428
  \only<2>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   429
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   430
   \draw[fill, blue!50] (3,0) rectangle (5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   431
   \draw[fill, blue!100] (2,3) rectangle (3,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   432
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   433
  \only<3>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   434
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   435
   \draw[fill, blue!50] (3,0) rectangle (4.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   436
   \draw[fill, blue!50] (5.5,0) rectangle (6,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   437
   \draw[fill, blue!100] (2,3) rectangle (3,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   438
   \draw[fill, blue!100] (4.5,3) rectangle (5.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   439
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   440
  \only<4>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   441
   \node at (2.5,0.9) {\small locks a resource};
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   442
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   443
   \draw[blue!50, very thick] (2,0) rectangle (4,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   444
   \draw[blue!100, very thick] (2,3) rectangle (3, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   445
   \draw[red, <-, line width = 2mm] (2,-0.1) -- (2, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   446
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   447
  \only<5>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   448
   \node at (2.5,0.9) {\small locks a resource};
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   449
   \draw[fill, blue!50] (1,0) rectangle (4,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   450
   \draw[blue!100, fill] (4,3) rectangle (5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   451
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   452
  \only<6>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   453
   \node at (2.5,0.9) {\small locks a resource};
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   454
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   455
   \draw[blue!50, very thick] (2,0) rectangle (4,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   456
   \draw[blue!100, very thick] (2,3) rectangle (3, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   457
   \draw[red, <-, line width = 2mm] (2,-0.1) -- (2, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   458
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   459
  \only<7>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   460
   \node at (2.5,0.9) {\small locks a resource};
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   461
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   462
   \draw[blue!50, very thick] (2.5,0) rectangle (4,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   463
   \draw[blue!100, very thick] (2.5,3) rectangle (3.5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   464
   \draw[red, <-, line width = 2mm] (2.5,-0.1) -- (2.5, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   465
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   466
  \only<8>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   467
   \node at (2.5,0.9) {\small locks a resource}; 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   468
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   469
   \draw[blue!50, very thick] (2.5,0) rectangle (4,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   470
   \draw[blue!100, very thick] (2.5,3) rectangle (3.5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   471
   \draw[blue!100, very thick] (2.5,3) rectangle (3.5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   472
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   473
   \draw[red, <-, line width = 2mm] (2.5,-0.1) -- (2.5, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   474
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   475
  \only<9>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   476
   \node at (2.5,0.9) {\small locks a resource}; 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   477
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   478
   \draw[blue!50, very thick] (3.5,0) rectangle (5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   479
   \draw[blue!100, very thick] (3.5,3) rectangle (4.5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   480
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   481
   \draw[red, <-, line width = 2mm] (3.5,-0.1) -- (3.5, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   482
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   483
  \only<10>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   484
   \node at (2.5,0.9) {\small locks a resource}; 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   485
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   486
   \draw[blue!50, very thick] (3.5,0) rectangle (5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   487
   \draw[blue!100, very thick] (3.5,3) rectangle (4.5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   488
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   489
   \draw[red, fill] (3.55,1.5) rectangle (4.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   490
   \draw[red, <-, line width = 2mm] (3.5,-0.1) -- (3.5, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   491
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   492
  \only<11>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   493
   \node at (2.5,0.9) {\small locks a resource};
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   494
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   495
   \draw[blue!50, very thick] (4.5,0) rectangle (6,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   496
   \draw[blue!100, very thick] (4.5,3) rectangle (5.5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   497
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   498
   \draw[red, fill] (3.55,1.5) rectangle (4.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   499
   \draw[red, <-, line width = 2mm] (4.5,-0.1) -- (4.5, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   500
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   501
  \only<12>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   502
   \node at (2.5,0.9) {\small locks a resource}; 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   503
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   504
   \draw[blue!50, very thick] (5.5,0) rectangle (7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   505
   \draw[blue!100, very thick] (5.5,3) rectangle (6.5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   506
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   507
   \draw[red, fill] (3.55,1.5) rectangle (4.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   508
   \draw[red, fill] (4.55,1.5) rectangle (5.5,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   509
   \draw[red, <-, line width = 2mm] (5.5,-0.1) -- (5.5, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   510
   \node [anchor=base] at (6.3, 1.8) {\Large\ldots};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   511
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   512
  \only<13>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   513
   \node at (2.5,0.9) {\small locks a resource}; 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   514
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   515
   \draw[blue!50, very thick] (2,0) rectangle (4,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   516
   \draw[blue!100, very thick] (2,3) rectangle (3, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   517
   \draw[red, <-, line width = 2mm] (2,-0.1) -- (2, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   518
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   519
  \only<14>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   520
   \node at (2.5,3.9) {\small locks a resource}; 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   521
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   522
   \draw[blue!50, fill] (2,3) rectangle (4,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   523
   \draw[blue!100, very thick] (4,3) rectangle (5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   524
   \draw[blue!50, ->, line width = 2mm] (2,1) -- (2, 2.5);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   525
   \draw[red, <-, line width = 2mm] (2,-0.1) -- (2, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   526
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   527
  \only<15>{
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   528
   \node at (2.5,3.9) {\small locks a resource};  
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   529
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   530
   \draw[blue!50, fill] (2,3) rectangle (4,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   531
   \draw[blue!100, very thick] (4,3) rectangle (5, 3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   532
   \draw[red, <-, line width = 2mm] (2.5,-0.1) -- (2.5, -1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   533
   \draw[red, very thick] (2.5,1.5) rectangle (3.5,2.1); 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   534
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   535
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   536
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   537
  \draw[very thick,->](0,0) -- (8,0);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   538
  \node [anchor=base] at (8, -0.3) {\scriptsize time};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   539
  \node [anchor=base] at (0, -0.3) {\scriptsize 0};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   540
  \node [anchor=base] at (-1.2, 0.2) {\small low priority};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   541
  \only<2->{\node [anchor=base] at (-1.2, 3.2) {\small high priority};}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   542
  \only<8->{\node [anchor=base] at (-1.5, 1.7) {\small medium pr.};}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   543
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   544
  \end{tikzpicture}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   545
  \end{tabular}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   546
  \end{textblock}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   547
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   548
  \begin{textblock}{0}(2.5,13)%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   549
  \small
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   550
  \onslide<3->{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   551
  \begin{bubble}[8cm]%
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   552
  RT-Scheduling: You want to avoid that a 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   553
  high-priority process is starved indefinitely.
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   554
  \end{bubble}}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   555
  \end{textblock}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   556
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   557
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   558
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   559
  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   560
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   561
  \begin{frame}[c]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   562
  \frametitle{\Large Priority Inheritance Scheduling}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   563
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   564
  \begin{itemize}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   565
  \item Let a low priority process \bl{$L$} temporarily inherit 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   566
    the high priority of \bl{$H$} until \bl{$L$} leaves the critical 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   567
    section unlocking the resource.\bigskip
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   568
  \item Once the resource is unlocked, \bl{$L$} ``returns to its original 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   569
    priority level.''\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   570
    \mbox{}\hfill\footnotesize
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   571
    \begin{tabular}{p{6cm}@{}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   572
    L.~Sha, R.~Rajkumar, and J.~P.~Lehoczky. 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   573
    {\it Priority Inheritance Protocols: An Approach to 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   574
    Real-Time Synchronization}. IEEE Transactions on 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   575
    Computers, 39(9):1175–1185, 1990
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   576
    \end{tabular}\bigskip\normalsize\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   577
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   578
  \item Proved correct, reviewed in a respectable journal....what could possibly be wrong?
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   579
    
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   580
  \end{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   581
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   582
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   583
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   584
  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   585
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   586
  \begin{frame}[c]
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   587
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   588
  \begin{textblock}{11}(1,3)
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   589
  \begin{tabular}{@{\hspace{-10mm}}l}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   590
  \begin{tikzpicture}[scale=1.1]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   591
  \node at (-2.5,-1.5) {\textcolor{white}{a}};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   592
  \node at (8,4) {\textcolor{white}{a}};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   593
  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   594
  \only<1>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   595
    \draw[fill, blue!50] (1,0) rectangle (6,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   596
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   597
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   598
    \node at (3.5,0.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   599
    \node at (5.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   600
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   601
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   602
    \draw[very thick,blue!100] (3.5,0) -- (3.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   603
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   604
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   605
  \only<2>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   606
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   607
    \draw[very thick, blue!50] (3,0) rectangle (6,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   608
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   609
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   610
    \node at (3.5,0.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   611
    \node at (5.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   612
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   613
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   614
    \draw[very thick,blue!100] (3.5,0) -- (3.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   615
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   616
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   617
  \only<3>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   618
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   619
    \draw[very thick, blue!50] (3,0) rectangle (6,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   620
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   621
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   622
    \node at (3.5,0.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   623
    \node at (5.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   624
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   625
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   626
    \draw[very thick,blue!100] (3.5,0) -- (3.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   627
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   628
    \draw[very thick,blue!100] (3,3) rectangle (4,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   629
    \node at (3.5,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   630
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   631
  \only<4>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   632
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   633
    \draw[very thick, blue!50] (3,0) rectangle (6,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   634
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   635
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   636
    \node at (3.5,0.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   637
    \node at (5.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   638
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   639
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   640
    \draw[very thick,blue!100] (3.5,0) -- (3.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   641
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   642
    \draw[very thick,blue!100] (3,3) rectangle (4,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   643
    \node at (3.5,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   644
    \draw[very thick,blue!100] (4,3) rectangle (5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   645
    \node at (4.5,3.3) {\small $B$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   646
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   647
  \only<5>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   648
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   649
    \draw[very thick, blue!50] (3,3) rectangle (6,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   650
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   651
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   652
    \node at (3.5,3.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   653
    \node at (5.7,3.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   654
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   655
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   656
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   657
    \draw[very thick,blue!100] (5.7,3) -- (5.7,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   658
    \draw[very thick,blue!100] (6,3) rectangle (7,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   659
    \node at (6.5,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   660
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   661
    \node at (7.5,3.3) {\small $B$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   662
    \draw[blue!50, ->, line width = 2mm] (3,1) -- (3, 2.5);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   663
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   664
  \only<6>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   665
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   666
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   667
    \draw[very thick, blue!50] (3.5,3) rectangle (6,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   668
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   669
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   670
    \node at (3.5,3.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   671
    \node at (5.7,3.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   672
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   673
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   674
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   675
    \draw[very thick,blue!100] (5.7,3) -- (5.7,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   676
    \draw[very thick,blue!100] (6,3) rectangle (7,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   677
    \node at (6.5,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   678
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   679
    \node at (7.5,3.3) {\small $B$}; 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   680
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   681
  \only<7>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   682
   \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   683
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   684
    \draw[very thick, blue!50] (3.5,0) rectangle (6,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   685
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   686
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   687
    \node at (3.5,3.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   688
    \node at (5.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   689
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   690
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   691
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   692
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   693
    \draw[very thick,blue!100] (6,3) rectangle (7,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   694
    \node at (6.5,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   695
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   696
    \node at (7.5,3.3) {\small $B$};  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   697
    \draw[blue!50, <-, line width = 2mm] (3.5,1) -- (3.5, 2.5);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   698
    \draw[blue!50, <-, line width = 2mm] (4,3.3) -- (5.5,3.3);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   699
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   700
  \only<8>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   701
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   702
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   703
    \draw[very thick, blue!50] (4.5,0) rectangle (7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   704
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   705
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   706
    \node at (3.5,3.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   707
    \node at (6.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   708
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   709
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   710
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   711
    \draw[very thick,blue!100] (6.7,0) -- (6.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   712
    \draw[fill,blue!100] (3.5,3) rectangle (4.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   713
    \node at (4,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   714
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   715
    \node at (7.5,3.3) {\small $B$};  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   716
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   717
  \only<9>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   718
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   719
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   720
    \draw[fill, blue!50] (4.5,0) rectangle (5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   721
    \draw[very thick, blue!50] (5,0) rectangle (7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   722
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   723
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   724
    \node at (3.5,3.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   725
    \node at (6.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   726
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   727
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   728
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   729
    \draw[very thick,blue!100] (6.7,0) -- (6.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   730
    \draw[fill,blue!100] (3.5,3) rectangle (4.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   731
    \node at (4,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   732
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   733
    \node at (7.5,3.3) {\small $B$};  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   734
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   735
  \only<10>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   736
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   737
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   738
    \draw[fill, blue!50] (4.5,0) rectangle (5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   739
    \draw[very thick, blue!50] (5,0) rectangle (7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   740
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   741
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   742
    \node at (3.5,3.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   743
    \node at (6.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   744
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   745
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   746
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   747
    \draw[very thick,blue!100] (6.7,0) -- (6.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   748
    \draw[fill,blue!100] (3.5,3) rectangle (4.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   749
    \node at (4,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   750
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   751
    \node at (7.5,3.3) {\small $B$};  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   752
    \draw[red, fill] (5,1.5) rectangle (6,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   753
    \draw[red, fill] (6.05,1.5) rectangle (7,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   754
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   755
  \only<11>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   756
   \draw[fill, blue!50] (1,0) rectangle (3,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   757
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   758
    \draw[fill, blue!50] (4.5,0) rectangle (5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   759
    \draw[very thick, blue!50] (5,0) rectangle (7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   760
    \node at (1.5,0.9) {\small $A_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   761
    \node at (2.0,0.9) {\small $B_L$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   762
    \node at (3.5,3.9) {\small $A_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   763
    \node at (6.7,0.9) {\small $B_R$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   764
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   765
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   766
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   767
    \draw[very thick,blue!100] (6.7,0) -- (6.7,0.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   768
    \draw[fill,blue!100] (3.5,3) rectangle (4.5,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   769
    \node at (4,3.3) {\small $A$};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   770
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   771
    \node at (7.5,3.3) {\small $B$};  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   772
    \draw[red, fill] (5,1.5) rectangle (6,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   773
    \draw[red, fill] (6.05,1.5) rectangle (7,2.1);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   774
    \draw[blue!50, ->, line width = 2mm] (7.1,0.4) -- (8, 0.4);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   775
    \draw[blue!50, ->, line width = 2mm] (7.1,4) -- (8,4);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   776
  }
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   777
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   778
  \draw[very thick,->](0,0) -- (8,0);
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   779
  \node [anchor=base] at (8, -0.3) {\scriptsize time};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   780
  \node [anchor=base] at (0, -0.3) {\scriptsize 0};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   781
  \node [anchor=base] at (-1.2, 0.2) {\small low priority};
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   782
  \only<2->{\node [anchor=base] at (-1.2, 3.2) {\small high priority};}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   783
  \only<10->{\node [anchor=base] at (-1.5, 1.7) {\small medium pr.};}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   784
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   785
  \end{tikzpicture}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   786
  \end{tabular}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   787
  \end{textblock}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   788
  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   789
  \begin{textblock}{0}(2.5,13)%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   790
  \small
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   791
  \onslide<11>{
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   792
  \begin{bubble}[8cm]%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   793
  Scheduling: You want to avoid that a high 
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   794
  priority process is starved indefinitely.
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   795
  \end{bubble}}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   796
  \end{textblock}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   797
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   798
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   799
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   800
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   801
  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   802
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   803
  \begin{frame}[c]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   804
  \frametitle{\Large Priority Inheritance Scheduling}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   805
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   806
  \begin{itemize}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   807
  \item Let a low priority process \bl{$L$} temporarily inherit 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   808
    the high priority of \bl{$H$} until \bl{$L$} leaves the critical 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   809
    section unlocking the resource.\bigskip
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   810
  \item Once the resource is unlocked, \bl{$L$} returns to its original 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   811
    priority level. \alert{\bf BOGUS}\pause\bigskip
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   812
  \item \ldots \bl{$L$} needs to switch to the highest 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   813
    \alert{\bf remaining} priority of the threads that it blocks.
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   814
  \end{itemize}\bigskip
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   815
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   816
  \small this error is already known since around 1999
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   817
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   818
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   819
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   820
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   821
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   822
  \begin{frame}[c]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   823
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   824
  \begin{center}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   825
  \includegraphics[scale=0.25]{p3.jpg}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   826
  \end{center}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   827
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   828
   \begin{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   829
  \item by Rajkumar, 1991
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   830
  \item \it ``it resumes the priority it had at the point of entry into the critical 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   831
  section''
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   832
  \end{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   833
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   834
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   835
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   836
     
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   837
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   838
  \begin{frame}[c]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   839
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   840
  \begin{center}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   841
  \includegraphics[scale=0.25]{p2.jpg}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   842
  \end{center}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   843
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   844
   \begin{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   845
  \item by Jane Liu, 2000
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   846
  \item {\it ``The job $J_l$ executes at its inherited 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   847
    priority until it releases $R$; at that time, the 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   848
    priority of $J_l$ returns to its priority 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   849
    at the time when it acquires the resource $R$.''}\medskip
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   850
  \item \small gives pseudo code and totally bogus data structures  
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   851
  \item \small interesting part is ``{\it left as an exercise}''
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   852
  \end{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   853
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   854
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   855
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   856
     
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   857
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   858
  \begin{frame}[c]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   859
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   860
  \begin{center}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   861
  \includegraphics[scale=0.15]{p1.pdf}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   862
  \end{center}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   863
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   864
  \begin{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   865
  \item by Laplante and Ovaska, 2011 (\$113.76)
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   866
  \item \it ``when $[$the task$]$ exits the critical section that
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   867
        caused the block, it reverts to the priority it had
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   868
        when it entered that section'' 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   869
  \end{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   870
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   871
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   872
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   873
  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   874
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   875
  \begin{frame}[c]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   876
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   877
  \begin{center}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   878
  \includegraphics[scale=0.22]{p5.jpg}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   879
  \end{center}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   880
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   881
  \begin{itemize}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   882
  \item by Silberschatz, Galvin and Gagne (9th edition, 2013)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   883
  \item \it ``Upon releasing the
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   884
  lock, the $[$low-priority$]$ thread will revert to its original
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   885
  priority.''
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   886
  \end{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   887
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   888
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   889
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   890
    
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   891
  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   892
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   893
  \begin{frame}[c]
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   894
  \frametitle{Priority Scheduling}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   895
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   896
  \begin{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   897
  \item a scheduling algorithm that is widely used in real-time operating systems
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   898
  \item has been ``proved'' correct by hand in a paper in 1990
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   899
  \item but this algorithm turned out to be incorrect, despite its ``proof''\bigskip\pause
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   900
  
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   901
  \item we (generalised) the algorithm and then {\bf really} proved that it is correct	
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   902
  \item we implemented this algorithm in a small OS called PINTOS (used for teaching at Stanford)
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   903
  \item our implementation was faster than their reference implementation
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   904
  \end{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   905
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   906
  \end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   907
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   908
   
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   909
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   910
%  \begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   911
%  \frametitle{\Large{}Mars Pathfinder Mission 1997}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   912
%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   913
%  \begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   914
%  \includegraphics[scale=0.15]{marspath1.png}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   915
%  \includegraphics[scale=0.16]{marspath3.png}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   916
%  \includegraphics[scale=0.3]{marsrover.png}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   917
%  \end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   918
%  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   919
%  \begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   920
%  \item despite NASA's famous testing procedures, the lander crashed frequently on Mars
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   921
%  \item a scheduling algorithm was not used in the OS at the 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   922
%  beginning; PIP was enabled after the cause was identified
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   923
%  \end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   924
%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   925
%  \end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   926
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   927
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   928
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   929
  \begin{frame}[c]
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   930
  \frametitle{Lessons Learned}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   931
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   932
  \begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   933
  \item our proof-technique is adapted from security 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   934
  protocols\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   935
 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   936
  \item do not venture outside your field of expertise 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   937
  \includegraphics[scale=0.03]{smiley.jpg}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   938
  \bigskip
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   939
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   940
  \item we solved the single-processor case; the multi-processor 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   941
  case: no idea!
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   942
  \end{itemize}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   943
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   944
  \end{frame}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   945
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   946
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   947
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   948
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   949
\frametitle{Regular Expressions}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   950
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   951
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   952
\begin{textblock}{6}(2,5)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   953
  \begin{tabular}{rrl@ {\hspace{13mm}}l}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   954
  \bl{$r$} & \bl{$::=$}  & \bl{$\varnothing$}   & null\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   955
           & \bl{$\mid$} & \bl{$\epsilon$}      & empty string\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   956
           & \bl{$\mid$} & \bl{$c$}             & character\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   957
           & \bl{$\mid$} & \bl{$r_1 \cdot r_2$} & sequence\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   958
           & \bl{$\mid$} & \bl{$r_1 + r_2$}     & alternative / choice\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   959
           & \bl{$\mid$} & \bl{$r^*$}           & star (zero or more)\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   960
  \end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   961
  \end{textblock}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   962
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   963
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   964
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   965
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   966
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   967
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   968
\frametitle{\begin{tabular}{c}The Derivative of a Rexp\end{tabular}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   969
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   970
\large
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   971
If \bl{$r$} matches the string \bl{$c\!::\!s$}, what is a regular 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   972
expression that matches just \bl{$s$}?\bigskip\bigskip\bigskip\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   973
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   974
\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   975
\bl{$der\,c\,r$} gives the answer, Brzozowski (1964), Owens (2005)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   976
``\ldots have been lost in the sands of time\ldots''
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   977
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   978
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   979
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   980
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   981
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   982
\frametitle{}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   983
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   984
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   985
\ldots{}whether a regular expression can match the empty string:
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   986
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   987
\begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   988
\bl{$nullable(\varnothing)$}      & \bl{$\dn$} & \bl{$false$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   989
\bl{$nullable(\epsilon)$}           & \bl{$\dn$} &  \bl{$true$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   990
\bl{$nullable (c)$}                    & \bl{$\dn$} &  \bl{$false$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   991
\bl{$nullable (r_1 + r_2)$}       & \bl{$\dn$} &  \bl{$nullable(r_1) \vee nullable(r_2)$} \\ 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   992
\bl{$nullable (r_1 \cdot r_2)$} & \bl{$\dn$} &  \bl{$nullable(r_1) \wedge nullable(r_2)$} \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   993
\bl{$nullable (r^*)$}                 & \bl{$\dn$} & \bl{$true$} \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   994
\end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   995
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   996
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   997
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   998
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
   999
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1000
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1001
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1002
\frametitle{\begin{tabular}{c}The Derivative of a Rexp\end{tabular}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1003
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1004
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1005
\begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {\hspace{-10mm}}l@ {}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1006
  \bl{$der\, c\, (\varnothing)$}      & \bl{$\dn$} & \bl{$\varnothing$} & \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1007
  \bl{$der\, c\, (\epsilon)$}           & \bl{$\dn$} & \bl{$\varnothing$} & \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1008
  \bl{$der\, c\, (d)$}                     & \bl{$\dn$} & \bl{if $c = d$ then $\epsilon$ else $\varnothing$} & \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1009
  \bl{$der\, c\, (r_1 + r_2)$}        & \bl{$\dn$} & \bl{$der\, c\, r_1 + der\, c\, r_2$} & \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1010
  \bl{$der\, c\, (r_1 \cdot r_2)$}  & \bl{$\dn$}  & \bl{if $nullable (r_1)$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1011
  & & \bl{then $(der\,c\,r_1) \cdot r_2 + der\, c\, r_2$}\\ 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1012
  & & \bl{else $(der\, c\, r_1) \cdot r_2$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1013
  \bl{$der\, c\, (r^*)$}          & \bl{$\dn$} & \bl{$(der\,c\,r) \cdot (r^*)$} &\medskip\\\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1014
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1015
  \bl{$\textit{ders}\, []\, r$}     & \bl{$\dn$} & \bl{$r$} & \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1016
  \bl{$\textit{ders}\, (c\!::\!s)\, r$} & \bl{$\dn$} & \bl{$\textit{ders}\,s\,(der\,c\,r)$} & \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1017
  \end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1018
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1019
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1020
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1021
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1022
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1023
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1024
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1025
\frametitle{\begin{tabular}{c}\bl{$({\tt a}?)^n \cdot {\tt a}^n$}\end{tabular}}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1026
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1027
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1028
\begin{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1029
\begin{axis}[
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1030
    xlabel={\pcode{a}s},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1031
    ylabel={time in secs},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1032
    enlargelimits=false,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1033
    xtick={0,200,...,1000},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1034
    xmax=1000,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1035
    ytick={0,5,...,30},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1036
    scaled ticks=false,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1037
    axis lines=left,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1038
    width=9.5cm,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1039
    height=7cm, 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1040
    legend entries={Python,Ruby,Scala V1,Scala V2},  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1041
    legend pos=north west,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1042
    legend cell align=left  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1043
]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1044
\addplot[blue,mark=*, mark options={fill=white}] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1045
  table {re-python.data};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1046
\addplot[brown,mark=pentagon*, mark options={fill=white}] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1047
  table {re-ruby.data};  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1048
\addplot[red,mark=triangle*,mark options={fill=white}] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1049
  table {re1.data};  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1050
\addplot[green,mark=square*,mark options={fill=white}] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1051
  table {re2b.data};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1052
\end{axis}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1053
\end{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1054
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1055
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1056
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1057
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1058
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1059
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1060
\begin{frame}[t]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1061
\frametitle{\begin{tabular}{c}\bl{$({\tt a}?)^n \cdot {\tt a}^n$}\end{tabular}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1062
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1063
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1064
\begin{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1065
\begin{axis}[
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1066
    xlabel={\pcode{a}s},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1067
    ylabel={time in secs},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1068
    enlargelimits=false,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1069
    xtick={0,3000,...,12000},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1070
    xmax=12000,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1071
    ymax=35,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1072
    ytick={0,5,...,30},
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1073
    scaled ticks=false,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1074
    axis lines=left,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1075
    width=9cm,
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1076
    height=7cm
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1077
]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1078
\addplot[green,mark=square*,mark options={fill=white}] table {re2b.data};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1079
\addplot[black,mark=square*,mark options={fill=white}] table {re3.data};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1080
\end{axis}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1081
\end{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1082
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1083
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1084
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1085
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1086
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1087
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1088
\begin{frame}[c]
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1089
\frametitle{Correctness}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1090
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1091
It is a relative easy exercise in a theorem prover:
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1092
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1093
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1094
\bl{$matches(r, s)$}  if and only if  \bl{$s \in L(r)$} 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1095
\end{center}\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1096
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1097
\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1098
\bl{$matches(r, s) \dn nullable(ders(r, s))$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1099
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1100
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1101
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1102
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1103
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1104
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1105
\frametitle{POSIX Regex Matching}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1106
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1107
Two rules:
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1108
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1109
\begin{itemize}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1110
\item Longest match rule (``maximal munch rule''): The 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1111
longest initial substring matched by any regular expression 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1112
is taken as the next token.
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1113
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1114
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1115
\bl{$\texttt{\Grid{iffoo\VS bla}}$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1116
\end{center}\medskip
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1117
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1118
\item Rule priority:
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1119
For a particular longest initial substring, the first regular
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1120
expression that can match determines the token.
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1121
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1122
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1123
\bl{$\texttt{\Grid{if\VS bla}}$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1124
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1125
\end{itemize}\bigskip\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1126
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1127
\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1128
\hfill Kuklewicz: most POSIX matchers are buggy\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1129
\footnotesize
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1130
\hfill \url{http://www.haskell.org/haskellwiki/Regex_Posix}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1131
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1132
\end{frame}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1133
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1134
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1135
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1136
\begin{frame}[c]
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1137
\frametitle{POSIX Regex Matching}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1138
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1139
\begin{itemize}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1140
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1141
\item Sulzmann \& Lu came up with a beautiful
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1142
idea for how to extend the simple regular expression 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1143
matcher to POSIX matching/lexing (FLOPS 2014)\bigskip\bigskip\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1144
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1145
\begin{tabular}{@{\hspace{4cm}}c@{}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1146
  \includegraphics[scale=0.14]{sulzmann.jpg}\\[-2mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1147
  \hspace{0cm}\footnotesize Martin Sulzmann
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1148
\end{tabular}\bigskip\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1149
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1150
\item the idea: define an inverse operation to the derivatives
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1151
\end{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1152
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1153
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1154
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1155
\end{frame}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1156
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1157
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1158
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1159
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1160
\begin{frame}[c]
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1161
\frametitle{Regexes and Values}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1162
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1163
Regular expressions and their corresponding values:
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1164
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1165
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1166
\begin{columns}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1167
\begin{column}{3cm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1168
\begin{tabular}{@{}rrl@{}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1169
  \bl{$r$} & \bl{$::=$}  & \bl{$\varnothing$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1170
           & \bl{$\mid$} & \bl{$\epsilon$}   \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1171
           & \bl{$\mid$} & \bl{$c$}          \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1172
           & \bl{$\mid$} & \bl{$r_1 \cdot r_2$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1173
           & \bl{$\mid$} & \bl{$r_1 + r_2$}   \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1174
  \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1175
           & \bl{$\mid$} & \bl{$r^*$}         \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1176
  \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1177
  \end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1178
\end{column}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1179
\begin{column}{3cm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1180
\begin{tabular}{@{\hspace{-7mm}}rrl@{}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1181
  \bl{$v$} & \bl{$::=$}  & \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1182
           &             & \bl{$Empty$}   \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1183
           & \bl{$\mid$} & \bl{$Char(c)$}          \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1184
           & \bl{$\mid$} & \bl{$Seq(v_1,v_2)$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1185
           & \bl{$\mid$} & \bl{$Left(v)$}   \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1186
           & \bl{$\mid$} & \bl{$Right(v)$}  \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1187
           & \bl{$\mid$} & \bl{$[]$}      \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1188
           & \bl{$\mid$} & \bl{$[v_1,\ldots\,v_n]$} \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1189
  \end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1190
\end{column}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1191
\end{columns}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1192
\end{center}\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1193
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1194
There is also a notion of a string behind a value: \bl{$|v|$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1195
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1196
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1197
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1198
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1199
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1200
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1201
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1202
\frametitle{Sulzmann \& Lu Matcher}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1203
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1204
We want to match the string \bl{$abc$} using \bl{$r_1$}:
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1205
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1206
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1207
\begin{tikzpicture}[scale=2,node distance=1.3cm,every node/.style={minimum size=8mm}]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1208
\node (r1)  {\bl{$r_1$}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1209
\node (r2) [right=of r1] {\bl{$r_2$}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1210
\draw[->,line width=1mm]  (r1) -- (r2) node[above,midway] {\bl{$der\,a$}};\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1211
\node (r3) [right=of r2] {\bl{$r_3$}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1212
\draw[->,line width=1mm]  (r2) -- (r3) node[above,midway] {\bl{$der\,b$}};\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1213
\node (r4) [right=of r3] {\bl{$r_4$}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1214
\draw[->,line width=1mm]  (r3) -- (r4) node[above,midway] {\bl{$der\,c$}};\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1215
\draw (r4) node[anchor=west] {\;\raisebox{3mm}{\bl{$\;\;nullable?$}}};\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1216
\node (v4) [below=of r4] {\bl{$v_4$}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1217
\draw[->,line width=1mm]  (r4) -- (v4);\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1218
\node (v3) [left=of v4] {\bl{$v_3$}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1219
\draw[->,line width=1mm]  (v4) -- (v3) node[below,midway] {\bl{$inj\,c$}};\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1220
\node (v2) [left=of v3] {\bl{$v_2$}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1221
\draw[->,line width=1mm]  (v3) -- (v2) node[below,midway] {\bl{$inj\,b$}};\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1222
\node (v1) [left=of v2] {\bl{$v_1$}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1223
\draw[->,line width=1mm]  (v2) -- (v1) node[below,midway] {\bl{$inj\,a$}};\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1224
\draw[->,line width=0.5mm]  (r3) -- (v3);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1225
\draw[->,line width=0.5mm]  (r2) -- (v2);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1226
\draw[->,line width=0.5mm]  (r1) -- (v1);
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1227
\draw (r4) node[anchor=north west] {\;\raisebox{-8mm}{\bl{$mkeps$}}};
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1228
\end{tikzpicture}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1229
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1230
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1231
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1232
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1233
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1234
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1235
\begin{frame}[t,squeeze]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1236
\frametitle{Sulzmann \& Lu Paper}
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1237
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1238
\begin{itemize}
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1239
\item I have no doubt the algorithm is correct --- 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1240
  the problem, I do not believe their proof.
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1241
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1242
  \begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1243
  \begin{bubble}[10cm]\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1244
  ``How could I miss this? Well, I was rather careless when 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1245
  stating this Lemma :)\smallskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1246
 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1247
  Great example how formal machine checked proofs (and 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1248
  proof assistants) can help to spot flawed reasoning steps.''
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1249
  \end{bubble}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1250
  \end{center}\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1251
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1252
  \begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1253
  \begin{bubble}[10cm]\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1254
  ``Well, I don't think there's any flaw. The issue is how to 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1255
  come up with a mechanical proof. In my world mathematical 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1256
  proof $=$ mechanical proof doesn't necessarily hold.''
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1257
  \end{bubble}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1258
  \end{center}\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1259
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1260
\end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1261
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1262
  \only<3>{%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1263
  \begin{textblock}{11}(1,4.4)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1264
  \begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1265
  \begin{bubble}[10.9cm]\small\centering
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1266
  \includegraphics[scale=0.37]{msbug.png}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1267
  \end{bubble}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1268
  \end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1269
  \end{textblock}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1270
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1271
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1272
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1273
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1274
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1275
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1276
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1277
\frametitle{\begin{tabular}{c}The Proof Idea\\[-1mm] by Sulzmann \& Lu
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1278
\end{tabular}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1279
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1280
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1281
\item introduce an inductively defined ordering relation 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1282
\bl{$v \succ_r v'$} which captures the idea of POSIX matching
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1283
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1284
\item the algorithm returns the maximum of all possible
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1285
 values that are possible for a regular expression.\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1286
 \bigskip\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1287
 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1288
\item the idea is from a paper by Cardelli \& Frisch about 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1289
greedy matching (greedy $=$ preferring instant gratification to delayed
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1290
repletion):
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1291
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1292
\item e.g.~given \bl{$(a + (b + ab))^*$} and string \bl{$ab$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1293
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1294
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1295
\begin{tabular}{ll}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1296
greedy: & \bl{$[Left(a), Right(Left(b)]$}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1297
POSIX:  & \bl{$[Right(Right(a, b)))]$}  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1298
\end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1299
\end{center} 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1300
\end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1301
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1302
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1303
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1304
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1305
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1306
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1307
\frametitle{}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1308
\centering
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1309
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1310
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1311
\bl{\infer{\vdash Empty : \epsilon}{}}\hspace{15mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1312
\bl{\infer{\vdash Char(c): c}{}}\bigskip
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1313
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1314
\bl{\infer{\vdash Seq(v_1, v_2) : r_1\cdot r_2}{\vdash v_1 : r_1 \quad \vdash v_2 : r_2}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1315
\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1316
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1317
\bl{\infer{\vdash Left(v) : r_1 + r_2}{\vdash v : r_1}}\hspace{15mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1318
\bl{\infer{\vdash Right(v): r_1 + r_2}{\vdash v : r_2}}\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1319
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1320
\bl{\infer{\vdash [] : r^*}{}}\hspace{15mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1321
\bl{\infer{\vdash [v_1,\ldots, v_n] : r^*}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1322
          {\vdash v_1 : r \quad\ldots\quad \vdash v_n : r}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1323
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1324
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1325
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1326
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1327
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1328
\begin{frame}<1>[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1329
\frametitle{}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1330
\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1331
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1332
\begin{tabular}{@{}lll@{}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1333
\bl{$POSIX(v, r)$} & \bl{$\dn$} & \bl{$\vdash v : r$}\\ 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1334
 & &   \bl{$\wedge \;\;(\forall v'.\;\; \vdash v' : r \,\wedge\, |v'| = |v| 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1335
     \Rightarrow v \succ_{\alert<2>{r}} v')$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1336
\end{tabular}\bigskip\bigskip\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1337
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1338
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1339
\centering
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1340
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1341
\bl{\infer{Seq(v_1, v_2) \succ_{\alert<2>{r_1\cdot r_2}} Seq(v'_1, v'_2)}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1342
   {v_1 = v'_1 \quad v_2 \succ_{\alert<2>{r_2}} v'_2}}\hspace{3mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1343
\bl{\infer{Seq(v_1, v_2) \succ_{\alert<2>{r_1\cdot r_2}} Seq(v'_1, v'_2)}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1344
   {v_1 \not= v'_1 \quad v_1 \succ_{\alert<2>{r_1}} v'_1}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1345
\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1346
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1347
\bl{\infer{Left(v) \succ_{\alert<2>{r_1 + r_2}} Left(v')}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1348
          {v \succ_{\alert<2>{r_1}} v'}}\hspace{15mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1349
\bl{\infer{Right(v) \succ_{\alert<2>{r_1 + r_2}} Right(v')}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1350
          {v \succ_{\alert<2>{r_2}} v'}}\bigskip\medskip
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1351
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1352
\bl{\infer{Left(v) \succ_{\alert<2>{r_1 + r_2}} Right(v')}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1353
          {length |v|  \ge length |v'|}}\hspace{15mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1354
\bl{\infer{Right(v) \succ_{\alert<2>{r_1 + r_2}} Left(v')}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1355
          {length |v| >  length |v'|}}\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1356
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1357
\bl{$\big\ldots$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1358
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1359
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1360
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1361
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1362
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1363
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1364
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1365
\frametitle{Problems}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1366
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1367
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1368
\item Sulzmann: \ldots Let's assume \bl{$v$} is not 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1369
    a $POSIX$ value, then there must be another one
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1370
    \ldots contradiction.\bigskip\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1371
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1372
\item Exists?
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1373
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1374
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1375
\bl{$L(r) \not= \varnothing \;\Rightarrow\; POSIX(v, r)$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1376
\end{center}\bigskip\bigskip\pause
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1377
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1378
\item in the sequence case, the induction hypotheses require
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1379
\bl{$|v_1| = |v'_1|$} and \bl{$|v_2| = |v'_2|$}, 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1380
but you only know
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1381
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1382
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1383
\bl{$|v_1| \;@\; |v_2| = |v'_1| \;@\; |v'_2|$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1384
\end{center}\pause\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1385
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1386
\item although one begins with the assumption that the two 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1387
values have the same flattening, this cannot be maintained 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1388
as one descends into the induction (alternative, sequence)
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1389
\end{itemize}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1390
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1391
\end{frame}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1392
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1393
157
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1394
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1395
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1396
\frametitle{Our Solution}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1397
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1398
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1399
\item direct definition of what a POSIX value is, using
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1400
\bl{$s \in r \to v$}:
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1401
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1402
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1403
\bl{\infer{[] \in \epsilon \to Empty}{}}\hspace{15mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1404
\bl{\infer{c \in c \to Char(c)}{}}\bigskip\medskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1405
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1406
\bl{\infer{s \in r_1 + r_2 \to Left(v)}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1407
          {s \in r_1 \to v}}\hspace{10mm}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1408
\bl{\infer{s \in r_1 + r_2 \to Right(v)}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1409
          {s \in r_2 \to v & s \not\in L(r_1)}}\bigskip\medskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1410
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1411
\bl{\infer{s_1 @ s_2 \in r_1 \cdot r_2 \to Seq(v_1, v_2)}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1412
          {\small\begin{array}{l}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1413
           s_1 \in r_1 \to v_1 \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1414
           s_2 \in r_2 \to v_2 \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1415
           \neg(\exists s_3\,s_4.\; s_3 \not= []
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1416
           \wedge s_3 @ s_4 = s_2 \wedge
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1417
           s_1 @ s_3 \in L(r_1) \wedge
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1418
           s_4 \in L(r_2))
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1419
           \end{array}}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1420
           
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1421
\bl{\ldots}           
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1422
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1423
\end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1424
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1425
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1426
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1427
\begin{frame}[t]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1428
  \frametitle{\Large\begin{tabular}{@{}c@{}}Pencil-and-Paper Proofs\\[-1mm] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1429
  in CS are normally incorrect\end{tabular}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1430
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1431
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1432
\item case in point, in one of Roy's proofs he made the 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1433
incorrect inference
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1434
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1435
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1436
if \bl{$\forall s.\; |v_2| \alert{\not}\in L(der\,c\,r_1) \cdot s$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1437
then \bl{$\forall s.\; c\,|v_2| \alert{\not}\in L(r_1) \cdot s$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1438
\end{center}\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1439
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1440
while 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1441
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1442
\begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1443
if \bl{$\forall s.\; |v_2| \in L(der\,c\,r_1) \cdot s$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1444
then \bl{$\forall s.\; c\,|v_2| \in L(r_1) \cdot s$}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1445
\end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1446
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1447
is correct
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1448
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1449
\end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1450
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1451
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1452
\begin{textblock}{11}(12,11)
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1453
\includegraphics[scale=0.15]{roy.jpg}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1454
\end{textblock}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1455
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1456
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1457
  \begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1458
  \frametitle{Proofs in Math~vs.~in CS}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1459
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1460
  \alert{\bf My theory on why CS-proofs are often buggy}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1461
  \\[-10mm]\mbox{}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1462
  
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1463
  \begin{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1464
  \begin{tabular}{@{}cc@{}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1465
  \begin{tabular}{@{}p{5.6cm}} 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1466
  \includegraphics[scale=0.43]{icosahedron.png}\\[2mm] 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1467
  {\bf Math}: \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1468
  \raggedright\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1469
  in math, ``objects'' can be ``looked'' at from all 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1470
  ``angles'';\\\smallskip 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1471
  non-trivial proofs, but it seems
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1472
  difficult to make mistakes
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1473
  \end{tabular} &
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1474
  \begin{tabular}{p{5cm}} 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1475
  \includegraphics[scale=0.2]{sel4callgraph.jpg}\\[3mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1476
  \raggedright
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1477
  {\bf Code in CS}: \\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1478
  \raggedright\small
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1479
  the call-graph of the seL4 microkernel OS;\\\smallskip 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1480
  easy to make mistakes\\ \mbox{}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1481
  \end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1482
  \end{tabular}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1483
  \end{center}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1484
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1485
  \end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1486
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1487
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1488
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1489
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1490
\begin{frame}[c]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1491
\frametitle{Conclusion}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1492
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1493
\begin{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1494
\item we strengthened the POSIX definition of Sulzmann \& Lu
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1495
  in order to get the inductions through, his proof
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1496
  contained small gaps but had also fundamental flaws\bigskip
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1497
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1498
\item its a nice exercise for theorem proving
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1499
\item some optimisations need to be aplied to the
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1500
 algorithm in order to become fast enough
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1501
\item can be used for lexing, small little functional 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1502
 program
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1503
\end{itemize}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1504
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1505
\end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1506
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1507
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1508
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1509
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1510
  \begin{frame}[b]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1511
  \frametitle{
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1512
  \begin{tabular}{c}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1513
  \mbox{}\\[13mm]
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1514
  \alert{\Large Thank you very much again}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1515
  \alert{\Large for the invitation!}\\
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1516
  \alert{\Large Questions?}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1517
  \end{tabular}}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1518
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1519
  \end{frame}
1fe44fb6d0a4 cleaned up scala code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 103
diff changeset
  1520
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
103
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1521
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1522
\end{document}
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1523
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1524
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1525
%%% Local Variables:  
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1526
%%% mode: latex
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1527
%%% TeX-master: t
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1528
%%% End: 
ffe5d850df62 added some slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1529