slides/slides09.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 26 Nov 2013 22:45:06 +0000
changeset 206 85b961f1eee9
parent 151 df229ec49b22
child 207 f824e1331fc6
permissions -rw-r--r--
added
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}
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
     2
\usepackage{beamerthemeplaincu}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
     3
%\usepackage[T1]{fontenc}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
     4
%\usepackage[latin1]{inputenc}
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
\usepackage{mathpartir}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
\usepackage[absolute,overlay]{textpos}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
\usepackage{ifthen}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
\usepackage{tikz}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
\usepackage{pgf}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
\usepackage{calc} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
\usepackage{ulem}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
\usepackage{courier}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
\usepackage{listings}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
\renewcommand{\uline}[1]{#1}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
\usetikzlibrary{arrows}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
\usetikzlibrary{automata}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
\usetikzlibrary{shapes}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
\usetikzlibrary{shadows}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
\usetikzlibrary{positioning}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
\usetikzlibrary{calc}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
\usetikzlibrary{plotmarks}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
\usepackage{graphicx} 
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    23
\usepackage{pgfplots}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    24
65
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
\definecolor{javared}{rgb}{0.6,0,0} % for strings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
\lstset{language=Java,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
	basicstyle=\ttfamily,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
	stringstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
	commentstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
	numbers=left,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
	numberstyle=\tiny\color{black},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
	stepnumber=1,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
	numbersep=10pt,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
	tabsize=2,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
	showspaces=false,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
	showstringspaces=false}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    45
\lstdefinelanguage{scala}{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
  morekeywords={abstract,case,catch,class,def,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
    do,else,extends,false,final,finally,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
    for,if,implicit,import,match,mixin,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
    new,null,object,override,package,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
    private,protected,requires,return,sealed,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
    super,this,throw,trait,true,try,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
    type,val,var,while,with,yield},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
  otherkeywords={=>,<-,<\%,<:,>:,\#,@},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
  sensitive=true,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
  morecomment=[l]{//},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
  morecomment=[n]{/*}{*/},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
  morestring=[b]",
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
  morestring=[b]',
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
  morestring=[b]"""
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    62
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
\lstset{language=Scala,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
	basicstyle=\ttfamily,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
	stringstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
	commentstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    69
	numbers=left,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
	numberstyle=\tiny\color{black},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    71
	stepnumber=1,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    72
	numbersep=10pt,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    73
	tabsize=2,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    74
	showspaces=false,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    75
	showstringspaces=false}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    76
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    77
\lstdefinelanguage{while}{
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
    78
  morekeywords={if,then,else,while,do,true,false,write},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
    79
  otherkeywords={=,!=,:=,<,>,;},
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    80
  sensitive=true,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    81
  morecomment=[n]{/*}{*/},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    82
}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    83
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    85
\lstset{language=While,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    86
	basicstyle=\ttfamily,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    87
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    88
	stringstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    89
	commentstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    90
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    91
	numbers=left,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    92
	numberstyle=\tiny\color{black},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    93
	stepnumber=1,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    94
	numbersep=10pt,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    95
	tabsize=2,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    96
	showspaces=false,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    97
	showstringspaces=false}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    98
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    99
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   100
% beamer stuff 
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   101
\renewcommand{\slidecaption}{AFL 09, King's College London, 27.~November 2013}
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   102
\newcommand{\bl}[1]{\textcolor{blue}{#1}}       
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   103
\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   104
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   105
 \pgfdeclareradialshading{smallbluesphere}{\pgfpoint{0.5mm}{0.5mm}}%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   106
  {rgb(0mm)=(0,0,0.9);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   107
  rgb(0.9mm)=(0,0,0.7);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   108
  rgb(1.3mm)=(0,0,0.5);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   109
  rgb(1.4mm)=(1,1,1)}
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   110
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   111
  \def\myitemi{\begin{pgfpicture}{-1ex}{-0.55ex}{1ex}{1ex}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   112
    \usebeamercolor[fg]{subitem projected}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   113
    {\pgftransformscale{0.8}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   114
    \pgftext{%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   115
      \usebeamerfont*{subitem projected}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   116
  \end{pgfpicture}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   117
  
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   118
% The data files, written on the first run.
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   119
\begin{filecontents}{compiled.data}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   120
%1 0.234146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   121
%5000 0.227539
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   122
%10000 0.280748
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   123
50000 1.087897
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   124
100000 3.713165
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   125
250000 21.6624545
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   126
500000 85.872613
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   127
750000 203.6408015
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   128
1000000 345.736574
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   129
\end{filecontents}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   130
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   131
\begin{filecontents}{interpreted.data}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   132
%1 0.00503
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   133
200 1.005863
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   134
400 7.8296765
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   135
500 15.43106
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   136
600 27.2321885
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   137
800 65.249271
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   138
1000 135.4493445
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   139
1200 232.134097
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   140
1400 382.527227
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   141
\end{filecontents}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   142
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   143
\begin{filecontents}{interpreted2.data}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   144
%1 0.00503
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   145
200 1.005863
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   146
400 7.8296765
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   147
600 27.2321885
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   148
800 65.249271
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   149
1000 135.4493445
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   150
1200 232.134097
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   151
1400 382.527227
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   152
\end{filecontents}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   153
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   154
\begin{filecontents}{compiled2.data}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   155
200 0.222058
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   156
400 0.215204
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   157
600 0.202031
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   158
800 0.21986
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   159
1000 0.205934
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   160
1200 0.1981615
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   161
1400 0.207116
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   162
\end{filecontents}
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   163
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   164
\begin{document}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   165
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   166
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   167
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   168
\begin{frame}<1>[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   169
\frametitle{%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   170
  \begin{tabular}{@ {}c@ {}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   171
  \\[-3mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   172
  \LARGE Automata and \\[-2mm] 
76
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 70
diff changeset
   173
  \LARGE Formal Languages (9)\\[3mm] 
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   174
  \end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   175
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   176
  \normalsize
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   177
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   178
  \begin{tabular}{ll}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   179
  Email:  & christian.urban at kcl.ac.uk\\
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   180
  Office: & S1.27 (1st floor Strand Building)\\
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   181
  Slides: & KEATS (also home work is there)\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   182
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   183
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   184
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   185
\end{frame}}
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   186
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   187
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   188
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   189
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   190
\begin{frame}[c]
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   191
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   192
\large\bf
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   193
Using a compiler, \\how can you mount the\\ perfect attack against a system?
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   194
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   195
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   196
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   197
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   198
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   199
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   200
\begin{frame}[c]
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   201
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   202
{\large\bf
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   203
What is a perfect attack?}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   204
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   205
\begin{enumerate}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   206
\item you can potentially completely take over a target system
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   207
\item your attack is (nearly) undetectable
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   208
\end{enumerate}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   209
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   210
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   211
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   212
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   213
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   214
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   215
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   216
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   217
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   218
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   219
  \begin{tikzpicture}[scale=1]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   220
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   221
  \onslide<1->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   222
  \node (A) at (0,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=17mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   223
  \node [below right] at (A.north west) {\footnotesize\begin{tabular}{@{}l@{}}clean\\compiler\end{tabular}};}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   224
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   225
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   226
  \onslide<2->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   227
  \node (B) at (0,3)  [draw=black, rectangle, very thick, minimum height=8mm, minimum width=12mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   228
  \node [below right] at (B.north west) {\footnotesize login};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   229
  \node [above right] at (B.south west) {\footnotesize \alert{infected}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   230
  \node [right] at (B.east) {\ldots};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   231
  }
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   232
 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   233
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   234
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   235
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   236
  \end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   237
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   238
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   239
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   240
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   241
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   242
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   243
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   244
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   245
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   246
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   247
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   248
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   249
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   250
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   251
  \begin{tikzpicture}[scale=1]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   252
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   253
  \onslide<1->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   254
  \node (A) at (0,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   255
  \node [below right] at (A.north west) {\small V0.01};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   256
  \node [below right] (A1) at (A.south west) {\small Scala};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   257
  \node [below right] (A1) at (A1.south west) {\small\textcolor{gray}{host language}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   258
  \node [above right] at (A.north west) {my compiler (src)};}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   259
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   260
  \onslide<2->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   261
  \node (B) at (1.8,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   262
  \node [below right] at (B.north west) {\small V0.02};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   263
  \node [below right] at (B.south west) {\small Scala};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   264
  \node at (3,0) {\ldots};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   265
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   266
  \node (C) at (5,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   267
  \node [below right] at (C.north west) {\small V1.00};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   268
  \node [below right] at (C.south west) {\small Scala};}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   269
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   270
  \onslide<3->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   271
  \node (D) at (6.8,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   272
  \node [below right] at (D.north west) {\small V1.00};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   273
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   274
  \node (E) at (6.8,2)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   275
  \node [below right] at (E.north west) {\small V1.01};}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   276
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   277
  \onslide<4->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   278
  \node (F) at (8.6,0)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   279
  \node [below right] at (F.north west) {\small V1.01};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   280
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   281
  \node (G) at (8.6,2)  [draw=black, rectangle, very thick, minimum height=18mm, minimum width=14mm] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   282
  \node [below right] at (G.north west) {\small V1.02};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   283
  \node at (9.8,0) {\ldots};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   284
  \node at (9.8,2) {\ldots};}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   285
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   286
  \end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   287
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   288
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   289
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   290
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   291
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   292
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   293
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   294
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   295
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   296
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   297
  \begin{frame}<1-3>
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   298
  \frametitle{\LARGE\begin{tabular}{c}Hacking Compilers 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   299
  \end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   300
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   301
  %Why is it so paramount to have a small trusted code base (TCB)?
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   302
  \bigskip\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   303
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   304
  \begin{columns}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   305
  \begin{column}{2.7cm}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   306
  \begin{minipage}{2.5cm}%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   307
  \begin{tabular}{c@ {}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   308
  \includegraphics[scale=0.2]{../pics/ken-thompson.jpg}\\[-1.8mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   309
  \footnotesize Ken Thompson\\[-1.8mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   310
  \footnotesize Turing Award, 1983\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   311
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   312
  \end{minipage}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   313
  \end{column}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   314
  \begin{column}{9cm}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   315
  \begin{tabular}{l@ {\hspace{1mm}}p{8cm}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   316
  \myitemi
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   317
  & Ken Thompson showed how to hide a Trojan Horse in a 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   318
  compiler \textcolor{red}{without} leaving any traces in the source code.\\[2mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   319
  \myitemi
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   320
  & No amount of source level verification will protect 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   321
  you from such Thompson-hacks.\\[2mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   322
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   323
  \myitemi
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   324
  & Therefore in safety-critical systems it is important to rely 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   325
  on only a very small TCB.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   326
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   327
  \end{column}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   328
  \end{columns}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   329
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   330
  \only<2>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   331
  \begin{textblock}{6}(4,2)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   332
  \begin{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   333
  \draw (0,0) node[inner sep=3mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   334
  {\normalsize
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   335
  \begin{minipage}{8cm}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   336
  \begin{quote}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   337
  \includegraphics[scale=0.05]{../pics/evil.png}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   338
  \begin{enumerate}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   339
  \item[1)] Assume you ship the compiler as binary and also with sources.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   340
  \item[2)] Make the compiler aware when it compiles itself.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   341
  \item[3)] Add the Trojan horse.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   342
  \item[4)] Compile.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   343
  \item[5)] Delete Trojan horse from the sources of the compiler.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   344
  \item[6)] Go on holiday for the rest of your life. ;o)\\[-7mm]\mbox{}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   345
  \end{enumerate}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   346
  \end{quote}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   347
  \end{minipage}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   348
  \end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   349
  \end{textblock}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   350
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   351
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   352
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   353
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   354
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   355
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   356
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   357
\begin{frame}[c]
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   358
\frametitle{\begin{tabular}{c}While-Language\end{tabular}}
66
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   359
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   360
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   361
\begin{center}
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   362
\bl{\begin{tabular}{@{}lcl@{}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   363
$Stmt$ & $\rightarrow$ &  $\text{skip}$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   364
              & $|$ & $Id := AExp$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   365
              & $|$ & $\text{if}\; B\!Exp \;\text{then}\; Block \;\text{else}\; Block$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   366
              & $|$ & $\text{while}\; B\!Exp \;\text{do}\; Block$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   367
               & $|$ & $\alert{\text{write}\; Id}$\medskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   368
$Stmts$ & $\rightarrow$ &  $Stmt \;\text{;}\; Stmts$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   369
              & $|$ & $Stmt$\medskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   370
$Block$ & $\rightarrow$ &  $\{ Stmts \}$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   371
                & $|$ & $Stmt$\medskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   372
$AExp$ & $\rightarrow$ & \ldots\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   373
$BExp$ & $\rightarrow$ & \ldots\\
66
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   374
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   375
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   376
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   377
66
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   378
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   379
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   380
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   381
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   382
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   383
\begin{frame}[c]
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   384
\frametitle{\begin{tabular}{c}Fibonacci Numbers\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   385
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   386
\mbox{}\\[-18mm]\mbox{}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   387
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   388
{\lstset{language=While}\fontsize{10}{12}\selectfont
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   389
\texttt{\lstinputlisting{../progs/fib.while}}}
66
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   390
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   391
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   392
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   393
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   394
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   395
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   396
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   397
\frametitle{\begin{tabular}{c}Interpreter\end{tabular}}
66
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   398
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   399
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   400
\bl{\begin{tabular}{@{}lcl@{}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   401
$\text{eval}(n, E)$ & $\dn$ & $n$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   402
$\text{eval}(x, E)$ & $\dn$ & $E(x)$ \;\;\;\textcolor{black}{lookup \bl{$x$} in \bl{$E$}}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   403
$\text{eval}(a_1 + a_2, E)$ & $\dn$ & $\text{eval}(a_1, E) + \text{eval}(a_2, E)$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   404
$\text{eval}(a_1 - a_2, E)$ & $\dn$ & $\text{eval}(a_1, E) - \text{eval}(a_2, E)$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   405
$\text{eval}(a_1 * a_2, E)$ & $\dn$ & $\text{eval}(a_1, E) * \text{eval}(a_2, E)$\bigskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   406
$\text{eval}(a_1 = a_2, E)$ & $\dn$ & $\text{eval}(a_1, E) = \text{eval}(a_2, E)$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   407
$\text{eval}(a_1\,!\!= a_2, E)$ & $\dn$ & $\neg(\text{eval}(a_1, E) = \text{eval}(a_2, E))$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   408
$\text{eval}(a_1 < a_2, E)$ & $\dn$ & $\text{eval}(a_1, E) < \text{eval}(a_2, E)$\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   409
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   410
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   411
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   412
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   413
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   414
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   415
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   416
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   417
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   418
\frametitle{\begin{tabular}{c}Interpreter (2)\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   419
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   420
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   421
\bl{\begin{tabular}{@{}lcl@{}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   422
$\text{eval}(\text{skip}, E)$ & $\dn$ & $E$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   423
$\text{eval}(x:=a, E)$ & $\dn$ & \bl{$E(x \mapsto \text{eval}(a, E))$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   424
\multicolumn{3}{@{}l@{}}{$\text{eval}(\text{if}\;b\;\text{then}\;cs_1\;\text{else}\;cs_2 , E) \dn$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   425
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\text{if}\;\text{eval}(b,E)\;\text{then}\;
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   426
\text{eval}(cs_1,E)$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   427
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\phantom{\text{if}\;\text{eval}(b,E)\;}\text{else}\;\text{eval}(cs_2,E)$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   428
\multicolumn{3}{@{}l@{}}{$\text{eval}(\text{while}\;b\;\text{do}\;cs, E) \dn$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   429
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\text{if}\;\text{eval}(b,E)$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   430
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\text{then}\;
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   431
\text{eval}(\text{while}\;b\;\text{do}\;cs, \text{eval}(cs,E))$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   432
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\text{else}\; E$}\\
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   433
$\text{eval}(\text{write}\; x, E)$ & $\dn$ & $\{\;\text{println}(E(x))\; ;\;E\;\}$\\
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   434
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   435
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   436
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   437
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   438
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   439
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   440
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   441
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   442
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   443
\frametitle{\begin{tabular}{c}Test Program\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   444
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   445
\mbox{}\\[-18mm]\mbox{}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   446
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   447
{\lstset{language=While}\fontsize{10}{12}\selectfont
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 151
diff changeset
   448
\texttt{\lstinputlisting{../progs/loops.while}}}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   449
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   450
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   451
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   452
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   453
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   454
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   455
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   456
\frametitle{\begin{tabular}{c}Interpreted Code\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   457
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   458
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   459
\begin{tikzpicture}
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   460
\begin{axis}[axis x line=bottom, axis y line=left, xlabel=n, ylabel=secs, legend style=small]
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   461
\addplot+[smooth] file {interpreted.data};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   462
\end{axis}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   463
\end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   464
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   465
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   466
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   467
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   468
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   469
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   470
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   471
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   472
\frametitle{\begin{tabular}{c}Java Virtual Machine\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   473
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   474
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   475
\item introduced in 1995
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   476
\item is a stack-based VM (like Postscript, CLR of .Net)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   477
\item contains a JIT compiler
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   478
\item many languages take advantage of JVM's infrastructure (JRE)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   479
\item is garbage collected $\Rightarrow$ no buffer overflows
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   480
\item some languages compiled to the JVM: Scala, Clojure\ldots
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   481
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   482
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   483
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   484
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   485
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   486
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   487
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   488
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   489
\frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   490
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   491
{\Large\bl{1 + 2}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   492
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   493
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   494
\bl{\begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   495
ldc 1\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   496
ldc 2\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   497
iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   498
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   499
\end{center}\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   500
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   501
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   502
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   503
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   504
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   505
\frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   506
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   507
{\Large\bl{1 + 2 + 3}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   508
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   509
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   510
\bl{\begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   511
ldc 1\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   512
ldc 2\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   513
iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   514
ldc 3\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   515
iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   516
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   517
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   518
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   519
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   520
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   521
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   522
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   523
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   524
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   525
\frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   526
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   527
{\Large\bl{1 + (2 + 3)}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   528
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   529
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   530
\bl{\begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   531
ldc 1\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   532
ldc 2\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   533
ldc 3\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   534
iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   535
iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   536
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   537
\end{center}\bigskip\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   538
\vfill
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   539
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   540
\bl{dadd, fadd, ladd, \ldots}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   541
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   542
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   543
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   544
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   545
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   546
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   547
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   548
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   549
\frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   550
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   551
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   552
\bl{\begin{tabular}{@{}lcl@{}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   553
$\text{compile}(n)$ & $\dn$ & $\text{ldc}\;n$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   554
$\text{compile}(a_1 + a_2)$ & $\dn$\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   555
\multicolumn{3}{l}{$\qquad\text{compile}(a_1) \;@\;\text{compile}(a_2)\;@\; \text{iadd}$}\smallskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   556
$\text{compile}(a_1 - a_2)$ & $\dn$\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   557
\multicolumn{3}{l}{$\qquad\text{compile}(a_1) \;@\; \text{compile}(a_2)\;@\; \text{isub}$}\smallskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   558
$\text{compile}(a_1 * a_2)$ & $\dn$\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   559
\multicolumn{3}{l}{$\qquad\text{compile}(a_1) \;@\; \text{compile}(a_2)\;@\; \text{imul}$}\smallskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   560
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   561
\end{center}\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   562
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   563
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   564
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   565
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   566
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   567
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   568
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   569
\frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   570
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   571
{\Large\bl{1 + 2 * 3 + (4 - 3)}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   572
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   573
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   574
\bl{\begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   575
ldc 1\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   576
ldc 2\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   577
ldc 3\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   578
imul\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   579
ldc 4\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   580
ldc 3\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   581
isub\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   582
iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   583
iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   584
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   585
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   586
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   587
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   588
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   589
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   590
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   591
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   592
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   593
\frametitle{\begin{tabular}{c}Variables\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   594
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   595
{\Large\bl{$x := 5 + y * 2$}}\bigskip\pause   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   596
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   597
\begin{itemize}
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   598
\item lookup: \bl{$\text{iload}\; index$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   599
\item store: \bl{$\text{istore}\; index$}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   600
\end{itemize}\bigskip\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   601
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   602
while compilating we have to maintain a map between our identifiers and the
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   603
Java bytecode indices
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   604
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   605
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   606
\bl{$\text{compile}(a, E)$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   607
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   608
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   609
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   610
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   611
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   612
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   613
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   614
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   615
\frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   616
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   617
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   618
\bl{\begin{tabular}{@{}lcl@{}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   619
$\text{compile}(n, E)$ & $\dn$ & $\text{ldc}\;n$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   620
$\text{compile}(a_1 + a_2, E)$ & $\dn$\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   621
\multicolumn{3}{l}{$\qquad\text{compile}(a_1, E) \;@\;\text{compile}(a_2. E)\;@\; \text{iadd}$}\smallskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   622
$\text{compile}(a_1 - a_2, E)$ & $\dn$\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   623
\multicolumn{3}{l}{$\qquad\text{compile}(a_1, E) \;@\; \text{compile}(a_2, E)\;@\; \text{isub}$}\smallskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   624
$\text{compile}(a_1 * a_2, E)$ & $\dn$\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   625
\multicolumn{3}{l}{$\qquad\text{compile}(a_1, E) \;@\; \text{compile}(a_2, E)\;@\; \text{imul}$}\bigskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   626
$\text{compile}(x, E)$ & $\dn$ & $\text{iload}\;E(x)$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   627
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   628
\end{center}\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   629
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   630
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   631
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   632
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   633
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   634
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   635
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   636
\frametitle{\begin{tabular}{c}Compiling Statements\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   637
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   638
We return a list of instructions and an environment for the variables
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   639
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   640
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   641
\bl{\begin{tabular}{@{}l@{\hspace{1mm}}c@{\hspace{1mm}}l@{}}
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   642
$\text{compile}(\text{skip}, E)$ & $\dn$ & $(N\!il, E)$\bigskip\\
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   643
$\text{compile}(x := a, E)$ & $\dn$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   644
\multicolumn{3}{l}{$(\text{compile}(a, E) \;@\;\text{istore}\;index, E(x\mapsto index))$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   645
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   646
\end{center}\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   647
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   648
where \bl{$index$} is \bl{$E(x)$} if it is already defined, or if it is not then the largest index not yet seen
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   649
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   650
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   651
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   652
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   653
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   654
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   655
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   656
\frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   657
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   658
{\Large\bl{$x := x + 1$}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   659
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   660
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   661
\bl{\begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   662
iload $n_x$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   663
ldc 1\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   664
iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   665
istore $n_x$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   666
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   667
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   668
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   669
where \bl{$n_x$} is the index corresponding to the variable \bl{$x$}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   670
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   671
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   672
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   673
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   674
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   675
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   676
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   677
\frametitle{\begin{tabular}{c}Compiling Ifs\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   678
151
df229ec49b22 added ho
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   679
{\Large\bl{$\text{if}\;b\;\text{then}\;cs_1\;\text{else}\;cs_2$}}\bigskip\bigskip
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   680
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   681
\onslide<2->{Case }\only<2>{{\bf True}:}\only<3>{{\bf False}:}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   682
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   683
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   684
\begin{tikzpicture}[node distance=2mm and 4mm,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   685
 block/.style={rectangle, minimum size=1cm, draw=black, line width=1mm},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   686
 point/.style={rectangle, inner sep=0mm, minimum size=0mm, fill=red},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   687
 skip loop/.style={red, line width=1mm, to path={-- ++(0,-10mm) -| (\tikztotarget)}}]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   688
\node (A1) [point] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   689
\node (b) [block, right=of A1] {code of \bl{$b$}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   690
\node (A2) [point, right=of b] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   691
\node (cs1) [block, right=of A2] {code of \bl{$cs_1$}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   692
\node (A3) [point, right=of cs1] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   693
\node (cs2) [block, right=of A3] {code of \bl{$cs_2$}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   694
\node (A4) [point, right=of cs2] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   695
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   696
\only<2>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   697
\draw (A1) edge [->, red, line width=1mm] (b);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   698
\draw (b) edge [->, red, line width=1mm] (cs1);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   699
\draw (cs1) edge [->, red, line width=1mm] (A3);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   700
\draw (A3) edge [->,skip loop] (A4);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   701
\node [below=of cs2] {\raisebox{-5mm}{\small{}jump}};}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   702
\only<3>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   703
\draw (A1) edge [->, red, line width=1mm] (b);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   704
\draw (b) edge [->, red, line width=1mm] (A2);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   705
\draw (A2) edge [skip loop] (A3);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   706
\draw (A3) edge [->, red, line width=1mm] (cs2);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   707
\draw (cs2) edge [->,red, line width=1mm] (A4);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   708
\node [below=of cs1] {\raisebox{-5mm}{\small{}conditional jump}};}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   709
\end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   710
\end{center}
66
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   711
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   712
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   713
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   714
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 65
diff changeset
   715
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   716
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   717
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   718
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   719
\frametitle{\begin{tabular}{c}Conditional Jumps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   720
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   721
\begin{minipage}{1.1\textwidth}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   722
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   723
\item \bl{if\_icmpeq $label$} if two ints are equal, then jump\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   724
\item \bl{if\_icmpne $label$} if two ints aren't equal, then jump\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   725
\item \bl{if\_icmpge $label$} if one int is greater or equal then another, then jump
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   726
\item[]\ldots
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   727
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   728
\end{minipage}\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   729
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   730
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   731
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   732
\bl{\begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   733
$L_1$:\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   734
\hspace{5mm}if\_icmpeq\;$L_2$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   735
\hspace{5mm}iload 1\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   736
\hspace{5mm}ldc 1\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   737
\hspace{5mm}iadd\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   738
\hspace{5mm}if\_icmpeq\;$L_1$\\
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   739
$L_2$:
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   740
\end{tabular}}
82
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   741
\end{center}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   742
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   743
\begin{textblock}{3.5}(11,12)
82
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   744
\only<3>{labels must be unique}
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   745
\end{textblock}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   746
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   747
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   748
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   749
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   750
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   751
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   752
\frametitle{\begin{tabular}{c}Compiling BExps\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   753
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   754
{\Large\bl{$a_1 = a_2$}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   755
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   756
\begin{center}
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   757
\bl{\begin{tabular}{lcl}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   758
$\text{compile}(a_1 = a_2, E, lab)$ & $\dn$\\ 
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   759
\multicolumn{3}{l}{$\quad\text{compile}(a_1, E) \;@\;\text{compile}(a_2, E)\;@\; \text{if\_icmpne}\;lab$}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   760
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   761
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   762
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   763
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   764
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   765
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   766
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   767
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   768
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   769
\frametitle{\begin{tabular}{c}Compiling Ifs\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   770
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   771
{\Large\bl{if $b$ then $cs_1$ else $cs_2$}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   772
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   773
\begin{center}
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   774
\bl{\begin{tabular}{lcl}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   775
$\text{compile}(\text{if}\;b\;\text{then}\; cs_1\;\text{else}\; cs_2, E)$ & $\dn$\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   776
\multicolumn{3}{l}{$\quad l_{ifelse}\;$ \textcolor{black}{(fresh label)}}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   777
\multicolumn{3}{l}{$\quad l_{ifend}\;$ \textcolor{black}{(fresh label)}}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   778
\multicolumn{3}{l}{$\quad (is_1, E') = \text{compile}(cs_1, E)$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   779
\multicolumn{3}{l}{$\quad (is_2, E'') = \text{compile}(cs_2, E')$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   780
\multicolumn{3}{l}{$\quad(\text{compile}(b, E, l_{ifelse})$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   781
\multicolumn{3}{l}{$\quad\phantom{(}@\;is_1$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   782
\multicolumn{3}{l}{$\quad\phantom{(}@\; \text{goto}\;l_{ifend}$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   783
\multicolumn{3}{l}{$\quad\phantom{(}@\;l_{ifelse}:$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   784
\multicolumn{3}{l}{$\quad\phantom{(}@\;is_2$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   785
\multicolumn{3}{l}{$\quad\phantom{(}@\;l_{ifend}:, E'')$}\\
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   786
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   787
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   788
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   789
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   790
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   791
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   792
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   793
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   794
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   795
\frametitle{\begin{tabular}{c}Compiling Whiles\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   796
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   797
{\Large\bl{$\text{while}\;b\;\text{do}\;cs$}}\bigskip\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   798
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   799
\onslide<2->{Case }\only<2>{{\bf True}:}\only<3>{{\bf False}:}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   800
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   801
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   802
\begin{tikzpicture}[node distance=2mm and 4mm,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   803
 block/.style={rectangle, minimum size=1cm, draw=black, line width=1mm},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   804
 point/.style={rectangle, inner sep=0mm, minimum size=0mm, fill=red},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   805
 skip loop/.style={red, line width=1mm, to path={-- ++(0,-10mm) -| (\tikztotarget)}}]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   806
\node (A0) [point, left=of A1] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   807
\node (A1) [point] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   808
\node (b) [block, right=of A1] {code of \bl{$b$}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   809
\node (A2) [point, right=of b] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   810
\node (cs1) [block, right=of A2] {code of \bl{$cs$}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   811
\node (A3) [point, right=of cs1] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   812
\node (A4) [point, right=of A3] {};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   813
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   814
\only<2>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   815
\draw (A0) edge [->, red, line width=1mm] (b);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   816
\draw (b) edge [->, red, line width=1mm] (cs1);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   817
\draw (cs1) edge [->, red, line width=1mm] (A3);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   818
\draw (A3) edge [->,skip loop] (A1);}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   819
\only<3>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   820
\draw (A0) edge [->, red, line width=1mm] (b);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   821
\draw (b) edge [->, red, line width=1mm] (A2);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   822
\draw (A2) edge [skip loop] (A3);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   823
\draw (A3) edge [->, red, line width=1mm] (A4);}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   824
\end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   825
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   826
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   827
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   828
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   829
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   830
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   831
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   832
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   833
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   834
\frametitle{\begin{tabular}{c}Compiling Whiles\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   835
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   836
{\Large\bl{while $b$ do $cs$}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   837
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   838
\begin{center}
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   839
\bl{\begin{tabular}{lcl}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   840
$\text{compile}(\text{while}\; b\; \text{do} \;cs, E)$ & $\dn$\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   841
\multicolumn{3}{l}{$\quad l_{wbegin}\;$ \textcolor{black}{(fresh label)}}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   842
\multicolumn{3}{l}{$\quad l_{wend}\;$ \textcolor{black}{(fresh label)}}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   843
\multicolumn{3}{l}{$\quad (is, E') = \text{compile}(cs_1, E)$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   844
\multicolumn{3}{l}{$\quad(l_{wbegin}:$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   845
\multicolumn{3}{l}{$\quad\phantom{(}@\;\text{compile}(b, E, l_{wend})$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   846
\multicolumn{3}{l}{$\quad\phantom{(}@\;is$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   847
\multicolumn{3}{l}{$\quad\phantom{(}@\; \text{goto}\;l_{wbegin}$}\\
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   848
\multicolumn{3}{l}{$\quad\phantom{(}@\;l_{wend}:, E')$}\\
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   849
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   850
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   851
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   852
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   853
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   854
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   855
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   856
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   857
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   858
\frametitle{\begin{tabular}{c}Compiling Writes\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   859
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   860
{\Large\bl{write $x$}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   861
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   862
\begin{center}
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   863
\small\bl{\begin{tabular}{l}
84
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 82
diff changeset
   864
.method public static write(I)V\hspace{1cm}\textcolor{black}{(library function)}\\ 
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   865
\;\;    .limit locals 5 \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   866
\;\;    .limit stack 5 \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   867
\;\;    iload 0 \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   868
\;\;    getstatic java/lang/System/out Ljava/io/PrintStream;\\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   869
\;\;    swap \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   870
\;\;    invokevirtual java/io/PrintStream/println(I)V \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   871
\;\;    return \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   872
.end method\bigskip\bigskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   873
%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   874
\normalsize
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   875
iload $E(x)$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   876
invokestatic write(I)V\\
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   877
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   878
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   879
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   880
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   881
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
82
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   882
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   883
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   884
\mode<presentation>{
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   885
\begin{frame}[c]
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   886
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   887
\begin{center}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   888
\small\bl{\begin{tabular}{l}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   889
.class public XXX.XXX\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   890
.super java/lang/Object\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   891
\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   892
.method public <init>()V\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   893
\;\;     aload\_0\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   894
\;\;     invokenonvirtual java/lang/Object/<init>()V\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   895
 \;\;    return\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   896
.end method\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   897
\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   898
.method public static main([Ljava/lang/String;)V\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   899
\;\;   .limit locals 200\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   900
\;\;     .limit stack 200\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   901
\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   902
   \textcolor{black}{(here comes the compiled code)}\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   903
\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   904
\;\;     return\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   905
.end method\\
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   906
\end{tabular}}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   907
\end{center}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   908
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   909
\end{frame}}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   910
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   911
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   912
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   913
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   914
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   915
\frametitle{\begin{tabular}{c}Next Compiler Phases\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   916
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   917
\begin{itemize}
82
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   918
\item assembly $\Rightarrow$ byte code (class file)
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   919
\item labels $\Rightarrow$ absolute or relative jumps\bigskip\bigskip
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   920
\item \texttt{javap} is a disassembler for class files
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   921
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   922
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   923
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   924
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   925
82
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   926
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   927
\mode<presentation>{
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   928
\begin{frame}[t]
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   929
\frametitle{\begin{tabular}{c}Compiled Code\end{tabular}}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   930
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   931
\begin{center}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   932
\begin{tikzpicture}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   933
\begin{axis}[axis x line=bottom, axis y line=left, xlabel=n, ylabel=secs, legend style=small]
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   934
\addplot+[smooth] file {compiled.data};
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   935
\end{axis}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   936
\end{tikzpicture}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   937
\end{center}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   938
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   939
\end{frame}}
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   940
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   941
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   942
70
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 69
diff changeset
   943
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 69
diff changeset
   944
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 69
diff changeset
   945
\mode<presentation>{
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   946
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   947
\frametitle{\begin{tabular}{c}Compiled vs.~Interpreted Code\end{tabular}}
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   948
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   949
\begin{center}
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   950
\begin{tikzpicture}
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   951
\begin{loglogaxis}[axis x line=bottom, axis y line=left, xlabel=n, ylabel=secs, legend style=small]
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   952
\addplot+[smooth] file {interpreted.data};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   953
\addplot+[smooth] file {compiled.data};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   954
\end{loglogaxis}
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
   955
\end{tikzpicture}
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   956
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   957
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   958
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   959
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   960
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   961
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   962
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   963
\begin{frame}[t]
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   964
\frametitle{\begin{tabular}{c}Compiled vs.~Interpreted Code\end{tabular}}
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   965
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   966
\begin{center}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   967
\begin{tikzpicture}
82
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   968
\begin{axis}[axis x line=bottom, axis y line=left, ylabel=secs,
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   969
    xlabel=n,
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   970
    enlargelimits=0.05,
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   971
    ybar interval=0.7, legend style=small]
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   972
\addplot file {interpreted2.data};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   973
\addplot file {compiled2.data};
82
06c3ec0b452e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 81
diff changeset
   974
%\legend{interpreted, compiled}
80
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 79
diff changeset
   975
\end{axis}
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   976
\end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   977
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   978
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   979
\end{frame}}
81
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   980
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   981
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   982
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   983
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   984
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   985
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   986
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   987
\frametitle{\begin{tabular}{c}What Next\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   988
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   989
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   990
\item register spilling
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   991
\item dead code removal
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   992
\item loop optimisations
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   993
\item instruction selection
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   994
\item type checking
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   995
\item concurrency
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   996
\item fuzzy testing
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   997
\item verification\bigskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   998
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
   999
\item GCC, LLVM, tracing JITs
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
  1000
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
  1001
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
  1002
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 80
diff changeset
  1003
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1004
69
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 67
diff changeset
  1005
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1006
\end{document}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1007
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1008
%%% Local Variables:  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1009
%%% mode: latex
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1010
%%% TeX-master: t
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1011
%%% End: 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
  1012