|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
3 <HEAD> |
|
4 <TITLE>2017/18 BSc/MSci Projects</TITLE> |
|
5 <BASE HREF="http://nms.kcl.ac.uk/christian.urban/"> |
|
6 <script type="text/javascript" src="striper.js"></script> |
|
7 <link rel="stylesheet" href="nominal.css"> |
|
8 <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> |
|
9 </script> |
|
10 </HEAD> |
|
11 <BODY TEXT="#000000" |
|
12 BGCOLOR="#4169E1" |
|
13 LINK="#0000EF" |
|
14 VLINK="#51188E" |
|
15 ALINK="#FF0000" |
|
16 ONLOAD="striper('ul','striped','li','first,second')"> |
|
17 |
|
18 |
|
19 |
|
20 <TABLE WIDTH="100%" |
|
21 BGCOLOR="#4169E1" |
|
22 BORDER="0" |
|
23 FRAME="border" |
|
24 CELLPADDING="10" |
|
25 CELLSPACING="2" |
|
26 RULES="all"> |
|
27 |
|
28 <TR> |
|
29 <TD BGCOLOR="#FFFFFF" |
|
30 WIDTH="75%" |
|
31 VALIGN="TOP"> |
|
32 |
|
33 <H2>2017/18 BSc/MSci Projects</H2> |
|
34 <H4>Supervisor: Christian Urban</H4> |
|
35 <H4>Email: christian dot urban at kcl dot ac dot uk, Office: Bush House N7.07</H4> |
|
36 <H4>If you are interested in a project, please send me an email and we can discuss details. Please include |
|
37 a short description about your programming skills and Computer Science background in your first email. |
|
38 Thanks.</H4> |
|
39 |
|
40 <H4>Note that besides being a lecturer at the theoretical end of Computer Science, I am also a passionate |
|
41 <A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker</A> … |
|
42 defined as “a person who enjoys exploring the details of programmable systems and |
|
43 stretching their capabilities, as opposed to most users, who prefer to learn only the minimum |
|
44 necessary.” I am always happy to supervise like-minded students. |
|
45 |
|
46 <p>In 2013/14, I was nominated by the students |
|
47 for the best BSc project supervisor and best MSc project supervisor awards in the NMS |
|
48 faculty. Somehow I won both. In 2014/15 I was nominated again for the best MSc |
|
49 project supervisor, but did not win it. ;o)</H4> |
|
50 |
|
51 <ul class="striped"> |
|
52 <li> <H4>[CU1] Regular Expressions, Lexing and Derivatives</H4> |
|
53 |
|
54 <p> |
|
55 <B>Description:</b> |
|
56 <A HREF="http://en.wikipedia.org/wiki/Regular_expression">Regular expressions</A> |
|
57 are extremely useful for many text-processing tasks, such as finding patterns in hostile network traffic, |
|
58 lexing programs, syntax highlighting and so on. Given that regular expressions were |
|
59 introduced in 1950 by <A HREF="http://en.wikipedia.org/wiki/Stephen_Cole_Kleene">Stephen Kleene</A>, |
|
60 you might think regular expressions have since been studied and implemented to death. But you would definitely be |
|
61 mistaken: in fact they are still an active research area. On the top of my head, I can give |
|
62 you at least ten research papers that appeared in the last few years. |
|
63 For example |
|
64 <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/regex-parsing-derivatives.pdf">this paper</A> |
|
65 about regular expression matching and derivatives was presented in 2014 at the international |
|
66 FLOPS conference. Another <A HREF="http://nms.kcl.ac.uk/christian.urban/Publications/posix.pdf">paper</A> by my PhD student and me was presented in 2016 |
|
67 at the international ITP conference. |
|
68 The task in this project is to implement these results and use them for lexing.</p> |
|
69 |
|
70 <p>The background for this project is that some regular expressions are |
|
71 “<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>” |
|
72 and can “stab you in the back” according to |
|
73 this <A HREF="http://peterscott.github.io/2013/01/17/regular-expressions-will-stab-you-in-the-back/">blog post</A>. |
|
74 For example, if you use in <A HREF="http://www.python.org">Python</A> or |
|
75 in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (or also in a number of other mainstream programming languages) the |
|
76 innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string |
|
77 <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact, |
|
78 Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself: |
|
79 <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.py">catastrophic.py</A> (Python version) and |
|
80 <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.rb">catastrophic.rb</A> |
|
81 (Ruby version). Here is a similar problem in Java: <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.rb">catastrophic.java</A> |
|
82 </p> |
|
83 |
|
84 <p> |
|
85 You can imagine an attacker |
|
86 mounting a nice <A HREF="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attack</A> against |
|
87 your program if it contains such an “evil” regular expression. But it can also happen by accident: |
|
88 on 20 July 2016 the website <A HREF="http://stackstatus.net/post/147710624694/outage-postmortem-july-20-2016">Stack Exchange</A> |
|
89 was knocked offline because of an evil regular expression. One of their engineers talks about this in this |
|
90 <A HREF="https://vimeo.com/112065252">video</A>. A similar problem needed to be fixed in the |
|
91 <A HREF="http://davidvgalbraith.com/how-i-fixed-atom/">Atom</A> editor. |
|
92 A few implementations of regular expression matchers are almost immune from such problems. |
|
93 For example, <A HREF="http://www.scala-lang.org/">Scala</A> can deal with strings of up to 4,300 <code>a</code>s in less than a second. But if you scale |
|
94 the regular expression and string further to, say, 4,600 <code>a</code>s, then you get a <code>StackOverflowError</code> |
|
95 potentially crashing your program. Moreover (beside the "minor" problem of being painfully slow) according to this |
|
96 <A HREF="http://www.haskell.org/haskellwiki/Regex_Posix">report</A> |
|
97 nearly all regular expression matchers using the POSIX rules are actually buggy. |
|
98 </p> |
|
99 |
|
100 <p> |
|
101 On a rainy afternoon, I implemented |
|
102 <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re3.scala">this</A> |
|
103 regular expression matcher in Scala. It is not as fast as the official one in Scala, but |
|
104 it can match up to 11,000 <code>a</code>s in less than 5 seconds without raising any exception |
|
105 (remember Python and Ruby both need nearly 30 seconds to process 28(!) <code>a</code>s, and Scala's |
|
106 official matcher maxes out at 4,600 <code>a</code>s). My matcher is approximately |
|
107 85 lines of code and based on the concept of |
|
108 <A HREF="http://lambda-the-ultimate.org/node/2293">derivatives of regular expressions</A>. |
|
109 These derivatives were introduced in 1964 by <A HREF="http://en.wikipedia.org/wiki/Janusz_Brzozowski_(computer_scientist)"> |
|
110 Janusz Brzozowski</A>, but according to this |
|
111 <A HREF="https://www.cs.kent.ac.uk/people/staff/sao/documents/jfp09.pdf">paper</A> had been lost in the “sands of time”. |
|
112 The advantage of derivatives is that they side-step completely the usual |
|
113 <A HREF="http://hackingoff.com/compilers/regular-expression-to-nfa-dfa">translations</A> of regular expressions |
|
114 into NFAs or DFAs, which can introduce the exponential behaviour exhibited by the regular |
|
115 expression matchers in Python, Java and Ruby. |
|
116 </p> |
|
117 |
|
118 <p> |
|
119 Now the authors from the |
|
120 <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/regex-parsing-derivatives.pdf">FLOPS'14-paper</A> mentioned |
|
121 above claim they are even faster than me and can deal with even more features of regular expressions |
|
122 (for example subexpression matching, which my rainy-afternoon matcher cannot). I am sure they thought |
|
123 about the problem much longer than a single afternoon. The task |
|
124 in this project is to find out how good they actually are by implementing the results from their paper. |
|
125 Their approach to regular expression matching is also based on the concept of derivatives. |
|
126 I used derivatives very successfully once for something completely different in a |
|
127 <A HREF="http://nms.kcl.ac.uk/christian.urban/Publications/rexp.pdf">paper</A> |
|
128 about the <A HREF="http://en.wikipedia.org/wiki/Myhill–Nerode_theorem">Myhill-Nerode theorem</A>. |
|
129 So I know they are worth their money. Still, it would be interesting to actually compare their results |
|
130 with my simple rainy-afternoon matcher and potentially “blow away” the regular expression matchers |
|
131 in Python, Ruby and Java (and possibly in Scala too). The application would be to implement a fast lexer for |
|
132 programming languages, or improve the network traffic analysers in the tools Snort and Bro??? |
|
133 </p> |
|
134 |
|
135 <p> |
|
136 <B>Literature:</B> |
|
137 The place to start with this project is obviously this |
|
138 <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/regex-parsing-derivatives.pdf">paper</A> |
|
139 and this <A HREF="http://nms.kcl.ac.uk/christian.urban/Publications/posix.pdf">one</A>. |
|
140 Traditional methods for regular expression matching are explained |
|
141 in the Wikipedia articles |
|
142 <A HREF="http://en.wikipedia.org/wiki/DFA_minimization">here</A> and |
|
143 <A HREF="http://en.wikipedia.org/wiki/Powerset_construction">here</A>. |
|
144 The authoritative <A HREF="http://infolab.stanford.edu/~ullman/ialc.html">book</A> |
|
145 on automata and regular expressions is by John Hopcroft and Jeffrey Ullmann (available in the library). |
|
146 There is also an online course about this topic by Ullman at |
|
147 <A HREF="https://www.coursera.org/course/automata">Coursera</A>, though IMHO not |
|
148 done with love. |
|
149 There are millions of other pointers about regular expression |
|
150 matching on the Web. I found the chapter on Lexing in this |
|
151 <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A> very helpful. Finally, it will |
|
152 be of great help for this project to take part in my Compiler and Formal Language module (). |
|
153 Test cases for “<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>” |
|
154 regular expressions can be obtained from <A HREF="http://www.haskell.org/haskellwiki/Regex_Posix">here</A>. |
|
155 </p> |
|
156 |
|
157 <p> |
|
158 <B>Skills:</B> |
|
159 This is a project for a student with an interest in theory and with |
|
160 good programming skills. The project can be easily implemented |
|
161 in functional languages like |
|
162 <A HREF="http://www.scala-lang.org/">Scala</A>, |
|
163 <A HREF="http://fsharp.org">F#</A>, |
|
164 <A HREF="http://en.wikipedia.org/wiki/Standard_ML">ML</A>, |
|
165 <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>, etc. Python and other non-functional languages |
|
166 can be also used, but seem much less convenient. If you do attend my Compilers and Formal Languages |
|
167 module, that would obviously give you a head-start with this project. |
|
168 </p> |
|
169 |
|
170 <li> <H4>[CU2] A Compiler for a small Programming Language</H4> |
|
171 |
|
172 <p> |
|
173 <b>Description:</b> |
|
174 Compilers translate high-level programs that humans can read and write into |
|
175 efficient machine code that can be run on a CPU or virtual machine. |
|
176 A compiler for a simple functional language generating X86 code is described |
|
177 <A HREF="https://github.com/chameco/Shade">here</A>. |
|
178 I recently implemented a very simple compiler for an even simpler functional |
|
179 programming language following this |
|
180 <A HREF="https://www.cs.princeton.edu/~dpw/papers/tal-toplas.pdf">paper</A> |
|
181 (also described <A HREF="https://www.cs.princeton.edu/~dpw/papers/tal-tr.pdf">here</A>). |
|
182 My code, written in <A HREF="http://www.scala-lang.org/">Scala</A>, of this compiler is |
|
183 <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/compiler.scala">here</A>. |
|
184 The compiler can deal with simple programs involving natural numbers, such |
|
185 as Fibonacci numbers or factorial (but it can be easily extended - that is not the point). |
|
186 </p> |
|
187 |
|
188 <p> |
|
189 While the hard work has been done (understanding the two papers above), |
|
190 my compiler only produces some idealised machine code. For example I |
|
191 assume there are infinitely many registers. The goal of this |
|
192 project is to generate machine code that is more realistic and can |
|
193 run on a CPU, like X86, or run on a virtual machine, say the JVM. |
|
194 This gives probably a speedup of thousand times in comparison to |
|
195 my naive machine code and virtual machine. The project |
|
196 requires to dig into the literature about real CPUs and generating |
|
197 real machine code. |
|
198 </p> |
|
199 <p> |
|
200 An alternative is to not generate machine code, but build a compiler that compiles to |
|
201 <A HREF="http://www.w3schools.com/js/">JavaScript</A>. This is the language that is supported by most |
|
202 browsers and therefore is a favourite |
|
203 vehicle for Web-programming. Some call it <B>the</B> scripting language of the Web. |
|
204 Unfortunately, JavaScript is also probably one of the worst |
|
205 languages to program in (being designed and released in a hurry). <B>But</B> it can be used as a convenient target |
|
206 for translating programs from other languages. In particular there are two |
|
207 very optimised subsets of JavaScript that can be used for this purpose: |
|
208 one is <A HREF="http://asmjs.org">asm.js</A> and the other is |
|
209 <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>. Since |
|
210 last year there is even the official Webassembly??? |
|
211 There is a <A HREF="http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html">tutorial</A> for emscripten |
|
212 and an impressive <A HREF="https://youtu.be/c2uNDlP4RiE">demo</A> which runs the |
|
213 <A HREF="http://en.wikipedia.org/wiki/Unreal_Engine">Unreal Engine 3</A> |
|
214 in a browser with spectacular speed. This was achieved by compiling the |
|
215 C-code of the Unreal Engine to the LLVM intermediate language and then translating the LLVM |
|
216 code to JavaScript. |
|
217 </p> |
|
218 |
|
219 <p> |
|
220 <B>Literature:</B> |
|
221 There is a lot of literature about compilers |
|
222 (for example <A HREF="http://www.cs.princeton.edu/~appel/papers/cwc.html">this book</A> - |
|
223 I can lend you my copy for the duration of the project, or this |
|
224 <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A>). A very good overview article |
|
225 about implementing compilers by |
|
226 <A HREF="http://tratt.net/laurie/">Laurie Tratt</A> is |
|
227 <A HREF="http://tratt.net/laurie/tech_articles/articles/how_difficult_is_it_to_write_a_compiler">here</A>. |
|
228 An online book about the Art of Assembly Language is |
|
229 <A HREF="http://flint.cs.yale.edu/cs422/doc/art-of-asm/pdf/">here</A>. |
|
230 An introduction into x86 machine code is <A HREF="http://ianseyler.github.com/easy_x86-64/">here</A>. |
|
231 Intel's official manual for the x86 instruction is |
|
232 <A HREF="http://download.intel.com/design/intarch/manuals/24319101.pdf">here</A>. |
|
233 Two assemblers for the JVM are described <A HREF="http://jasmin.sourceforge.net">here</A> |
|
234 <A HREF="https://github.com/Storyyeller/Krakatau">here</A>. |
|
235 An interesting twist of this project is to not generate code for a CPU, but |
|
236 for the intermediate language of the <A HREF="http://llvm.org">LLVM</A> compiler |
|
237 (also described <A HREF="http://llvm.org/docs/LangRef.html">here</A>). If you want to see |
|
238 what machine code looks like you can compile your C-program using gcc -S. |
|
239 </p> |
|
240 <p> |
|
241 If JavaScript is chosen as a target instead, then there are plenty of <A HREF="http://www.w3schools.com/js/">tutorials</A> on the Web. |
|
242 <A HREF="http://jsbooks.revolunet.com">Here</A> is a list of free books on JavaScript. |
|
243 A project from which you can draw inspiration is this |
|
244 <A HREF="http://jlongster.com/Outlet--My-Lisp-to-Javascript-Experiment">Lisp-to-JavaScript</A> |
|
245 translator. <A HREF="https://bitbucket.org/ktg/parenjs/overview">Here</A> is another such project. |
|
246 And <A HREF="https://github.com/viclib/liscript">another</A> in less than 100 lines of code. |
|
247 <A HREF="http://en.wikipedia.org/wiki/CoffeeScript">Coffeescript</A> is a similar project |
|
248 except that it is already quite <A HREF="http://coffeescript.org">mature</A>. And finally not to |
|
249 forget <A HREF="http://www.typescriptlang.org">TypeScript</A> developed by Microsoft. The main |
|
250 difference between these projects and this one is that they translate into relatively high-level |
|
251 JavaScript code; none of them use the much lower levels <A HREF="http://asmjs.org">asm.js</A> and |
|
252 <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>. |
|
253 </p> |
|
254 <p> |
|
255 <B>Skills:</B> |
|
256 This is a project for a student with a deep interest in programming languages and |
|
257 compilers. Since my compiler is implemented in <A HREF="http://www.scala-lang.org/">Scala</A>, |
|
258 it would make sense to continue this project in this language. I can be |
|
259 of help with questions and books about <A HREF="http://www.scala-lang.org/">Scala</A>. |
|
260 But if Scala is a problem, my code can also be translated quickly into any other functional |
|
261 language. |
|
262 </p> |
|
263 |
|
264 <p> |
|
265 <B>PS:</B> Compiler projects consistently received high marks in the past. |
|
266 I have supervised eight so far and most of them received a mark below 70% - one even was awarded a prize. |
|
267 </p> |
|
268 |
|
269 <li> <H4>[CU3] Slide-Making in the Web-Age</H4> |
|
270 |
|
271 <p> |
|
272 The standard technology for writing scientific papers in Computer Science is to use |
|
273 <A HREF="http://en.wikipedia.org/wiki/LaTeX">LaTeX</A>, a document preparation |
|
274 system originally implemented by <A HREF="http://en.wikipedia.org/wiki/Donald_Knuth">Donald Knuth</A> |
|
275 and <A HREF="http://en.wikipedia.org/wiki/Leslie_Lamport">Leslie Lamport</A>. |
|
276 LaTeX produces very pleasantly looking documents, can deal nicely with mathematical |
|
277 formulas and is very flexible. If you are interested, <A HREF="http://openwetware.org/wiki/Word_vs._LaTeX">here</A> |
|
278 is a side-by-side comparison between Word and LaTeX (which LaTeX “wins” with 18 out of 21 points). |
|
279 Computer scientists not only use LaTeX for documents, |
|
280 but also for slides (really, nobody who wants to be cool uses Keynote or Powerpoint). |
|
281 </p> |
|
282 |
|
283 <p> |
|
284 Although used widely, LaTeX seems nowadays a bit dated for producing |
|
285 slides. Unlike documents, which are typically “static” and published in a book or journal, |
|
286 slides often contain changing contents that might first only be partially visible and |
|
287 only later be revealed as the “story” of a talk or lecture demands. |
|
288 Also slides often contain animated algorithms where each state in the |
|
289 calculation is best explained by highlighting the changing data. |
|
290 </p> |
|
291 |
|
292 <p> |
|
293 It seems HTML and JavaScript are much better suited for generating |
|
294 such animated slides. This <A HREF="http://www.impressivewebs.com/html-slidedeck-toolkits/">page</A> |
|
295 links to slide-generating programs using this combination of technologies. |
|
296 However, the problem with all of these project is that they depend heavily on the users being |
|
297 able to write JavaScript, CCS or HTML...not something one would like to depend on given that |
|
298 “normal” users likely only have a LaTeX background. The aim of this project is to invent a |
|
299 very simple language that is inspired by LaTeX and then generate from code written in this language |
|
300 slides that can be displayed in a web-browser. An example would be the |
|
301 <A HREF="https://www.madoko.net">Madoko</A> project. |
|
302 </p> |
|
303 |
|
304 <p> |
|
305 This sounds complicated, but there is already some help available: |
|
306 <A HREF="http://www.mathjax.org">Mathjax</A> is a JavaScript library that can |
|
307 be used to display mathematical text, for example |
|
308 |
|
309 <blockquote> |
|
310 <p>When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are |
|
311 \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\).</p> |
|
312 </blockquote> |
|
313 |
|
314 by writing code in the familiar LaTeX-way. This can be reused. |
|
315 Another such library is <A HREF="http://khan.github.io/KaTeX/">KaTeX</A>. |
|
316 There are also plenty of JavaScript |
|
317 libraries for graphical animations (for example |
|
318 <A HREF="http://raphaeljs.com">Raphael</A>, |
|
319 <A HREF="http://svgjs.com">SVG.JS</A>, |
|
320 <A HREF="http://bonsaijs.org">Bonsaijs</A>, |
|
321 <A HREF="http://jsxgraph.uni-bayreuth.de/wp/">JSXGraph</A>). The inspiration for how the user should be able to write |
|
322 slides could come from the LaTeX packages <A HREF="http://en.wikipedia.org/wiki/Beamer_(LaTeX)">Beamer</A> |
|
323 and <A HREF="http://en.wikipedia.org/wiki/PGF/TikZ">PGF/TikZ</A>. A slide-making project from which |
|
324 inspiration can be drawn is <A HREF="http://maciejczyzewski.me/hyhyhy/">hyhyhy</A>. |
|
325 </p> |
|
326 |
|
327 <p> |
|
328 <B>Skills:</B> |
|
329 This is a project that requires good knowledge of JavaScript. You need to be able to |
|
330 parse a language and translate it to a suitable part of JavaScript using |
|
331 appropriate libraries. Tutorials for JavaScript are <A HREF="http://www.w3schools.com/js/">here</A>. |
|
332 A parser generator for JavaScript is <A HREF="http://pegjs.majda.cz">here</A>. There are probably also |
|
333 others. If you want to avoid JavaScript there are a number of alternatives: for example the |
|
334 <A HREF="http://elm-lang.org">Elm</A> |
|
335 language has been especially designed for implementing with ease interactive animations, which would be |
|
336 very convenient for this project. A nice slide making project done by a previous student is |
|
337 <A HREF=" http://www.markslides.org/src/markslides.html">MarkSlides</A> by Oleksandr Cherednychenko. |
|
338 </p> |
|
339 |
|
340 <li> <H4>[CU4] Raspberry Pi's and Arduinos</H4> |
|
341 |
|
342 <p> |
|
343 <B>Description:</B> |
|
344 This project is for true hackers! <A HREF="http://en.wikipedia.org/wiki/Raspberry_Pi">Raspberry Pi's</A> |
|
345 are small Linux computers the size of a credit-card and only cost £26 (see picture on the left below). They were introduced |
|
346 in 2012 and people went crazy...well some of them. There is a |
|
347 <A HREF="https://plus.google.com/communities/113390432655174294208?hl=en">Google+</A> community about Raspberry Pi's that has more |
|
348 than 197k of followers. It is hard to keep up with what people do with these small computers. The possibilities |
|
349 seem to be limitless. The main resource for Raspberry Pi's is <A HREF="http://www.raspberrypi.org">here</A>. |
|
350 There are <A HREF="https://www.raspberrypi.org/magpi/">magazines</A> dedicated to them and tons of |
|
351 <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=39">books</A> (not to mention |
|
352 floods of <A HREF="https://www.google.co.uk/search?q=raspberry+pi">online</A> material, |
|
353 such as the <A HREF="https://www.raspberrypi.org/magpi-issues/Projects_Book_v1.pdf">RPi projects book</A>). |
|
354 Google just released a |
|
355 <A HREF="http://googlecreativelab.github.io/coder/">framework</A> |
|
356 for web-programming on Raspberry Pi's turning them into webservers. |
|
357 </p> |
|
358 |
|
359 <p> |
|
360 <A HREF="http://en.wikipedia.org/wiki/Arduino">Arduinos</A> are slightly older (from 2005) but still very cool (see picture on the right below). They |
|
361 are small single-board micro-controllers that can talk to various external gadgets (sensors, motors, etc). Since Arduinos |
|
362 are open-software and open-hardware there are many clones and add-on boards. Like for the Raspberry Pi, there |
|
363 is a lot of material <A HREF="https://www.google.co.uk/search?q=arduino">available</A> about Arduinos. |
|
364 The main reference is <A HREF="http://www.arduino.cc">here</A>. Like the Raspberry Pi's, the good thing about |
|
365 Arduinos is that they can be powered with simple AA-batteries. |
|
366 </p> |
|
367 |
|
368 <p> |
|
369 I have two such Raspberry Pi's including wifi-connectors and two <A HREF="http://www.raspberrypi.org/camera">cameras<A>. |
|
370 I also have two <A HREF="http://www.freaklabs.org/index.php/Blog/Store/Introducing-the-Freakduino-Chibi-An-Arduino-based-Board-For-Wireless-Sensor-Networking.html">Freakduino Boards</A> that are Arduinos extended with wireless communication. I can lend them to responsible |
|
371 students for one or two projects. However, the aim is to first come up with an idea for a project. Popular projects are |
|
372 automated temperature sensors, network servers, robots, web-cams (<A HREF="http://www.secretbatcave.co.uk/electronics/shard-rain-cam/">here</A> |
|
373 is a <A HREF="http://www.raspberrypi.org/archives/3547">web-cam</A> directed at the Shard that can |
|
374 <A HREF="http://www.secretbatcave.co.uk/software/shard-rain-cam-quantifying-cloudy/">tell</A> |
|
375 you whether it is raining or cloudy). There are plenty more ideas listed |
|
376 <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=15">here</A> for Raspberry Pi's and |
|
377 <A HREF="http://playground.arduino.cc/projects/ideas">here</A> for Arduinos. |
|
378 </p> |
|
379 |
|
380 <p> |
|
381 There are essentially two kinds of projects: One is purely software-based. Software projects for Raspberry Pi's are often |
|
382 written in <A HREF="http://www.python.org">Python</A>, but since these are Linux-capable computers any other |
|
383 language would do as well. You can also write your own operating system as done |
|
384 <A HREF="http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/">here</A>. For example the students |
|
385 <A HREF="http://www.recantha.co.uk/blog/?p=4918">here</A> developed their own bare-metal OS and then implemented |
|
386 a chess-program on top of it (have a look at their very impressive |
|
387 <A HREF="http://www.youtube.com/watch?v=-03bouPsfEQ&feature=player_embedded">youtube</A> video). |
|
388 The other kind of project is a combination of hardware and software; usually attaching some sensors |
|
389 or motors to the Raspberry Pi or Arduino. This might require some soldering or what is called |
|
390 a <A HREF="http://en.wikipedia.org/wiki/Breadboard">bread-board</A>. But be careful before choosing a project |
|
391 involving new hardware: these devices |
|
392 can be destroyed (if “Vin connected to GND” or “drawing more than 30mA from a GPIO” |
|
393 does not make sense to you, you should probably stay away from such a project). |
|
394 </p> |
|
395 |
|
396 <p> |
|
397 <center> |
|
398 <img style="-webkit-user-select: none; cursor: -webkit-zoom-in; |
|
399 "src="http://upload.wikimedia.org/wikipedia/commons/3/3d/RaspberryPi.jpg" width="313" height="209"> |
|
400 |
|
401 <img style="-webkit-user-select: none; cursor: -webkit-zoom-in; |
|
402 "src="http://upload.wikimedia.org/wikipedia/commons/3/38/Arduino_Uno_-_R3.jpg" width="240" height="209"> |
|
403 </center> |
|
404 </p> |
|
405 |
|
406 <p> |
|
407 <B>Skills:</B> |
|
408 Well, you must be a hacker; happy to make things. Your desk might look like the photo below on the left. |
|
409 The photo below on the right shows an earlier student project which connects wirelessly a wearable Arduino (packaged |
|
410 in a "self-3d-printed" watch) to a Raspberry Pi seen in the background. The Arduino in the foreground takes measurements of |
|
411 heart rate and body temperature; the Raspberry Pi collects this data and makes it accessible via a simple |
|
412 web-service. |
|
413 <center> |
|
414 <img style="-webkit-user-select: none; cursor: -webkit-zoom-in; |
|
415 "src="http://nms.kcl.ac.uk/christian.urban/rpi-photo.jpg" width="209" height="313"> |
|
416 |
|
417 <img style="-webkit-user-select: none; cursor: -webkit-zoom-in; |
|
418 "src="http://nms.kcl.ac.uk/christian.urban/rpi-watch.jpg" width="450" height="254"> |
|
419 </center> |
|
420 </p> |
|
421 |
|
422 <li> <H4>[CU5] An Infrastructure for Displaying and Animating Code in a Web-Browser</H4> |
|
423 |
|
424 <p> |
|
425 <B>Description:</B> |
|
426 The project aim is to implement an infrastructure for displaying and |
|
427 animating code in a web-browser. The infrastructure should be agnostic |
|
428 with respect to the programming language, but should be configurable. |
|
429 I envisage something smaller than the projects |
|
430 <A HREF="http://www.pythontutor.com">here</A> (for Python), |
|
431 <A HREF="http://ideone.com">here</A> (for Java), |
|
432 <A HREF="http://codepad.org">here</A> (for multiple languages), |
|
433 <A HREF="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro">here</A> (for HTML) |
|
434 <A HREF="http://repl.it/languages/JavaScript">here</A> (for JavaScript), |
|
435 and <A HREF="http://www.scala-tour.com/#/welcome">here</A> (for Scala). |
|
436 </p> |
|
437 |
|
438 <p> |
|
439 The tasks in this project are being able (1) to lex and parse languages and (2) to write an interpreter. |
|
440 The goal is to implement this as much as possible in a language-agnostic fashion. |
|
441 </p> |
|
442 |
|
443 <p> |
|
444 <B>Skills:</B> |
|
445 Good skills in lexing and language parsing, as well as being fluent with web programming (for |
|
446 example JavaScript). |
|
447 </p> |
|
448 |
|
449 |
|
450 <li> <H4>[CU6] Proving the Correctness of Programs</H4> |
|
451 |
|
452 <p> |
|
453 I am one of the main developers of the interactive theorem prover |
|
454 <A HREF="http://isabelle.in.tum.de">Isabelle</A>. This theorem prover |
|
455 has been used to establish the correctness of some quite large |
|
456 programs (for example an <A HREF="http://ertos.nicta.com.au/research/l4.verified/">operating system</A>). |
|
457 Together with colleagues from Nanjing, I used this theorem prover to establish the correctness of a |
|
458 scheduling algorithm, called |
|
459 <A HREF="http://en.wikipedia.org/wiki/Priority_inheritance">Priority Inheritance</A>, |
|
460 for real-time operating systems. This scheduling algorithm is part of the operating |
|
461 system that drives, for example, the |
|
462 <A HREF="http://en.wikipedia.org/wiki/Mars_Exploration_Rover">Mars rovers</A>. |
|
463 Actually, the very first Mars rover mission in 1997 did not have this |
|
464 algorithm switched on and it almost caused a catastrophic mission failure (see |
|
465 this youtube video <A HREF="http://www.youtube.com/watch?v=lyx7kARrGeM">here</A> |
|
466 for an explanation what happened). |
|
467 We were able to prove the correctness of this algorithm, but were also able to |
|
468 establish the correctness of some optimisations in this |
|
469 <A HREF="http://nms.kcl.ac.uk/christian.urban/Publications/pip.pdf">paper</A>. |
|
470 </p> |
|
471 |
|
472 <p>On a much smaller scale, there are a few small programs and underlying algorithms where it |
|
473 is not really understood whether they always compute a correct result (for example the |
|
474 regular expression matcher by Sulzmann and Lu in project [CU1]). The aim of this |
|
475 project is to completely specify an algorithm in Isabelle and then prove it correct (that is, |
|
476 it always computes the correct result). |
|
477 </p> |
|
478 |
|
479 <p> |
|
480 <B>Skills:</B> |
|
481 This project is for a very good student with a knack for theoretical things and formal reasoning. |
|
482 </p> |
|
483 |
|
484 <li> <H4>[CU7] Anything Security Related that is Interesting</H4> |
|
485 |
|
486 <p> |
|
487 If you have your own project that is related to security (must be |
|
488 something interesting), please propose it. We can then have a look |
|
489 whether it would be suitable for a project. |
|
490 </p> |
|
491 |
|
492 <li> <H4>[CU8] Anything Interesting in the Areas</H4> |
|
493 |
|
494 <p> |
|
495 <ul> |
|
496 <li><A HREF="http://elm-lang.org">Elm</A> (a reactive functional language for animating webpages; have a look at the cool examples, or <A HREF="http://pragmaticstudio.com/blog/2014/12/19/getting-started-with-elm">here</A> for an introduction) |
|
497 <li><A HREF="http://www.smlserver.org/smltojs/">SMLtoJS</A> (a ML compiler to JavaScript; or anything else related to |
|
498 sane languages that compile to JavaScript) |
|
499 <li>Any statistical data related to Bitcoins (in the spirit of this |
|
500 <A HREF="http://people.csail.mit.edu/spillai/data/papers/bitcoin-transaction-graph-analysis.pdf">paper</A> or |
|
501 this <A HREF="https://eprint.iacr.org/2012/584.pdf">one</A>; this will probably require some extensive C knowledge or any |
|
502 other heavy-duty programming language) |
|
503 <li>Anything related to programming languages and formal methods (like |
|
504 <A HREF="http://matt.might.net/articles/intro-static-analysis/">static program analysis</A>) |
|
505 <li>Anything related to low-cost, hands-on hardware like Raspberry Pi, Arduino, |
|
506 <A HREF="http://en.wikipedia.org/wiki/Cubieboard">Cubieboard</A> |
|
507 <li>Anything related to unikernel operating systems, like |
|
508 <A HREF="http://www.xenproject.org">Xen</A> or |
|
509 <A HREF="http://www.openmirage.org">Mirage OS</A> |
|
510 <li>Any kind of applied hacking, for example the Arduino-based keylogger described |
|
511 <A HREF="http://samy.pl/keysweeper/">here</A> |
|
512 <li>Anything related to code books, like this |
|
513 <A HREF="http://www.joelotter.com/kajero/">one</A> |
|
514 </ul> |
|
515 </p> |
|
516 |
|
517 |
|
518 <li> <H4>Earlier Projects</H4> |
|
519 |
|
520 I am also open to project suggestions from you. You might find some inspiration from my earlier projects: |
|
521 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-12.html">BSc 2012/13</A>, |
|
522 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-12.html">MSc 2012/13</A>, |
|
523 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-13.html">BSc 2013/14</A>, |
|
524 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-13.html">MSc 2013/14</A>, |
|
525 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-14.html">BSc 2014/15</A>, |
|
526 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-14.html">MSc 2014/15</A>, |
|
527 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-15.html">BSc 2015/16</A>, |
|
528 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-15.html">MSc 2015/16</A>, |
|
529 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-16.html">BSc 2016/17</A>, |
|
530 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-16.html">MSc 2016/17</A> |
|
531 </ul> |
|
532 </TD> |
|
533 </TR> |
|
534 </TABLE> |
|
535 |
|
536 <P> |
|
537 <!-- hhmts start --> Last modified: Mon May 16 11:27:14 BST 2016 <!-- hhmts end --> |
|
538 <a href="http://validator.w3.org/check/referer">[Validate this page.]</a> |
|
539 </BODY> |
|
540 </HTML> |