# HG changeset patch # User Christian Urban # Date 1428561743 -3600 # Node ID 698ed1c96cd053a19e121d4b2d6cdbe007fa7f96 # Parent c5850f8f3f5e197af8acbd20d1a8b14519c03280 updated diff -r c5850f8f3f5e -r 698ed1c96cd0 coursework/cw04.pdf Binary file coursework/cw04.pdf has changed diff -r c5850f8f3f5e -r 698ed1c96cd0 coursework/cw04.tex --- a/coursework/cw04.tex Thu Dec 11 21:13:48 2014 +0000 +++ b/coursework/cw04.tex Thu Apr 09 07:42:23 2015 +0100 @@ -46,8 +46,15 @@ \end{center} \noindent -where you might need to give the correct path to the class file. There -are also other resources about Jasmin on the Internet, for example +where you might need to give the correct path to the class file. +For example: + +\begin{center} +\texttt{java -cp . loops/loops} +\end{center} + +\noindent +There are also other resources about Jasmin on the Internet, for example \begin{center} \url{http://www.ceng.metu.edu.tr/courses/ceng444/link/f3jasmintutorial.html} diff -r c5850f8f3f5e -r 698ed1c96cd0 handouts/ho03.pdf Binary file handouts/ho03.pdf has changed diff -r c5850f8f3f5e -r 698ed1c96cd0 handouts/ho03.tex --- a/handouts/ho03.tex Thu Dec 11 21:13:48 2014 +0000 +++ b/handouts/ho03.tex Thu Apr 09 07:42:23 2015 +0100 @@ -497,10 +497,10 @@ left-hand side is $q_1$ and the right-hand side $q_0\,a$. The right-hand side is essentially all possible ways how to end up in $q_1$. There is only one incoming edge from $q_0$ consuming -an $a$. Therefore the right hand side is +an $a$. Therefore the right hand side is this state followed by character---in this case $q_0\,a$. Now lets have a look at the third equation: there are two incoming -edges. Therefore we have two terms, namely $q_1\,a$ and +edges for $q_2$. Therefore we have two terms, namely $q_1\,a$ and $q_2\,a$. These terms are separated by $+$. The first states that if in state $q_1$ consuming an $a$ will bring you to $q_2$, and the secont that being in $q_2$ and consuming an $a$ @@ -835,7 +835,7 @@ for this is as follows: take a regular expression, translate it into a NFA and DFA that recognise the same language. Once you have the DFA it is very easy to construct the automaton -for the language not recognised by an DFA. If the DAF is +for the language not recognised by an DFA. If the DFA is completed (this is important!), then you just need to exchange the accepting and non-accepting states. You can then translate this DFA back into a regular expression. diff -r c5850f8f3f5e -r 698ed1c96cd0 hws/hw05.tex --- a/hws/hw05.tex Thu Dec 11 21:13:48 2014 +0000 +++ b/hws/hw05.tex Thu Apr 09 07:42:23 2015 +0100 @@ -37,16 +37,16 @@ \sim r$ \end{center} -\item Assume the delimiters for comments are \texttt{$\slash$*} -and \texttt{*$\slash$}. Give a regular expression that can -recognise comments of the form - -\begin{center} -\texttt{$\slash$*~\ldots{}~*$\slash$} -\end{center} - -where the three dots stand for arbitrary characters, but not -comment delimiters. +%\item Assume the delimiters for comments are \texttt{$\slash$*} +%and \texttt{*$\slash$}. Give a regular expression that can +%recognise comments of the form +% +%\begin{center} +%\texttt{$\slash$*~\ldots{}~*$\slash$} +%\end{center} +% +%where the three dots stand for arbitrary characters, but not +%comment delimiters. \item Define the following regular expressions diff -r c5850f8f3f5e -r 698ed1c96cd0 mk --- a/mk Thu Dec 11 21:13:48 2014 +0000 +++ b/mk Thu Apr 09 07:42:23 2015 +0100 @@ -1,4 +1,5 @@ #!/bin/sh +set -e subdirs="slides handouts hws coursework"