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