author | Christian Urban <urbanc@in.tum.de> |
Wed, 25 Sep 2019 11:24:34 +0100 | |
changeset 630 | 9b1c15c3eb6f |
parent 621 | cf287db8dc15 |
child 631 | f618dd4de24a |
permissions | -rw-r--r-- |
95
dbe49327b6c5
added new stuff
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
1 |
\documentclass[dvipsnames,14pt,t,xelatex]{beamer} |
252
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
215
diff
changeset
|
2 |
\usepackage{../slides} |
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
215
diff
changeset
|
3 |
\usepackage{../graphics} |
215
828303e8e4af
updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
98
diff
changeset
|
4 |
\usepackage{../langs} |
828303e8e4af
updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
98
diff
changeset
|
5 |
\usepackage{../data} |
0 | 6 |
|
252
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
215
diff
changeset
|
7 |
\hfuzz=220pt |
e8ef8f38ca84
added style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
215
diff
changeset
|
8 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
9 |
\lstset{language=Scala, |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
10 |
style=mystyle, |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
11 |
numbersep=0pt, |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
12 |
numbers=none, |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
13 |
xleftmargin=0mm} |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
14 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
15 |
\newcommand{\bl}[1]{\textcolor{blue}{#1}} |
559 | 16 |
|
0 | 17 |
% beamer stuff |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
18 |
\renewcommand{\slidecaption}{CFL 01, King's College London} |
0 | 19 |
|
20 |
||
21 |
\begin{document} |
|
22 |
||
576 | 23 |
|
24 |
||
621 | 25 |
|
26 |
||
27 |
||
0 | 28 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
29 |
\begin{frame}[t] |
510 | 30 |
\frametitle{% |
0 | 31 |
\begin{tabular}{@ {}c@ {}} |
1 | 32 |
\\[-3mm] |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
33 |
\LARGE Compilers and \\[-1mm] |
1 | 34 |
\LARGE Formal Languages (1)\\[-3mm] |
0 | 35 |
\end{tabular}} |
36 |
||
37 |
\begin{center} |
|
507 | 38 |
%\includegraphics[scale=0.3]{pics/ante1.jpg}\hspace{5mm} |
39 |
%\includegraphics[scale=0.31]{pics/ante2.jpg}\\ |
|
40 |
%\footnotesize\textcolor{gray}{Antikythera automaton, 100 BC (Archimedes?)} |
|
0 | 41 |
\end{center} |
42 |
||
510 | 43 |
\normalsize |
0 | 44 |
\begin{center} |
45 |
\begin{tabular}{ll} |
|
46 |
Email: & christian.urban at kcl.ac.uk\\ |
|
559 | 47 |
Office: & N\liningnums{7.07} (North Wing, Bush House)\\ |
0 | 48 |
Slides: & KEATS |
49 |
\end{tabular} |
|
50 |
\end{center} |
|
51 |
||
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
52 |
\end{frame} |
559 | 53 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
0 | 54 |
|
55 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
559 | 56 |
\begin{frame}[t] |
57 |
\frametitle{Why Study Compilers?} |
|
0 | 58 |
|
560 | 59 |
John Regehr {\small(Univ.~Utah, LLVM compiler hacker)}\smallskip\\ |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
60 |
|
559 | 61 |
\begin{bubble}[10.5cm] |
62 |
\bf ``\ldots{}It’s effectively a perpetual |
|
63 |
employment act for solid compiler hackers.'' |
|
64 |
\end{bubble} |
|
0 | 65 |
|
559 | 66 |
\onslide<1->{ |
67 |
\only<2>{ |
|
68 |
\begin{itemize} |
|
69 |
\item {\bf Hardware is getting weirder |
|
70 |
rather than getting clocked faster} |
|
0 | 71 |
|
559 | 72 |
\begin{itemize} |
73 |
\item Almost all processors are |
|
74 |
multicores nowadays and it looks like there is increasing asymmetry in |
|
75 |
resources across cores. Processors come with vector units, crypto |
|
76 |
accelerators etc. We have DSPs, GPUs, |
|
77 |
ARM big.little, and Xeon Phi. This is only scratching the |
|
78 |
surface. |
|
79 |
\end{itemize} |
|
80 |
\end{itemize}} |
|
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
81 |
\only<3>{ |
559 | 82 |
\begin{itemize} |
83 |
\item {\bf We’re getting tired of low-level languages and |
|
84 |
their associated security disasters} |
|
85 |
||
86 |
\begin{itemize} |
|
87 |
\item |
|
88 |
We want to write new code, to |
|
89 |
whatever extent possible, in safer, higher-level |
|
90 |
languages. Compilers are caught right in the middle of these |
|
91 |
opposing trends: one of their main jobs is to help bridge the large |
|
92 |
and growing gap between increasingly high-level languages and |
|
93 |
increasingly wacky platforms. |
|
94 |
\end{itemize} |
|
95 |
\end{itemize}}} |
|
1 | 96 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
97 |
\end{frame} |
0 | 98 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1 | 99 |
|
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
100 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
101 |
\begin{frame}[c] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
102 |
\frametitle{Why Bother?} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
103 |
|
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
104 |
\begin{columns}[t] |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
105 |
\begin{column}{.5\textwidth} |
559 | 106 |
Ruby, Python, Java 8\medskip\\ |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
107 |
\begin{tikzpicture}\footnotesize |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
108 |
\begin{axis}[ |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
109 |
xlabel={$n$}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
110 |
x label style={at={(1.05,0.0)}}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
111 |
ylabel={time in secs}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
112 |
enlargelimits=false, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
113 |
xtick={0,5,...,30}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
114 |
xmax=33, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
115 |
ymax=35, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
116 |
ytick={0,5,...,30}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
117 |
scaled ticks=false, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
118 |
axis lines=left, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
119 |
width=5.5cm, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
120 |
height=4cm, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
121 |
legend entries={Python,Ruby}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
122 |
legend pos=north west, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
123 |
legend cell align=left] |
559 | 124 |
\addplot[blue,mark=*, mark options={fill=white}] table {re-python.data}; |
125 |
\addplot[brown,mark=triangle*, mark options={fill=white}] table {re-ruby.data}; |
|
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
126 |
\end{axis} |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
127 |
\end{tikzpicture} |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
128 |
\begin{tikzpicture}\footnotesize |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
129 |
\begin{axis}[ |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
130 |
xlabel={$n$}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
131 |
x label style={at={(1.05,0.0)}}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
132 |
ylabel={time in secs}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
133 |
enlargelimits=false, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
134 |
xtick={0,5,...,30}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
135 |
xmax=33, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
136 |
ymax=35, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
137 |
ytick={0,5,...,30}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
138 |
scaled ticks=false, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
139 |
axis lines=left, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
140 |
width=5.5cm, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
141 |
height=4cm, |
559 | 142 |
legend entries={Python, Java 8}, |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
143 |
legend pos=north west, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
144 |
legend cell align=left] |
559 | 145 |
\addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data}; |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
146 |
\addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data}; |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
147 |
\end{axis} |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
148 |
\end{tikzpicture} |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
149 |
|
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
150 |
\end{column} |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
151 |
\begin{column}{.5\textwidth} |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
152 |
Us (after next lecture)\medskip\\ |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
153 |
\begin{tikzpicture}\footnotesize |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
154 |
\begin{axis}[ |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
155 |
xlabel={$n$}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
156 |
x label style={at={(1.07,0.0)}}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
157 |
ylabel={time in secs}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
158 |
enlargelimits=false, |
442
84d6714840c9
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
437
diff
changeset
|
159 |
xtick={0,5000,...,10000}, |
84d6714840c9
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
437
diff
changeset
|
160 |
xmax=11000, |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
161 |
ymax=35, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
162 |
ytick={0,5,...,30}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
163 |
scaled ticks=false, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
164 |
axis lines=left, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
165 |
width=5.5cm, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
166 |
height=4cm] |
437
fe387fcbf2ee
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
428
diff
changeset
|
167 |
\addplot[green,mark=square*,mark options={fill=white}] table {re2.data}; |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
168 |
\addplot[black,mark=square*,mark options={fill=white}] table {re3.data}; |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
169 |
\end{axis} |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
170 |
\end{tikzpicture} |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
171 |
\begin{tikzpicture}\footnotesize |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
172 |
\begin{axis}[ |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
173 |
xlabel={$n$}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
174 |
x label style={at={(1.07,0.0)}}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
175 |
ylabel={time in secs}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
176 |
enlargelimits=false, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
177 |
ymax=35, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
178 |
ytick={0,5,...,30}, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
179 |
scaled ticks=false, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
180 |
axis lines=left, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
181 |
width=5.5cm, |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
182 |
height=4cm] |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
183 |
\addplot[black,mark=square*,mark options={fill=white}] table {re3a.data}; |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
184 |
\end{axis} |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
185 |
\end{tikzpicture} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
186 |
\end{column} |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
187 |
\end{columns}\bigskip |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
188 |
|
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
189 |
\small\centering |
559 | 190 |
matching \texttt{[a?]\{n\}[a]\{n\}} and \texttt{(a*)*b} |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
191 |
against $\underbrace{\texttt{a}...\texttt{a}}_n$ |
510 | 192 |
\end{frame} |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
193 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
194 |
|
560 | 195 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
196 |
\begin{frame}[c] |
|
197 |
\frametitle{Evil Regular Expressions} |
|
198 |
||
199 |
\begin{itemize} |
|
200 |
\item \alert{R}egular \alert{e}xpression \alert{D}enial \alert{o}f \alert{S}ervice (ReDoS)\medskip |
|
201 |
\item Evil regular expressions\medskip |
|
202 |
\begin{itemize} |
|
203 |
\item \bl{$(a^{?\{n\}}) \cdot a^{\{n\}}$} |
|
204 |
\item \bl{$(a^*)^*\cdot b$} |
|
630 | 205 |
\item \bl{$([a-z]^+)^*$} |
560 | 206 |
\item \bl{$(a + a \cdot a)^*$} |
207 |
\item \bl{$(a + a^?)^*$} |
|
208 |
\end{itemize} |
|
209 |
||
210 |
\item sometimes also called \alert{catastrophic backtracking} |
|
211 |
\item this is a problem for \alert{N}etwork \alert{I}ntrusion |
|
212 |
\alert{D}etection systems, StackExchange, Atom editor |
|
213 |
\item \url{https://vimeo.com/112065252} |
|
214 |
\end{itemize} |
|
215 |
||
216 |
\end{frame} |
|
217 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
218 |
|
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
219 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
220 |
\begin{frame}[c] |
559 | 221 |
\frametitle{The Goal of this Module} |
222 |
||
223 |
\begin{center} |
|
224 |
\begin{tikzpicture}[scale=1, |
|
225 |
node/.style={ |
|
226 |
rectangle,rounded corners=3mm, |
|
227 |
very thick,draw=black!50,minimum height=18mm, minimum width=20mm, |
|
228 |
top color=white,bottom color=black!20}] |
|
229 |
||
560 | 230 |
\node at (3.05, 1.8) {\Large\bf write a compiler}; |
559 | 231 |
|
560 | 232 |
\node (0) at (-2.3,0) {}; |
233 |
\node [above=5mm of 0] |
|
234 |
{\makebox[0mm]{\footnotesize |
|
235 |
\begin{tabular}{@{}l@{}}input\\[-1mm]program\end{tabular}}}; |
|
576 | 236 |
|
559 | 237 |
\node (A) at (0,0) [node] {}; |
238 |
\node [below right] at (A.north west) {lexer}; |
|
239 |
||
240 |
\node (B) at (3,0) [node] {}; |
|
241 |
\node [below right=1mm] at (B.north west) {\mbox{}\hspace{-1mm}parser}; |
|
242 |
||
243 |
\node (C) at (6,0) [node] {}; |
|
244 |
\node [below right] at (C.north west) {\mbox{}\hspace{-1mm}code gen}; |
|
245 |
||
560 | 246 |
\node (1) at (8.4,0) {}; |
247 |
\node [above=5mm of 1] |
|
248 |
{\makebox[0mm]{\footnotesize |
|
249 |
\begin{tabular}{@{}r@{}}binary\\[-1mm]code\end{tabular}}}; |
|
559 | 250 |
|
251 |
\draw [->,line width=4mm] (0) -- (A); |
|
252 |
\draw [->,line width=4mm] (A) -- (B); |
|
253 |
\draw [->,line width=4mm] (B) -- (C); |
|
254 |
\draw [->,line width=4mm] (C) -- (1); |
|
255 |
\end{tikzpicture} |
|
256 |
\end{center} |
|
257 |
||
258 |
\only<2,3,4>{ |
|
259 |
\begin{textblock}{1}(1,2.1) |
|
260 |
\begin{bubble}[9.8cm] |
|
261 |
\normalsize |
|
262 |
lexer input: a string\smallskip\\ |
|
263 |
\hspace{5mm}\code{"read(n);"}\medskip\\ |
|
264 |
lexer output: a sequence of tokens\smallskip\\ |
|
265 |
\hspace{5mm}\code{key(read) lpar id(n) rpar semi} |
|
266 |
\end{bubble} |
|
621 | 267 |
\end{textblock}} |
559 | 268 |
|
269 |
\only<3,4>{ |
|
270 |
\begin{textblock}{1}(6,7.8) |
|
271 |
\begin{tabular}{c} |
|
272 |
\includegraphics[scale=0.2]{../pics/rosetta.jpg}\\[-2mm] |
|
273 |
\footnotesize lexing $\Rightarrow$ recognising words (Stone of Rosetta) |
|
274 |
\end{tabular} |
|
275 |
\end{textblock}} |
|
276 |
||
277 |
\only<4>{ |
|
278 |
\begin{textblock}{1}(0.5,12)\small |
|
279 |
\begin{tabular}{l@{}c@{}l} |
|
280 |
\pcode{if} & $\;\Rightarrow\;$ & keyword\\ |
|
281 |
\pcode{iffoo} & $\;\Rightarrow\;$ & identifier\\ |
|
282 |
\end{tabular} |
|
283 |
\end{textblock}} |
|
284 |
||
285 |
\only<5>{ |
|
286 |
\begin{textblock}{1}(1,1.5) |
|
287 |
\begin{bubble}[8.5cm] |
|
288 |
\normalsize |
|
289 |
parser input: a sequence of tokens\smallskip\\ |
|
290 |
||
291 |
{\small\hspace{5mm}\code{key(read) lpar id(n) rpar semi}}\smallskip\\ |
|
292 |
||
293 |
parser output: an abstract syntax tree\smallskip\\ |
|
294 |
\footnotesize |
|
295 |
\hspace{2cm}\begin{tikzpicture} |
|
296 |
\node {\code{read}} |
|
297 |
child {node {\code{lpar}}} |
|
298 |
child {node {\code{n}}} |
|
299 |
child {node {\code{rpar}}}; |
|
300 |
\end{tikzpicture} |
|
301 |
\end{bubble} |
|
302 |
\end{textblock}} |
|
303 |
||
304 |
\only<6,7>{ |
|
305 |
\begin{textblock}{1}(1,1.5) |
|
306 |
\begin{bubble}[4cm] |
|
307 |
\normalsize |
|
308 |
code generator:\smallskip\\ |
|
309 |
\hspace{5mm}\code{istore 2}\\ |
|
310 |
\hspace{5mm}\code{iload 2}\\ |
|
311 |
\hspace{5mm}\code{ldc 10}\\ |
|
312 |
\hspace{5mm}\code{isub}\\ |
|
313 |
\hspace{5mm}\code{ifeq Label2}\\ |
|
314 |
\hspace{5mm}\code{iload 2}\\ |
|
315 |
\hspace{5mm}\code{...}\\ |
|
316 |
\end{bubble} |
|
317 |
\end{textblock}} |
|
318 |
||
319 |
\only<7>{ |
|
320 |
\begin{textblock}{6}(8.4,7) |
|
321 |
\begin{bubble}[5cm] |
|
322 |
\mbox{\begin{tikzpicture}[scale=0.58,rounded corners=0mm] |
|
323 |
\begin{axis}[axis x line=bottom, axis y line=left, ylabel=secs, |
|
324 |
xlabel=n, |
|
325 |
enlargelimits=0.05, |
|
326 |
ybar interval=0.7, legend style=small] |
|
327 |
\addplot file {interpreted2.data}; |
|
328 |
\addplot file {compiled2.data}; |
|
329 |
%\legend{interpreted, compiled} |
|
330 |
\end{axis} |
|
331 |
\end{tikzpicture}} |
|
332 |
\end{bubble} |
|
333 |
\end{textblock}} |
|
334 |
||
335 |
\end{frame} |
|
336 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
337 |
||
338 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
339 |
\begin{frame}[c] |
|
340 |
\frametitle{The Acad.~Subject is Mature} |
|
341 |
||
342 |
\begin{itemize} |
|
343 |
\item Turing Machines, 1936 |
|
344 |
\item Regular Expressions, 1956\\ |
|
345 |
\item The first compiler for COBOL, 1957\\ (Grace Hopper) |
|
346 |
\item But surprisingly research papers are still published nowadays\\ |
|
347 |
\item ``Parsing: The Solved Problem That Isn't'' |
|
348 |
\end{itemize} |
|
349 |
||
350 |
\begin{flushright} |
|
351 |
\includegraphics[scale=0.3]{pics/hopper.jpg}\\ |
|
352 |
\footnotesize\textcolor{gray}{Grace Hopper} |
|
353 |
\end{flushright} |
|
354 |
||
355 |
||
356 |
\begin{flushright} |
|
357 |
\mbox{}\\[-6mm] |
|
358 |
{\footnotesize\textcolor{gray}{(she made it to David Letterman's Tonight Show,\\[-2mm] |
|
359 |
\url{http://www.youtube.com/watch?v=aZOxtURhfEU})}} |
|
360 |
\end{flushright} |
|
361 |
||
362 |
\end{frame} |
|
363 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
364 |
||
365 |
||
366 |
||
367 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
368 |
\begin{frame}[c] |
|
327
9470cd124667
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
255
diff
changeset
|
369 |
\frametitle{Lectures 1 - 5} |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
370 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
371 |
transforming strings into structured data\\[10mm] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
372 |
|
506 | 373 |
{\LARGE\bf Lexing} {\hfill{}based on regular expressions}\medskip\\ |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
374 |
\hspace{5mm}(recognising ``words'')\\[6mm] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
375 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
376 |
{\LARGE\bf Parsing}\medskip\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
377 |
\hspace{5mm}(recognising ``sentences'') |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
378 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
379 |
\begin{textblock}{1}(10,9.1) |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
380 |
\begin{tabular}{c} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
381 |
\includegraphics[scale=0.1]{../pics/rosetta.jpg}\\[-2mm] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
382 |
\footnotesize Stone of Rosetta |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
383 |
\end{tabular} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
384 |
\end{textblock} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
385 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
386 |
\end{frame} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
387 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
388 |
|
1 | 389 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
390 |
\begin{frame}[t] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
391 |
\frametitle{Familiar Regular Expr.} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
392 |
\small |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
393 |
\begin{center} |
560 | 394 |
\texttt{[a-z0-9\_$\backslash{}$.-]+ @ [a-z0-9$\backslash{}$.-]+ . [a-z$\backslash{}$.]\{2,6\}} |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
395 |
\end{center}\smallskip |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
396 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
397 |
\begin{center} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
398 |
\begin{tabular}{@{}lp{8.5cm}@{}} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
399 |
\pcode{re*} & matches 0 or more times\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
400 |
\pcode{re+} & matches 1 or more times\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
401 |
\pcode{re?} & matches 0 or 1 times\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
402 |
\pcode{re\{n\}} & matches exactly \pcode{n} number of times\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
403 |
\pcode{re\{n,m\}} & matches at least \pcode{n} and at most {\tt m} times\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
404 |
\pcode{[...]} & matches any single character inside the brackets\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
405 |
\pcode{[^...]} & matches any single character not inside the |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
406 |
brackets\\ |
560 | 407 |
\pcode{a-z A-Z} & character ranges\\ |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
408 |
\pcode{\\d} & matches digits; equivalent to \pcode{[0-9]}\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
409 |
\pcode{.} & matches every character except newline\\ |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
410 |
\pcode{(re)} & groups regular expressions and remembers |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
411 |
the matched text |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
412 |
\end{tabular} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
413 |
\end{center} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
414 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
415 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
416 |
\end{frame} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
417 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
418 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
419 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1 | 420 |
\begin{frame}[c] |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
421 |
\frametitle{Today} |
0 | 422 |
|
1 | 423 |
\begin{itemize} |
560 | 424 |
\item While the ultimate goal is to implement a small compiler for the JVM |
425 |
\ldots\bigskip |
|
1 | 426 |
\end{itemize} |
427 |
||
428 |
Let's start with: |
|
429 |
||
430 |
\begin{itemize} |
|
431 |
\item a web-crawler |
|
432 |
\item an email harvester |
|
559 | 433 |
%\item \textcolor{gray}{(a web-scraper)} |
1 | 434 |
\end{itemize} |
435 |
||
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
436 |
\end{frame} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
437 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
0 | 438 |
|
2 | 439 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
3 | 440 |
\begin{frame}[t] |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
441 |
\frametitle{A Web-Crawler} |
2 | 442 |
|
3 | 443 |
\mbox{}\\[10mm] |
444 |
||
2 | 445 |
\begin{enumerate} |
446 |
\item given an URL, read the corresponding webpage |
|
447 |
\item extract all links from it |
|
448 |
\item call the web-crawler again for all these links |
|
449 |
\end{enumerate} |
|
450 |
||
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
451 |
\end{frame} |
2 | 452 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
453 |
||
454 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
3 | 455 |
\begin{frame}[t] |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
456 |
\frametitle{A Web-Crawler} |
2 | 457 |
|
3 | 458 |
\mbox{}\\[10mm] |
459 |
||
460 |
||
2 | 461 |
\begin{enumerate} |
462 |
\item given an URL, read the corresponding webpage |
|
463 |
\item if not possible print, out a problem |
|
464 |
\item if possible, extract all links from it |
|
465 |
\item call the web-crawler again for all these links |
|
466 |
\end{enumerate}\bigskip\pause |
|
467 |
||
3 | 468 |
\small (we need a bound for the number of recursive calls) |
2 | 469 |
|
470 |
\small (the purpose is to check all links on my own webpage) |
|
559 | 471 |
\end{frame} |
2 | 472 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
473 |
||
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
474 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
475 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
476 |
\begin{frame}[c] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
477 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
478 |
\begin{textblock}{1}(2,5) |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
479 |
\begin{tabular}{c} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
480 |
\includegraphics[scale=0.15]{pics/servers.png}\\[-2mm] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
481 |
\small Server |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
482 |
\end{tabular} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
483 |
\end{textblock} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
484 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
485 |
\begin{textblock}{1}(5.6,4) |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
486 |
\begin{tikzpicture}[scale=1.1] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
487 |
\draw[white] (0,1) node (X) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
488 |
\draw[white] (2,1) node (Y) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
489 |
\draw[white] (0,0) node (X1) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
490 |
\draw[white] (2,0) node (Y1) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
491 |
\draw[white] (0,-1) node (X2) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
492 |
\draw[white] (2,-1) node (Y2) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
493 |
\draw[red, <-, line width = 2mm] (X) -- (Y); |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
494 |
\node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
495 |
\draw[red, ->, line width = 2mm] (X1) -- (Y1); |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
496 |
\node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X1)!.5!(Y1) $) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
497 |
\draw[red, <-, line width = 2mm] (X2) -- (Y2); |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
498 |
\node [inner sep=7pt,label=above:\textcolor{black}{POST data}] at ($ (X2)!.5!(Y2) $) {}; |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
499 |
\end{tikzpicture} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
500 |
\end{textblock} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
501 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
502 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
503 |
\begin{textblock}{1}(9,5.5) |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
504 |
\begin{tabular}{c} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
505 |
\includegraphics[scale=0.15]{pics/laptop.png}\\[-2mm] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
506 |
\small Browser |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
507 |
\end{tabular} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
508 |
\end{textblock} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
509 |
\end{frame} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
510 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
511 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
512 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
513 |
|
0 | 514 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
515 |
\begin{frame}[c] |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
516 |
\frametitle{Scala} |
1 | 517 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
518 |
\small A simple Scala function for reading webpages: |
559 | 519 |
\bigskip |
0 | 520 |
|
98
1f3d89fe9820
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
97
diff
changeset
|
521 |
\footnotesize |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
522 |
\lstinputlisting{../progs/app0.scala} |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
523 |
\medskip\pause |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
524 |
|
559 | 525 |
\lstinline{get_page("""https://nms.kcl.ac.uk/christian.urban/""")} |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
526 |
\bigskip\medskip\pause |
0 | 527 |
|
3 | 528 |
|
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
529 |
\small A slightly more complicated version for handling errors: |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
530 |
\smallskip |
2 | 531 |
|
98
1f3d89fe9820
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
97
diff
changeset
|
532 |
\footnotesize |
559 | 533 |
\lstinputlisting[xleftmargin=-4mm]{../progs/app1.scala} |
1 | 534 |
|
0 | 535 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
536 |
\end{frame} |
0 | 537 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
538 |
||
98
1f3d89fe9820
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
97
diff
changeset
|
539 |
|
1f3d89fe9820
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
97
diff
changeset
|
540 |
|
1f3d89fe9820
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
97
diff
changeset
|
541 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
3 | 542 |
\begin{frame}[t] |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
543 |
\frametitle{A Regular Expression} |
3 | 544 |
|
545 |
\begin{itemize} |
|
546 |
\item \ldots{} is a pattern or template for specifying strings |
|
547 |
\end{itemize}\bigskip |
|
548 |
||
549 |
\begin{center} |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
550 |
\only<1>{\scode{"https?://[^"]*"}}% |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
551 |
\only<2>{\scode{""""https?://[^"]*"""".r}} |
3 | 552 |
\end{center}\bigskip\bigskip |
553 |
||
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
554 |
matches for example\smallskip\\ |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
555 |
\hspace{2mm}\code{"http://www.foobar.com"}\\ |
559 | 556 |
\hspace{2mm}\code{"https://www.tls.org"}\smallskip\\ |
557 |
||
558 |
but not\smallskip\\ |
|
559 |
\hspace{2mm}\code{"http://www."foo"bar.com"}\\ |
|
3 | 560 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
561 |
\end{frame} |
3 | 562 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
563 |
||
564 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
559 | 565 |
\begin{frame}[c] |
566 |
\frametitle{Finding Operations in Scala} |
|
0 | 567 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
568 |
{\bf\code{rexp.findAllIn(string)}}\medskip |
3 | 569 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
570 |
returns a list of all (sub)strings that match the |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
571 |
regular expression |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
572 |
\bigskip\bigskip |
0 | 573 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
574 |
|
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
575 |
{\bf\code{rexp.findFirstIn(string)}}\medskip |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
576 |
|
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
577 |
returns either |
0 | 578 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
579 |
\begin{itemize} |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
580 |
\item \code{None} if no (sub)string matches or |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
581 |
\item \code{Some(s)} with the first (sub)string |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
582 |
\end{itemize} |
0 | 583 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
584 |
\end{frame} |
0 | 585 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
586 |
||
587 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
3 | 588 |
\begin{frame}[c] |
0 | 589 |
|
3 | 590 |
\footnotesize |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
591 |
\lstinputlisting{../progs/app2.scala} |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
592 |
|
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
593 |
\end{frame} |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
594 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
0 | 595 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
596 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
597 |
\begin{frame}[c] |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
598 |
|
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
599 |
\small |
559 | 600 |
A version that only crawls links in ``my'' domain:\bigskip |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
601 |
|
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
602 |
\footnotesize |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
603 |
\lstinputlisting{../progs/app3.scala} |
0 | 604 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
605 |
\end{frame} |
0 | 606 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
607 |
||
608 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
609 |
\begin{frame}[c] |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
610 |
\lstset{xleftmargin=-4mm} |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
611 |
\small |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
612 |
A little email harvester: |
3 | 613 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
614 |
\footnotesize |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
615 |
\lstinputlisting{../progs/app4.scala}\bigskip |
3 | 616 |
|
617 |
\tiny |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
618 |
\url{http://net.tutsplus.com/tutorials/other/8-regular-expressions-you-should-know/} |
3 | 619 |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
620 |
\end{frame} |
3 | 621 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
622 |
||
623 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
14 | 624 |
\begin{frame}[t] |
506 | 625 |
\frametitle{Regular Expressions} |
0 | 626 |
|
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
627 |
Their inductive definition: |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
628 |
|
14 | 629 |
|
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
630 |
\begin{textblock}{6}(2,7.5) |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
631 |
\begin{tabular}{@ {}rrl@ {\hspace{13mm}}l} |
512 | 632 |
\bl{$r$} & \bl{$::=$} & \bl{$\ZERO$} & nothing\\ |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
633 |
& \bl{$\mid$} & \bl{$\ONE$} & empty string / \pcode{""} / $[]$\\ |
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
634 |
& \bl{$\mid$} & \bl{$c$} & character\\ |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
635 |
& \bl{$\mid$} & \bl{$r_1 + r_2$} & alternative / choice\\ |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
636 |
& \bl{$\mid$} & \bl{$r_1 \cdot r_2$} & sequence\\ |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
637 |
& \bl{$\mid$} & \bl{$r^*$} & star (zero or more)\\ |
3 | 638 |
\end{tabular} |
639 |
\end{textblock} |
|
640 |
||
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
641 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
642 |
\only<2->{\footnotesize |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
643 |
\begin{textblock}{9}(2,0.5) |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
644 |
\begin{bubble}[9.8cm] |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
645 |
\lstinputlisting{../progs/app01.scala} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
646 |
\end{bubble} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
647 |
\end{textblock}} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
648 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
649 |
\end{frame} |
3 | 650 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
651 |
||
652 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
506 | 653 |
%\begin{frame}[t] |
654 |
%\frametitle{Regular Expressions} |
|
655 |
% |
|
656 |
%\small |
|
657 |
%In Scala:\bigskip |
|
658 |
% |
|
659 |
%\footnotesize |
|
660 |
%\lstinputlisting{../progs/app51.scala} |
|
661 |
% |
|
662 |
% |
|
663 |
%\end{frame} |
|
0 | 664 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
665 |
||
666 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
667 |
\begin{frame}[t] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
668 |
\frametitle{Strings} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
669 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
670 |
\ldots are lists of characters. For example \code{"hello"} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
671 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
672 |
\begin{center} |
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
673 |
\bl{$[h, e, l, l, o]$} or just \bl{$hello$} |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
674 |
\end{center} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
675 |
|
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
676 |
the empty string: \bl{$[]$} or \bl{\pcode{""}}\bigskip\\ |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
677 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
678 |
the concatenation of two strings: |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
679 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
680 |
\begin{center} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
681 |
\bl{$s_1 \,@\, s_2$} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
682 |
\end{center} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
683 |
|
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
684 |
\bl{\textit{foo $@$ bar = foobar}, \textit{baz $@\, []$ = baz}} |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
685 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
686 |
\end{frame} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
687 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
688 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
689 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
690 |
\begin{frame}[c] |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
691 |
\frametitle{Languages, Strings} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
692 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
693 |
\begin{itemize} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
694 |
\item \alert{\bf Strings} are lists of characters, for example |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
695 |
\begin{center} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
696 |
\bl{$[]$},\;\bl{$abc$} \hspace{2cm}(Pattern match: \bl{$c\!::\!s$}) |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
697 |
\end{center}\bigskip |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
698 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
699 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
700 |
\item A \alert{\bf language} is a set of strings, for example\medskip |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
701 |
\begin{center} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
702 |
\bl{$\{[], hello, \textit{foobar}, a, abc\}$} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
703 |
\end{center}\bigskip |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
704 |
|
332
4755ad4b457b
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
331
diff
changeset
|
705 |
\item \alert{\bf Concatenation} of strings and languages |
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
706 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
707 |
\begin{center} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
708 |
\begin{tabular}{rcl} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
709 |
\bl{$\textit{foo}\;@\;bar$} & \bl{$=$} & \bl{$\textit{foobar}$}\medskip\\ |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
710 |
\bl{$A\;@\;B$} & \bl{$\dn$} & \bl{$\{ s_1\,@\,s_2 \;\mid\; s_1 \in A \wedge s_2 \in B\}$} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
711 |
\end{tabular} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
712 |
\end{center} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
713 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
714 |
%\item The \alert{\bf meaning} of a regular expression is a set of |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
715 |
% strings, or language. |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
716 |
\end{itemize} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
717 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
718 |
\end{frame} |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
719 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
720 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
721 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
722 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
0 | 723 |
\mode<presentation>{ |
724 |
\begin{frame}[c] |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
725 |
\frametitle{\begin{tabular}{c}The Meaning of a\\[-2mm] |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
726 |
Regular Expression\end{tabular}} |
0 | 727 |
|
4 | 728 |
\begin{textblock}{15}(1,4) |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
729 |
\begin{tabular}{rcl} |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
730 |
\bl{$L(\ZERO)$} & \bl{$\dn$} & \bl{$\{\}$}\\ |
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
731 |
\bl{$L(\ONE)$} & \bl{$\dn$} & \bl{$\{[]\}$}\\ |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
732 |
\bl{$L(c)$} & \bl{$\dn$} & \bl{$\{[c]\}$}\\ |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
733 |
\bl{$L(r_1 + r_2)$} & \bl{$\dn$} & \bl{$L(r_1) \cup L(r_2)$}\\ |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
734 |
\bl{$L(r_1 \cdot r_2)$} & \bl{$\dn$} & \bl{$\{ s_1 \,@\, s_2 \;|\; s_1 \in L(r_1) \wedge s_2 \in L(r_2) \}$}\\ |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
735 |
\bl{$L(r^*)$} & \bl{$\dn$} & \onslide<4->{\bl{$\bigcup_{0 \le n} L(r)^n$}}\\ |
4 | 736 |
\end{tabular}\bigskip |
3 | 737 |
|
4 | 738 |
\onslide<2->{ |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
739 |
\hspace{5mm}\bl{$L(r)^0 \;\dn\; \{[]\}$}\\ |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
740 |
\bl{$L(r)^{n+1} \;\dn\; L(r) \,@\, L(r)^n$}\hspace{9mm}\onslide<3->{\small\textcolor{gray}{(append on sets)}\\ |
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
741 |
\small\hspace{5cm}\textcolor{gray}{$\{ s_1 @ s_2 \;|\; s_1\in L(r) \wedge s_2 \in L(r)^n \}$}} |
4 | 742 |
} |
743 |
\end{textblock} |
|
744 |
||
0 | 745 |
\end{frame}} |
746 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
747 |
||
5 | 748 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
749 |
\begin{frame}[c] |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
750 |
\frametitle{The Meaning of Matching} |
5 | 751 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
752 |
\begin{bubble}[10cm] |
559 | 753 |
\large\bf |
507 | 754 |
A regular expression \bl{$r$} matches a string~\bl{$s$} |
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
755 |
provided |
5 | 756 |
|
757 |
\begin{center} |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
758 |
\bl{$s \in L(r)$}\\ |
5 | 759 |
\end{center} |
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
760 |
\end{bubble}\bigskip\bigskip |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
761 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
762 |
\ldots and the point of the next lecture is |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
763 |
to decide this problem as fast as possible (unlike Python, |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
764 |
Ruby, Java) |
5 | 765 |
|
254
dcd4688690ce
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
253
diff
changeset
|
766 |
\end{frame} |
5 | 767 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
768 |
||
0 | 769 |
|
770 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
771 |
\begin{frame}[c] |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
772 |
\frametitle{Written Exam} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
773 |
|
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
774 |
\begin{itemize} |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
775 |
\item Accounts for 80\%.\bigskip |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
776 |
|
559 | 777 |
\item The question ``\textit{Is this relevant for |
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
778 |
the exam?}'' is very demotivating for the lecturer!\bigskip\\ |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
779 |
|
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
780 |
\item Deal: Whatever is in the homework (and is not marked |
330
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
781 |
``\textit{optional}'') is relevant for the exam.\bigskip |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
782 |
|
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
783 |
\item Each lecture has also a handout. There are also handouts about |
0806e45d873c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
328
diff
changeset
|
784 |
notation and Scala. |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
785 |
\end{itemize} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
786 |
|
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
787 |
\end{frame} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
788 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
789 |
|
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
790 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
791 |
\begin{frame}[t] |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
792 |
\frametitle{Coursework} |
0 | 793 |
|
794 |
\begin{itemize} |
|
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
795 |
\item Accounts for 20\%. Two strands. Choose \alert{\bf one}!\bigskip |
0 | 796 |
\end{itemize} |
797 |
||
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
798 |
\begin{columns}[t] |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
799 |
\begin{column}{.5\textwidth} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
800 |
\underline{\bf Strand 1}\medskip |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
801 |
\begin{itemize} |
428
a47c4227a0c6
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
334
diff
changeset
|
802 |
\item four programming tasks: |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
803 |
\begin{itemize} |
559 | 804 |
\item matcher (4\%, 12.10.) |
805 |
\item lexer (5\%, 02.11.) |
|
506 | 806 |
\item parser (5\%, 23.11.) |
559 | 807 |
\item compiler (6\%, 14.12.) |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
808 |
\end{itemize} |
559 | 809 |
\item in any lang.~you like,\\ but I want to see the code |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
810 |
\end{itemize} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
811 |
\end{column} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
812 |
|
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
813 |
\hspace{-45pt}\vrule{}\hspace{10pt} |
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
814 |
\begin{column}{.5\textwidth} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
815 |
\underline{\bf Strand 2}\smallskip\begin{itemize} |
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
816 |
\item one task: prove the correctness of a regular expression matcher in |
559 | 817 |
the \underline{Isabelle} theorem prover |
818 |
\item 20\%, submission on~14.12.\hspace{-5mm}\mbox{} |
|
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
819 |
\end{itemize} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
820 |
\end{column} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
821 |
\end{columns}\medskip |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
822 |
|
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
823 |
\small |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
824 |
\begin{itemize} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
825 |
\item Solving more than one strand will {\bf not} give you more |
506 | 826 |
marks. |
827 |
||
253
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
828 |
\end{itemize} |
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
829 |
|
75c469893514
added coursework
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
252
diff
changeset
|
830 |
\end{frame} |
0 | 831 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
832 |
||
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
833 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
834 |
\begin{frame}[c] |
506 | 835 |
\frametitle{Lecture Capture} |
836 |
||
837 |
\begin{itemize} |
|
559 | 838 |
\item Hope it works\ldots\pause actually no, it does not!\medskip\pause |
839 |
\item It is important to use lecture capture wisely\\ (it is only the ``baseline''): |
|
506 | 840 |
\begin{itemize} |
841 |
\item Lecture recordings are a study and revision aid. |
|
842 |
\item Statistically, there is a clear and direct link between attendance and |
|
843 |
attainment: Students who do not attend lectures, do less well in exams. |
|
844 |
\end{itemize} |
|
845 |
||
846 |
\item Attending a lecture is more than watching it online -- if you do not |
|
847 |
attend, you miss out! |
|
848 |
||
849 |
\end{itemize} |
|
850 |
||
851 |
\end{frame} |
|
852 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
853 |
||
854 |
||
855 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
856 |
\begin{frame}[c] |
|
255
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
857 |
\frametitle{\begin{tabular}{c}\\[3cm]\alert{Questions?}\end{tabular}} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
858 |
|
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
859 |
\mbox{} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
860 |
\end{frame} |
96a99237fa42
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
254
diff
changeset
|
861 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
0 | 862 |
\end{document} |
863 |
||
864 |
%%% Local Variables: |
|
865 |
%%% mode: latex |
|
866 |
%%% TeX-master: t |
|
867 |
%%% End: |
|
868 |