81 % \end{frame} |
87 % \end{frame} |
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
88 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
83 |
89 |
84 { |
90 { |
85 \setbeamercolor{background canvas}{bg=cream} |
91 \setbeamercolor{background canvas}{bg=cream} |
|
92 \begin{frame}[c] |
|
93 \frametitle{Some Housekeeping} |
|
94 |
|
95 \begin{itemize} |
|
96 %%\item the Discussion Forum is for everyone |
|
97 \item SGT groups 4 + 6 for 10th November |
|
98 \item Ammonite FAQ |
|
99 \end{itemize} |
|
100 \end{frame} |
|
101 |
|
102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
103 \begin{frame}[c] |
|
104 \frametitle{Inject} |
|
105 |
|
106 Injecting (``Adding'') a character to a value\\[-12mm]\mbox{} |
|
107 |
|
108 \begin{center} |
|
109 \begin{tabular}{@{\hspace{-3mm}}l@{\hspace{1mm}}c@{\hspace{1mm}}l@{}} |
|
110 \bl{$inj\,(c)\,c\,(Empty)$} & \bl{$\dn$} & \bl{$Char\,c$}\\ |
|
111 \bl{$inj\,(r_1 + r_2)\,c\,(Left(v))$} & \bl{$\dn$} & \bl{$Left(inj\,r_1\,c\,v)$}\\ |
|
112 \bl{$inj\,(r_1 + r_2)\,c\,(Right(v))$} & \bl{$\dn$} & \bl{$Right(inj\,r_2\,c\,v)$}\\ |
|
113 \bl{$inj\,(r_1 \cdot r_2)\,c\,(Seq(v_1,v_2))$} & \bl{$\dn$} & \bl{$Seq(inj\,r_1\,c\,v_1,v_2)$}\\ |
|
114 \bl{$inj\,(r_1 \cdot r_2)\,c\,(Left(Seq(v_1,v_2)))$} & \bl{$\dn$} & \bl{$Seq(inj\,r_1\,c\,v_1,v_2)$}\\ |
|
115 \bl{$inj\,(r_1 \cdot r_2)\,c\,(Right(v))$} & \bl{$\dn$} & \bl{$Seq(mkeps(r_1),inj\,r_2\,c\,v)$}\\ |
|
116 \bl{$inj\,(r^*)\,c\,(Seq(v,Stars\,vs))$} & \bl{$\dn$} & \bl{$Stars\,((inj\,r\,c\,v)\,::\,vs)$}\\ |
|
117 \end{tabular} |
|
118 \end{center}\bigskip |
|
119 |
|
120 \footnotesize |
|
121 \begin{tabular}{l@{\hspace{2mm}}l} |
|
122 \bl{$inj$}: & 1st arg $\mapsto$ a rexp; 2nd arg $\mapsto$ a character; |
|
123 3rd arg $\mapsto$ a value\\ |
|
124 & result $\mapsto$ a value |
|
125 \end{tabular} |
|
126 \end{frame} |
|
127 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
128 |
86 \begin{frame}<1-10>[c] |
129 \begin{frame}<1-10>[c] |
87 \end{frame} |
130 \end{frame} |
88 |
|
89 |
|
90 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
91 \begin{frame}[c] |
|
92 \frametitle{Coursework 1: Submissions} |
|
93 |
|
94 \begin{itemize} |
|
95 \item Scala (162) |
|
96 \item Ocaml (1) |
|
97 \item Java (1) \ldots uses new features of Java 21 |
|
98 \item Rust (6) |
|
99 \end{itemize}\bigskip\bigskip |
|
100 |
|
101 |
|
102 \end{frame} |
|
103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
104 } |
131 } |
|
132 |
|
133 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
134 %\begin{frame}[c] |
|
135 % \frametitle{Coursework 1: Submissions} |
|
136 % |
|
137 % \begin{itemize} |
|
138 % \item Scala (162) |
|
139 % \item Ocaml (1) |
|
140 % \item Java (1) \ldots uses new features of Java 21 |
|
141 % \item Rust (6) |
|
142 % \end{itemize}\bigskip\bigskip |
|
143 % % |
|
144 % |
|
145 %\end{frame} |
|
146 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
147 |
105 |
148 |
106 |
149 |
107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
108 \begin{frame}[t] |
151 \begin{frame}[t] |
109 \frametitle{Parser} |
152 \frametitle{Parser} |
176 |
219 |
177 \end{frame} |
220 \end{frame} |
178 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
221 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
179 |
222 |
180 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
223 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
181 { |
224 % { |
182 \setbeamercolor{background canvas}{bg=cream} |
225 % \setbeamercolor{background canvas}{bg=cream} |
183 \begin{frame}[c] |
226 % \begin{frame}[c] |
184 |
227 |
185 \begin{center} |
228 % \begin{center} |
186 \begin{tikzpicture}[scale=1.5,>=stealth',very thick, |
229 % \begin{tikzpicture}[scale=1.5,>=stealth',very thick, |
187 every state/.style={minimum size=0pt, |
230 % every state/.style={minimum size=0pt, |
188 draw=blue!50,very thick,fill=blue!20}] |
231 % draw=blue!50,very thick,fill=blue!20}] |
189 \node[state,initial] (q0) at (0,2) {$q_0$}; |
232 % \node[state,initial] (q0) at (0,2) {$q_0$}; |
190 \node[state,accepting] (q1) at (2,2) {$q_1$}; |
233 % \node[state,accepting] (q1) at (2,2) {$q_1$}; |
191 \node[state] (q2) at (0,0) {$q_2$}; |
234 % \node[state] (q2) at (0,0) {$q_2$}; |
192 \node[state] (q3) at (2,0) {$q_3$}; |
235 % \node[state] (q3) at (2,0) {$q_3$}; |
193 |
236 |
194 \path[->] (q0) edge[bend left] node[above] {\alert{$a$}} (q1) |
237 % \path[->] (q0) edge[bend left] node[above] {\alert{$a$}} (q1) |
195 (q1) edge[bend left] node[above] {\alert{$a$}} (q0) |
238 % (q1) edge[bend left] node[above] {\alert{$a$}} (q0) |
196 (q2) edge[bend left] node[above] {\alert{$a$}} (q3) |
239 % (q2) edge[bend left] node[above] {\alert{$a$}} (q3) |
197 (q3) edge[bend left] node[above] {\alert{$a$}} (q2) |
240 % (q3) edge[bend left] node[above] {\alert{$a$}} (q2) |
198 (q0) edge[bend left] node[right] {\alert{$b$}} (q2) |
241 % (q0) edge[bend left] node[right] {\alert{$b$}} (q2) |
199 (q2) edge[bend left] node[left] {\alert{$b$}} (q0) |
242 % (q2) edge[bend left] node[left] {\alert{$b$}} (q0) |
200 (q1) edge[bend left] node[right] {\alert{$b$}} (q3) |
243 % (q1) edge[bend left] node[right] {\alert{$b$}} (q3) |
201 (q3) edge[bend left] node[left] {\alert{$b$}} (q1); |
244 % (q3) edge[bend left] node[left] {\alert{$b$}} (q1); |
202 \end{tikzpicture} |
245 % \end{tikzpicture} |
203 \end{center} |
246 % \end{center} |
204 |
247 |
205 \hfill{}Which language? |
248 % \hfill{}Which language? |
206 |
249 |
207 \end{frame} |
250 % \end{frame} |
208 } |
251 % } |
209 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
252 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
210 |
253 |
211 |
254 |
212 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
255 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
213 \begin{frame}[c] |
256 \begin{frame}[c] |
666 \end{frame} |
709 \end{frame} |
667 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
710 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
668 |
711 |
669 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
712 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
670 |
713 |
671 \begin{frame}[t,fragile] |
714 % \begin{frame}[t,fragile] |
672 \begin{mybox3}{} |
715 % \begin{mybox3}{} |
673 For CW2, please include '$\backslash$' as a symbol in strings, because |
716 % For CW2, please include '$\backslash$' as a symbol in strings, because |
674 the collatz program contains |
717 % the collatz program contains |
675 \begin{lstlisting}[language=Scala, numbers=none] |
718 % \begin{lstlisting}[language=Scala, numbers=none] |
676 write "\n";\end{lstlisting} |
719 % write "\n";\end{lstlisting} |
677 \end{mybox3} |
720 % \end{mybox3} |
678 \end{frame} |
721 % \end{frame} |
679 |
722 |
680 \begin{frame}[t] |
723 % \begin{frame}[t] |
681 \begin{mybox3}{} |
724 % \begin{mybox3}{} |
682 val (r1s, f1s) = simp(r1)\\ |
725 % val (r1s, f1s) = simp(r1)\\ |
683 val (r2s, f2s) = simp(r2)\\ |
726 % val (r2s, f2s) = simp(r2)\\ |
684 how are the |
727 % how are the |
685 first rectification functions f1s and f2s made? could you maybe |
728 % first rectification functions f1s and f2s made? could you maybe |
686 show an example? |
729 % show an example? |
687 \end{mybox3} |
730 % \end{mybox3} |
688 \end{frame} |
731 % \end{frame} |
689 |
732 |
690 \begin{frame}<1-24>[c] |
733 % \begin{frame}<1-24>[c] |
691 \end{frame} |
734 % \end{frame} |
692 |
735 |
693 |
736 |
694 \begin{frame}[t] |
737 % \begin{frame}[t] |
695 \begin{minipage}{1.2\textwidth} |
738 % \begin{minipage}{1.2\textwidth} |
696 \begin{mybox3}{}\small |
739 % \begin{mybox3}{}\small |
697 \textbf{Questions regarding CFL CW1} |
740 % \textbf{Questions regarding CFL CW1} |
698 |
741 |
699 Dear Dr Urban |
742 % Dear Dr Urban |
700 |
743 |
701 Regarding CW1, I am stuck on finding the nullable and derivative rules for some important regexes.\smallskip |
744 % Regarding CW1, I am stuck on finding the nullable and derivative rules for some important regexes.\smallskip |
702 |
745 |
703 The NOT Regex nullable rule: I am not sure how to approach this, I am inclined to simply put this as the negation of the nullable function on the input regex (e.g !nullable(r)). However I have found instances where negating a nullable does not make it un-nullable. For example the negation of r* can still match regex ab (which is not nullable). So I would like some actual clarification, pointers and help in this area.\smallskip |
746 % The NOT Regex nullable rule: I am not sure how to approach this, I am inclined to simply put this as the negation of the nullable function on the input regex (e.g !nullable(r)). However I have found instances where negating a nullable does not make it un-nullable. For example the negation of r* can still match regex ab (which is not nullable). So I would like some actual clarification, pointers and help in this area.\smallskip |
704 |
747 |
705 The NOT Regex derivation rule: again I am dumbfounded here, I am inclined to think that I should derive the regex and then negate that derivation. But none of this ever works. Please provide some helpful information so I can solve this. |
748 % The NOT Regex derivation rule: again I am dumbfounded here, I am inclined to think that I should derive the regex and then negate that derivation. But none of this ever works. Please provide some helpful information so I can solve this. |
706 \end{mybox3} |
749 % \end{mybox3} |
707 \end{minipage} |
750 % \end{minipage} |
708 \end{frame} |
751 % \end{frame} |
709 |
752 |
710 |
753 |
711 |
754 |
712 \end{document} |
755 \end{document} |
713 |
756 |