slides/slides09.tex
author Christian Urban <urbanc@in.tum.de>
Mon, 18 Nov 2019 11:11:11 +0000
changeset 694 b6ed836ce59b
parent 612 7a12053567d4
child 701 681c36b2af27
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t]{beamer}
309
640e4a05cd9b updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 215
diff changeset
     2
\usepackage{../slides}
215
828303e8e4af updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 207
diff changeset
     3
\usepackage{../langs}
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
     4
\usepackage{../data}
309
640e4a05cd9b updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 215
diff changeset
     5
\usepackage{../graphics}
379
fa2589ec0fae updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 312
diff changeset
     6
\usepackage{../grammar}
310
d384fe01d0e8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 309
diff changeset
     7
\usepackage{soul}
610
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
     8
\usepackage{mathpartir}
310
d384fe01d0e8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 309
diff changeset
     9
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    10
% beamer stuff
459
780486571e38 updated
Christian Urban <urbanc@in.tum.de>
parents: 384
diff changeset
    11
\renewcommand{\slidecaption}{CFL 09, King's College London}
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    12
\newcommand{\bl}[1]{\textcolor{blue}{#1}}       
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    13
310
d384fe01d0e8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 309
diff changeset
    14
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
\begin{document}
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    16
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
309
640e4a05cd9b updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 215
diff changeset
    18
\begin{frame}[t]
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
\frametitle{%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
  \begin{tabular}{@ {}c@ {}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
  \\[-3mm]
459
780486571e38 updated
Christian Urban <urbanc@in.tum.de>
parents: 384
diff changeset
    22
  \LARGE Compilers and \\[-2mm] 
538
17acdd516ccd updated
Christian Urban <urbanc@in.tum.de>
parents: 537
diff changeset
    23
  \LARGE Formal Languages (9)\\[3mm] 
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
  \end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
  \normalsize
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
  \begin{tabular}{ll}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
  Email:  & christian.urban at kcl.ac.uk\\
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    30
  Office: & N\liningnums{7.07} (North Wing, Bush House)\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    31
  Slides: & KEATS (also homework is there)\\
538
17acdd516ccd updated
Christian Urban <urbanc@in.tum.de>
parents: 537
diff changeset
    32
  \end{tabular}
17acdd516ccd updated
Christian Urban <urbanc@in.tum.de>
parents: 537
diff changeset
    33
  \end{center}
310
d384fe01d0e8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 309
diff changeset
    34
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    35
\end{frame}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    36
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    37
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    38
 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    39
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    40
\begin{frame}[t]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    41
\frametitle{While Language}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    42
  
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    43
\begin{center}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    44
\bl{\begin{tabular}{@{}lcl@{}}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    45
\\[-12mm]        
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    46
\meta{Stmt} & $::=$ &  $\texttt{skip}$\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    47
              & $|$ & \textit{Id}\;\texttt{:=}\;\meta{AExp}\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    48
              & $|$ & \texttt{if}\; \meta{BExp} \;\texttt{then}\; \meta{Block} \;\texttt{else}\; \meta{Block}\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    49
              & $|$ & \texttt{while}\; \meta{BExp} \;\texttt{do}\; \meta{Block}\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    50
              & $|$ & \texttt{read}\;\textit{Id}\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    51
              & $|$ & \texttt{write}\;\textit{Id}\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    52
              & $|$ & \texttt{write}\;\textit{String}\medskip\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    53
\meta{Stmts} & $::=$ &  \meta{Stmt} \;\texttt{;}\; \meta{Stmts} $|$  \meta{Stmt}\medskip\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    54
\meta{Block} & $::=$ &  \texttt{\{}\,\meta{Stmts}\,\texttt{\}} $|$ \meta{Stmt}\medskip\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    55
\meta{AExp} & $::=$ & \ldots\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    56
\meta{BExp} & $::=$ & \ldots\\
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    57
\end{tabular}}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    58
\end{center}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    59
\end{frame}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    60
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    61
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    62
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    63
\begin{frame}[c]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    64
\frametitle{\begin{tabular}{c}Fibonacci Numbers\end{tabular}}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    65
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    66
\mbox{}\\[-18mm]\mbox{}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    67
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    68
{\lstset{language=While}\fontsize{10}{12}\selectfont
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    69
\texttt{\lstinputlisting{../progs/fib.while}}}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    70
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    71
\end{frame}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    72
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    73
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    74
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    75
\begin{frame}[c,fragile]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    76
\frametitle{BF***}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    77
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    78
some big array, say \texttt{a}; 7 (8) instructions:
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    79
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    80
\begin{itemize}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    81
\item \texttt{>} move \texttt{ptr++}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    82
\item \texttt{<} move \texttt{ptr-{}-}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    83
\item \texttt{+} add \texttt{a[ptr]++}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    84
\item \texttt{-} subtract \texttt{a[ptr]-{}-}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    85
\item \texttt{.} print out \texttt{a[ptr]} as ASCII
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    86
\item \texttt{[} if \texttt{a[ptr] == 0} jump just after the corresponding \texttt{]}; otherwise \texttt{ptr++}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    87
\item \texttt{]} if \texttt{a[ptr] != 0} jump just after the corresponding \texttt{[}; otherwise \texttt{ptr++}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    88
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    89
\end{itemize}  
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    90
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    91
\end{frame}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    92
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    93
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    94
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    95
\begin{frame}[c,fragile]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    96
\frametitle{Arrays in While}
310
d384fe01d0e8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 309
diff changeset
    97
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    98
\begin{itemize}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
    99
\item \texttt{new arr[15000]}\medskip 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   100
\item \texttt{x := 3 + arr[3 + y]}\medskip 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   101
\item \texttt{arr[42 * n] := ...}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   102
\end{itemize}  
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   103
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   104
\end{frame}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   105
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   106
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   107
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   108
\begin{frame}[c,fragile]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   109
\frametitle{New Arrays}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   110
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   111
\begin{lstlisting}[mathescape,numbers=none,language=While]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   112
  new arr[number]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   113
\end{lstlisting}\bigskip\bigskip
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   114
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   115
\begin{lstlisting}[mathescape,numbers=none,language=While]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   116
  ldc number
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   117
  newarray int
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   118
  astore loc_var
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   119
\end{lstlisting}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   120
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   121
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   122
\end{frame}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   123
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   124
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   125
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   126
\begin{frame}[c,fragile]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   127
\frametitle{Array Update}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   128
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   129
\begin{lstlisting}[mathescape,numbers=none,language=While]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   130
  arr[...] := 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   131
\end{lstlisting}\bigskip\bigskip
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   132
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   133
\begin{lstlisting}[mathescape,numbers=none,language=While]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   134
  aload loc_var
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   135
  index_aexp
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   136
  value_aexp
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   137
  iastore
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   138
\end{lstlisting}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   139
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   140
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   141
\end{frame}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   142
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   143
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   144
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   145
\begin{frame}[c,fragile]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   146
\frametitle{Array Lookup in AExp}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   147
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   148
\begin{lstlisting}[mathescape,numbers=none,language=While]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   149
  ...arr[...]... 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   150
\end{lstlisting}\bigskip\bigskip
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   151
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   152
\begin{lstlisting}[mathescape,numbers=none,language=While]
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   153
  aload loc_var
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   154
  index_aexp
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   155
  iaload
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   156
\end{lstlisting}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   157
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   158
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   159
\end{frame}
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   160
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
310
d384fe01d0e8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 309
diff changeset
   161
610
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   162
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   163
\mode<presentation>{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   164
\begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   165
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   166
\large\bf
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   167
Using a compiler, \\how can you mount the\\ perfect attack against a system?
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   168
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   169
\end{frame}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   170
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   171
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   172
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   173
\mode<presentation>{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   174
\begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   175
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   176
{\large\bf
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   177
What is a \alert{perfect} attack?}\bigskip
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   178
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   179
\begin{enumerate}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   180
\item you can potentially completely take over a target system
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   181
\item your attack is (nearly) undetectable
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   182
\item the victim has (almost) no chance to recover
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   183
\end{enumerate}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   184
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   185
\end{frame}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   186
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   187
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   188
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   189
\mode<presentation>{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   190
\begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   191
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   192
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   193
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   194
  \begin{tikzpicture}[scale=1]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   195
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   196
  \onslide<1->{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   197
  \node (A) at (0,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=17mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   198
  \node [below right] at (A.north west) {\footnotesize\begin{tabular}{@{}l@{}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   199
  \only<1,2>{clean}\only<3->{\alert{hacked}}\\compiler\end{tabular}};}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   200
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   201
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   202
  \onslide<2->{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   203
  \node (B) at (-2,2)  [draw=black, rectangle, very thick, minimum height=10mm, minimum width=12mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   204
  \node [below right] at (B.north west) {\footnotesize\begin{tabular}{@{}l@{}}login\\(src)\end{tabular}};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   205
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   206
  \node (C) at (2,2)  [draw=black, rectangle, very thick, minimum height=10mm, minimum width=12mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   207
  \node [below right] at (C.north west) {\footnotesize\begin{tabular}{@{}l@{}}login\\(bin)\end{tabular}};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   208
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   209
  \draw[->, line width=2mm] (B) -- (C);
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   210
  }
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   211
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   212
 \onslide<3->{\node [above left=-1.5mm] at (C.south east) {\footnotesize \alert{$\blacksquare$}};}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   213
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   214
  \end{tikzpicture}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   215
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   216
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   217
\end{frame}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   218
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   219
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   220
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   221
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   222
\mode<presentation>{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   223
\begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   224
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   225
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   226
  \begin{tikzpicture}[scale=1]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   227
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   228
  \onslide<1->{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   229
  \node (A) at (0,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   230
  \node [below right] at (A.north west) {\small V0.01};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   231
  \node [below right] (A1) at (A.south west) {\small Scala};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   232
  \node [below right] (A1) at (A1.south west) {\small\textcolor{gray}{host language}};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   233
  \node [above right] at (A.north west) {my compiler (src)};}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   234
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   235
  \onslide<2->{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   236
  \node (B) at (1.8,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   237
  \node [below right] at (B.north west) {\small V0.02};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   238
  \node [below right] at (B.south west) {\small Scala};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   239
  \node at (3,0) {\ldots};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   240
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   241
  \node (C) at (5,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   242
  \node [below right] at (C.north west) {\small V1.00};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   243
  \node [below right] at (C.south west) {\small Scala};}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   244
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   245
  \onslide<3->{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   246
  \node (D) at (6.8,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   247
  \node [below right] at (D.north west) {\small V1.00};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   248
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   249
  \node (E) at (6.8,2)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   250
  \node [below right] at (E.north west) {\small V1.01};}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   251
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   252
  \onslide<4->{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   253
  \node (F) at (8.6,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   254
  \node [below right] at (F.north west) {\small V1.01};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   255
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   256
  \node (G) at (8.6,2)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   257
  \node [below right] at (G.north west) {\small V1.02};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   258
  \node at (9.8,0) {\ldots};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   259
  \node at (9.8,2) {\ldots};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   260
  \node at (8,-2) {\textcolor{gray}{\begin{tabular}{@{}l@{}}no host language\\needed\end{tabular}}};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   261
  }
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   262
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   263
  \end{tikzpicture}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   264
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   265
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   266
\end{frame}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   267
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   268
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   269
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   270
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   271
  \mode<presentation>{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   272
  \begin{frame}<1-3>
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   273
  \frametitle{\LARGE\begin{tabular}{c}Hacking Compilers 
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   274
  \end{tabular}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   275
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   276
  %Why is it so paramount to have a small trusted code base (TCB)?
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   277
  \bigskip\bigskip
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   278
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   279
  \begin{columns}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   280
  \begin{column}{2.7cm}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   281
  \begin{minipage}{2.5cm}%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   282
  \begin{tabular}{c@ {}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   283
  \includegraphics[scale=0.2]{../pics/ken-thompson.jpg}\\[-1.8mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   284
  \footnotesize Ken Thompson\\[-1.8mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   285
  \footnotesize Turing Award, 1983\\
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   286
  \end{tabular}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   287
  \end{minipage}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   288
  \end{column}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   289
  \begin{column}{9cm}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   290
  \begin{tabular}{l@ {\hspace{1mm}}p{8cm}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   291
 
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   292
  & Ken Thompson showed how to hide a Trojan Horse in a 
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   293
  compiler \textcolor{red}{without} leaving any traces in the source code.\\[2mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   294
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   295
  & No amount of source level verification will protect 
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   296
  you from such Thompson-hacks.\\[2mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   297
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   298
  \end{tabular}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   299
  \end{column}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   300
  \end{columns}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   301
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   302
  \only<2>{
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   303
  \begin{textblock}{6}(4,2)
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   304
  \begin{tikzpicture}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   305
  \draw (0,0) node[inner sep=3mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   306
  {\normalsize
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   307
  \begin{minipage}{8cm}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   308
  \begin{quote}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   309
  \includegraphics[scale=0.05]{../pics/evil.png}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   310
  \begin{enumerate}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   311
  \item[1)] Assume you ship the compiler as binary and also with sources.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   312
  \item[2)] Make the compiler aware when it compiles itself.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   313
  \item[3)] Add the Trojan horse.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   314
  \item[4)] Compile.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   315
  \item[5)] Delete Trojan horse from the sources of the compiler.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   316
  \item[6)] Go on holiday for the rest of your life. ;o)\\[-7mm]\mbox{}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   317
  \end{enumerate}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   318
  \end{quote}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   319
  \end{minipage}};
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   320
  \end{tikzpicture}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   321
  \end{textblock}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   322
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   323
  \end{frame}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   324
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   325
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   326
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   327
  \begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   328
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   329
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   330
  \includegraphics[scale=0.6]{../pics/bridge-limits.png}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   331
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   332
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   333
  \end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   334
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   335
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   336
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   337
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   338
\begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   339
\frametitle{Compilers \& Boeings 777}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   340
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   341
First flight in 1994. They want to achieve triple redundancy in hardware
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   342
faults.\bigskip
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   343
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   344
They compile 1 Ada program to\medskip
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   345
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   346
\begin{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   347
\item Intel 80486
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   348
\item Motorola 68040 (old Macintosh's)
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   349
\item AMD 29050 (RISC chips used often in laser printers)
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   350
\end{itemize}\medskip
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   351
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   352
using 3 independent compilers.\bigskip\pause
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   353
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   354
\small Airbus uses C and static analysers. Recently started using CompCert.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   355
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   356
\end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   357
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   358
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   359
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   360
\begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   361
\frametitle{Goal}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   362
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   363
Remember the Bridges example?
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   364
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   365
\begin{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   366
\item Can we look at our programs and somehow ensure
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   367
they are bug free/correct?\pause\bigskip
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   368
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   369
\item Very hard: Anything interesting about programs is equivalent
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   370
to the Halting Problem, which is undecidable.\pause\bigskip
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   371
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   372
\item \alert{Solution:} We avoid this ``minor'' obstacle by
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   373
      being as close as possible of deciding the halting
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   374
      problem, without actually deciding the halting problem.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   375
      \small$\quad\Rightarrow$ yes, no, don't know (static analysis)
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   376
\end{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   377
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   378
\end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   379
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   380
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   381
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   382
  \begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   383
  \frametitle{What is Static Analysis?}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   384
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   385
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   386
  \includegraphics[scale=0.4]{../pics/state.png}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   387
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   388
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   389
  \begin{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   390
  \item depending on some initial input, a program 
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   391
  (behaviour) will ``develop'' over time.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   392
  \end{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   393
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   394
  \end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   395
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   396
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   397
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   398
  \begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   399
  \frametitle{What is Static Analysis?}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   400
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   401
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   402
  \includegraphics[scale=0.4]{../pics/state2.png}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   403
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   404
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   405
  \end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   406
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   407
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   408
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   409
  \begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   410
  \frametitle{What is Static Analysis?}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   411
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   412
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   413
  \includegraphics[scale=0.4]{../pics/state3.jpg}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   414
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   415
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   416
  \end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   417
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   418
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   419
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   420
  \begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   421
  \frametitle{What is Static Analysis?}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   422
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   423
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   424
  \includegraphics[scale=0.4]{../pics/state4.jpg}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   425
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   426
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   427
  \begin{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   428
  \item to be avoided
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   429
  \end{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   430
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   431
  \end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   432
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   433
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   434
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   435
  \begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   436
  \frametitle{What is Static Analysis?}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   437
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   438
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   439
  \includegraphics[scale=0.4]{../pics/state5.png}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   440
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   441
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   442
  \begin{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   443
  \item this needs more work
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   444
  \end{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   445
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   446
  \end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   447
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   448
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   449
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   450
  \begin{frame}[c]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   451
  \frametitle{What is Static Analysis?}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   452
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   453
  \begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   454
  \includegraphics[scale=0.4]{../pics/state6.png}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   455
  \end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   456
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   457
  \end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   458
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   459
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   460
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   461
  \begin{frame}[c,fragile]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   462
    \frametitle{\Large\begin{tabular}{c}Concrete Example:\\[-1mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   463
                  Are Vars Definitely Initialised?\end{tabular}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   464
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   465
Assuming \texttt{x} is initialised, what about \texttt{y}?\bigskip
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   466
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   467
Prog.~1:\\
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   468
\begin{lstlisting}[numbers=none,
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   469
                   basicstyle=\ttfamily,
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   470
                   language=While,xleftmargin=3mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   471
if x < 1 then y := x else y := x + 1;
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   472
y := y + 1
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   473
\end{lstlisting}\medskip     
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   474
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   475
Prog.~2:\\
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   476
\begin{lstlisting}[numbers=none,
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   477
                   basicstyle=\ttfamily,
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   478
                   language=While,xleftmargin=3mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   479
if x < x then y := y + 1 else y := x;
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   480
y := y + 1
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   481
\end{lstlisting}            
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   482
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   483
  \end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   484
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   485
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   486
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   487
  \begin{frame}[c,fragile]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   488
    \frametitle{\Large\begin{tabular}{c}Concrete Example:\\[-1mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   489
                  Are Vars Definitely Initialised?\end{tabular}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   490
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   491
              What should the rules be for deciding when a
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   492
              variable is initialised?\bigskip\pause
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   493
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   494
\begin{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   495
\item variable \texttt{x} is definitely initialized after
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   496
  \texttt{skip}\\
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   497
  iff \texttt{x} is definitely initialized before \texttt{skip}.
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   498
\end{itemize}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   499
  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   500
\end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   501
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   502
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   503
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   504
  \begin{frame}[c,fragile]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   505
%    \frametitle{\Large\begin{tabular}{c}Concrete Example:\\[-1mm]
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   506
%                  Are Vars Definitely Initialised?\end{tabular}}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   507
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   508
$\bl{A}$ is the set of definitely defined variables:
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   509
              
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   510
\begin{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   511
\begin{tabular}{c}
612
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   512
  \bl{\infer{\mbox{}}{A\triangleright\texttt{skip}\triangleright{}A}}\qquad
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   513
  \bl{\infer{vars(a) \subseteq A}{A\triangleright
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   514
  (\texttt{x\,:=\,a})\triangleright\{x\}\cup A}}
610
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   515
  \medskip\\\pause
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   516
612
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   517
  \bl{\infer{A_1\triangleright{}s_1\triangleright{}A_2
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   518
  \quad A_2\triangleright{}s_2\triangleright{}A_3}
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   519
  {A_1\triangleright{}(s_1 ; s_2)\triangleright{}A_3}}
610
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   520
  \medskip\\\pause
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   521
  
612
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   522
  \bl{\infer{vars(b)\subseteq A\quad A\triangleright{}s_1\triangleright{}A_1
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   523
  \quad A\triangleright{}s_2\triangleright{}A_2}
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   524
  {A\triangleright(\texttt{if}\;b\;\texttt{then}\;s_1\;\texttt{else}\;s_2)\triangleright{}A_1\cap A_2}}
610
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   525
  \medskip\\\pause
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   526
612
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   527
  \bl{\infer{vars(b)\subseteq A\quad A\triangleright{}s\triangleright{}A'}
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   528
  {A\triangleright(\texttt{while}\;b\;\texttt{do}\;s)\triangleright{}A}}\pause
610
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   529
\end{tabular}  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   530
\end{center}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   531
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   532
\hfill we start with $\bl{A = \{\}}$
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   533
\end{frame}
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   534
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   535
310
d384fe01d0e8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 309
diff changeset
   536
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   537
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   538
  \begin{frame}[c]
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   539
  \frametitle{Dijkstra on Testing}
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   540
  
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   541
  \begin{bubble}[10cm]
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   542
  ``Program testing can be a very effective way to show the
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   543
  presence of bugs, but it is hopelessly inadequate for showing
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   544
  their absence.''
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   545
  \end{bubble}\bigskip
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   546
  
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   547
  \small
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   548
  What is good about compilers: the either seem to work,
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   549
  or go horribly wrong (most of the time).
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   550
  
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   551
  \end{frame}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   552
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   553
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   554
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   555
\begin{frame}[c]
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   556
\frametitle{\Large Proving Programs to be Correct}
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   557
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   558
\begin{bubble}[10cm]
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   559
\small
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   560
{\bf Theorem:} There are infinitely many prime 
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   561
numbers.\medskip\\
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   562
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   563
{\bf Proof} \ldots\\
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   564
\end{bubble}\bigskip
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   565
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   566
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   567
similarly\bigskip
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   568
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   569
\begin{bubble}[10cm]
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   570
\small
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   571
{\bf Theorem:} The program is doing what 
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   572
it is supposed to be doing.\medskip
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   573
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   574
{\bf Long, long proof} \ldots\\
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   575
\end{bubble}\bigskip\medskip
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   576
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   577
\small This can be a gigantic proof. The only hope is to have
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   578
help from the computer. `Program' is here to be understood to be
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   579
quite general (compiler, OS, \ldots).
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   580
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   581
\end{frame}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   582
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   583
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   584
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   585
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   586
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   587
\begin{frame}[c]
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   588
\frametitle{Can This Be Done?}
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   589
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   590
\begin{itemize}
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   591
\item in 2008, verification of a small C-compiler
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   592
\begin{itemize}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   593
\item ``if my input program has a certain behaviour, then the compiled machine code has the same behaviour''
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   594
\item is as good as \texttt{gcc -O1}, but much, much less buggy 
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   595
\end{itemize}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   596
\end{itemize}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   597
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   598
\begin{center}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   599
  \includegraphics[scale=0.12]{../pics/compcert.png}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   600
\end{center}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   601
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   602
\end{frame}
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   603
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   604
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   605
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
610
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   606
\begin{frame}[t]
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   607
\frametitle{Fuzzy Testing C-Compilers}
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   608
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   609
\begin{itemize}
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   610
\item tested GCC, LLVM and others by randomly generating 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   611
C-programs
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   612
\item found more than 300 bugs in GCC and also
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   613
many in LLVM (some of them highest-level critical)\bigskip
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   614
\item about CompCert:
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   615
610
7ec1bdb670ba updated
Christian Urban <urbanc@in.tum.de>
parents: 609
diff changeset
   616
\begin{bubble}[10.7cm]\small ``The striking thing about our CompCert
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   617
results is that the middle-end bugs we found in all other
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   618
compilers are absent. As of early 2011, the under-development
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   619
version of CompCert is the only compiler we have tested for
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   620
which Csmith cannot find wrong-code errors. This is not for
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   621
lack of trying: we have devoted about six CPU-years to the
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   622
task.'' 
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   623
\end{bubble} 
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   624
\end{itemize}
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   625
383
a6a6bf32fade updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   626
\end{frame}
609
e33545bb2eba updated
Christian Urban <urbanc@in.tum.de>
parents: 538
diff changeset
   627
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
82
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   628
612
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   629
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   630
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   631
\begin{frame}[c]
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   632
\frametitle{Next Week}
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   633
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   634
\begin{itemize}
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   635
\item Revision Lecture\medskip
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   636
\item How many  strings are in $\bl{L(a^*)}$?\pause\medskip
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   637
\item How many  strings are in $\bl{L((a + b)^*)}$?\\ Are there more than
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   638
  in $\bl{L(a^*)}$?
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   639
\end{itemize}
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   640
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   641
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   642
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   643
\end{frame}
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   644
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   645
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   646
7a12053567d4 updated
Christian Urban <urbanc@in.tum.de>
parents: 610
diff changeset
   647
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   648
\end{document}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   649
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   650
%%% Local Variables:  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   651
%%% mode: latex
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   652
%%% TeX-master: t
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   653
%%% End: 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   654