slides/slides02.tex
changeset 337 885ac2b6c27d
parent 336 7c80b9b6f713
child 338 f16120cb4e19
--- a/slides/slides02.tex	Thu Oct 01 22:40:00 2015 +0100
+++ b/slides/slides02.tex	Thu Oct 01 22:51:32 2015 +0100
@@ -263,6 +263,13 @@
   \end{tabular}
 \end{textblock}
   
+\only<2->{\footnotesize
+\begin{textblock}{9}(2,0.5)
+\begin{bubble}[9.8cm]
+\lstinputlisting{../progs/app01.scala}
+\end{bubble}
+\end{textblock}}  
+  
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
@@ -475,7 +482,6 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[c]
 \frametitle{The Derivative of a Rexp}
 
@@ -495,7 +501,7 @@
   \end{tabular}
 \end{center}
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -516,7 +522,6 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[t]
 \frametitle{The Algorithm}
 
@@ -536,7 +541,7 @@
 \end{center}
 
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -560,7 +565,7 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
-\frametitle{\begin{tabular}{c}\bl{$(a?\{n\}) \cdot a\{n\}$}\end{tabular}}
+\frametitle{\bl{$(a?\{n\}) \cdot a\{n\}$}}
 
 \begin{center}
 \begin{tikzpicture}
@@ -673,9 +678,8 @@
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[c]
-\frametitle{\begin{tabular}{c}Examples\end{tabular}}
+\frametitle{Examples}
 
 Recall the example of \bl{$r \dn ((a \cdot b) + b)^*$} with
 
@@ -689,15 +693,14 @@
 
 What are these regular expressions equivalent to?
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[t]
-\frametitle{\begin{tabular}{c}\bl{$(a?\{n\}) \cdot a\{n\}$}\end{tabular}}
+\frametitle{\bl{$(a?\{n\}) \cdot a\{n\}$}}
 
 \begin{center}
 \begin{tikzpicture}
@@ -720,36 +723,34 @@
 \end{tikzpicture}
 \end{center}
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[t]
-\frametitle{\begin{tabular}{c}Proofs about Rexps\end{tabular}}
+\frametitle{Proofs about Rexps}
 
 Remember their inductive definition:\\[5cm]
 
 \begin{textblock}{6}(5,5)
   \begin{tabular}{@ {}rrl}
   \bl{$r$} & \bl{$::=$}  & \bl{$\varnothing$}\\
-         & \bl{$\mid$} & \bl{$\epsilon$}       \\
-         & \bl{$\mid$} & \bl{$c$}                        \\
+         & \bl{$\mid$} & \bl{$\epsilon$}     \\
+         & \bl{$\mid$} & \bl{$c$}            \\
          & \bl{$\mid$} & \bl{$r_1 \cdot r_2$}\\
-         & \bl{$\mid$} & \bl{$r_1 + r_2$}  \\
-         & \bl{$\mid$} & \bl{$r^*$}                  \\
+         & \bl{$\mid$} & \bl{$r_1 + r_2$}    \\
+         & \bl{$\mid$} & \bl{$r^*$}          \\
   \end{tabular}
   \end{textblock}
 
 If we want to prove something, say a property \bl{$P(r)$}, for all regular expressions \bl{$r$} then \ldots
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[c]
-\frametitle{\begin{tabular}{c}Proofs about Rexp (2)\end{tabular}}
+\frametitle{Proofs about Rexp (2)}
 
 \begin{itemize}
 \item \bl{$P$} holds for \bl{$\varnothing$}, \bl{$\epsilon$} and \bl{c}\bigskip
@@ -761,13 +762,12 @@
 holds for \bl{$r$}.
 \end{itemize}
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[c]
-\frametitle{\begin{tabular}{c}Proofs about Rexp (3)\end{tabular}}
+\frametitle{Proofs about Rexp (3)}
 
 Assume \bl{$P(r)$} is the property:
 
@@ -775,14 +775,12 @@
 \bl{$nullable(r)$} if and only if \bl{$[] \in L(r)$}
 \end{center}
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[c]
-\frametitle{\begin{tabular}{c}Proofs about Rexp (4)\end{tabular}}
-
+\frametitle{Proofs about Rexp (4)}
 
 \begin{center}
 \bl{\begin{tabular}{r@{\hspace{1mm}}c@{\hspace{1mm}}l}
@@ -804,13 +802,12 @@
 
 by induction on \bl{$r$}.
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
 \begin{frame}[c]
-\frametitle{\begin{tabular}{c}Proofs about Rexp (5)\end{tabular}}
+\frametitle{Proofs about Rexp (5)}
 
 Let \bl{$Der\,c\,A$} be the set defined as
 
@@ -826,7 +823,7 @@
 
 by induction on \bl{$r$}.
 
-\end{frame}}
+\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%