686
|
1 |
% !TEX program = xelatex
|
63
|
2 |
\documentclass[dvipsnames,14pt,t]{beamer}
|
302
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
3 |
\usepackage{../slides}
|
215
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
4 |
\usepackage{../langs}
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
5 |
\usepackage{../data}
|
608
|
6 |
\usepackage{../graphics}
|
|
7 |
\usepackage{../grammar}
|
188
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
8 |
|
63
|
9 |
% beamer stuff
|
451
|
10 |
\renewcommand{\slidecaption}{CFL 07, King's College London}
|
63
|
11 |
\newcommand{\bl}[1]{\textcolor{blue}{#1}}
|
|
12 |
|
|
13 |
\begin{document}
|
|
14 |
|
|
15 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
302
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
16 |
\begin{frame}[t]
|
63
|
17 |
\frametitle{%
|
|
18 |
\begin{tabular}{@ {}c@ {}}
|
|
19 |
\\[-3mm]
|
451
|
20 |
\LARGE Compilers and \\[-2mm]
|
387
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
21 |
\LARGE Formal Languages (7)\\[3mm]
|
63
|
22 |
\end{tabular}}
|
|
23 |
|
|
24 |
\normalsize
|
|
25 |
\begin{center}
|
|
26 |
\begin{tabular}{ll}
|
686
|
27 |
Email: & christian.urban at kcl.ac.uk\\
|
|
28 |
Office Hours: & Thursdays 12 -- 14\\
|
|
29 |
Location: & N7.07 (North Wing, Bush House)\\
|
|
30 |
Slides \& Progs: & KEATS (also homework is there)\\
|
63
|
31 |
\end{tabular}
|
|
32 |
\end{center}
|
|
33 |
|
302
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
34 |
\end{frame}
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
35 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
63
|
36 |
|
608
|
37 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
38 |
\begin{frame}[c]
|
|
39 |
\frametitle{Bird's Eye View}
|
387
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
40 |
|
608
|
41 |
\begin{center}
|
|
42 |
\begin{tikzpicture}
|
|
43 |
\node (rexp) {\bl{\bf Lexer}};
|
|
44 |
\node (nfa) [right=of rexp] {\bl{\bf Parser}};
|
|
45 |
\node (dfa) [right=of nfa]
|
|
46 |
{\bl{\begin{tabular}{c}\bf Machine Code/\\\bf Java Byte Code\end{tabular}}};
|
|
47 |
\path[->, red, line width=2mm] (rexp) edge node [above=4mm, black] {\begin{tabular}{c@{\hspace{9mm}}}token\\[-1mm]
|
|
48 |
sequence\end{tabular}} (nfa);
|
|
49 |
\path[->, red, line width=2mm] (nfa) edge node [above=4mm, black] {\begin{tabular}{c}parse\\[-1mm] tree\end{tabular}}(dfa);
|
|
50 |
\end{tikzpicture}\\
|
|
51 |
\end{center}
|
|
52 |
|
|
53 |
\end{frame}
|
|
54 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
55 |
|
63
|
56 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
57 |
\begin{frame}[c]
|
686
|
58 |
\frametitle{CW3}
|
|
59 |
|
|
60 |
Atomic parsers for tokens
|
|
61 |
|
|
62 |
\begin{center}
|
|
63 |
\bl{$\texttt{T\_Num(123)}::rest \;\Rightarrow\; \{(\texttt{T\_Num(123)}, rest)\}$}
|
|
64 |
\end{center}\bigskip
|
|
65 |
|
|
66 |
\begin{itemize}
|
|
67 |
\item you consume one or more token from the\\
|
|
68 |
input (stream)
|
687
|
69 |
\item \bl{\texttt{T\_NUM(1), T\_OP(+), T\_NUM(2)}}\bigskip
|
|
70 |
\item a good starting point would be \texttt{comb2.scala}
|
686
|
71 |
\end{itemize}
|
|
72 |
\end{frame}
|
|
73 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
74 |
|
|
75 |
|
|
76 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
77 |
\begin{frame}[c]
|
608
|
78 |
\begin{textblock}{10}(0.5,0.5)
|
|
79 |
\LARGE
|
|
80 |
\fontspec{Hoefler Text Black}
|
|
81 |
\textcolor{ProcessBlue}{JVM\\ Code}
|
|
82 |
\\[12mm]
|
|
83 |
|
|
84 |
\normalsize
|
|
85 |
Jasmin\\
|
|
86 |
Krakatau\\
|
|
87 |
ASM lib
|
|
88 |
\end{textblock}
|
|
89 |
|
387
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
90 |
|
608
|
91 |
\fontsize{8}{10}\selectfont
|
|
92 |
%\footnotesize
|
|
93 |
\mbox{}\\[-8mm]\mbox{}
|
|
94 |
|
|
95 |
\begin{columns}
|
|
96 |
\begin{column}{2cm}
|
|
97 |
\lstinputlisting[numbers=none]{../progs/appHa.j}
|
|
98 |
\end{column}
|
|
99 |
|
|
100 |
\begin{column}{2cm}
|
|
101 |
\lstinputlisting[numbers=none]{../progs/appHb.j}
|
|
102 |
\end{column}
|
|
103 |
|
|
104 |
\end{columns}
|
63
|
105 |
|
608
|
106 |
\end{frame}
|
|
107 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
108 |
|
|
109 |
|
|
110 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
111 |
\begin{frame}[t]
|
|
112 |
|
63
|
113 |
\begin{center}
|
608
|
114 |
\bl{\begin{tabular}{@{}lcl@{}}
|
|
115 |
\\[-12mm]
|
|
116 |
\meta{Stmt} & $::=$ & $\texttt{skip}$\\
|
|
117 |
& $|$ & \textit{Id}\;\texttt{:=}\;\meta{AExp}\\
|
|
118 |
& $|$ & \texttt{if}\; \meta{BExp} \;\texttt{then}\; \meta{Block} \;\texttt{else}\; \meta{Block}\\
|
|
119 |
& $|$ & \texttt{while}\; \meta{BExp} \;\texttt{do}\; \meta{Block}\\
|
|
120 |
& $|$ & \texttt{read}\;\textit{Id}\\
|
|
121 |
& $|$ & \texttt{write}\;\textit{Id}\\
|
|
122 |
& $|$ & \texttt{write}\;\textit{String}\medskip\\
|
|
123 |
\meta{Stmts} & $::=$ & \meta{Stmt} \;\texttt{;}\; \meta{Stmts}\\
|
|
124 |
& $|$ & \meta{Stmt}\medskip\\
|
|
125 |
\meta{Block} & $::=$ & \texttt{\{}\,\meta{Stmts}\,\texttt{\}}\\
|
|
126 |
& $|$ & \meta{Stmt}\medskip\\
|
|
127 |
\meta{AExp} & $::=$ & \ldots\\
|
|
128 |
\meta{BExp} & $::=$ & \ldots\\
|
|
129 |
\end{tabular}}
|
184
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
130 |
\end{center}
|
608
|
131 |
\end{frame}
|
|
132 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
184
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
133 |
|
608
|
134 |
|
|
135 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
136 |
\begin{frame}[c]
|
|
137 |
\frametitle{\begin{tabular}{c}Fibonacci Numbers\end{tabular}}
|
387
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
138 |
|
608
|
139 |
\mbox{}\\[-18mm]\mbox{}
|
|
140 |
|
|
141 |
{\lstset{language=While}\fontsize{10}{12}\selectfont
|
|
142 |
\texttt{\lstinputlisting{../progs/fib.while}}}
|
387
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
143 |
|
369
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
144 |
\end{frame}
|
184
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
145 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
387
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
146 |
|
184
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
147 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
387
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
148 |
\begin{frame}[c]
|
608
|
149 |
\frametitle{Interpreter}
|
188
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
150 |
|
63
|
151 |
\begin{center}
|
188
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
152 |
\bl{\begin{tabular}{@{}lcl@{}}
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
153 |
$\text{eval}(n, E)$ & $\dn$ & $n$\\
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
154 |
$\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>
diff
changeset
|
155 |
$\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>
diff
changeset
|
156 |
$\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>
diff
changeset
|
157 |
$\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>
diff
changeset
|
158 |
$\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>
diff
changeset
|
159 |
$\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>
diff
changeset
|
160 |
$\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>
diff
changeset
|
161 |
\end{tabular}}
|
63
|
162 |
\end{center}
|
|
163 |
|
608
|
164 |
\end{frame}
|
63
|
165 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
608
|
166 |
|
63
|
167 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
168 |
\begin{frame}[c]
|
608
|
169 |
\frametitle{Interpreter (2)}
|
63
|
170 |
|
|
171 |
\begin{center}
|
188
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
172 |
\bl{\begin{tabular}{@{}lcl@{}}
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
173 |
$\text{eval}(\text{skip}, E)$ & $\dn$ & $E$\\
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
174 |
$\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>
diff
changeset
|
175 |
\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>
diff
changeset
|
176 |
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\text{if}\;\text{eval}(b,E)\;\text{then}\;
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
177 |
\text{eval}(cs_1,E)$}\\
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
178 |
\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>
diff
changeset
|
179 |
\multicolumn{3}{@{}l@{}}{$\text{eval}(\text{while}\;b\;\text{do}\;cs, E) \dn$}\\
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
180 |
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\text{if}\;\text{eval}(b,E)$}\\
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
181 |
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\text{then}\;
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
182 |
\text{eval}(\text{while}\;b\;\text{do}\;cs, \text{eval}(cs,E))$}\\
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
183 |
\multicolumn{3}{@{}l@{}}{\hspace{2cm}$\text{else}\; E$}\\
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
184 |
$\text{eval}(\text{write}\; x, E)$ & $\dn$ & $\{\;\text{println}(E(x))\; ;\;E\;\}$\\
|
63
|
185 |
\end{tabular}}
|
|
186 |
\end{center}
|
|
187 |
|
608
|
188 |
\end{frame}
|
188
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
189 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
190 |
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
191 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
192 |
\begin{frame}[c]
|
608
|
193 |
\frametitle{Test Program}
|
188
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
194 |
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
195 |
\mbox{}\\[-18mm]\mbox{}
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
196 |
|
608
|
197 |
{\lstset{language=While}\fontsize{10}{12}\selectfont
|
188
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
198 |
\texttt{\lstinputlisting{../progs/loops.while}}}
|
63
|
199 |
|
608
|
200 |
\end{frame}
|
63
|
201 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
202 |
|
|
203 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
608
|
204 |
\begin{frame}[c]
|
|
205 |
\fontsize{7}{9}\selectfont
|
|
206 |
|
|
207 |
|
|
208 |
\begin{columns}
|
|
209 |
\begin{column}{7cm}
|
|
210 |
\lstinputlisting[numbers=none]{../progs/appHa.j}
|
|
211 |
\end{column}
|
|
212 |
|
|
213 |
\begin{column}{7cm}
|
|
214 |
\lstinputlisting[numbers=none]{../progs/appHb.j}
|
|
215 |
\end{column}
|
|
216 |
\end{columns}
|
|
217 |
|
|
218 |
\end{frame}
|
|
219 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
220 |
|
686
|
221 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
222 |
%\begin{frame}[t]
|
|
223 |
%\frametitle{Interpreted Code}
|
|
224 |
%
|
|
225 |
%\begin{center}
|
|
226 |
%\begin{tikzpicture}
|
|
227 |
%\begin{axis}[axis x line=bottom, axis y line=left, xlabel=n, ylabel=secs, legend style=small]
|
|
228 |
%\addplot+[smooth] file {interpreted.data};
|
|
229 |
%\end{axis}
|
|
230 |
%\end{tikzpicture}
|
|
231 |
%\end{center}
|
|
232 |
%
|
|
233 |
%\end{frame}
|
|
234 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
235 |
%
|
|
236 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
237 |
%\begin{frame}[c]
|
|
238 |
%\frametitle{Java Virtual Machine}
|
|
239 |
%
|
|
240 |
%\begin{itemize}
|
|
241 |
%\item introduced in 1995
|
|
242 |
%\item is a stack-based VM (like Postscript, CLR of .Net)
|
|
243 |
%\item contains a JIT compiler
|
|
244 |
%\item many languages take advantage of JVM's infrastructure (JRE)
|
|
245 |
%\item is garbage collected $\Rightarrow$ no buffer overflows
|
|
246 |
%\item some languages compiled to the JVM: Scala, Clojure\ldots
|
|
247 |
%\end{itemize}
|
|
248 |
%
|
|
249 |
%\end{frame}
|
608
|
250 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
251 |
|
|
252 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
253 |
\begin{frame}[t,fragile]
|
|
254 |
\frametitle{Compiling AExps}
|
|
255 |
|
686
|
256 |
For example \textbf{\bl{1 + ((2 * 3) + (4 - 3))}}:\medskip
|
608
|
257 |
|
|
258 |
\begin{columns}[T]
|
|
259 |
\begin{column}{.3\textwidth}
|
|
260 |
\begin{center}
|
|
261 |
\bl{\begin{tikzpicture}
|
|
262 |
\tikzset{level distance=12mm,sibling distance=4mm}
|
|
263 |
\tikzset{edge from parent/.style={draw,very thick}}
|
|
264 |
\Tree [.$+$ [.$1$ ] [.$+$ [.$*$ $2$ $3$ ] [.$-$ $4$ $3$ ]]]
|
|
265 |
\end{tikzpicture}}
|
|
266 |
\end{center}
|
|
267 |
\end{column}
|
|
268 |
\begin{column}{.3\textwidth}
|
|
269 |
\begin{lstlisting}[language=JVMIS,numbers=none]
|
|
270 |
ldc 1
|
|
271 |
ldc 2
|
|
272 |
ldc 3
|
|
273 |
imul
|
|
274 |
ldc 4
|
|
275 |
ldc 3
|
|
276 |
isub
|
|
277 |
iadd
|
|
278 |
iadd
|
|
279 |
\end{lstlisting}
|
|
280 |
\end{column}
|
|
281 |
\end{columns}\bigskip
|
|
282 |
|
|
283 |
\small
|
|
284 |
Traverse tree in post-order \bl{$\Rightarrow$} code for
|
|
285 |
stack-machine
|
|
286 |
|
|
287 |
\end{frame}
|
|
288 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
289 |
|
|
290 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
291 |
\begin{frame}[t,fragile]
|
|
292 |
\frametitle{Compiling AExps}
|
|
293 |
|
686
|
294 |
\liningnums{\textbf{\Large\bl{(1 + 2) + 3}}}
|
608
|
295 |
|
|
296 |
\begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=6cm]
|
|
297 |
ldc 1
|
|
298 |
ldc 2
|
|
299 |
iadd
|
|
300 |
ldc 3
|
|
301 |
iadd
|
|
302 |
\end{lstlisting}
|
|
303 |
|
|
304 |
|
|
305 |
\end{frame}
|
|
306 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
307 |
|
|
308 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
309 |
\begin{frame}[t,fragile]
|
|
310 |
\frametitle{Compiling AExps}
|
|
311 |
|
|
312 |
\liningnums{\textbf{\Large\bl{1 + (2 + 3)}}}
|
|
313 |
|
|
314 |
\begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=6cm]
|
|
315 |
ldc 1
|
|
316 |
ldc 2
|
|
317 |
ldc 3
|
|
318 |
iadd
|
|
319 |
iadd
|
|
320 |
\end{lstlisting}
|
|
321 |
\bigskip\pause
|
|
322 |
\vfill
|
|
323 |
|
|
324 |
\textcolor{codepurple}{\textbf{\texttt{dadd}}},
|
|
325 |
\textcolor{codepurple}{\textbf{\texttt{fadd}}},
|
|
326 |
\textcolor{codepurple}{\textbf{\texttt{ladd}}}, \ldots
|
|
327 |
|
|
328 |
\end{frame}
|
|
329 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
330 |
|
|
331 |
|
|
332 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
333 |
\begin{frame}[t]
|
|
334 |
\frametitle{Compiling AExps}
|
|
335 |
|
|
336 |
\begin{center}
|
|
337 |
\bl{\begin{tabular}{@{}lcl@{}}
|
|
338 |
$\text{compile}(n)$ & $\dn$ & $\text{ldc}\;n$\\
|
|
339 |
$\text{compile}(a_1 + a_2)$ & $\dn$\\
|
|
340 |
\multicolumn{3}{l}{$\qquad\text{compile}(a_1) \;@\;\text{compile}(a_2)\;@\; \text{iadd}$}\smallskip\\
|
|
341 |
$\text{compile}(a_1 - a_2)$ & $\dn$\\
|
|
342 |
\multicolumn{3}{l}{$\qquad\text{compile}(a_1) \;@\; \text{compile}(a_2)\;@\; \text{isub}$}\smallskip\\
|
|
343 |
$\text{compile}(a_1 * a_2)$ & $\dn$\\
|
|
344 |
\multicolumn{3}{l}{$\qquad\text{compile}(a_1) \;@\; \text{compile}(a_2)\;@\; \text{imul}$}\smallskip\\
|
|
345 |
\end{tabular}}
|
|
346 |
\end{center}
|
|
347 |
|
|
348 |
\end{frame}
|
|
349 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
350 |
|
|
351 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
352 |
\begin{frame}[t,fragile]
|
|
353 |
\frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
|
|
354 |
|
|
355 |
\liningnums{\textbf{\Large\bl{1 $+$ 2 $*$ 3 $+$ (4 $-$ 3)}}}
|
|
356 |
|
|
357 |
\begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=6cm]
|
|
358 |
ldc 1
|
|
359 |
ldc 2
|
|
360 |
ldc 3
|
|
361 |
imul
|
|
362 |
ldc 4
|
|
363 |
ldc 3
|
|
364 |
isub
|
|
365 |
iadd
|
|
366 |
iadd
|
|
367 |
\end{lstlisting}
|
|
368 |
|
|
369 |
\end{frame}
|
|
370 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
371 |
|
|
372 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
373 |
\begin{frame}[c]
|
|
374 |
\frametitle{Variables}
|
|
375 |
\liningnums{\textbf{\Large\bl{x $:=$ 5 $+$ y $*$ 2}}}\bigskip\pause
|
|
376 |
|
|
377 |
\begin{itemize}
|
|
378 |
\item lookup: \bl{$\textcolor{codepurple}{\textbf{\texttt{iload}}}\; index$}
|
|
379 |
\item store: \bl{$\textcolor{codepurple}{\textbf{\texttt{istore}}}\; index$}
|
|
380 |
\end{itemize}\bigskip\pause
|
|
381 |
|
|
382 |
while compilating we have to maintain a map between our identifiers and the
|
|
383 |
Java bytecode indices
|
|
384 |
|
|
385 |
\begin{center}
|
|
386 |
\bl{$\text{compile}(a, E)$}
|
|
387 |
\end{center}
|
|
388 |
|
|
389 |
\end{frame}
|
|
390 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
391 |
|
|
392 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
393 |
\begin{frame}[t]
|
|
394 |
\frametitle{Compiling AExps}
|
|
395 |
|
|
396 |
\begin{center}
|
|
397 |
\bl{\begin{tabular}{@{}lcl@{}}
|
|
398 |
$\text{compile}(n, E)$ & $\dn$ & $\text{ldc}\;n$\\
|
|
399 |
$\text{compile}(a_1 + a_2, E)$ & $\dn$\\
|
|
400 |
\multicolumn{3}{l}{$\qquad\text{compile}(a_1, E) \;@\;\text{compile}(a_2, E)\;@\; \text{iadd}$}\smallskip\\
|
|
401 |
$\text{compile}(a_1 - a_2, E)$ & $\dn$\\
|
|
402 |
\multicolumn{3}{l}{$\qquad\text{compile}(a_1, E) \;@\; \text{compile}(a_2, E)\;@\; \text{isub}$}\smallskip\\
|
|
403 |
$\text{compile}(a_1 * a_2, E)$ & $\dn$\\
|
|
404 |
\multicolumn{3}{l}{$\qquad\text{compile}(a_1, E) \;@\; \text{compile}(a_2, E)\;@\; \text{imul}$}\bigskip\\
|
|
405 |
$\text{compile}(x, E)$ & $\dn$ & $\text{iload}\;E(x)$\\
|
|
406 |
\end{tabular}}
|
|
407 |
\end{center}
|
|
408 |
|
|
409 |
\end{frame}
|
|
410 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
411 |
|
|
412 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
413 |
\begin{frame}[c, fragile]
|
|
414 |
\frametitle{Mathematical Functions}
|
|
415 |
|
|
416 |
Compilation of some mathematical functions:
|
|
417 |
|
|
418 |
\begin{center}
|
|
419 |
\begin{tabular}{lcl}
|
|
420 |
\texttt{Aop("+", a1, a2)} & $\Rightarrow$ & \texttt{...iadd}\\
|
|
421 |
\texttt{Aop("-", a1, a2)} & $\Rightarrow$ & \texttt{...isub}\\
|
|
422 |
\texttt{Aop("*", a1, a2)} & $\Rightarrow$ & \texttt{...imul}\\
|
|
423 |
\texttt{Aop("/", a1, a2)} & $\Rightarrow$ & \texttt{...idiv}\\
|
|
424 |
\texttt{Aop("\%", a1, a2)} & $\Rightarrow$ & \texttt{...irem}\\
|
|
425 |
\end{tabular}
|
|
426 |
\end{center}
|
|
427 |
|
|
428 |
\end{frame}
|
|
429 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
430 |
|
|
431 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
432 |
\begin{frame}[c]
|
|
433 |
\frametitle{Compiling Statements}
|
|
434 |
|
|
435 |
We return a list of instructions and an environment for the
|
|
436 |
variables
|
|
437 |
|
|
438 |
\begin{center}
|
|
439 |
\bl{\begin{tabular}{@{}l@{\hspace{1mm}}c@{\hspace{1mm}}l@{}}
|
|
440 |
$\text{compile}(\text{skip}, E)$ & $\dn$ & $(\textit{Nil}, E)$\bigskip\\
|
|
441 |
$\text{compile}(x := a, E)$ & $\dn$\\
|
|
442 |
\multicolumn{3}{l}{$(\text{compile}(a, E) \;@\;\text{istore}\;index, E(x\mapsto index))$}\\
|
|
443 |
\end{tabular}}
|
|
444 |
\end{center}\medskip
|
|
445 |
|
|
446 |
where \bl{$index$} is \bl{$E(x)$} if it is already defined,
|
|
447 |
or if it is not, then the largest index not yet seen
|
|
448 |
|
|
449 |
\end{frame}
|
|
450 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
451 |
|
|
452 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
453 |
\begin{frame}[c,fragile]
|
|
454 |
\frametitle{Compiling Assignments}
|
|
455 |
|
|
456 |
\liningnums{\textbf{\Large\bl{x $:=$ x $+$ 1}}}
|
|
457 |
|
|
458 |
\begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=6cm]
|
|
459 |
iload /*@\bl{$n_x$}@*/
|
|
460 |
ldc 1
|
|
461 |
iadd
|
|
462 |
istore /*@\bl{$n_x$}@*/
|
|
463 |
\end{lstlisting}\medskip
|
|
464 |
|
|
465 |
where \bl{$n_x$} is the index corresponding to the variable~\bl{$x$}
|
|
466 |
|
|
467 |
\end{frame}
|
|
468 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
469 |
|
|
470 |
|
|
471 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
472 |
\begin{frame}[t]
|
|
473 |
\frametitle{Compiling Ifs}
|
|
474 |
|
|
475 |
{\Large\bl{$\text{if}\;b\;\text{then}\;cs_1\;\text{else}\;cs_2$}}\bigskip\bigskip
|
|
476 |
|
|
477 |
\onslide<2->{Case }\only<2>{{\bf True}:}\only<3>{{\bf False}:}
|
|
478 |
|
|
479 |
\begin{center}
|
|
480 |
\begin{tikzpicture}[node distance=2mm and 4mm,
|
|
481 |
block/.style={rectangle, minimum size=1cm, draw=black, line width=1mm},
|
|
482 |
point/.style={rectangle, inner sep=0mm, minimum size=0mm, fill=red},
|
|
483 |
skip loop/.style={red, line width=1mm, to path={-- ++(0,-10mm) -| (\tikztotarget)}}]
|
|
484 |
\node (A1) [point] {};
|
|
485 |
\node (b) [block, right=of A1] {code of \bl{$b$}};
|
|
486 |
\node (A2) [point, right=of b] {};
|
|
487 |
\node (cs1) [block, right=of A2] {code of \bl{$cs_1$}};
|
|
488 |
\node (A3) [point, right=of cs1] {};
|
|
489 |
\node (cs2) [block, right=of A3] {code of \bl{$cs_2$}};
|
|
490 |
\node (A4) [point, right=of cs2] {};
|
|
491 |
|
|
492 |
\only<2>{
|
|
493 |
\draw (A1) edge [->, red, line width=1mm] (b);
|
|
494 |
\draw (b) edge [->, red, line width=1mm] (cs1);
|
|
495 |
\draw (cs1) edge [->, red, line width=1mm] (A3);
|
|
496 |
\draw (A3) edge [->,skip loop] (A4);
|
|
497 |
\node [below=of cs2] {\raisebox{-5mm}{\small{}jump}};}
|
|
498 |
\only<3>{
|
|
499 |
\draw (A1) edge [->, red, line width=1mm] (b);
|
|
500 |
\draw (b) edge [->, red, line width=1mm] (A2);
|
|
501 |
\draw (A2) edge [skip loop] (A3);
|
|
502 |
\draw (A3) edge [->, red, line width=1mm] (cs2);
|
|
503 |
\draw (cs2) edge [->,red, line width=1mm] (A4);
|
|
504 |
\node [below=of cs1] {\raisebox{-5mm}{\small{}conditional jump}};}
|
|
505 |
\end{tikzpicture}
|
|
506 |
\end{center}
|
|
507 |
|
|
508 |
\end{frame}
|
|
509 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
510 |
|
|
511 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
512 |
\begin{frame}[t,fragile]
|
|
513 |
\frametitle{Conditional Jumps}
|
|
514 |
|
|
515 |
\begin{minipage}{1.1\textwidth}
|
|
516 |
\begin{itemize}
|
|
517 |
\item \textcolor{codepurple}{\textbf{\texttt{if\_icmpeq}}} \bl{$label$}
|
|
518 |
if two ints are equal, then jump\medskip
|
|
519 |
\item \textcolor{codepurple}{\textbf{\texttt{if\_icmpne}}} \bl{$label$}
|
|
520 |
if two ints aren't equal, then jump\medskip
|
|
521 |
\item \textcolor{codepurple}{\textbf{\texttt{if\_icmpge}}} \bl{$label$}
|
|
522 |
if one int is greater or equal then another, then jump
|
|
523 |
\item[]\ldots
|
|
524 |
\end{itemize}
|
|
525 |
\end{minipage}\pause
|
|
526 |
|
|
527 |
\begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=2cm]
|
|
528 |
/*@\bl{$L_1$:}@*/
|
|
529 |
if_icmpeq /*@\bl{$L_2$}@*/
|
|
530 |
iload 1
|
|
531 |
ldc 1
|
|
532 |
iadd
|
|
533 |
if_icmpeq /*@\bl{$L_1$}@*/
|
|
534 |
/*@\bl{$L_2$:}@*/
|
|
535 |
\end{lstlisting}
|
|
536 |
|
|
537 |
|
|
538 |
\begin{textblock}{3.5}(11,12)
|
|
539 |
\only<3>{labels must be unique}
|
|
540 |
\end{textblock}
|
|
541 |
\end{frame}
|
|
542 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
543 |
|
|
544 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
545 |
\begin{frame}[c,fragile]
|
|
546 |
\frametitle{Compiling Ifs}
|
|
547 |
|
|
548 |
For example
|
|
549 |
|
|
550 |
\begin{lstlisting}[mathescape,numbers=none,language=While]
|
|
551 |
if 1 = 1 then x := 2 else y := 3
|
|
552 |
\end{lstlisting}
|
|
553 |
|
|
554 |
|
|
555 |
\begin{center}
|
|
556 |
\begin{lstlisting}[mathescape,language=JVMIS,numbers=none]
|
|
557 |
ldc 1
|
|
558 |
ldc 1
|
|
559 |
if_icmpne L_ifelse $\quad\tikz[remember picture] \node (C) {\mbox{}};$
|
|
560 |
ldc 2
|
|
561 |
istore 0
|
|
562 |
goto L_ifend $\quad\tikz[remember picture] \node (A) {\mbox{}};$
|
|
563 |
L_ifelse: $\quad\tikz[remember picture] \node[] (D) {\mbox{}};$
|
|
564 |
ldc 3
|
|
565 |
istore 1
|
|
566 |
L_ifend: $\quad\tikz[remember picture] \node[] (B) {\mbox{}};$
|
|
567 |
\end{lstlisting}
|
|
568 |
\end{center}
|
|
569 |
|
|
570 |
\begin{tikzpicture}[remember picture,overlay]
|
|
571 |
\draw[->,very thick] (A) edge [->,to path={-- ++(10mm,0mm)
|
|
572 |
-- ++(0mm,-17.3mm) |- (\tikztotarget)},line width=1mm] (B.east);
|
|
573 |
\draw[->,very thick] (C) edge [->,to path={-- ++(10mm,0mm)
|
|
574 |
-- ++(0mm,-17.3mm) |- (\tikztotarget)},line width=1mm] (D.east);
|
|
575 |
\end{tikzpicture}
|
|
576 |
|
|
577 |
\end{frame}
|
|
578 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
579 |
|
|
580 |
|
|
581 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
582 |
\begin{frame}[t]
|
|
583 |
\frametitle{Compiling BExps}
|
|
584 |
|
|
585 |
{\Large\bl{$a_1 = a_2$}}
|
|
586 |
|
|
587 |
\begin{center}
|
|
588 |
\bl{\begin{tabular}{lcl}
|
|
589 |
$\text{compile}(a_1 = a_2, E, lab)$ & $\dn$\\
|
|
590 |
\multicolumn{3}{l}{$\quad\text{compile}(a_1, E) \;@\;\text{compile}(a_2, E)\;@\; \text{if\_icmpne}\;lab$}
|
|
591 |
\end{tabular}}
|
|
592 |
\end{center}
|
|
593 |
|
|
594 |
\end{frame}
|
|
595 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
596 |
|
|
597 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
598 |
\begin{frame}[c, fragile]
|
|
599 |
\frametitle{Boolean Expressions}
|
|
600 |
|
|
601 |
Compilation of boolean expressions:
|
|
602 |
|
|
603 |
\begin{center}
|
|
604 |
\begin{tikzpicture}[node distance=2mm and 4mm,
|
|
605 |
block/.style={rectangle, minimum size=1cm, draw=black, line width=1mm},
|
|
606 |
point/.style={rectangle, inner sep=0mm, minimum size=0mm, fill=red},
|
|
607 |
skip loop/.style={red, line width=1mm, to path={-- ++(0,-10mm) -| (\tikztotarget)}}]
|
|
608 |
\node (A1) [point] {};
|
|
609 |
\node (b) [block, right=of A1] {code of \bl{$b$}};
|
|
610 |
\node (A2) [point, right=of b] {};
|
|
611 |
\node (cs1) [block, right=of A2] {code of \bl{$cs_1$}};
|
|
612 |
\node (A3) [point, right=of cs1] {};
|
|
613 |
\node (cs2) [block, right=of A3] {code of \bl{$cs_2$}};
|
|
614 |
\node (A4) [point, right=of cs2] {};
|
|
615 |
|
|
616 |
\only<1>{
|
|
617 |
\draw (A1) edge [->, red, line width=1mm] (b);
|
|
618 |
\draw (b) edge [->, red, line width=1mm] (A2);
|
|
619 |
\draw (A2) edge [skip loop] (A3);
|
|
620 |
\draw (A3) edge [->, red, line width=1mm] (cs2);
|
|
621 |
\draw (cs2) edge [->,red, line width=1mm] (A4);
|
|
622 |
\node [below=of cs1] {\raisebox{-5mm}{\small{}conditional jump}};}
|
|
623 |
\end{tikzpicture}
|
|
624 |
\end{center}
|
|
625 |
|
|
626 |
\begin{center}
|
|
627 |
\begin{tabular}{lcl}
|
|
628 |
\texttt{Bop("==", a1, a2)} & $\Rightarrow$ & \texttt{...if\_icmpne...}\\
|
|
629 |
\texttt{Bop("!=", a1, a2)} & $\Rightarrow$ & \texttt{...if\_icmpeq...}\\
|
|
630 |
\texttt{Bop("<", a1, a2)} & $\Rightarrow$ & \texttt{...if\_icmpge...}\\
|
|
631 |
\texttt{Bop("<=", a1, a2)} & $\Rightarrow$ & \texttt{...if\_icmpgt...}\\
|
|
632 |
\end{tabular}
|
|
633 |
\end{center}
|
|
634 |
|
|
635 |
\end{frame}
|
|
636 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
637 |
|
|
638 |
|
|
639 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
640 |
\begin{frame}[t]
|
|
641 |
\frametitle{Compiling Ifs}
|
|
642 |
|
|
643 |
{\Large\bl{if $b$ then $cs_1$ else $cs_2$}}
|
|
644 |
|
|
645 |
\begin{center}
|
|
646 |
\bl{\begin{tabular}{lcl}
|
|
647 |
$\text{compile}(\text{if}\;b\;\text{then}\; cs_1\;\text{else}\; cs_2, E)$ & $\dn$\\
|
|
648 |
\multicolumn{3}{l}{$\quad l_{ifelse}\;$ \textcolor{black}{(fresh label)}}\\
|
|
649 |
\multicolumn{3}{l}{$\quad l_{ifend}\;$ \textcolor{black}{(fresh label)}}\\
|
|
650 |
\multicolumn{3}{l}{$\quad (is_1, E') = \text{compile}(cs_1, E)$}\\
|
|
651 |
\multicolumn{3}{l}{$\quad (is_2, E'') = \text{compile}(cs_2, E')$}\\
|
|
652 |
\multicolumn{3}{l}{$\quad(\text{compile}(b, E, l_{ifelse})$}\\
|
|
653 |
\multicolumn{3}{l}{$\quad\phantom{(}@\;is_1$}\\
|
|
654 |
\multicolumn{3}{l}{$\quad\phantom{(}@\; \text{goto}\;l_{ifend}$}\\
|
|
655 |
\multicolumn{3}{l}{$\quad\phantom{(}@\;l_{ifelse}:$}\\
|
|
656 |
\multicolumn{3}{l}{$\quad\phantom{(}@\;is_2$}\\
|
|
657 |
\multicolumn{3}{l}{$\quad\phantom{(}@\;l_{ifend}:, E'')$}\\
|
|
658 |
\end{tabular}}
|
|
659 |
\end{center}
|
|
660 |
|
|
661 |
\end{frame}
|
|
662 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
663 |
|
|
664 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
665 |
\begin{frame}[t]
|
|
666 |
\frametitle{Compiling Whiles}
|
|
667 |
|
|
668 |
{\Large\bl{$\text{while}\;b\;\text{do}\;cs$}}\bigskip\bigskip
|
|
669 |
|
|
670 |
\onslide<2->{Case }\only<2>{{\bf True}:}\only<3>{{\bf False}:}
|
|
671 |
|
|
672 |
\begin{center}
|
|
673 |
\begin{tikzpicture}[node distance=2mm and 4mm,
|
|
674 |
block/.style={rectangle, minimum size=1cm, draw=black, line width=1mm},
|
|
675 |
point/.style={rectangle, inner sep=0mm, minimum size=0mm, fill=red},
|
|
676 |
skip loop/.style={red, line width=1mm, to path={-- ++(0,-10mm) -| (\tikztotarget)}}]
|
|
677 |
\node (A0) [point, left=of A1] {};
|
|
678 |
\node (A1) [point] {};
|
|
679 |
\node (b) [block, right=of A1] {code of \bl{$b$}};
|
|
680 |
\node (A2) [point, right=of b] {};
|
|
681 |
\node (cs1) [block, right=of A2] {code of \bl{$cs$}};
|
|
682 |
\node (A3) [point, right=of cs1] {};
|
|
683 |
\node (A4) [point, right=of A3] {};
|
|
684 |
|
|
685 |
\only<2>{
|
|
686 |
\draw (A0) edge [->, red, line width=1mm] (b);
|
|
687 |
\draw (b) edge [->, red, line width=1mm] (cs1);
|
|
688 |
\draw (cs1) edge [->, red, line width=1mm] (A3);
|
|
689 |
\draw (A3) edge [->,skip loop] (A1);}
|
|
690 |
\only<3>{
|
|
691 |
\draw (A0) edge [->, red, line width=1mm] (b);
|
|
692 |
\draw (b) edge [->, red, line width=1mm] (A2);
|
|
693 |
\draw (A2) edge [skip loop] (A3);
|
|
694 |
\draw (A3) edge [->, red, line width=1mm] (A4);}
|
|
695 |
\end{tikzpicture}
|
|
696 |
\end{center}
|
|
697 |
|
|
698 |
\end{frame}
|
|
699 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
700 |
|
|
701 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
702 |
\begin{frame}[t]
|
|
703 |
\frametitle{Compiling Whiles}
|
|
704 |
|
|
705 |
{\Large\bl{while $b$ do $cs$}}
|
|
706 |
|
|
707 |
\begin{center}
|
|
708 |
\bl{\begin{tabular}{lcl}
|
|
709 |
$\text{compile}(\text{while}\; b\; \text{do} \;cs, E)$ & $\dn$\\
|
|
710 |
\multicolumn{3}{l}{$\quad l_{wbegin}\;$ \textcolor{black}{(fresh label)}}\\
|
|
711 |
\multicolumn{3}{l}{$\quad l_{wend}\;$ \textcolor{black}{(fresh label)}}\\
|
|
712 |
\multicolumn{3}{l}{$\quad (is, E') = \text{compile}(cs_1, E)$}\\
|
|
713 |
\multicolumn{3}{l}{$\quad(l_{wbegin}:$}\\
|
|
714 |
\multicolumn{3}{l}{$\quad\phantom{(}@\;\text{compile}(b, E, l_{wend})$}\\
|
|
715 |
\multicolumn{3}{l}{$\quad\phantom{(}@\;is$}\\
|
|
716 |
\multicolumn{3}{l}{$\quad\phantom{(}@\; \text{goto}\;l_{wbegin}$}\\
|
|
717 |
\multicolumn{3}{l}{$\quad\phantom{(}@\;l_{wend}:, E')$}\\
|
|
718 |
\end{tabular}}
|
|
719 |
\end{center}
|
|
720 |
|
|
721 |
\end{frame}
|
|
722 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
723 |
|
|
724 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
725 |
\begin{frame}[c,fragile]
|
|
726 |
\frametitle{Compiling Whiles}
|
|
727 |
|
|
728 |
For example
|
|
729 |
|
|
730 |
\begin{lstlisting}[mathescape,numbers=none,language=While]
|
|
731 |
while x <= 10 do x := x + 1
|
|
732 |
\end{lstlisting}
|
|
733 |
|
|
734 |
|
|
735 |
\begin{center}
|
|
736 |
\begin{lstlisting}[mathescape,language=JVMIS,numbers=none]
|
|
737 |
L_wbegin: $\quad\tikz[remember picture] \node[] (LB) {\mbox{}};$
|
|
738 |
iload 0
|
|
739 |
ldc 10
|
|
740 |
if_icmpgt L_wend $\quad\tikz[remember picture] \node (LC) {\mbox{}};$
|
|
741 |
iload 0
|
|
742 |
ldc 1
|
|
743 |
iadd
|
|
744 |
istore 0
|
|
745 |
goto L_wbegin $\quad\tikz[remember picture] \node (LA) {\mbox{}};$
|
|
746 |
L_wend: $\quad\tikz[remember picture] \node[] (LD) {\mbox{}};$
|
|
747 |
\end{lstlisting}
|
|
748 |
\end{center}
|
|
749 |
|
|
750 |
\begin{tikzpicture}[remember picture,overlay]
|
|
751 |
\draw[->,very thick] (LA) edge [->,to path={-- ++(12mm,0mm)
|
|
752 |
-- ++(0mm,17.3mm) |- (\tikztotarget)},line width=1mm] (LB.east);
|
|
753 |
\draw[->,very thick] (LC) edge [->,to path={-- ++(12mm,0mm)
|
|
754 |
-- ++(0mm,-17.3mm) |- (\tikztotarget)},line width=1mm] (LD.east);
|
|
755 |
\end{tikzpicture}
|
|
756 |
|
|
757 |
\end{frame}
|
|
758 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
759 |
|
|
760 |
|
|
761 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
762 |
\begin{frame}[c,fragile]
|
|
763 |
\frametitle{Compiling Writes}
|
|
764 |
|
|
765 |
\small
|
|
766 |
\begin{lstlisting}[language=JVMIS,mathescape,
|
|
767 |
numbers=none,xleftmargin=-6mm]
|
|
768 |
.method public static write(I)V
|
|
769 |
.limit locals 1
|
|
770 |
.limit stack 2
|
|
771 |
getstatic java/lang/System/out
|
|
772 |
Ljava/io/PrintStream;
|
|
773 |
iload 0
|
|
774 |
invokevirtual java/io/PrintStream/println(I)V
|
|
775 |
return
|
|
776 |
.end method
|
|
777 |
|
|
778 |
|
|
779 |
|
|
780 |
iload $E(x)$
|
|
781 |
invokestatic XXX/XXX/write(I)V
|
|
782 |
\end{lstlisting}
|
|
783 |
|
|
784 |
\end{frame}
|
|
785 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
786 |
|
|
787 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
788 |
\begin{frame}[c,fragile]
|
|
789 |
\frametitle{Compiling Main}
|
|
790 |
|
|
791 |
\footnotesize
|
|
792 |
\begin{lstlisting}[language=JVMIS,mathescape,
|
|
793 |
numbers=none,xleftmargin=-6mm]
|
|
794 |
.class public XXX.XXX
|
|
795 |
.super java/lang/Object
|
|
796 |
|
|
797 |
.method public <init>()V
|
|
798 |
aload_0
|
|
799 |
invokenonvirtual java/lang/Object/<init>()V
|
|
800 |
return
|
|
801 |
.end method
|
|
802 |
|
|
803 |
.method public static main([Ljava/lang/String;)V
|
|
804 |
.limit locals 200
|
|
805 |
.limit stack 200
|
|
806 |
|
|
807 |
$\textit{\ldots{}here comes the compiled code\ldots}$
|
|
808 |
|
|
809 |
return
|
|
810 |
.end method
|
|
811 |
\end{lstlisting}
|
|
812 |
|
|
813 |
\end{frame}
|
|
814 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
815 |
|
|
816 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
817 |
\begin{frame}[c]
|
686
|
818 |
\frametitle{Next Compiler Phases}
|
608
|
819 |
|
|
820 |
\begin{itemize}
|
|
821 |
\item assembly $\Rightarrow$ byte code (class file)
|
|
822 |
\item labels $\Rightarrow$ absolute or relative jumps\bigskip\bigskip
|
|
823 |
\item \texttt{javap} is a disassembler for class files
|
686
|
824 |
\item jasmin and krakatau are assemblers for jvm code
|
369
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
825 |
\end{itemize}
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
826 |
|
686
|
827 |
\end{frame}
|
608
|
828 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
829 |
|
|
830 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
831 |
\begin{frame}[t]
|
686
|
832 |
\frametitle{Recall: Interpreted Code}
|
|
833 |
|
|
834 |
\begin{center}
|
|
835 |
\begin{tikzpicture}
|
|
836 |
\begin{axis}[axis x line=bottom, axis y line=left, xlabel=n, ylabel=secs, legend style=small]
|
|
837 |
\addplot+[smooth] file {interpreted.data};
|
|
838 |
\end{axis}
|
|
839 |
\end{tikzpicture}
|
|
840 |
\end{center}
|
|
841 |
|
|
842 |
Loop program
|
|
843 |
\end{frame}
|
|
844 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
845 |
|
|
846 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
847 |
\begin{frame}[t]
|
|
848 |
\frametitle{Compiled Code}
|
608
|
849 |
|
|
850 |
\begin{center}
|
|
851 |
\begin{tikzpicture}
|
|
852 |
\begin{axis}[axis x line=bottom, axis y line=left, xlabel=n, ylabel=secs, legend style=small]
|
|
853 |
\addplot+[smooth] file {compiled.data};
|
|
854 |
\end{axis}
|
|
855 |
\end{tikzpicture}
|
|
856 |
\end{center}
|
|
857 |
|
686
|
858 |
\end{frame}
|
608
|
859 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
860 |
|
|
861 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
862 |
\begin{frame}[t]
|
686
|
863 |
\frametitle{Compiler vs.~Interpreter}
|
608
|
864 |
|
|
865 |
\begin{center}
|
|
866 |
\begin{tikzpicture}
|
|
867 |
\begin{axis}[axis x line=bottom, axis y line=left, ylabel=secs,
|
|
868 |
xlabel=n,
|
|
869 |
enlargelimits=0.05,
|
|
870 |
ybar interval=0.7, legend style=small]
|
|
871 |
\addplot file {interpreted2.data};
|
|
872 |
\addplot file {compiled2.data};
|
|
873 |
%\legend{interpreted, compiled}
|
|
874 |
\end{axis}
|
|
875 |
\end{tikzpicture}
|
|
876 |
\end{center}
|
|
877 |
|
686
|
878 |
\end{frame}
|
608
|
879 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
880 |
|
|
881 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
686
|
882 |
\begin{frame}[c]
|
|
883 |
\frametitle{A ``Compiler'' for BF*** to C}
|
|
884 |
|
|
885 |
\begin{center}
|
|
886 |
\begin{tabular}{lcl}
|
|
887 |
\bl{\texttt{>}} & $\Rightarrow$ & \texttt{ptr++}\\
|
|
888 |
\bl{\texttt{<}} & $\Rightarrow$ & \texttt{ptr--}\\
|
|
889 |
\bl{\texttt{+}} & $\Rightarrow$ & \texttt{(*ptr)++}\\
|
|
890 |
\bl{\texttt{-}} & $\Rightarrow$ & \texttt{(*ptr)--}\\
|
|
891 |
\bl{\texttt{.}} & $\Rightarrow$ & \texttt{putchar(*ptr)}\\
|
|
892 |
\bl{\texttt{,}} & $\Rightarrow$ & \texttt{*ptr = getchar()}\\
|
|
893 |
\bl{\texttt{[}} & $\Rightarrow$ & \texttt{while(*ptr)\{}\\
|
|
894 |
\bl{\texttt{]}} & $\Rightarrow$ & \texttt{\}}\medskip\\
|
|
895 |
& $\Rightarrow$ & ignore everything else\\
|
|
896 |
\end{tabular}
|
|
897 |
\end{center}\bigskip
|
|
898 |
|
|
899 |
\texttt{char field[30000]\\ char *ptr = \&field[15000]}
|
|
900 |
|
|
901 |
\end{frame}
|
|
902 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
903 |
|
|
904 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
905 |
\begin{frame}[c,fragile]
|
|
906 |
\frametitle{BF***}
|
|
907 |
|
|
908 |
we need some big array, say \texttt{arr} and 7 (8) instructions:\medskip
|
|
909 |
|
|
910 |
\begin{itemize}
|
|
911 |
\item \texttt{>} move \texttt{ptr++}
|
|
912 |
\item \texttt{<} move \texttt{ptr-{}-}
|
|
913 |
\item \texttt{+} add \texttt{arr[ptr]++}
|
|
914 |
\item \texttt{-} subtract \texttt{arr[ptr]-{}-}
|
|
915 |
\item \texttt{.} print out \texttt{arr[ptr]} as ASCII
|
|
916 |
\item \texttt{[} if \texttt{arr[ptr] == 0} jump just after the corresponding \texttt{]}; otherwise \texttt{ptr++}
|
|
917 |
\item \texttt{]} if \texttt{arr[ptr] != 0} jump just after the corresponding \texttt{[}; otherwise \texttt{ptr++}
|
|
918 |
|
|
919 |
\end{itemize}
|
|
920 |
|
|
921 |
\end{frame}
|
|
922 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
923 |
|
|
924 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
925 |
\begin{frame}[c,fragile]
|
|
926 |
\frametitle{Arrays in While}
|
|
927 |
|
|
928 |
\begin{itemize}
|
|
929 |
\item \texttt{new arr[15000]}\medskip
|
|
930 |
\item \texttt{x := 3 + arr[3 + y]}\medskip
|
|
931 |
\item \texttt{arr[42 * n] := ...}
|
|
932 |
\end{itemize}
|
|
933 |
|
|
934 |
\end{frame}
|
|
935 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
936 |
|
|
937 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
938 |
\begin{frame}[c,fragile]
|
|
939 |
\frametitle{New Arrays}
|
|
940 |
|
|
941 |
\begin{lstlisting}[mathescape,numbers=none,language=While]
|
|
942 |
new arr[number]
|
|
943 |
\end{lstlisting}\bigskip\bigskip
|
|
944 |
|
|
945 |
\begin{lstlisting}[mathescape,numbers=none,language=JVMIS]
|
|
946 |
ldc number
|
|
947 |
newarray int
|
|
948 |
astore loc_var
|
|
949 |
\end{lstlisting}
|
|
950 |
|
|
951 |
|
|
952 |
\end{frame}
|
|
953 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
954 |
|
|
955 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
956 |
\begin{frame}[c,fragile]
|
|
957 |
\frametitle{Array Update}
|
|
958 |
|
|
959 |
\begin{lstlisting}[mathescape,numbers=none,language=While]
|
|
960 |
arr[...] :=
|
|
961 |
\end{lstlisting}\bigskip\bigskip
|
|
962 |
|
|
963 |
\begin{lstlisting}[mathescape,numbers=none,language=JVMIS]
|
|
964 |
aload loc_var
|
|
965 |
index_aexp
|
|
966 |
value_aexp
|
|
967 |
iastore
|
|
968 |
\end{lstlisting}
|
|
969 |
|
|
970 |
|
|
971 |
\end{frame}
|
|
972 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
973 |
|
|
974 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
975 |
\begin{frame}[c,fragile]
|
|
976 |
\frametitle{Array Lookup in AExp}
|
|
977 |
|
|
978 |
\begin{lstlisting}[mathescape,numbers=none,language=While]
|
|
979 |
...arr[...]...
|
|
980 |
\end{lstlisting}\bigskip\bigskip
|
|
981 |
|
|
982 |
\begin{lstlisting}[mathescape,numbers=none,language=JVMIS]
|
|
983 |
aload loc_var
|
|
984 |
index_aexp
|
|
985 |
iaload
|
|
986 |
\end{lstlisting}
|
|
987 |
|
|
988 |
|
|
989 |
\end{frame}
|
|
990 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
991 |
|
|
992 |
|
|
993 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
608
|
994 |
\mode<presentation>{
|
|
995 |
\begin{frame}[c]
|
|
996 |
\frametitle{Backend}
|
|
997 |
|
|
998 |
\begin{center}
|
|
999 |
\begin{tikzpicture}
|
|
1000 |
\node (rexp) {\bl{\bf Lexer}};
|
|
1001 |
\node (nfa) [right=of rexp] {\bl{\bf Parser}};
|
|
1002 |
\node (dfa) [right=of nfa] {\bl{\begin{tabular}{c}\bf Optimizations\end{tabular}}};
|
|
1003 |
\path[->, red, line width=2mm] (rexp) edge node [above=4mm, black] {\begin{tabular}{c@{\hspace{9mm}}}token\\[-1mm]
|
|
1004 |
sequence\end{tabular}} (nfa);
|
|
1005 |
\node (final) [below=of dfa] {\bl{\begin{tabular}{c}\bf Machine Code/\\\bf Byte Code\end{tabular}}};
|
|
1006 |
\path[->, red, line width=2mm] (nfa) edge node [above=4mm, black] {\begin{tabular}{c}parse\\[-1mm] tree
|
|
1007 |
\end{tabular}}(dfa);
|
|
1008 |
\path[->, red, line width=2mm] (dfa) edge (final);
|
|
1009 |
\end{tikzpicture}\\
|
|
1010 |
\end{center}
|
|
1011 |
|
|
1012 |
\end{frame}}
|
369
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
1013 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
1014 |
|
608
|
1015 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
1016 |
\mode<presentation>{
|
|
1017 |
\begin{frame}[t]
|
|
1018 |
\frametitle{\begin{tabular}{c}What is Next\end{tabular}}
|
|
1019 |
|
|
1020 |
\begin{itemize}
|
|
1021 |
\item register spilling
|
|
1022 |
\item dead code removal
|
|
1023 |
\item loop optimisations
|
|
1024 |
\item instruction selection
|
|
1025 |
\item type checking
|
|
1026 |
\item concurrency
|
|
1027 |
\item fuzzy testing
|
|
1028 |
\item verification\bigskip\\
|
|
1029 |
|
|
1030 |
\item GCC, LLVM, tracing JITs
|
|
1031 |
\end{itemize}
|
|
1032 |
|
|
1033 |
\end{frame}}
|
|
1034 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
1035 |
|
184
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
1036 |
|
63
|
1037 |
\end{document}
|
|
1038 |
|
|
1039 |
%%% Local Variables:
|
|
1040 |
%%% mode: latex
|
|
1041 |
%%% TeX-master: t
|
|
1042 |
%%% End:
|
|
1043 |
|