132
|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
2 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
3 |
<HEAD>
|
|
4 |
<TITLE>2012/13 BSc Projects</TITLE>
|
|
5 |
<BASE HREF="http://www.inf.kcl.ac.uk/staff/urbanc/">
|
|
6 |
<script type="text/javascript" src="striper.js"></script>
|
|
7 |
<link rel="stylesheet" href="nominal.css">
|
|
8 |
</HEAD>
|
|
9 |
<BODY TEXT="#000000"
|
|
10 |
BGCOLOR="#4169E1"
|
|
11 |
LINK="#0000EF"
|
|
12 |
VLINK="#51188E"
|
|
13 |
ALINK="#FF0000"
|
|
14 |
ONLOAD="striper('ul','striped','li','first,second')">
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
<TABLE WIDTH="100%"
|
|
19 |
BGCOLOR="#4169E1"
|
|
20 |
BORDER="0"
|
|
21 |
FRAME="border"
|
|
22 |
CELLPADDING="10"
|
|
23 |
CELLSPACING="2"
|
|
24 |
RULES="all">
|
|
25 |
|
|
26 |
<TR>
|
|
27 |
<TD BGCOLOR="#FFFFFF"
|
|
28 |
WIDTH="75%"
|
|
29 |
VALIGN="TOP">
|
|
30 |
|
|
31 |
<H2>2012/13 BSc Projects</H2>
|
|
32 |
<H4>Supervisor: Christian Urban</H4>
|
|
33 |
<H4>Email: christian dot urban at kcl dot ac dot uk, Office: Strand Building S1.24</H4>
|
|
34 |
<H4>If you are interested in a project, please send me an email and we can discuss details. Please include
|
|
35 |
a short description about your programming skills and Computer Science background in your first email.
|
|
36 |
I will also need your King's username in order to book the project for you. Thanks.</H4>
|
|
37 |
|
140
|
38 |
<H4>Note that besides being a lecturer in the theory of Computer Science, I am also a passionate
|
132
|
39 |
<A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker</A> …
|
|
40 |
defined as “a person who enjoys exploring the details of programmable systems and
|
|
41 |
stretching their capabilities, as opposed to most users, who prefer to learn only the minimum
|
|
42 |
necessary.” I am always happy to supervise like-minded students.</H4>
|
|
43 |
|
|
44 |
<ul class="striped">
|
|
45 |
<li> <H4>[CU1] Automata Minimisation</H4>
|
|
46 |
|
|
47 |
<p><B>Description:</b>
|
|
48 |
<A HREF="http://en.wikipedia.org/wiki/Deterministic_finite_automaton">Deterministic finite automata</A>
|
|
49 |
have many uses in Computer Science, for example for lexing
|
|
50 |
program code. In order to improve their run-time, automata need to be minimised, that
|
|
51 |
is transformed into equivalent automata with the smallest possible number of state
|
|
52 |
nodes.
|
|
53 |
</p>
|
|
54 |
|
|
55 |
<p>
|
|
56 |
There is a little known method for minimising deterministic finite
|
|
57 |
automata by <A HREF="http://en.wikipedia.org/wiki/Janusz_Brzozowski_(computer_scientist)">
|
|
58 |
Janusz Brzozowski</A>.
|
|
59 |
This method first reverses the edges of an automaton, which produces
|
|
60 |
a potentially non-deterministic automaton. The non-deterministic automaton is
|
|
61 |
then determinised using the usual powerset construction. This is repeated
|
|
62 |
once more and voila you obtain a minimised version of the automaton
|
|
63 |
you started with. It is rather surprising that this method works at all:
|
|
64 |
the powerset construction might produce an automaton with an exponentially
|
|
65 |
larger number of states, completely contrary to the idea of minimising the
|
|
66 |
number of states. The task of this project is to implement this method, check that
|
|
67 |
it actually works with some examples and
|
|
68 |
compare it with more traditional methods for automata minimisation
|
|
69 |
(in terms of run-time, code complexity, etc). Examples can be
|
133
|
70 |
obtained by translating regular expressions into automata. A natural extension
|
|
71 |
of the project is therefore to implement a recogniser for regular expressions
|
|
72 |
following, for example, this <A HREF="http://www.cl.cam.ac.uk/~so294/documents/jfp09.pdf">paper</A>.
|
132
|
73 |
</p>
|
|
74 |
|
|
75 |
<p>
|
|
76 |
<B>Literature:</B>
|
|
77 |
A good place to start with this project are the wikipedia articles
|
|
78 |
<A HREF="http://en.wikipedia.org/wiki/DFA_minimization">here</A> and
|
|
79 |
<A HREF="http://en.wikipedia.org/wiki/Powerset_construction">here</A>.
|
|
80 |
The authoritative <A HREF="http://infolab.stanford.edu/~ullman/ialc.html">book</A>
|
|
81 |
on automata is by John Hopcroft and Jeffrey Ullmann (available in the library).
|
|
82 |
There is also an online course about automata by Ullman at
|
|
83 |
<A HREF="https://www.coursera.org/course/automata">Coursera</A>, though IMHO not
|
|
84 |
done with love. There
|
|
85 |
is also the book <i>Automata and Computability</i> by
|
|
86 |
<A HREF="http://www.cs.cornell.edu/~kozen/">Dexter Kozen</A> including more
|
|
87 |
advanced material about automata.
|
|
88 |
Finally, there are millions of other pointers about automata
|
|
89 |
minimisation on the web.
|
|
90 |
</p>
|
|
91 |
|
|
92 |
<p>
|
|
93 |
<B>Skills:</B>
|
|
94 |
This is a project for a student with an interest in theory and some
|
|
95 |
reasonable programming skills. The project can be easily implemented
|
|
96 |
in languages like
|
|
97 |
<A HREF="http://www.scala-lang.org/">Scala</A>,
|
|
98 |
<A HREF="http://en.wikipedia.org/wiki/Standard_ML">ML</A>,
|
|
99 |
<A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>,
|
|
100 |
<A HREF="http://www.python.org">Python</A>, etc.
|
|
101 |
</p>
|
|
102 |
|
|
103 |
<li> <H4>[CU2] Equivalence Checking of Regular Expressions</H4>
|
|
104 |
|
|
105 |
<p><B>Description:</b>
|
|
106 |
Solving the problem of deciding the equivalence of regular expressions can be used
|
|
107 |
to decide a number of problems in automated reasoning. Recently,
|
|
108 |
<A HREF="http://www.cs.unibo.it/~asperti/">Andreas Asperti</A>
|
|
109 |
proposed a simple method for deciding regular expression equivalence described
|
|
110 |
<A HREF="http://www.cs.unibo.it/~asperti/PAPERS/compact.pdf">here</A>.
|
|
111 |
The task is to implement this method and test it on examples.
|
133
|
112 |
It would be also interesting to see whether Asperti's method applies to
|
132
|
113 |
extended regular expressions, described
|
|
114 |
<A HREF="http://ww2.cs.mu.oz.au/~sulzmann/manuscript/reg-exp-partial-derivatives.pdf">here</A>.
|
|
115 |
</p>
|
|
116 |
|
|
117 |
<p>
|
|
118 |
<B>Literature:</B>
|
|
119 |
The central literature is obviously the papers
|
|
120 |
<A HREF="http://www.cs.unibo.it/~asperti/PAPERS/compact.pdf">here</A> and
|
|
121 |
<A HREF="http://ww2.cs.mu.oz.au/~sulzmann/manuscript/reg-exp-partial-derivatives.pdf">here</A>.
|
|
122 |
Asperti has also some slides <A HREF="http://www.cs.unibo.it/~asperti/SLIDES/regular.pdf">here</a>.
|
|
123 |
More references about regular expressions can be found
|
|
124 |
<A HREF="http://en.wikipedia.org/wiki/Regular_expression">here</A>.
|
|
125 |
</p>
|
|
126 |
|
|
127 |
<p>
|
|
128 |
<B>Skills:</B>
|
|
129 |
This is a project for a student with a passion for theory and some
|
|
130 |
reasonable programming skills. The project can be easily implemented
|
|
131 |
in languages like Scala
|
|
132 |
<A HREF="http://www.scala-lang.org/">Scala</A>,
|
|
133 |
<A HREF="http://en.wikipedia.org/wiki/Standard_ML">ML</A>,
|
|
134 |
<A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>,
|
|
135 |
<A HREF="http://www.python.org">Python</A>, etc.
|
|
136 |
Being able to read <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>
|
|
137 |
code is beneficial for the part involving extended regular expressions.
|
|
138 |
</p>
|
|
139 |
|
|
140 |
<li> <H4>[CU3] Machine Code Generation for a Simple Compiler</H4>
|
|
141 |
|
|
142 |
<p><b>Description:</b>
|
|
143 |
Compilers translate high-level programs that humans can read and write into
|
|
144 |
efficient machine code that can be run on a CPU or virtual machine.
|
|
145 |
I recently implemented a very simple compiler for a very simple functional
|
|
146 |
programming language following this
|
|
147 |
<A HREF="http://www.cs.princeton.edu/~dpw/papers/tal-toplas.pdf">paper</A>
|
|
148 |
(also described <A HREF="http://www.cs.princeton.edu/~dpw/papers/tal-tr.pdf">here</A>).
|
|
149 |
My code, written in <A HREF="http://www.scala-lang.org/">Scala</A>, of this compiler is
|
|
150 |
<A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/compiler.scala">here</A>.
|
|
151 |
The compiler can deal with simple programs involving natural numbers, such
|
|
152 |
as Fibonacci numbers
|
|
153 |
or factorial (but it can be easily extended - that is not the point).
|
|
154 |
</p>
|
|
155 |
|
|
156 |
<p>
|
|
157 |
While the hard work has been done (understanding the two papers above),
|
|
158 |
my compiler only produces some idealised machine code. For example I
|
|
159 |
assume there are infinitely many registers. The goal of this
|
133
|
160 |
project is to generate machine code that is more realistic and can
|
|
161 |
run on a CPU, like x86, or run on a virtual machine, say the JVM.
|
132
|
162 |
This gives probably a speedup of thousand times in comparison to
|
|
163 |
my naive machine code and virtual machine. The project
|
|
164 |
requires to dig into the literature about real CPUs and generating
|
|
165 |
real machine code.
|
|
166 |
</p>
|
|
167 |
|
|
168 |
<p>
|
|
169 |
<B>Literature:</B>
|
|
170 |
There is a lot of literature about compilers
|
|
171 |
(for example <A HREF="http://www.cs.princeton.edu/~appel/papers/cwc.html">this book</A> -
|
|
172 |
I can lend you my copy for the duration of the project). A very good overview article
|
|
173 |
about implementing compilers by
|
|
174 |
<A HREF="http://tratt.net/laurie/">Laurie Tratt</A> is
|
|
175 |
<A HREF="http://tratt.net/laurie/tech_articles/articles/how_difficult_is_it_to_write_a_compiler">here</A>.
|
|
176 |
An introduction into x86 machine code is <A HREF="http://ianseyler.github.com/easy_x86-64/">here</A>.
|
134
|
177 |
Intel's official manual for the x86 instruction is
|
|
178 |
<A HREF="http://download.intel.com/design/intarch/manuals/24319101.pdf">here<A>.
|
132
|
179 |
A simple assembler for the JVM is described <A HREF="http://jasmin.sourceforge.net">here</A>.
|
|
180 |
An interesting twist of this project is to not generate code for a CPU, but
|
|
181 |
for the intermediate language of the <A HREF="http://llvm.org">LLVM</A> compiler
|
|
182 |
(also described <A HREF="https://wiki.aalto.fi/display/t1065450/LLVM+IR">here</A> and
|
|
183 |
<A HREF="http://llvm.org/docs/LangRef.html">here</A>).
|
|
184 |
</p>
|
|
185 |
|
|
186 |
<p><B>Skills:</B>
|
|
187 |
This is a project for a student with a deep interest in programming languages and
|
|
188 |
compilers. Since my compiler is implemented in <A HREF="http://www.scala-lang.org/">Scala</A>,
|
|
189 |
it would make sense to continue this project in this language. I can be
|
|
190 |
of help with questions and books about <A HREF="http://www.scala-lang.org/">Scala</A>.
|
|
191 |
But if Scala is a problem, my code can also be translated quickly into any other functional
|
|
192 |
language.
|
|
193 |
</p>
|
|
194 |
|
|
195 |
<li> <H4>[CU4] Implementation of Register Spilling Algorithms</H4>
|
|
196 |
|
|
197 |
<p><b>Description:</b>
|
|
198 |
This project is similar to [CU3]. The emphasis here, however, is on the
|
|
199 |
implementation and comparison of register spilling algorithms, also often called register allocation
|
|
200 |
algorithms. They are part of any respectable compiler. As said
|
|
201 |
in [CU3], however, my simple compiler lacks them and assumes an infinite amount of registers instead.
|
|
202 |
Real CPUs however only provide a fixed amount of registers (for example
|
|
203 |
x86-64 has 16 general purpose registers). Whenever a program needs
|
|
204 |
to hold more values than registers, the values need to be “spilled”
|
|
205 |
into the main memory. Register spilling algorithms try to minimise
|
|
206 |
this spilling, since fetching values from main memory is a costly
|
|
207 |
operation.
|
|
208 |
</p>
|
|
209 |
|
|
210 |
<p>
|
|
211 |
The classic algorithm for register spilling uses a
|
|
212 |
<A HREF="http://en.wikipedia.org/wiki/Register_allocation">graph-colouring method</A>.
|
|
213 |
However, for some time the <A HREF="http://llvm.org">LLVM</A> compiler
|
|
214 |
used a supposedly more efficient method, called the linear scan allocation method
|
|
215 |
(described
|
|
216 |
<A HREF="http://www.cs.ucla.edu/~palsberg/course/cs132/linearscan.pdf">here</A>).
|
|
217 |
However, it was later decided to abandon this method in favour of
|
|
218 |
a <A HREF="http://blog.llvm.org/2011/09/greedy-register-allocation-in-llvm-30.html">
|
|
219 |
greedy register allocation</A> method. It would be nice if this project can find out
|
|
220 |
what the issues are with these methods and implement at least one of them for the
|
|
221 |
simple compiler referenced in [CU3].
|
|
222 |
</p>
|
|
223 |
|
|
224 |
<p>
|
|
225 |
<B>Literature:</B>
|
|
226 |
The graph colouring method is described in Andrew Appel's
|
|
227 |
<A HREF="http://www.cs.princeton.edu/~appel/modern/java/">book</A> on compilers
|
|
228 |
(I can give you my copy of this book, if it is not available in the library).
|
|
229 |
There is also a survey
|
|
230 |
<A HREF="http://compilers.cs.ucla.edu/fernando/publications/drafts/survey.pdf">article</A>
|
|
231 |
about register allocation algorithms with further pointers.
|
|
232 |
</p>
|
|
233 |
|
|
234 |
<p><B>Skills:</B>
|
|
235 |
Same skills as [CU3].
|
|
236 |
</p>
|
|
237 |
|
|
238 |
<li> <H4>[CU5] A Student Polling System</H4>
|
|
239 |
<p>
|
|
240 |
<B>Description:</B>
|
|
241 |
One of the more annoying aspects of giving a lecture is to ask a question
|
|
242 |
to the students and no matter how easy the questions is to not
|
|
243 |
receive an answer. Recently, the online course system
|
|
244 |
<A HREF="http://www.udacity.com">Udacity</A> made an art out of
|
|
245 |
asking questions during lectures (see for example the
|
|
246 |
<A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A>
|
|
247 |
course CS253).
|
|
248 |
The lecturer there gives multiple-choice questions as part of the lecture and the students need to
|
|
249 |
click on the appropriate answer. This works very well in the online world.
|
|
250 |
For “real-world” lectures, the department has some
|
|
251 |
<A HREF="http://en.wikipedia.org/wiki/Audience_response">clickers</A>
|
|
252 |
(these are little devices part of an audience response systems). However,
|
|
253 |
they are a logistic nightmare for the lecturer: they need to be distributed
|
|
254 |
during the lecture and collected at the end. Nowadays, where students
|
|
255 |
come with their own laptop or smartphone to lectures, this can
|
|
256 |
be improved.
|
|
257 |
</p>
|
|
258 |
|
|
259 |
<p>
|
|
260 |
The task of this project is to implement an online student
|
|
261 |
polling system. The lecturer should be able to prepare
|
|
262 |
questions beforehand (encoded as some web-form) and be able to
|
|
263 |
show them during the lecture. The students
|
|
264 |
can give their answers by clicking on the corresponding webpage.
|
|
265 |
The lecturer can then collect the responses online and evaluate them
|
|
266 |
immediately. Such a system is sometimes called
|
|
267 |
<A HREF="http://en.wikipedia.org/wiki/Audience_response#Smartphone_.2F_HTTP_voting">HTML voting</A>.
|
|
268 |
There are a number of commercial
|
|
269 |
solutions for this problem, but they are not easy to use (in addition
|
|
270 |
to being ridiculously expensive). A good student can easily improve upon
|
|
271 |
what they provide.
|
|
272 |
</p>
|
|
273 |
|
|
274 |
<p>
|
|
275 |
The problem of student polling is not as hard as
|
|
276 |
<A HREF="http://en.wikipedia.org/wiki/Electronic_voting">electronic voting</A>,
|
|
277 |
which essentially is still an unsolved problem in Computer Science. The
|
|
278 |
students only need to be prevented from answering question more than once thus skewing
|
|
279 |
any statistics. Unlike electronic voting, no audit trail needs to be kept
|
133
|
280 |
for student polling. Restricting the number of answers can probably be solved
|
132
|
281 |
by setting appropriate cookies on the students
|
|
282 |
computers or smart phones.
|
|
283 |
</p>
|
|
284 |
|
|
285 |
<p>
|
|
286 |
<B>Literature:</B>
|
|
287 |
The project requires fluency in a web-programming language (for example
|
|
288 |
<A HREF="http://en.wikipedia.org/wiki/JavaScript">Javascript</A>,
|
|
289 |
<A HREF="http://en.wikipedia.org/wiki/PHP">PHP</A>,
|
|
290 |
Java, <A HREF="http://www.python.org">Python</A>, <A HREF="http://en.wikipedia.org/wiki/Go_(programming_language)">Go</A>, <A HREF="http://www.scala-lang.org/">Scala</A>,
|
|
291 |
<A HREF="http://en.wikipedia.org/wiki/Ruby_(programming_language)">Ruby</A>)
|
|
292 |
and possibly a cloud application platform (for example
|
|
293 |
<A HREF="https://developers.google.com/appengine/">Google App Engine</a> or
|
|
294 |
<A HREF="http://www.heroku.com">Heroku</A>).
|
|
295 |
For web-programming the
|
|
296 |
<A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A>
|
|
297 |
course at <A HREF="http://www.udacity.com">Udacity</A> is a good starting point
|
|
298 |
to be aware of the issues involved. This course uses <A HREF="http://www.python.org">Python</A>.
|
133
|
299 |
To evaluate the answers from the student, Google's
|
|
300 |
<A HREF="https://developers.google.com/chart/image/docs/making_charts">Chart Tools</A>
|
|
301 |
might be useful, which ar also described in this
|
|
302 |
<A HREF="http://www.youtube.com/watch?v=NZtgT4jgnE8">youtube</A> video.
|
132
|
303 |
</p>
|
|
304 |
|
|
305 |
<p><B>Skills:</B>
|
|
306 |
In order to provide convenience for the lecturer, this project needs very good web-programming skills. A
|
|
307 |
<A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker mentality</A>
|
|
308 |
(see above) is probably very beneficial: web-programming is an area that only emerged recently and
|
|
309 |
many tools still lack maturity. You probably have to experiment a lot with several different
|
|
310 |
languages and tools.
|
|
311 |
</p>
|
|
312 |
|
140
|
313 |
<li> <H4>[CU6] Implementation of a Distributed Clock-Synchronisation Algorithm developed at NASA</H4>
|
|
314 |
<p>
|
|
315 |
<B>Description:</B>
|
141
|
316 |
There are many algorithms for synchronising clocks. This
|
140
|
317 |
<A HREF="http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20120000054_2011025573.pdf">paper</A>
|
141
|
318 |
describes a new algorithm for clocks that communicate by exchanging
|
|
319 |
messages and thereby reach a state in which (within some bound) all clocks are synchronised.
|
|
320 |
The point of this project is to implement this algorithm and simulate networks of clocks.
|
140
|
321 |
</p>
|
|
322 |
|
|
323 |
<B>Literature:</B>
|
141
|
324 |
There is a wide range of literature on clock syncronisation algorithms.
|
|
325 |
Some pointers are given in this
|
|
326 |
<A HREF="http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20120000054_2011025573.pdf">paper</A>,
|
|
327 |
which describes the algorithm to be implemented in this project. Pointers
|
|
328 |
are given also <A HREF="http://en.wikipedia.org/wiki/Clock_synchronization">here</A>.
|
140
|
329 |
</p>
|
|
330 |
|
|
331 |
<p><B>Skills:</B>
|
141
|
332 |
In order to implement a simulation of a network of clocks, you need to tackle
|
140
|
333 |
concurrency. You can do this for example in the programming language
|
141
|
334 |
<A HREF="http://www.scala-lang.org/">Scala</A> with the help of the
|
|
335 |
<A HREF="http://akka.io">Akka</a> library. This library enables you to send messages
|
|
336 |
between different <I>actors</I>. <A HREF="http://www.scala-lang.org/node/242">Here</A>
|
|
337 |
are some examples that explain how to implement exchanging messages between actors.
|
140
|
338 |
</p>
|
|
339 |
|
132
|
340 |
</ul>
|
|
341 |
</TD>
|
|
342 |
</TR>
|
|
343 |
</TABLE>
|
|
344 |
|
|
345 |
<P><!-- Created: Tue Mar 4 00:23:25 GMT 1997 -->
|
|
346 |
<!-- hhmts start -->
|
|
347 |
Last modified: Wed Jan 11 16:30:03 GMT 2012
|
|
348 |
<!-- hhmts end -->
|
|
349 |
<a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
|
|
350 |
</BODY>
|
|
351 |
</HTML>
|