1 \documentclass{article} |
1 \documentclass{article} |
2 \usepackage{../style} |
2 \usepackage{../style} |
3 \usepackage{../langs} |
3 \usepackage{../langs} |
|
4 \usepackage{disclaimer} |
4 \usepackage{tikz} |
5 \usepackage{tikz} |
5 \usepackage{pgf} |
6 \usepackage{pgf} |
6 \usepackage{pgfplots} |
7 \usepackage{pgfplots} |
7 \usepackage{stackengine} |
8 \usepackage{stackengine} |
8 %%\usepackage{accents} |
9 %% \usepackage{accents} |
9 \newcommand\barbelow[1]{\stackunder[1.2pt]{#1}{\raisebox{-4mm}{\boldmath$\uparrow$}}} |
10 \newcommand\barbelow[1]{\stackunder[1.2pt]{#1}{\raisebox{-4mm}{\boldmath$\uparrow$}}} |
10 |
11 |
11 \begin{filecontents}{re-python2.data} |
12 \begin{filecontents}{re-python2.data} |
12 1 0.033 |
13 1 0.033 |
13 5 0.036 |
14 5 0.036 |
14 10 0.034 |
15 10 0.034 |
15 15 0.036 |
16 15 0.036 |
16 18 0.059 |
17 18 0.059 |
17 19 0.084 |
18 19 0.084 |
18 20 0.141 |
19 20 0.141 |
19 21 0.248 |
20 21 0.248 |
20 22 0.485 |
21 22 0.485 |
21 23 0.878 |
22 23 0.878 |
22 24 1.71 |
23 24 1.71 |
85 regular expression matcher based on derivatives of regular |
86 regular expression matcher based on derivatives of regular |
86 expressions. The reason is that regular expression matching in Java |
87 expressions. The reason is that regular expression matching in Java |
87 and Python can sometimes be extremely slow. The advanced part is about |
88 and Python can sometimes be extremely slow. The advanced part is about |
88 an interpreter for a very simple programming language.\bigskip |
89 an interpreter for a very simple programming language.\bigskip |
89 |
90 |
90 \noindent |
91 \IMPORTANT{} |
91 \textbf{Important:} |
|
92 |
|
93 \begin{itemize} |
|
94 \item Make sure the files you submit can be processed by just calling\\ |
|
95 \mbox{\texttt{scala <<filename.scala>>}} on the commandline. Use the |
|
96 template files provided and do not make any changes to arguments of |
|
97 functions or to any types. You are free to implement any auxiliary |
|
98 function you might need. |
|
99 |
|
100 \item Do not use any mutable data structures in your |
|
101 submissions! They are not needed. This means you cannot create new |
|
102 \texttt{Array}s or \texttt{ListBuffer}s, for example. |
|
103 |
|
104 \item Do not use \texttt{return} in your code! It has a different |
|
105 meaning in Scala, than in Java. |
|
106 |
|
107 \item Do not use \texttt{var}! This declares a mutable variable. Only |
|
108 use \texttt{val}! |
|
109 |
|
110 \item Do not use any parallel collections! No \texttt{.par} therefore! |
|
111 Our testing and marking infrastructure is not set up for it. |
|
112 \end{itemize} |
|
113 |
92 |
114 \noindent |
93 \noindent |
115 Also note that the running time of each part will be restricted to a |
94 Also note that the running time of each part will be restricted to a |
116 maximum of 360 seconds on my laptop |
95 maximum of 360 seconds on my laptop. |
117 |
96 |
118 |
97 \DISCLAIMER{} |
119 \subsection*{Disclaimer} |
|
120 |
|
121 It should be understood that the work you submit represents |
|
122 your \textbf{own} effort! You have not copied from anyone else. An |
|
123 exception is the Scala code I showed during the lectures or |
|
124 uploaded to KEATS, which you can freely use.\bigskip |
|
125 |
98 |
126 |
99 |
127 \subsection*{Part 1 (6 Marks)} |
100 \subsection*{Part 1 (6 Marks)} |
128 |
101 |
129 The task is to implement a regular expression matcher that is based on |
102 The task is to implement a regular expression matcher that is based on |