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