slides/slides09.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Wed, 26 Nov 2014 10:15:43 +0000
changeset 335 06d5fc15594d
parent 334 6f08b13c0242
child 336 3cb200fa6d6a
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t]{beamer}
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
     2
\usepackage{../slides}
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
     3
\usepackage{../langs}
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
     4
\usepackage{../graphics}
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
     5
\usepackage{../grammar}
335
06d5fc15594d updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 334
diff changeset
     6
%\usepackage{soul}
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
     7
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
     8
\makeatletter
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
     9
\newenvironment<>{btHighlight}[1][]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    10
{\begin{onlyenv}#2\begingroup\tikzset{bt@Highlight@par/.style={#1}}\begin{lrbox}{\@tempboxa}}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    11
{\end{lrbox}\bt@HL@box[bt@Highlight@par]{\@tempboxa}\endgroup\end{onlyenv}}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    12
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    13
\newcommand<>\btHL[1][]{%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    14
  \only#2{\begin{btHighlight}[#1]\bgroup\aftergroup\bt@HL@endenv}%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    15
}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    16
\def\bt@HL@endenv{%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    17
  \end{btHighlight}%   
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    18
  \egroup
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    19
}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    20
\newcommand{\bt@HL@box}[2][]{%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    21
  \tikz[#1]{%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    22
    \pgfpathrectangle{\pgfpoint{1pt}{0pt}}{\pgfpoint{\wd #2}{\ht #2}}%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    23
    \pgfusepath{use as bounding box}%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    24
    \node[anchor=base west, fill=orange!30,outer sep=0pt,inner xsep=1pt, inner ysep=0pt, rounded corners=3pt, minimum height=\ht\strutbox+1pt,#1]{\raisebox{1pt}{\strut}\strut\usebox{#2}};
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    25
  }%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    26
}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    27
\makeatother
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
    28
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
% beamer stuff 
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    31
\renewcommand{\slidecaption}{APP 09, King's College London}
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
\newcommand{\bl}[1]{\textcolor{blue}{#1}}
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
\begin{document}
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    37
\begin{frame}[t]
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
\frametitle{%
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
  \begin{tabular}{@ {}c@ {}}
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
  \\
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
  \LARGE Access Control and \\[-3mm] 
83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
    42
  \LARGE Privacy Policies (9)\\[-6mm] 
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
  \end{tabular}}\bigskip\bigskip\bigskip
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 145
diff changeset
    45
  \normalsize
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
  \begin{center}
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
  \begin{tabular}{ll}
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
  Email:  & christian.urban at kcl.ac.uk\\
146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 145
diff changeset
    49
  Office: & S1.27 (1st floor Strand Building)\\
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
  Slides: & KEATS (also homework is there)\\
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
  \end{tabular}
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
  \end{center}
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    54
\end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    55
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    56
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    57
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    58
  \begin{frame}[c]
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    60
  \begin{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    61
  \includegraphics[scale=0.6]{../pics/bridge-limits.png}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    62
  \end{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    63
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    64
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
    66
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    67
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    68
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    69
  \frametitle{Old-Fashioned Eng.~vs.~CS}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    70
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    71
  \begin{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    72
  \begin{tabular}{@{}cc@{}}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    73
  \begin{tabular}{@{}p{5.2cm}} 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    74
  \includegraphics[scale=0.058]{../pics/towerbridge.jpg}\\ 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    75
  {\bf bridges}: \\
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    76
  \raggedright\small
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    77
  engineers can ``look'' at a bridge and have a pretty good
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    78
  intuition about whether it will hold up or not\\ 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    79
  (redundancy; predictive theory)
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    80
  \end{tabular} &
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    81
  \begin{tabular}{p{5cm}} 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    82
  \includegraphics[scale=0.265]{../pics/code.jpg}\\
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    83
  \raggedright
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    84
  {\bf code}: \\
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    85
  \raggedright\small
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    86
  programmers have very little intuition about their code; 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    87
  often it is too expensive to have redundancy;
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    88
  not ``continuous'' 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    89
  \end{tabular}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    90
  \end{tabular}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    91
  \end{center}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
    92
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    93
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    94
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    95
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
    96
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    97
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    98
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
    99
  \frametitle{Dijkstra on Testing}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   100
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   101
  \begin{bubble}[10cm]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   102
  ``Program testing can be a very effective way to show the
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   103
  presence of bugs, but it is hopelessly inadequate for showing
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   104
  their absence.''
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   105
  \end{bubble}\bigskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   106
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   107
  unfortunately attackers exploit bugs (Satan's computer vs 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   108
  Murphy's)
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   109
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   110
  \vfill
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   111
  \small
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   112
  Dijkstra: shortest path algorithm, 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   113
  dining philosophers problem,
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   114
  semaphores
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   115
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   116
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   117
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   118
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   119
\begin{frame}[c]
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   120
\frametitle{\Large Proving Programs to be Correct}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   121
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   122
\begin{bubble}[10cm]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   123
\small
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   124
{\bf Theorem:} There are infinitely many prime 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   125
numbers.\medskip\\
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   126
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   127
{\bf Proof} \ldots\\
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   128
\end{bubble}\bigskip
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   129
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   130
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   131
similarly\bigskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   132
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   133
\begin{bubble}[10cm]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   134
\small
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   135
{\bf Theorem:} The program is doing what 
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   136
it is sup+ed to be doing.\medskip
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   137
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   138
{\bf Long, long proof} \ldots\\
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   139
\end{bubble}\bigskip\medskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   140
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   141
\small This can be a gigantic proof. The only hope is to have
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   142
help from the computer. `Program' is here to be understood to be
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   143
quite general (protocol, OS,\ldots).
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   144
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   145
\end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   146
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   148
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   149
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   150
  \frametitle{\Large{}Mars Pathfinder Mission 1997}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   151
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   152
  \begin{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   153
  \includegraphics[scale=0.15]{../pics/marspath1.png}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   154
  \includegraphics[scale=0.16]{../pics/marspath3.png}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   155
  \includegraphics[scale=0.3]{../pics/marsrover.png}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   156
  \end{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   157
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   158
  \begin{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   159
  \item despite NASA's famous testing procedures, the lander crashed frequently on Mars
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   160
  \item a scheduling algorithm was not used in the OS
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   161
  \end{itemize}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   162
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   163
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   164
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   165
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   166
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   167
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   168
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   169
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   170
  \begin{textblock}{11}(1,3)
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   171
  \begin{tabular}{@{\hspace{-10mm}}l}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   172
  \begin{tikzpicture}[scale=1.1]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   173
  \node at (-2.5,-1.5) {\textcolor{white}{a}};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   174
  \node at (8,4) {\textcolor{white}{a}};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   175
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   176
    
146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 145
diff changeset
   177
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   178
  \only<1>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   179
   \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   180
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   181
  \only<2>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   182
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   183
   \draw[fill, blue!50] (3,0) rectangle (5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   184
   \draw[fill, blue!100] (2,3) rectangle (3,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   185
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   186
  \only<3>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   187
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   188
   \draw[fill, blue!50] (3,0) rectangle (4.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   189
   \draw[fill, blue!50] (5.5,0) rectangle (6,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   190
   \draw[fill, blue!100] (2,3) rectangle (3,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   191
   \draw[fill, blue!100] (4.5,3) rectangle (5.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   192
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   193
  \only<4>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   194
   \node at (2.5,0.9) {\small locked a resource};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   195
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   196
   \draw[blue!50, very thick] (2,0) rectangle (4,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   197
   \draw[blue!100, very thick] (2,3) rectangle (3, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   198
   \draw[red, <-, line width = 2mm] (2,-0.1) -- (2, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   199
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   200
  \only<5>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   201
   \node at (2.5,0.9) {\small locked a resource};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   202
   \draw[fill, blue!50] (1,0) rectangle (4,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   203
   \draw[blue!100, fill] (4,3) rectangle (5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   204
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   205
  \only<6>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   206
   \node at (2.5,0.9) {\small locked a resource};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   207
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   208
   \draw[blue!50, very thick] (2,0) rectangle (4,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   209
   \draw[blue!100, very thick] (2,3) rectangle (3, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   210
   \draw[red, <-, line width = 2mm] (2,-0.1) -- (2, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   211
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   212
  \only<7>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   213
   \node at (2.5,0.9) {\small locked a resource};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   214
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   215
   \draw[blue!50, very thick] (2.5,0) rectangle (4,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   216
   \draw[blue!100, very thick] (2.5,3) rectangle (3.5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   217
   \draw[red, <-, line width = 2mm] (2.5,-0.1) -- (2.5, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   218
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   219
  \only<8>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   220
   \node at (2.5,0.9) {\small locked a resource}; 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   221
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   222
   \draw[blue!50, very thick] (2.5,0) rectangle (4,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   223
   \draw[blue!100, very thick] (2.5,3) rectangle (3.5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   224
   \draw[blue!100, very thick] (2.5,3) rectangle (3.5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   225
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   226
   \draw[red, <-, line width = 2mm] (2.5,-0.1) -- (2.5, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   227
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   228
  \only<9>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   229
   \node at (2.5,0.9) {\small locked a resource}; 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   230
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   231
   \draw[blue!50, very thick] (3.5,0) rectangle (5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   232
   \draw[blue!100, very thick] (3.5,3) rectangle (4.5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   233
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   234
   \draw[red, <-, line width = 2mm] (3.5,-0.1) -- (3.5, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   235
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   236
  \only<10>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   237
   \node at (2.5,0.9) {\small locked a resource}; 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   238
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   239
   \draw[blue!50, very thick] (3.5,0) rectangle (5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   240
   \draw[blue!100, very thick] (3.5,3) rectangle (4.5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   241
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   242
   \draw[red, fill] (3.55,1.5) rectangle (4.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   243
   \draw[red, <-, line width = 2mm] (3.5,-0.1) -- (3.5, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   244
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   245
  \only<11>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   246
   \node at (2.5,0.9) {\small locked a resource};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   247
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   248
   \draw[blue!50, very thick] (4.5,0) rectangle (6,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   249
   \draw[blue!100, very thick] (4.5,3) rectangle (5.5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   250
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   251
   \draw[red, fill] (3.55,1.5) rectangle (4.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   252
   \draw[red, <-, line width = 2mm] (4.5,-0.1) -- (4.5, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   253
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   254
  \only<12>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   255
   \node at (2.5,0.9) {\small locked a resource}; 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   256
   \draw[fill, blue!50] (1,0) rectangle (2.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   257
   \draw[blue!50, very thick] (5.5,0) rectangle (7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   258
   \draw[blue!100, very thick] (5.5,3) rectangle (6.5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   259
   \draw[red, fill] (2.5,1.5) rectangle (3.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   260
   \draw[red, fill] (3.55,1.5) rectangle (4.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   261
   \draw[red, fill] (4.55,1.5) rectangle (5.5,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   262
   \draw[red, <-, line width = 2mm] (5.5,-0.1) -- (5.5, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   263
   \node [anchor=base] at (6.3, 1.8) {\Large\ldots};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   264
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   265
  \only<13>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   266
   \node at (2.5,0.9) {\small locked a resource}; 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   267
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   268
   \draw[blue!50, very thick] (2,0) rectangle (4,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   269
   \draw[blue!100, very thick] (2,3) rectangle (3, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   270
   \draw[red, <-, line width = 2mm] (2,-0.1) -- (2, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   271
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   272
  \only<14>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   273
   \node at (2.5,3.9) {\small locked a resource}; 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   274
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   275
   \draw[blue!50, fill] (2,3) rectangle (4,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   276
   \draw[blue!100, very thick] (4,3) rectangle (5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   277
   \draw[blue!50, ->, line width = 2mm] (2,1) -- (2, 2.5);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   278
   \draw[red, <-, line width = 2mm] (2,-0.1) -- (2, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   279
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   280
  \only<15>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   281
   \node at (2.5,3.9) {\small locked a resource};  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   282
   \draw[fill, blue!50] (1,0) rectangle (2,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   283
   \draw[blue!50, fill] (2,3) rectangle (4,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   284
   \draw[blue!100, very thick] (4,3) rectangle (5, 3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   285
   \draw[red, <-, line width = 2mm] (2.5,-0.1) -- (2.5, -1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   286
   \draw[red, very thick] (2.5,1.5) rectangle (3.5,2.1); 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   287
  }
83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   288
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   289
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   290
  \draw[very thick,->](0,0) -- (8,0);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   291
  \node [anchor=base] at (8, -0.3) {\scriptsize time};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   292
  \node [anchor=base] at (0, -0.3) {\scriptsize 0};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   293
  \node [anchor=base] at (-1.2, 0.2) {\small low priority};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   294
  \only<2->{\node [anchor=base] at (-1.2, 3.2) {\small high priority};}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   295
  \only<8->{\node [anchor=base] at (-1.5, 1.7) {\small medium pr.};}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   296
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   297
  \end{tikzpicture}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   298
  \end{tabular}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   299
  \end{textblock}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   300
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   301
  \begin{textblock}{0}(2.5,13)%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   302
  \small
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   303
  \onslide<3->{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   304
  \begin{bubble}[8cm]%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   305
  Scheduling: You want to avoid that a high 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   306
  priority process is staved indefinitely.
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   307
  \end{bubble}}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   308
  \end{textblock}
146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 145
diff changeset
   309
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   310
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   311
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   312
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   313
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   314
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   315
  \frametitle{\Large Priority Inheritance Scheduling}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   316
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   317
  \begin{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   318
  \item Let a low priority process $L$ temporarily inherit 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   319
    the high priority of $H$ until $L$ leaves the critical 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   320
    section unlocking the resource.\bigskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   321
  \item Once the resource is unlocked $L$ returns to its original 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   322
    priority level.
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   323
  \end{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   324
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   325
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   326
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   327
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   328
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   329
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   330
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   332
  \begin{textblock}{11}(1,3)
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   333
  \begin{tabular}{@{\hspace{-10mm}}l}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   334
  \begin{tikzpicture}[scale=1.1]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   335
  \node at (-2.5,-1.5) {\textcolor{white}{a}};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   336
  \node at (8,4) {\textcolor{white}{a}};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   337
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   338
    
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   339
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   340
  \only<1>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   341
    \draw[fill, blue!50] (1,0) rectangle (6,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   342
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   343
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   344
    \node at (3.5,0.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   345
    \node at (5.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   346
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   347
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   348
    \draw[very thick,blue!100] (3.5,0) -- (3.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   349
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   350
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   351
  \only<2>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   352
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   353
    \draw[very thick, blue!50] (3,0) rectangle (6,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   354
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   355
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   356
    \node at (3.5,0.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   357
    \node at (5.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   358
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   359
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   360
    \draw[very thick,blue!100] (3.5,0) -- (3.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   361
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   362
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   363
  \only<3>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   364
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   365
    \draw[very thick, blue!50] (3,0) rectangle (6,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   366
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   367
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   368
    \node at (3.5,0.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   369
    \node at (5.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   370
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   371
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   372
    \draw[very thick,blue!100] (3.5,0) -- (3.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   373
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   374
    \draw[very thick,blue!100] (3,3) rectangle (4,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   375
    \node at (3.5,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   376
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   377
  \only<4>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   378
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   379
    \draw[very thick, blue!50] (3,0) rectangle (6,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   380
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   381
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   382
    \node at (3.5,0.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   383
    \node at (5.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   384
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   385
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   386
    \draw[very thick,blue!100] (3.5,0) -- (3.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   387
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   388
    \draw[very thick,blue!100] (3,3) rectangle (4,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   389
    \node at (3.5,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   390
    \draw[very thick,blue!100] (4,3) rectangle (5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   391
    \node at (4.5,3.3) {\small $B$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   392
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   393
  \only<5>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   394
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   395
    \draw[very thick, blue!50] (3,3) rectangle (6,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   396
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   397
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   398
    \node at (3.5,3.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   399
    \node at (5.7,3.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   400
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   401
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   402
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   403
    \draw[very thick,blue!100] (5.7,3) -- (5.7,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   404
    \draw[very thick,blue!100] (6,3) rectangle (7,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   405
    \node at (6.5,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   406
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   407
    \node at (7.5,3.3) {\small $B$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   408
    \draw[blue!50, ->, line width = 2mm] (3,1) -- (3, 2.5);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   409
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   410
  \only<6>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   411
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   412
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   413
    \draw[very thick, blue!50] (3.5,3) rectangle (6,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   414
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   415
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   416
    \node at (3.5,3.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   417
    \node at (5.7,3.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   418
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   419
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   420
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   421
    \draw[very thick,blue!100] (5.7,3) -- (5.7,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   422
    \draw[very thick,blue!100] (6,3) rectangle (7,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   423
    \node at (6.5,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   424
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   425
    \node at (7.5,3.3) {\small $B$}; 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   426
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   427
  \only<7>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   428
   \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   429
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   430
    \draw[very thick, blue!50] (3.5,0) rectangle (6,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   431
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   432
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   433
    \node at (3.5,3.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   434
    \node at (5.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   435
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   436
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   437
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   438
    \draw[very thick,blue!100] (5.7,0) -- (5.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   439
    \draw[very thick,blue!100] (6,3) rectangle (7,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   440
    \node at (6.5,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   441
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   442
    \node at (7.5,3.3) {\small $B$};  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   443
    \draw[blue!50, <-, line width = 2mm] (3.5,1) -- (3.5, 2.5);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   444
    \draw[blue!50, <-, line width = 2mm] (4,3.3) -- (5.5,3.3);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   445
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   446
  \only<8>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   447
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   448
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   449
    \draw[very thick, blue!50] (4.5,0) rectangle (7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   450
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   451
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   452
    \node at (3.5,3.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   453
    \node at (6.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   454
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   455
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   456
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   457
    \draw[very thick,blue!100] (6.7,0) -- (6.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   458
    \draw[fill,blue!100] (3.5,3) rectangle (4.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   459
    \node at (4,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   460
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   461
    \node at (7.5,3.3) {\small $B$};  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   462
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   463
  \only<9>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   464
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   465
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   466
    \draw[fill, blue!50] (4.5,0) rectangle (5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   467
    \draw[very thick, blue!50] (5,0) rectangle (7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   468
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   469
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   470
    \node at (3.5,3.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   471
    \node at (6.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   472
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   473
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   474
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   475
    \draw[very thick,blue!100] (6.7,0) -- (6.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   476
    \draw[fill,blue!100] (3.5,3) rectangle (4.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   477
    \node at (4,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   478
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   479
    \node at (7.5,3.3) {\small $B$};  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   480
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   481
  \only<10>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   482
    \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   483
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   484
    \draw[fill, blue!50] (4.5,0) rectangle (5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   485
    \draw[very thick, blue!50] (5,0) rectangle (7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   486
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   487
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   488
    \node at (3.5,3.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   489
    \node at (6.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   490
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   491
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   492
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   493
    \draw[very thick,blue!100] (6.7,0) -- (6.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   494
    \draw[fill,blue!100] (3.5,3) rectangle (4.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   495
    \node at (4,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   496
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   497
    \node at (7.5,3.3) {\small $B$};  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   498
    \draw[red, fill] (5,1.5) rectangle (6,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   499
    \draw[red, fill] (6.05,1.5) rectangle (7,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   500
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   501
  \only<11>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   502
   \draw[fill, blue!50] (1,0) rectangle (3,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   503
    \draw[fill, blue!50] (3,3) rectangle (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   504
    \draw[fill, blue!50] (4.5,0) rectangle (5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   505
    \draw[very thick, blue!50] (5,0) rectangle (7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   506
    \node at (1.5,0.9) {\small $A_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   507
    \node at (2.0,0.9) {\small $B_L$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   508
    \node at (3.5,3.9) {\small $A_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   509
    \node at (6.7,0.9) {\small $B_R$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   510
    \draw[very thick,blue!100] (1.5,0) -- (1.5,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   511
    \draw[very thick,blue!100] (2.0,0) -- (2.0,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   512
    \draw[very thick,blue!100] (3.5,3) -- (3.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   513
    \draw[very thick,blue!100] (6.7,0) -- (6.7,0.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   514
    \draw[fill,blue!100] (3.5,3) rectangle (4.5,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   515
    \node at (4,3.3) {\small $A$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   516
    \draw[very thick,blue!100] (7,3) rectangle (8,3.6);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   517
    \node at (7.5,3.3) {\small $B$};  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   518
    \draw[red, fill] (5,1.5) rectangle (6,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   519
    \draw[red, fill] (6.05,1.5) rectangle (7,2.1);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   520
    \draw[blue!50, ->, line width = 2mm] (7.1,0.4) -- (8, 0.4);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   521
    \draw[blue!50, ->, line width = 2mm] (7.1,4) -- (8,4);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   522
  }
76
dde58256fc35 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 75
diff changeset
   523
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   524
  \draw[very thick,->](0,0) -- (8,0);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   525
  \node [anchor=base] at (8, -0.3) {\scriptsize time};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   526
  \node [anchor=base] at (0, -0.3) {\scriptsize 0};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   527
  \node [anchor=base] at (-1.2, 0.2) {\small low priority};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   528
  \only<2->{\node [anchor=base] at (-1.2, 3.2) {\small high priority};}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   529
  \only<10->{\node [anchor=base] at (-1.5, 1.7) {\small medium pr.};}
146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 145
diff changeset
   530
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   531
  \end{tikzpicture}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   532
  \end{tabular}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   533
  \end{textblock}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   534
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   535
  \begin{textblock}{0}(2.5,13)%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   536
  \small
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   537
  \onslide<11>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   538
  \begin{bubble}[8cm]%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   539
  Scheduling: You want to avoid that a high 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   540
  priority process is staved indefinitely.
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   541
  \end{bubble}}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   542
  \end{textblock}
79
2eaca58f9bcc updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 78
diff changeset
   543
146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 145
diff changeset
   544
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   545
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   546
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   547
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   548
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   549
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   550
  \frametitle{\Large Priority Inheritance Scheduling}
146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 145
diff changeset
   551
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   552
  \begin{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   553
  \item Let a low priority process $L$ temporarily inherit 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   554
    the high priority of $H$ until $L$ leaves the critical 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   555
    section unlocking the resource.\bigskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   556
  \item Once the resource is unlocked $L$ returns to its original 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   557
    priority level. \alert{\bf BOGUS}\pause\bigskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   558
  \item \ldots $L$ needs to switch to the highest 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   559
    \alert{remaining} priority of the threads that it blocks.
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   560
  \end{itemize}\bigskip
76
dde58256fc35 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 75
diff changeset
   561
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   562
  \small this error is already known since around 1999
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   563
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   564
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   565
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
76
dde58256fc35 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 75
diff changeset
   566
dde58256fc35 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 75
diff changeset
   567
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   568
  \begin{frame}[c]
83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   569
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   570
  \begin{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   571
  \includegraphics[scale=0.25]{../pics/p3.jpg}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   572
  \end{center}
83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   573
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   574
   \begin{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   575
  \item by Rajkumar, 1991
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   576
  \item \it ``it resumes the priority it had at the point of entry into the critical 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   577
  section''
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   578
  \end{itemize}
148
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 147
diff changeset
   579
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   580
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   581
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   582
     
83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   583
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   584
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   585
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   586
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   587
  \begin{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   588
  \includegraphics[scale=0.25]{../pics/p2.jpg}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   589
  \end{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   590
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   591
   \begin{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   592
  \item by Jane Liu, 2000
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   593
  \item {\it ``The job $J_l$ executes at its inherited 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   594
    priority until it releases $R$; at that time, the 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   595
    priority of $J_l$ returns to its priority 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   596
    at the time when it acquires the resource $R$.''}\medskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   597
  \item \small gives pseudo code and totally bogus data structures  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   598
  \item \small interesting part ``{\it left as an exercise}''
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   599
  \end{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   600
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   601
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   602
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   603
     
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   604
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   605
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   606
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   607
  \begin{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   608
  \includegraphics[scale=0.15]{../pics/p1.pdf}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   609
  \end{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   610
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   611
  \begin{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   612
  \item by Laplante and Ovaska, 2011 (\$113.76)
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   613
  \item \it ``when $[$the task$]$ exits the critical section that
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   614
        caused the block, it reverts to the priority it had
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   615
        when it entered that section'' 
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   616
  \end{itemize}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   617
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   618
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   619
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   620
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   621
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   622
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   623
  \frametitle{Priority Scheduling}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   624
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   625
  \begin{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   626
  \item a scheduling algorithm that is widely used in real-time operating systems
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   627
  \item has been ``proved'' correct by hand in a paper in 1983
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   628
  \item but this algorithm turned out to be incorrect, despite its ``proof''\bigskip\pause
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   629
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   630
  \item we corrected the algorithm and then {\bf really} proved that it is correct	
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   631
  \item we implemented this algorithm in a small OS called PINTOS (used for teaching at Stanford)
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   632
  \item our implementation was much more efficient than their reference implementation
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   633
  \end{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   634
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   635
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   636
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   637
   
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   638
   
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   639
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   640
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   641
  \frametitle{Design of AC-Policies}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   642
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   643
  \Large
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   644
  \begin{quote}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   645
  ''what you specify is what you get but not necessarily what you want\ldots''
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   646
  \end{quote}\bigskip\bigskip\bigskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   647
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   648
  \normalsize main work by Chunhan Wu (PhD-student)
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   649
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   650
  \end{frame}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   651
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   652
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   653
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   654
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   655
  \frametitle{Testing Policies}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   656
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   657
  \begin{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   658
  \begin{tikzpicture}[scale=1]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   659
  %\draw[black!10,step=2mm] (-5,-3) grid (5,4);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   660
  %\draw[black!10,thick,step=10mm] (-5,-3) grid (5,4);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   661
  \draw[white,thick,step=10mm] (-5,-3) grid (5,4);
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   662
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   663
  \draw [black!20, line width=1mm] (0,0) circle (1cm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   664
  \draw [line width=1mm] (0,0) circle (3cm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   665
  \node [black!20] at (0,0) {\begin{tabular}{c}core\\[-1mm] system\end{tabular}};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   666
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   667
  \draw [red, line width=2mm, <-] (-2.1,2.1) -- (-3.5,3.2);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   668
  \node at (-3.5,3.6) {your system};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   669
  \node at (-4.8,0) {\Large policy $+$};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   670
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   671
  
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   672
  \only<2>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   673
  \draw [black, fill=red, line width=0.5mm] (2,1) circle (3mm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   674
  \draw [red, line width=2mm, <-] (2.3,1.2) -- (3.5,2);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   675
  \node at (3.8,2.6) {\begin{tabular}{l}a seed\\[-1mm] \footnotesize virus, Trojan\end{tabular}};}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   676
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   677
  \only<3>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   678
  \draw [black, fill=red, line width=0.5mm] (2,1) circle (7mm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   679
  \node[white] at (2,1) {\small tainted};}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   680
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   681
  \only<4>{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   682
  \begin{scope}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   683
  \draw [clip] (0,0) circle (2.955cm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   684
  \draw [black, fill=red, line width=0.5mm] (2,1) circle (9mm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   685
  \node[white] at (2,1) {\small tainted};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   686
  \end{scope}}
83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   687
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   688
  \only<5->{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   689
  \begin{scope}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   690
  \draw [clip] (0,0) circle (2.955cm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   691
  \draw [black, fill=red, line width=0.5mm] (2,1) circle (13mm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   692
  \node[white] at (2,1) {\small tainted};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   693
  \end{scope}}
83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   694
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   695
  \only<6->{
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   696
  \draw[fill=white, line width=1mm] (1.265,2.665) arc (-35:183:5mm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   697
  \draw[fill=white, line width=1mm] (1.25,3.25) arc (-35:183:3mm);
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   698
  \node[black, rotate=10] at (1.9,3.6) {\LARGE\ldots};
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   699
  }
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   700
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   701
  \end{tikzpicture}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   702
  \end{center}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   703
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   704
  \end{frame}
83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   705
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   706
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   707
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   708
  \begin{frame}[c]
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   709
  \frametitle{A Sound and Complete Test}
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   710
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   711
  \begin{itemize}
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   712
  \item working purely in the \emph{dynamic world} does not work -\!-\!- infinite state space\bigskip
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   713
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   714
  \item working purely on \emph{static} policies also does not\\ work -\!-\!- because of over approximation
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   715
  \smallskip
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   716
  \begin{itemize}
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   717
  \item sup+e a tainted file has type \emph{bin} and
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   718
  \item there is a role \bl{$r$} which can both read and write \emph{bin}-files\pause
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   719
  \item then we would conclude that this tainted file can spread\medskip\pause
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   720
  \item but if there is no process with role \bl{$r$} and it will never been
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   721
  created, then the file actually does not spread
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   722
  \end{itemize}\bigskip\pause
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   723
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   724
  \item \alert{our solution:} take a middle ground and record precisely the information
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   725
  of the initial state, but be less precise about every newly created object.
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   726
  \end{itemize}
77
56dbc339ec87 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   727
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   728
  \end{frame}
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   729
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   730
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   731
\begin{frame}[c]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   732
\frametitle{Big Proofs in CS}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   733
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   734
Formal proofs in CS sound like science fiction? Completely irrelevant!
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   735
Lecturer gone mad?\pause
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   736
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   737
\begin{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   738
\item in 2008, verification of a small C-compiler
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   739
\begin{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   740
\item ``if my input program has a certain behaviour, then the compiled machine code has the same behaviour''
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   741
\item is as good as \texttt{gcc -O1}, but much less buggy 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   742
\end{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   743
\medskip 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   744
\item in 2010, verification of a micro-kernel operating system (approximately 8700 loc)
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   745
\begin{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   746
\item 200k loc of proof
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   747
\item 25 - 30 person years
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   748
\item found 160 bugs in the C code (144 by the proof)
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   749
\end{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   750
\end{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   751
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   752
\end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   753
147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 146
diff changeset
   754
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
149
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 148
diff changeset
   755
\begin{frame}[c]
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   756
\frametitle{Goal}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   757
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   758
Remember the Bridges example?
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   759
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   760
\begin{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   761
\item Can we look at our programs and somehow ensure
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   762
they are secure/bug free/correct?\pause\bigskip
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   763
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   764
\item Very hard: Anything interesting about programs is equivalent
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   765
to halting problem, which is undecidable.\pause\bigskip
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   766
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   767
\item \alert{Solution:} We avoid this ``minor'' obstacle by
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   768
      being as close as +sible of deciding the halting
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   769
      problem, without actually deciding the halting problem.
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   770
      $\quad\Rightarrow$ static analysis
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   771
\end{itemize}
87
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 86
diff changeset
   772
331
54a1fbe96b14 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   773
\end{frame}
87
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 86
diff changeset
   774
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   775
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   776
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   777
  \begin{frame}[c]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   778
  \frametitle{What is Static Analysis?}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   779
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   780
  \begin{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   781
  \includegraphics[scale=0.4]{../pics/state.png}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   782
  \end{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   783
  
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   784
  \begin{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   785
  \item depending on some initial input, a program 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   786
  (behaviour) will ``develop'' over time.
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   787
  \end{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   788
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   789
  \end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   790
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   791
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   792
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   793
  \begin{frame}[c]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   794
  \frametitle{What is Static Analysis?}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   795
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   796
  \begin{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   797
  \includegraphics[scale=0.4]{../pics/state2.png}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   798
  \end{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   799
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   800
  \end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   801
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   802
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   803
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   804
  \begin{frame}[c]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   805
  \frametitle{What is Static Analysis?}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   806
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   807
  \begin{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   808
  \includegraphics[scale=0.4]{../pics/state3.jpg}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   809
  \end{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   810
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   811
  \end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   812
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   813
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   814
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   815
  \begin{frame}[c]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   816
  \frametitle{What is Static Analysis?}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   817
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   818
  \begin{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   819
  \includegraphics[scale=0.4]{../pics/state4.jpg}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   820
  \end{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   821
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   822
  \begin{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   823
  \item to be avoided
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   824
  \end{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   825
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   826
  \end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   827
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   828
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   829
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   830
  \begin{frame}[c]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   831
  \frametitle{What is Static Analysis?}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   832
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   833
  \begin{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   834
  \includegraphics[scale=0.4]{../pics/state5.png}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   835
  \end{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   836
  
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   837
  \begin{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   838
  \item this needs more work
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   839
  \end{itemize}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   840
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   841
  \end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   842
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   843
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   844
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   845
  \begin{frame}[c]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   846
  \frametitle{What is Static Analysis?}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   847
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   848
  \begin{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   849
  \includegraphics[scale=0.4]{../pics/state6.png}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   850
  \end{center}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   851
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   852
  \end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   853
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   854
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   855
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   856
\begin{frame}[fragile]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   857
\frametitle{\large Concrete Example: Sign-Analysis}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   858
\mbox{}\\[-20mm]\mbox{}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   859
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   860
\bl{\begin{plstx}[rhs style=,one per line]
: \meta{Exp} ::= \meta{Exp} + \meta{Exp}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   861
         | \meta{Exp} * \meta{Exp}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   862
         | \meta{Exp} = \meta{Exp} 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   863
         | \meta{num}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   864
         | \meta{var}\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   865
: \meta{Stmt} ::= \meta{label} :
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   866
         | \meta{var} := \meta{Exp}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   867
         | jump? \meta{Exp} \meta{label}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   868
         | goto \meta{label}\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   869
: \meta{Prog} ::= \meta{Stmt} \ldots\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   870
\end{plstx}}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   871
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   872
\end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   873
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   874
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   875
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   876
\begin{frame}[fragile]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   877
\frametitle{\large Concrete Example: Sign-Analysis}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   878
\mbox{}\\[-20mm]\mbox{}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   879
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   880
\bl{\begin{plstx}[rhs style=,one per line]
: \meta{Exp} ::= \meta{Exp} + \meta{Exp}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   881
         | \meta{Exp} * \meta{Exp}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   882
         | \meta{Exp} = \meta{Exp} 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   883
         | \meta{num}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   884
         | \meta{var}\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   885
: \meta{Stmt} ::= \meta{label} :
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   886
         | \meta{var} := \meta{Exp}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   887
         | jump? \meta{Exp} \meta{label}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   888
         | goto \meta{label}\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   889
: \meta{Prog} ::= \meta{Stmt} \ldots\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   890
\end{plstx}}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   891
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   892
\begin{textblock}{0}(7.8,2.5)
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   893
\small
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   894
\begin{bubble}[5.6cm]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   895
\begin{lstlisting}[numbers=none,
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   896
                   basicstyle=\ttfamily,
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   897
                   language={},xleftmargin=3mm]
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   898
      a := 1
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   899
      n := 5 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   900
top:  jump? n = 0 done 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   901
      a := a * n 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   902
      n := n + -1 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   903
      goto top 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   904
done:
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   905
\end{lstlisting}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   906
\end{bubble}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   907
\end{textblock}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   908
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   909
\end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   910
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   911
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   912
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   913
\begin{frame}[fragile]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   914
\frametitle{\large Concrete Example: Sign-Analysis}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   915
\mbox{}\\[-20mm]\mbox{}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   916
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   917
\bl{\begin{plstx}[rhs style=,one per line]
: \meta{Exp} ::= \meta{Exp} + \meta{Exp}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   918
         | \meta{Exp} * \meta{Exp}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   919
         | \meta{Exp} = \meta{Exp} 
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   920
         | \meta{num}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   921
         | \meta{var}\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   922
: \meta{Stmt} ::= \meta{label} :
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   923
         | \meta{var} := \meta{Exp}
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   924
         | jmp? \meta{Exp} \meta{label}
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   925
         | goto \meta{label}\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   926
: \meta{Prog} ::= \meta{Stmt} \ldots\\
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   927
\end{plstx}}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   928
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   929
\begin{textblock}{0}(7.8,3.5)
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   930
\small
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   931
\begin{bubble}[5.6cm]
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   932
\begin{lstlisting}[numbers=none,
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   933
                   basicstyle=\ttfamily,
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   934
                   language={},xleftmargin=3mm]
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   935
      n := 6
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   936
      m1 := 0
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   937
      m2 := 1
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   938
top:  jmp? n = 0 done
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   939
      tmp := m2
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   940
      m2 := m1 + m2
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   941
      m1 := tmp
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   942
      n := n + -1
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   943
      goto top
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   944
done:
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   945
\end{lstlisting}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   946
\end{bubble}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   947
\end{textblock}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   948
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   949
\end{frame}
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   950
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
   951
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   952
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   953
\begin{frame}[fragile]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   954
\frametitle{Eval}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   955
\mbox{}\\[-18mm]\mbox{}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   956
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   957
\small
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   958
\begin{center}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   959
\bl{\begin{tabular}{lcl}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   960
$[n]_{env}$ & $\dn$ & $n$\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   961
$[x]_{env}$ & $\dn$ & $env(x)$\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   962
$[e_1 + e_2]_{env}$ & $\dn$ & $[e_1]_{env} + [e_2]_{env}$\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   963
$[e_1 * e_2]_{env}$ & $\dn$ & $[e_1]_{env} * [e_2]_{env}$\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   964
$[e_1 = e_2]_{env}$ & $\dn$ & 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   965
$\begin{cases}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   966
1 & \text{if}\quad[e_1]_{env} = [e_2]_{env}\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   967
0 & \text{otherwise}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   968
\end{cases}$\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   969
\end{tabular}}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   970
\end{center}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   971
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   972
\footnotesize
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   973
\begin{lstlisting}[language=Scala,numbers=none,xleftmargin=-5mm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   974
def eval_exp(e: Exp, env: Env) : Int = e match {
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   975
  case Num(n) & n
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   976
  case Var(x) & env(x)
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   977
  case Plus(e1, e2) & eval_exp(e1, env) + eval_exp(e2, env)
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   978
  case Times(e1, e2) & eval_exp(e1, env) * eval_exp(e2, env)
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   979
  case Equ(e1, e2) & 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   980
    if (eval_exp(e1, env) == eval_exp(e2, env)) 1 else 0
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   981
}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   982
\end{lstlisting}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   983
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   984
\end{frame}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   985
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   986
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   987
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   988
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   989
\begin{frame}[fragile]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   990
\small
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   991
A program
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   992
\begin{bubble}[6cm]\footnotesize
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   993
\begin{lstlisting}[numbers=none,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   994
                   language={},
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   995
                   basicstyle=\ttfamily,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   996
                   xleftmargin=1mm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   997
      a := 1
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   998
      n := 5 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
   999
top:  jmp? n = 0 done 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1000
      a := a * n 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1001
      n := n + -1 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1002
      goto top 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1003
done:
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1004
\end{lstlisting}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1005
\end{bubble}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1006
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1007
Some snippets
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1008
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1009
\footnotesize
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1010
\begin{columns}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1011
\begin{column}[t]{5cm}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1012
\begin{bubble}[4.5cm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1013
\begin{lstlisting}[numbers=none,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1014
                   basicstyle=\ttfamily,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1015
                   language={},xleftmargin=1mm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1016
""    a := 1
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1017
      n := 5 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1018
top:  jmp? n = 0 done 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1019
      a := a * n 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1020
      n := n + -1 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1021
      goto top 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1022
done:
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1023
\end{lstlisting}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1024
\end{bubble}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1025
\end{column}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1026
\begin{column}[t]{5cm}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1027
\begin{bubble}[4.5cm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1028
\begin{lstlisting}[numbers=none,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1029
                   basicstyle=\ttfamily,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1030
                   language={},xleftmargin=1mm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1031
top:  jmp? n = 0 done 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1032
      a := a * n 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1033
      n := n + -1 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1034
      goto top 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1035
done:
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1036
\end{lstlisting}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1037
\end{bubble}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1038
\end{column}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1039
\begin{column}[t]{2cm}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1040
\begin{bubble}[1.1cm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1041
\begin{lstlisting}[numbers=none,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1042
                   basicstyle=\ttfamily,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1043
                   language={},xleftmargin=1mm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1044
done:
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1045
\end{lstlisting}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1046
\end{bubble}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1047
\end{column}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1048
\end{columns}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1049
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1050
\end{frame}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1051
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1052
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1053
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1054
\begin{frame}[fragile]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1055
\frametitle{Eval for Stmts}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1056
\mbox{}\\[-12mm]\mbox{}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1057
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1058
Let \bl{$sn$} be the snippets of a program
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1059
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1060
\small
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1061
\begin{center}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1062
\bl{\begin{tabular}{lcl}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1063
$[\texttt{nil}]_{env}$ & $\dn$ & $env$\medskip\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1064
$[\texttt{Label}(l:)::rest]_{env}$ & $\dn$ & $[rest]_{env}$\medskip\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1065
$[x \,\texttt{:=}\, e::rest]_{env}$ & $\dn$ & 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1066
$[rest]_{(env[x:= [e]_{env}])}$\medskip\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1067
$[\texttt{jmp?}\;e\;l::rest]_{env}$ & $\dn$ & 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1068
$\begin{cases}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1069
[sn(l)]_{env} & \text{if}\quad[e]_{env} = 1\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1070
[rest]_{env}  & \text{otherwise}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1071
\end{cases}$\medskip\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1072
$[\texttt{goto}\;l::rest]_{env}$ & $\dn$ & $[sn(l)]_{env}$\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1073
\end{tabular}}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1074
\end{center}\bigskip
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1075
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1076
Start with \bl{$[sn(\mbox{\code{""}})]_{\varnothing}$}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1077
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1078
\end{frame}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1079
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1080
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1081
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1082
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1083
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1084
\begin{frame}[fragile]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1085
\frametitle{Eval in Code}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1086
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1087
\footnotesize
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1088
\begin{lstlisting}[language=Scala,numbers=none,xleftmargin=-5mm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1089
def eval(sn: Snips) : Env = {
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1090
  def eval_stmts(sts: Stmts, env: Env) : Env = sts match {
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1091
    case Nil & env
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1092
    case Label(l)::rest & eval_stmts(rest, env)
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1093
    case Assign(x, e)::rest & 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1094
      eval_stmts(rest, env + (x -> eval_exp(e, env)))
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1095
    case Jump(b, l)::rest & 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1096
      if (eval_exp(b, env) == 1) eval_stmts(sn(l), env) 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1097
      else eval_stmts(rest, env)
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1098
    case Goto(l)::rest & eval_stmts(sn(l), env)
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1099
  }
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1100
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1101
  eval_stmts(sn(""), Map())
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1102
}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1103
\end{lstlisting}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1104
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1105
\end{frame}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1106
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1107
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1108
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1109
\begin{frame}[fragile]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1110
\frametitle{The Idea}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1111
\small
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1112
\mbox{}\bigskip\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1113
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1114
\begin{columns}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1115
\begin{column}{5cm}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1116
\begin{bubble}[4.5cm]\footnotesize
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1117
\begin{lstlisting}[numbers=none,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1118
                   language={},
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1119
                   basicstyle=\ttfamily,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1120
                   xleftmargin=1mm]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1121
      a := 1
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1122
      n := 5 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1123
top:  jmp? n = 0 done 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1124
      a := a * n 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1125
      n := n + -1 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1126
      goto top 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1127
done:
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1128
\end{lstlisting}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1129
\end{bubble}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1130
\end{column}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1131
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1132
\begin{column}{1cm}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1133
\raisebox{-20mm}{\LARGE\bf$\Rightarrow$}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1134
\end{column}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1135
\begin{column}{6cm}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1136
\begin{bubble}[4.7cm]\footnotesize
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1137
\begin{lstlisting}[numbers=none,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1138
                   language={},
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1139
                   basicstyle=\ttfamily,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1140
                   xleftmargin=1mm,
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1141
                   escapeinside={(*@}{@*)}]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1142
      a := (*@\hl{'+'}@*)
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1143
      n := (*@\hl{'+'}@*) 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1144
top:  jmp? n = (*@\hl{'0'}@*) done 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1145
      a := a * n 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1146
      n := n + (*@\hl{'-'}@*) 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1147
      goto top 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1148
done:
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1149
\end{lstlisting}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1150
\end{bubble}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1151
\end{column}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1152
\end{columns}\bigskip\bigskip
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1153
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1154
Replace all constants and variables by either 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1155
\pcode{+}, \pcode{-} or \pcode{0}. What we want to find out
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1156
is what the sign of \texttt{a} and \texttt{n} is (they are 
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1157
always positive).
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1158
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1159
\end{frame}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1160
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1161
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1162
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1163
  \begin{frame}[c]
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1164
  \frametitle{Sign Analysis?}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1165
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1166
  
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1167
  \begin{columns}
334
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1168
  \begin{column}{3cm}
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1169
  \begin{tabular}{cc|l}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1170
  $e_1$ & $e_2$ & $e_1 + e_2$\\\hline{}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1171
  - & - & -\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1172
  - & 0 & -\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1173
  - & + & -, 0, +\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1174
  0 & $x$ & $x$\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1175
  + & - & -, 0, +\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1176
  + & 0 & +\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1177
  + & + & +\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1178
  \end{tabular}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1179
  \end{column}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1180
334
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1181
  \begin{column}{3cm}
333
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1182
  \begin{tabular}{cc|l}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1183
  $e_1$ & $e_2$ & $e_1 * e_2$\\\hline{}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1184
  - & - & +\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1185
  - & 0 & 0\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1186
  - & + & -\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1187
  0 & $x$ & 0\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1188
  + & - & -\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1189
  + & 0 & 0\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1190
  + & + & +\\
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1191
  \end{tabular}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1192
  \end{column}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1193
  \end{columns}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1194
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1195
  \end{frame}
cf02511469d6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 332
diff changeset
  1196
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
  1197
334
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1198
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1199
\begin{frame}[fragile]
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1200
\mbox{}\\[-13mm]\mbox{}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1201
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1202
\small
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1203
\begin{center}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1204
\bl{\begin{tabular}{lcl}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1205
$[n]_{env}$ & $\dn$ & 
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1206
$\begin{cases}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1207
\{+\} & \text{if}\; n > 0\\
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1208
\{-\} & \text{if}\; n < 0\\
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1209
\{0\} & \text{if}\; n = 0
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1210
\end{cases}$\\
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1211
$[x]_{env}$ & $\dn$ & $env(x)$\\
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1212
$[e_1 + e_2]_{env}$ & $\dn$ & $[e_1]_{env} \oplus [e_2]_{env}$\\
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1213
$[e_1 * e_2]_{env}$ & $\dn$ & $[e_1]_{env} \otimes [e_2]_{env}$\\
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1214
$[e_1 = e_2]_{env}$ & $\dn$ & $\{0, +\}$\\
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1215
\end{tabular}}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1216
\end{center}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1217
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1218
\scriptsize
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1219
\begin{lstlisting}[language=Scala,numbers=none,xleftmargin=-5mm]
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1220
def aeval_exp(e: Exp, aenv: AEnv) : Set[Abst] = e match {
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1221
  case Num(0) => Set(Zero)
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1222
  case Num(n) if (n < 0) => Set(Neg)
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1223
  case Num(n) if (n > 0) => Set(Pos)
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1224
  case Var(x) => aenv(x)
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1225
  case Plus(e1, e2) => 
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1226
    aplus(aeval_exp(e1, aenv), aeval_exp(e2, aenv))
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1227
  case Times(e1, e2) => 
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1228
    atimes(aeval_exp(e1, aenv), aeval_exp(e2, aenv))
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1229
  case Equ(e1, e2) => Set(Zero, Pos)
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1230
}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1231
\end{lstlisting}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1232
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1233
\end{frame}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1234
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1235
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1236
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1237
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1238
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1239
  \begin{frame}[c]
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1240
  \frametitle{Sign Analysis}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1241
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1242
  \begin{itemize}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1243
  \item We want to find out whether \texttt{a} and \texttt{n}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1244
  are always positive?\medskip
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1245
  \item After a few optimisations, we can indeed find this out.
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1246
  \begin{itemize}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1247
  \item \texttt{if} returns \texttt{+} or \texttt{0}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1248
  \item branch into only one dircection if you know
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1249
  \item if $x$ is \texttt{+}, then $x + \texttt{-1}$ 
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1250
  cannot be negative 
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1251
  \end{itemize}\bigskip
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1252
  
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1253
  \item What is this good for? Well, you do not need 
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1254
  underflow checks (in order to prevent buffer-overflow
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1255
  attacks).
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1256
  \end{itemize}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1257
  
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1258
  \end{frame}
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1259
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6f08b13c0242 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 333
diff changeset
  1260
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
  1261
76
dde58256fc35 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 75
diff changeset
  1262
\end{document}
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1263
332
8eab185fb187 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
  1264
75
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1265
%%% Local Variables:  
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1266
%%% mode: latex
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1267
%%% TeX-master: t
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1268
%%% End: 
df7cf3d07bd8 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1269