slides/slides05.tex
changeset 361 9c7eb266594c
parent 360 c6c574d2ca0c
child 370 a65767fe5d71
equal deleted inserted replaced
360:c6c574d2ca0c 361:9c7eb266594c
   177 \draw (r4) node[anchor=north west] {\;\raisebox{-8mm}{\bl{$mkeps$}}};
   177 \draw (r4) node[anchor=north west] {\;\raisebox{-8mm}{\bl{$mkeps$}}};
   178 \end{tikzpicture}
   178 \end{tikzpicture}
   179 \end{center}
   179 \end{center}
   180 
   180 
   181 \small
   181 \small
   182 \hspace{4.5cm}\bl{$(\varnothing \cdot (b \cdot c)) + ((\varnothing \cdot c) + \epsilon)$}
   182 \hspace{4.5cm}\bl{$(b \cdot c) + (\varnothing + \epsilon)$}
   183 $\mapsto$
   183 $\mapsto$
   184 \bl{$\epsilon$}
   184 \bl{$(b \cdot c) + \epsilon$}
   185 
   185 
   186 \end{frame}
   186 \end{frame}
   187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
   187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
       
   188 
       
   189 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   190 \begin{frame}[t]
       
   191 
       
   192 \begin{center}
       
   193 \bl{$\only<1>{(b \cdot c)}%
       
   194      \only<2-3>{(\underline{b \cdot c})}%
       
   195      \only<1-3>{+}% 
       
   196      \only<1>{(\varnothing + \epsilon)}%
       
   197      \only<2-3>{(\underline{\varnothing + \epsilon})}$}%
       
   198 \only<4->{%
       
   199 \bl{$\underline{(b \cdot c) + (\varnothing + \epsilon)}$}%
       
   200 }
       
   201 $\mapsto$
       
   202 \bl{$(b \cdot c) + \epsilon$}
       
   203 \end{center}\bigskip
       
   204 
       
   205 \onslide<3->{%
       
   206 \begin{center}
       
   207 \begin{tabular}{lcl}
       
   208 \bl{$f_{s1}$} & \bl{$=$} & \bl{$\lambda v.v$}\\
       
   209 \bl{$f_{s2}$} & \bl{$=$} & \bl{$\lambda v. \textit{Right}(v)$}
       
   210 \end{tabular}
       
   211 \end{center}}
       
   212 
       
   213 \only<4>{%
       
   214 \begin{center}
       
   215 \begin{tabular}{@{}l@{\hspace{1mm}}l@{}}
       
   216 \bl{$f_{alt}(f_{s1}, f_{s2}) \dn$}\\
       
   217 \quad \bl{$\lambda v.\,$} 
       
   218         case \bl{$v = Left(v')$}: 
       
   219       & return \bl{$Left(f_{s1}(v'))$}\\
       
   220 \quad \phantom{$\lambda v.\,$} 
       
   221         case \bl{$v = Right(v')$}: 
       
   222       & return \bl{$Right(f_{s2}(v'))$}\\ 
       
   223 \end{tabular}
       
   224 \end{center}}%
       
   225 \only<5->{%
       
   226 \begin{center}
       
   227 \begin{tabular}{@{}l@{\hspace{1mm}}l@{}}
       
   228 \only<5->{\phantom{\bl{$f_{alt}(f_{s1}, f_{s2}) \dn$}}}\\
       
   229 \quad \bl{$\lambda v.\,$} 
       
   230         case \bl{$v = Left(v')$}: 
       
   231       & return \bl{$Left(v')$}\\
       
   232 \quad \phantom{$\lambda v.\,$} 
       
   233         case \bl{$v = Right(v')$}: 
       
   234       & return \bl{$Right(Right(v'))$}\\ 
       
   235 \end{tabular}
       
   236 \end{center}}%
       
   237 
       
   238 \only<6->{%
       
   239 \begin{center}
       
   240 \begin{tabular}{@{}l@{\hspace{4mm}}l@{}}
       
   241 \bl{$\textit{mkeps}$} simplified case: &
       
   242 \bl{$\textit{Right}(\textit{Empty})$}\\
       
   243 rectified case: &
       
   244 \bl{$\textit{Right}(\textit{Right}(\textit{Empty}))$}
       
   245 \end{tabular}
       
   246 \end{center}}%
       
   247 
       
   248 \end{frame}
       
   249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   188 
   250 
   189 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   251 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   190 \begin{frame}[c]
   252 \begin{frame}[c]
   191 \frametitle{Records}
   253 \frametitle{Records}
   192 
   254 
   312 %\item problem with infix operations, for example i-12
   374 %\item problem with infix operations, for example i-12
   313 
   375 
   314 
   376 
   315 \end{frame}
   377 \end{frame}
   316 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   378 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   317 
       
   318 
       
   319 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   320 \begin{frame}[c]
       
   321 
       
   322 \begin{itemize}
       
   323 \item Regular expression for email addresses
       
   324 
       
   325 \begin{center}
       
   326 \begin{tabular}{l}
       
   327 (name: \bl{$[a\mbox{-}z0\mbox{-}9\_\!\_\,.-]^+$})\bl{$\cdot @\cdot$}\\ 
       
   328 \qquad(domain: \bl{$[a\mbox{-}z0\mbox{-}9\,.-]^+$}) \bl{$\cdot .\cdot$}\\ 
       
   329 \qquad\qquad(top\_level: \bl{$[a\mbox{-}z\,.]^{\{2,6\}}$})
       
   330 \end{tabular}
       
   331 \end{center}
       
   332 
       
   333 \bl{\[
       
   334 \texttt{christian.urban@kcl.ac.uk}
       
   335 \]}
       
   336 
       
   337 \item result environment:
       
   338 
       
   339 \begin{center}
       
   340 \begin{tabular}{l}
       
   341 \bl{$[(name:\texttt{christian.urban}),$}\\ 
       
   342 \bl{$\phantom{[}(domain:\texttt{kcl}),$}\\ 
       
   343 \bl{$\phantom{[}(top\_level:\texttt{ac.uk})]$}
       
   344 \end{tabular}
       
   345 \end{center}
       
   346 \end{itemize}
       
   347 
       
   348 \end{frame}
       
   349 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   350 
   379 
   351 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   380 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   352 \begin{frame}[c]
   381 \begin{frame}[c]
   353 \frametitle{Coursework}
   382 \frametitle{Coursework}
   354 
   383