slides/slides01.tex
changeset 93 4794759139ea
parent 14 8ef75033f34e
child 95 dbe49327b6c5
equal deleted inserted replaced
92:e85600529ca5 93:4794759139ea
       
     1 \documentclass[dvipsnames,14pt,t]{beamer}
       
     2 \usepackage{beamerthemeplainculight}
       
     3 \usepackage[T1]{fontenc}
       
     4 \usepackage[latin1]{inputenc}
       
     5 \usepackage{mathpartir}
       
     6 \usepackage[absolute,overlay]{textpos}
       
     7 \usepackage{ifthen}
       
     8 \usepackage{tikz}
       
     9 \usepackage{pgf}
       
    10 \usepackage{calc} 
       
    11 \usepackage{ulem}
       
    12 \usepackage{courier}
       
    13 \usepackage{listings}
       
    14 \renewcommand{\uline}[1]{#1}
       
    15 \usetikzlibrary{arrows}
       
    16 \usetikzlibrary{automata}
       
    17 \usetikzlibrary{shapes}
       
    18 \usetikzlibrary{shadows}
       
    19 \usetikzlibrary{positioning}
       
    20 \usetikzlibrary{calc}
       
    21 \usepackage{graphicx} 
       
    22 
       
    23 \definecolor{javared}{rgb}{0.6,0,0} % for strings
       
    24 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
       
    25 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
       
    26 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
       
    27 
       
    28 \lstset{language=Java,
       
    29 	basicstyle=\ttfamily,
       
    30 	keywordstyle=\color{javapurple}\bfseries,
       
    31 	stringstyle=\color{javagreen},
       
    32 	commentstyle=\color{javagreen},
       
    33 	morecomment=[s][\color{javadocblue}]{/**}{*/},
       
    34 	numbers=left,
       
    35 	numberstyle=\tiny\color{black},
       
    36 	stepnumber=1,
       
    37 	numbersep=10pt,
       
    38 	tabsize=2,
       
    39 	showspaces=false,
       
    40 	showstringspaces=false}
       
    41 
       
    42 \lstdefinelanguage{scala}{
       
    43   morekeywords={abstract,case,catch,class,def,%
       
    44     do,else,extends,false,final,finally,%
       
    45     for,if,implicit,import,match,mixin,%
       
    46     new,null,object,override,package,%
       
    47     private,protected,requires,return,sealed,%
       
    48     super,this,throw,trait,true,try,%
       
    49     type,val,var,while,with,yield},
       
    50   otherkeywords={=>,<-,<\%,<:,>:,\#,@},
       
    51   sensitive=true,
       
    52   morecomment=[l]{//},
       
    53   morecomment=[n]{/*}{*/},
       
    54   morestring=[b]",
       
    55   morestring=[b]',
       
    56   morestring=[b]"""
       
    57 }
       
    58 
       
    59 \lstset{language=Scala,
       
    60 	basicstyle=\ttfamily,
       
    61 	keywordstyle=\color{javapurple}\bfseries,
       
    62 	stringstyle=\color{javagreen},
       
    63 	commentstyle=\color{javagreen},
       
    64 	morecomment=[s][\color{javadocblue}]{/**}{*/},
       
    65 	numbers=left,
       
    66 	numberstyle=\tiny\color{black},
       
    67 	stepnumber=1,
       
    68 	numbersep=10pt,
       
    69 	tabsize=2,
       
    70 	showspaces=false,
       
    71 	showstringspaces=false}
       
    72 
       
    73 % beamer stuff 
       
    74 \renewcommand{\slidecaption}{AFL 01, King's College London, 26.~September 2012}
       
    75 
       
    76 
       
    77 \begin{document}
       
    78 
       
    79 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
    80 \mode<presentation>{
       
    81 \begin{frame}<1>[t]
       
    82 \frametitle{%
       
    83   \begin{tabular}{@ {}c@ {}}
       
    84   \\[-3mm]
       
    85   \LARGE Automata and \\[-2mm] 
       
    86   \LARGE Formal Languages (1)\\[-3mm] 
       
    87   \end{tabular}}
       
    88 
       
    89   \begin{center}
       
    90   \includegraphics[scale=0.3]{pics/ante1.jpg}\hspace{5mm}
       
    91   \includegraphics[scale=0.31]{pics/ante2.jpg}\\
       
    92   \footnotesize\textcolor{gray}{Antikythera automaton, 100 BC (Archimedes?)}
       
    93   \end{center}
       
    94 
       
    95 \normalsize
       
    96   \begin{center}
       
    97   \begin{tabular}{ll}
       
    98   Email:  & christian.urban at kcl.ac.uk\\
       
    99   Of$\!$fice: & S1.27 (1st floor Strand Building)\\
       
   100   Slides: & KEATS
       
   101   \end{tabular}
       
   102   \end{center}
       
   103 
       
   104 
       
   105 \end{frame}}
       
   106  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   107 
       
   108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   109 \mode<presentation>{
       
   110 \begin{frame}[c]
       
   111 
       
   112 \begin{textblock}{1}(2,5)
       
   113 \begin{tabular}{c}
       
   114 \includegraphics[scale=0.15]{pics/servers.png}\\[-2mm]
       
   115 \small Server
       
   116 \end{tabular}
       
   117 \end{textblock}
       
   118 
       
   119 \begin{textblock}{1}(5.6,4)
       
   120   \begin{tikzpicture}[scale=1.1]
       
   121   \draw[white] (0,1) node (X) {};
       
   122   \draw[white] (2,1) node (Y) {};
       
   123    \draw[white] (0,0) node (X1) {};
       
   124   \draw[white] (2,0) node (Y1) {};
       
   125    \draw[white] (0,-1) node (X2) {};
       
   126   \draw[white] (2,-1) node (Y2) {};
       
   127   \draw[red, <-, line width = 2mm] (X) -- (Y);
       
   128   \node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {};
       
   129   \draw[red, ->, line width = 2mm] (X1) -- (Y1);
       
   130   \node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X1)!.5!(Y1) $) {};
       
   131   \draw[red, <-, line width = 2mm] (X2) -- (Y2);
       
   132   \node [inner sep=7pt,label=above:\textcolor{black}{POST data}] at ($ (X2)!.5!(Y2) $) {};
       
   133   \end{tikzpicture}
       
   134 \end{textblock}
       
   135 
       
   136 
       
   137 \begin{textblock}{1}(9,5.5)
       
   138 \begin{tabular}{c}
       
   139 \includegraphics[scale=0.15]{pics/laptop.png}\\[-2mm]
       
   140 \small Browser
       
   141 \end{tabular}
       
   142 \end{textblock}
       
   143   
       
   144 \only<2>{  
       
   145 \begin{textblock}{10}(2,13.5)
       
   146 \begin{itemize}
       
   147 \item programming languages, compilers
       
   148 \end{itemize}
       
   149 \end{textblock}}
       
   150   
       
   151   
       
   152 \end{frame}}
       
   153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   154 
       
   155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   156 \mode<presentation>{
       
   157 \begin{frame}[c]
       
   158 
       
   159 transforming strings into structured data\\[10mm]
       
   160 
       
   161 {\LARGE\bf Lexing}\medskip\\
       
   162 \hspace{5mm}(recognising ``words'')\\[6mm]
       
   163 
       
   164 {\LARGE\bf Parsing}\medskip\\
       
   165 \hspace{5mm}(recognising ``sentences'')
       
   166 
       
   167 \end{frame}}
       
   168 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   169 
       
   170 
       
   171 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   172 \mode<presentation>{
       
   173 \begin{frame}[c]
       
   174 
       
   175 The subject is quite old:
       
   176 
       
   177 \begin{itemize}
       
   178 \item Turing Machines, 1936
       
   179 \item first compiler for COBOL, 1957 (Grace Hopper)
       
   180 \item but surprisingly research papers are still published now
       
   181 \end{itemize}
       
   182 
       
   183 \begin{flushright}
       
   184 \includegraphics[scale=0.3]{pics/hopper.jpg}\\
       
   185 \footnotesize\textcolor{gray}{Grace Hopper}
       
   186 \end{flushright}
       
   187 
       
   188 {\footnotesize\textcolor{gray}{(she made it to David Letterman's Tonight Show, \url{http://www.youtube.com/watch?v=aZOxtURhfEU})}}
       
   189 
       
   190 \end{frame}}
       
   191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   192 
       
   193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   194 \mode<presentation>{
       
   195 \begin{frame}[c]
       
   196 \frametitle{\begin{tabular}{c}This Course\end{tabular}}
       
   197 
       
   198 \begin{itemize}
       
   199 \item the ultimate goal is to implement a small web-browser (really small one)\bigskip
       
   200 \end{itemize}
       
   201 
       
   202 Let's start with:
       
   203 
       
   204 \begin{itemize}
       
   205 \item a web-crawler
       
   206 \item an email harvester
       
   207 \item a web-scraper
       
   208 \end{itemize}
       
   209 
       
   210 \end{frame}}
       
   211 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   212 
       
   213 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   214 \mode<presentation>{
       
   215 \begin{frame}[t]
       
   216 \frametitle{\begin{tabular}{c}A Web-Crawler\end{tabular}}
       
   217 
       
   218 \mbox{}\\[10mm]
       
   219 
       
   220 \begin{enumerate}
       
   221 \item given an URL, read the corresponding webpage
       
   222 \item extract all links from it
       
   223 \item call the web-crawler again for all these links
       
   224 \end{enumerate}
       
   225 
       
   226 \end{frame}}
       
   227 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   228 
       
   229 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   230 \mode<presentation>{
       
   231 \begin{frame}[t]
       
   232 \frametitle{\begin{tabular}{c}A Web-Crawler\end{tabular}}
       
   233 
       
   234 \mbox{}\\[10mm]
       
   235 
       
   236 
       
   237 \begin{enumerate}
       
   238 \item given an URL, read the corresponding webpage
       
   239 \item if not possible print, out a problem
       
   240 \item if possible, extract all links from it
       
   241 \item call the web-crawler again for all these links
       
   242 \end{enumerate}\bigskip\pause
       
   243 
       
   244 \small (we need a bound for the number of recursive calls)
       
   245 
       
   246 \small (the purpose is to check all links on my own webpage)
       
   247 \end{frame}}
       
   248 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   249 
       
   250 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   251 \mode<presentation>{
       
   252 \begin{frame}[c]
       
   253 \frametitle{\begin{tabular}{c}Scala\end{tabular}}
       
   254 
       
   255 \footnotesize a simple Scala function for reading webpages\\[-3mm]
       
   256 
       
   257 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   258 \texttt{\lstinputlisting{app0.scala}}}\pause
       
   259 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   260 \texttt{\lstinline{get_page("""http://www.inf.kcl.ac.uk/staff/urbanc/""")}}}\pause\bigskip
       
   261 
       
   262 
       
   263 \footnotesize slightly more complicated for handling errors properly:\\[-3mm]
       
   264 
       
   265 \footnotesize
       
   266 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   267 \texttt{\lstinputlisting{app1.scala}}}
       
   268 
       
   269 
       
   270 \end{frame}}
       
   271 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   272 
       
   273 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   274 \mode<presentation>{
       
   275 \begin{frame}[t]
       
   276 \frametitle{\begin{tabular}{c}A Regular Expression\end{tabular}}
       
   277 
       
   278 \begin{itemize}
       
   279 \item \ldots{} is a pattern or template for specifying strings
       
   280 \end{itemize}\bigskip
       
   281   
       
   282 \begin{center}  
       
   283 \only<1>{{\lstset{language=Scala}\fontsize{18}{19}\selectfont\bf
       
   284 \texttt{"https?://[$\hat{\hspace{2mm}}$"]*"}}}%
       
   285 \only<2>{{\lstset{language=Scala}\fontsize{18}{19}\selectfont\bf
       
   286 \texttt{"""\textbackslash{}"https?://[$\hat{\hspace{2mm}}$\textbackslash{}"]*\textbackslash{}"""".r}}}
       
   287 \end{center}\bigskip\bigskip
       
   288 
       
   289 matches for example\\  
       
   290 \;{\lstset{language=Scala}\fontsize{12}{14}\selectfont\bf
       
   291 \texttt{"http://www.foobar.com"}}\\
       
   292 \;{\lstset{language=Scala}\fontsize{12}{14}\selectfont\bf
       
   293 \texttt{"https://www.tls.org"}}\\
       
   294 
       
   295 \end{frame}}
       
   296 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   297 
       
   298 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   299 \mode<presentation>{
       
   300 \begin{frame}[c]
       
   301 
       
   302 {\lstset{language=Scala}\fontsize{18}{19}\selectfont\bf
       
   303 \texttt{rexp.findAllIn(string)}}\medskip
       
   304   
       
   305 returns a list of all (sub)strings that match the regular expression\bigskip\bigskip  
       
   306   
       
   307 {\lstset{language=Scala}\fontsize{18}{19}\selectfont\bf
       
   308 \texttt{rexp.findFirstIn(string)}}\medskip
       
   309   
       
   310 returns either {\bf\texttt{None}} if no (sub)string matches 
       
   311 or {\bf\texttt{Some(s)}} with the first (sub)string
       
   312   
       
   313 \end{frame}}
       
   314 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   315 
       
   316 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   317 \mode<presentation>{
       
   318 \begin{frame}[c]
       
   319 
       
   320 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   321 \texttt{\lstinputlisting{app2.scala}}}\medskip
       
   322 
       
   323 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   324 \texttt{crawl(some\_start\_URL, 2)}}\
       
   325 
       
   326 \end{frame}}
       
   327 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   328 
       
   329 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   330 \mode<presentation>{
       
   331 \begin{frame}[c]
       
   332 
       
   333 \footnotesize
       
   334 a version that only ``crawls'' links in my domain:
       
   335 
       
   336 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   337 \texttt{\lstinputlisting{app3.scala}}}
       
   338 
       
   339 
       
   340 \end{frame}}
       
   341 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   342 
       
   343 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   344 \mode<presentation>{
       
   345 \begin{frame}[c]
       
   346 
       
   347 \footnotesize
       
   348 a little email ``harvester'':
       
   349 
       
   350 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   351 \texttt{\lstinputlisting{app4.scala}}}\bigskip
       
   352 
       
   353 \tiny
       
   354 \textcolor{gray}{\url{http://net.tutsplus.com/tutorials/other/8-regular-expressions-you-should-know/}}
       
   355 
       
   356 \end{frame}}
       
   357 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   358 
       
   359 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
       
   360 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   361 \mode<presentation>{
       
   362 \begin{frame}[t]
       
   363 \frametitle{\begin{tabular}{c}Regular Expressions\end{tabular}}
       
   364 
       
   365 Their inductive definition:\medskip
       
   366 
       
   367 \begin{textblock}{6}(2,5)
       
   368   \begin{tabular}{@ {}rrl@ {\hspace{13mm}}l}
       
   369   \bl{r} & \bl{$::=$}  & \bl{$\varnothing$}  & null\\
       
   370          & \bl{$\mid$} & \bl{$\epsilon$}        & empty string / "" / []\\
       
   371          & \bl{$\mid$} & \bl{c}                         & character\\
       
   372          & \bl{$\mid$} & \bl{r$_1$ $\cdot$ r$_2$} & sequence\\
       
   373          & \bl{$\mid$} & \bl{r$_1$ + r$_2$}  & alternative / choice\\
       
   374          & \bl{$\mid$} & \bl{r$^*$}                   & star (zero or more)\\
       
   375   \end{tabular}
       
   376   \end{textblock}
       
   377   
       
   378 \end{frame}}
       
   379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   380 
       
   381 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   382 \mode<presentation>{
       
   383 \begin{frame}[t]
       
   384 \frametitle{\begin{tabular}{c}Regular Expressions\end{tabular}}
       
   385 
       
   386 \small
       
   387 In Scala:
       
   388 
       
   389 
       
   390 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   391 \texttt{\lstinputlisting{app51.scala}}}
       
   392 
       
   393   
       
   394 \end{frame}}
       
   395 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   396 
       
   397 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
       
   398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   399 \mode<presentation>{
       
   400 \begin{frame}[c]
       
   401 \frametitle{\begin{tabular}{c}The Meaning of a\\[-2mm] Regular Expression\end{tabular}}
       
   402 
       
   403 \begin{textblock}{15}(1,4)
       
   404  \begin{tabular}{@ {}rcl}
       
   405  \bl{$L$($\varnothing$)}  & \bl{$\dn$} & \bl{$\varnothing$}\\
       
   406  \bl{$L$($\epsilon$)}        & \bl{$\dn$} & \bl{$\{$""$\}$}\\
       
   407  \bl{$L$(c)}                         & \bl{$\dn$} & \bl{$\{$"c"$\}$}\\
       
   408  \bl{$L$(r$_1$ + r$_2$)} & \bl{$\dn$} & \bl{$L$(r$_1$) $\cup$ $L$(r$_2$)}\\
       
   409  \bl{$L$(r$_1$ $\cdot$ r$_2$)}  & \bl{$\dn$} & \bl{$\{$ s$_1$ @ s$_2$ $|$ s$_1$ $\in$ $L$(r$_1$) $\wedge$ s$_2$ $\in$ 
       
   410      $L$(r$_2$) $\}$}\\
       
   411  \bl{$L$(r$^*$)}                   & \bl{$\dn$} & \onslide<4->{\bl{$\bigcup_{n \ge 0}$ $L$(r)$^n$}}\\
       
   412   \end{tabular}\bigskip
       
   413   
       
   414 \onslide<2->{
       
   415 \hspace{5mm}\bl{$L$(r)$^0$ $\;\dn\;$ $\{$""$\}$}\\
       
   416 \bl{$L$(r)$^{n+1}$ $\;\dn\;$ $L$(r) @ $L$(r)$^n$}\hspace{9mm}\onslide<3->{\small\textcolor{gray}{(append on sets)}\\
       
   417 \small\hspace{5cm}\textcolor{gray}{$\{$ s$_1$ @ s$_2$ $|$ s$_1$ $\in$ $L$(r) $\wedge$ s$_2$ $\in$ 
       
   418      $L$(r)$^n$ $\}$}}
       
   419 }  
       
   420     \end{textblock}
       
   421 
       
   422 \end{frame}}
       
   423 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   424 
       
   425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   426 \mode<presentation>{
       
   427 \begin{frame}[c]
       
   428 \frametitle{\begin{tabular}{c}The Meaning of Matching\end{tabular}}
       
   429 
       
   430 \large
       
   431 a regular expression \bl{r} matches a string \bl{s} is defined as
       
   432 
       
   433 \begin{center}
       
   434 \bl{s $\in$ $L$(r)}\\ 
       
   435 \end{center}
       
   436 
       
   437 \end{frame}}
       
   438 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   439 
       
   440 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   441 \mode<presentation>{
       
   442 \begin{frame}[c]
       
   443 \frametitle{\begin{tabular}{c}This Course\end{tabular}}
       
   444 
       
   445 We will have a look at:
       
   446 
       
   447 \begin{itemize}
       
   448 \item regular expressions / regular expression matching
       
   449 \item automata
       
   450 \item the Myhill-Nerode theorem
       
   451 \item parsing
       
   452 \item grammars
       
   453 \item a small interpreter / web browser
       
   454 \end{itemize}
       
   455 
       
   456 \end{frame}}
       
   457 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   458 
       
   459 
       
   460 
       
   461 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   462 \mode<presentation>{
       
   463 \begin{frame}[c]
       
   464 \frametitle{\begin{tabular}{c}Exam\end{tabular}}
       
   465 
       
   466 \begin{itemize}
       
   467 \item The question ``Is this relevant for the exam?'' is not appreciated!\bigskip\\
       
   468 
       
   469 Whatever is in the homework sheets (and is not marked ``optional'') is relevant for the
       
   470 exam.\\ No code needs to be written in the exam.
       
   471 \end{itemize}
       
   472 
       
   473 \end{frame}}
       
   474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   475 
       
   476 
       
   477 \end{document}
       
   478 
       
   479 %%% Local Variables:  
       
   480 %%% mode: latex
       
   481 %%% TeX-master: t
       
   482 %%% End: 
       
   483