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