--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/msc-projects-13.html Sun Nov 10 21:37:24 2013 +0000
@@ -0,0 +1,570 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HEAD>
+<TITLE>2013/14 Msc Projects</TITLE>
+<BASE HREF="http://www.inf.kcl.ac.uk/staff/urbanc/">
+<script type="text/javascript" src="striper.js"></script>
+<link rel="stylesheet" href="nominal.css">
+<script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+</script>
+</HEAD>
+<BODY TEXT="#000000"
+ BGCOLOR="#4169E1"
+ LINK="#0000EF"
+ VLINK="#51188E"
+ ALINK="#FF0000"
+ ONLOAD="striper('ul','striped','li','first,second')">
+
+
+
+<TABLE WIDTH="100%"
+ BGCOLOR="#4169E1"
+ BORDER="0"
+ FRAME="border"
+ CELLPADDING="10"
+ CELLSPACING="2"
+ RULES="all">
+
+<TR>
+<TD BGCOLOR="#FFFFFF"
+ WIDTH="75%"
+ VALIGN="TOP">
+
+<H2>2013/14 MSc Projects</H2>
+<H4>Supervisor: Christian Urban</H4>
+<H4>Email: christian dot urban at kcl dot ac dot uk, Office: Strand Building S1.27</H4>
+<H4>If you are interested in a project, please send me an email and we can discuss details. Please include
+a short description about your programming skills and Computer Science background in your first email.
+I will also need your King's username in order to book the project for you. Thanks.</H4>
+
+<H4>Note that besides being a lecturer at the theoretical end of Computer Science, I am also a passionate
+ <A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker</A> …
+ defined as “a person who enjoys exploring the details of programmable systems and
+ stretching their capabilities, as opposed to most users, who prefer to learn only the minimum
+ necessary.” I am always happy to supervise like-minded students.</H4>
+
+<ul class="striped">
+<li> <H4>[CU1] Regular Expression Matching and Partial Derivatives</H4>
+
+ <p>
+ <B>Description:</b>
+ <A HREF="http://en.wikipedia.org/wiki/Regular_expression">Regular expressions</A>
+ are extremely useful for many text-processing tasks such as finding patterns in texts,
+ lexing programs, syntax highlighting and so on. Given that regular expressions were
+ introduced in 1950 by <A HREF="http://en.wikipedia.org/wiki/Stephen_Cole_Kleene">Stephen Kleene</A>,
+ you might think regular expressions have since been studied and implemented to death. But you would definitely be
+ mistaken: in fact they are still an active research area. For example
+ <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">this paper</A>
+ about regular expression matching and partial derivatives was presented last summer at the international
+ PPDP'12 conference. They even work on a followup paper that has not yet been presented at any
+ conference. The task in this project is to implement their results.</p>
+
+ <p>The background for this project is that some regular expressions are
+ “<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>”
+ and can “stab you in the back” according to
+ this <A HREF="http://tech.blog.cueup.com/regular-expressions-will-stab-you-in-the-back">blog post</A>.
+ For example, if you use in <A HREF="http://www.python.org">Python</A> or
+ in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (probably also other mainstream programming languages) the
+ innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string
+ <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact,
+ Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself:
+ <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re.py">re.py</A> (Python version) and
+ <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re.rb">re.rb</A>
+ (Ruby version). You can imagine an attacker
+ mounting a nice <A HREF="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attack</A> against
+ your program if it contains such an “evil” regular expression. Actually
+ <A HREF="http://www.scala-lang.org/">Scala</A> (and also Java) are almost immune from such
+ attacks as they can deal with strings of up to 4,300 <code>a</code>s in less than a second. But if you scale
+ the regular expression and string further to, say, 4,600 <code>a</code>s, then you get a <code>StackOverflowError</code>
+ potentially crashing your program.
+ </p>
+
+ <p>
+ On a rainy afternoon, I implemented
+ <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re3.scala">this</A>
+ regular expression matcher in Scala. It is not as fast as the official one in Scala, but
+ it can match up to 11,000 <code>a</code>s in less than 5 seconds without raising any exception
+ (remember Python and Ruby both need nearly 30 seconds to process 28(!) <code>a</code>s, and Scala's
+ official matcher maxes out at 4,600 <code>a</code>s). My matcher is approximately
+ 85 lines of code and based on the concept of
+ <A HREF="http://lambda-the-ultimate.org/node/2293">derivatives of regular expressions</A>.
+ These derivatives were introduced in 1964 by <A HREF="http://en.wikipedia.org/wiki/Janusz_Brzozowski_(computer_scientist)">
+ Janusz Brzozowski</A>, but according to this
+ <A HREF="http://www.cl.cam.ac.uk/~so294/documents/jfp09.pdf">paper</A> had been lost in the “sands of time”.
+ The advantage of derivatives is that they side-step completely the usual
+ <A HREF="http://hackingoff.com/compilers/regular-expression-to-nfa-dfa">translations</A> of regular expressions
+ into NFAs or DFAs, which can introduce the exponential behaviour exhibited by the regular
+ expression matchers in Python and Ruby.
+ </p>
+
+ <p>
+ Now the authors from the
+ <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">PPDP'12-paper</A> mentioned
+ above claim they are even faster than me and can deal with even more features of regular expressions
+ (for example subexpression matching, which my rainy-afternoon matcher cannot). I am sure they thought
+ about the problem much longer than a single afternoon. The task
+ in this project is to find out how good they actually are by implementing the results from their paper.
+ Their approach is based on the concept of partial derivatives introduced in 1994 by
+ <A HREF="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.56.2509&rep=rep1&type=pdf">Valentin Antimirov</A>.
+ I used them once myself in a <A HREF="http://www.inf.kcl.ac.uk/staff/urbanc/Publications/rexp.pdf">paper</A>
+ in order to prove the <A HREF="http://en.wikipedia.org/wiki/Myhill–Nerode_theorem">Myhill-Nerode theorem</A>.
+ So I know they are worth their money. Still, it would be interesting to actually compare their results
+ with my simple rainy-afternoon matcher and potentially “blow away” the regular expression matchers
+ in Python and Ruby (and possibly in Scala too).
+ </p>
+
+ <p>
+ <B>Literature:</B>
+ The place to start with this project is obviously this
+ <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">paper</A>.
+ Traditional methods for regular expression matching are explained
+ in the Wikipedia articles
+ <A HREF="http://en.wikipedia.org/wiki/DFA_minimization">here</A> and
+ <A HREF="http://en.wikipedia.org/wiki/Powerset_construction">here</A>.
+ The authoritative <A HREF="http://infolab.stanford.edu/~ullman/ialc.html">book</A>
+ on automata and regular expressions is by John Hopcroft and Jeffrey Ullmann (available in the library).
+ There is also an online course about this topic by Ullman at
+ <A HREF="https://www.coursera.org/course/automata">Coursera</A>, though IMHO not
+ done with love.
+ Finally, there are millions of other pointers about regular expression
+ matching on the Web. I found the chapter on Lexing in this
+ <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A> very helpful.
+ Test cases for “<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>”
+ regular expressions can be obtained from <A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">here</A>.
+ </p>
+
+ <p>
+ <B>Skills:</B>
+ This is a project for a student with an interest in theory and some
+ reasonable programming skills. The project can be easily implemented
+ in functional languages like
+ <A HREF="http://www.scala-lang.org/">Scala</A>,
+ F#,
+ <A HREF="http://en.wikipedia.org/wiki/Standard_ML">ML</A>,
+ <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>, etc. Python and other non-functional languages
+ can be also used, but seem much less convenient.
+ </p>
+
+<li> <H4>[CU2] A Compiler for a Simple Programming Language</H4>
+
+ <p>
+ <b>Description:</b>
+ Compilers translate high-level programs that humans can read and write into
+ efficient machine code that can be run on a CPU or virtual machine.
+ A compiler for a simple functional language generating X86 code is described
+ <A HREF="https://github.com/chameco/Shade">here</A>.
+ I recently implemented a very simple compiler for an even simpler functional
+ programming language following this
+ <A HREF="http://www.cs.princeton.edu/~dpw/papers/tal-toplas.pdf">paper</A>
+ (also described <A HREF="http://www.cs.princeton.edu/~dpw/papers/tal-tr.pdf">here</A>).
+ My code, written in <A HREF="http://www.scala-lang.org/">Scala</A>, of this compiler is
+ <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/compiler.scala">here</A>.
+ The compiler can deal with simple programs involving natural numbers, such
+ as Fibonacci numbers or factorial (but it can be easily extended - that is not the point).
+ </p>
+
+ <p>
+ While the hard work has been done (understanding the two papers above),
+ my compiler only produces some idealised machine code. For example I
+ assume there are infinitely many registers. The goal of this
+ project is to generate machine code that is more realistic and can
+ run on a CPU, like X86, or run on a virtual machine, say the JVM.
+ This gives probably a speedup of thousand times in comparison to
+ my naive machine code and virtual machine. The project
+ requires to dig into the literature about real CPUs and generating
+ real machine code.
+ </p>
+
+ <p>
+ An alternative is to not generate machine code, but build a compiler that compiles
+ <A HREF="http://www.w3schools.com/js/">JavaScript</A>. This is the language that is supported by most
+ browsers and therefore is a favourite
+ vehicle for Web-programming. Some call it <B>the</B> scripting language of the Web.
+ Unfortunately, JavaScript is probably one of the worst
+ languages to program in (being designed and released in a hurry). <B>But</B> it can be used as a convenient target
+ for translating programs from other languages. In particular there are two
+ very optimised subsets of JavaScript that can be used for this purpose:
+ one is <A HREF="http://asmjs.org">asm.js</A> and the other is
+ <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>.
+ There is a <A HREF="https://github.com/kripken/emscripten/wiki/Tutorial">tutorial</A> for emscripten
+ and an impressive <A HREF="http://www.unrealengine.com/html5/">demo</A> which runs the
+ <A HREF="http://en.wikipedia.org/wiki/Unreal_Engine">Unreal Engine 3</A>
+ in a browser with spectacular speed. This was achieved by compiling the
+ C-code of the Unreal Engine to the LLVM intermediate language and then translating the LLVM
+ code to JavaScript.
+ </p>
+
+ <p>
+ <B>Literature:</B>
+ There is a lot of literature about compilers
+ (for example <A HREF="http://www.cs.princeton.edu/~appel/papers/cwc.html">this book</A> -
+ I can lend you my copy for the duration of the project, or this
+ <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A>). A very good overview article
+ about implementing compilers by
+ <A HREF="http://tratt.net/laurie/">Laurie Tratt</A> is
+ <A HREF="http://tratt.net/laurie/tech_articles/articles/how_difficult_is_it_to_write_a_compiler">here</A>.
+ An online book about the Art of Assembly Language is
+ <A HREF="http://flint.cs.yale.edu/cs422/doc/art-of-asm/pdf/">here</A>.
+ An introduction into x86 machine code is <A HREF="http://ianseyler.github.com/easy_x86-64/">here</A>.
+ Intel's official manual for the x86 instruction is
+ <A HREF="http://download.intel.com/design/intarch/manuals/24319101.pdf">here</A>.
+ A simple assembler for the JVM is described <A HREF="http://jasmin.sourceforge.net">here</A>.
+ An interesting twist of this project is to not generate code for a CPU, but
+ for the intermediate language of the <A HREF="http://llvm.org">LLVM</A> compiler
+ (also described <A HREF="https://wiki.aalto.fi/display/t1065450/LLVM+IR">here</A> and
+ <A HREF="http://llvm.org/docs/LangRef.html">here</A>). If you want to see
+ what machine code looks like you can compile your C-program using gcc -S.
+ </p>
+ <p>
+ 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.
+ <A HREF="http://jsbooks.revolunet.com">Here</A> is a list of free books on JavaScript.
+ A project from which you can draw inspiration is this
+ <A HREF="http://jlongster.com/2012/01/04/outlet-my-lisp-to-javascript-experiment.html">List-to-JavaScript</A>
+ translator. <A HREF="https://bitbucket.org/ktg/parenjs/overview">Here</A> is another such project.
+ And <A HREF="https://github.com/viclib/liscript">another</A> in less than 100 lines of code.
+ <A HREF="http://en.wikipedia.org/wiki/CoffeeScript">Coffeescript</A> is a similar project
+ except that it is already quite <A HREF="http://coffeescript.org">mature</A>. And finally not to
+ forget <A HREF="http://www.typescriptlang.org">TypeScript</A> developed by Microsoft. The main
+ difference between these projects and this one is that they translate int relatively high-level
+ JavaScript code; none of them use the much lower levels <A HREF="http://asmjs.org">asm.js</A> and
+ <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>.
+ </p>
+
+ <p>
+ <B>Skills:</B>
+ This is a project for a student with a deep interest in programming languages and
+ compilers. Since my compiler is implemented in <A HREF="http://www.scala-lang.org/">Scala</A>,
+ it would make sense to continue this project in this language. I can be
+ of help with questions and books about <A HREF="http://www.scala-lang.org/">Scala</A>.
+ But if Scala is a problem, my code can also be translated quickly into any other functional
+ language.
+ </p>
+
+ <p>
+ <B>PS:</B> Compiler projects like this one consistently received high marks in the past.
+ I suprvised four so far and none of them received a mark below 70% - one even was awarded a prize.
+ </p>
+
+<li> <H4>[CU3] Slide-Making in the Web-Age</H4>
+
+ <p>
+ The standard technology for writing scientific papers in Computer Science is to use
+ <A HREF="http://en.wikipedia.org/wiki/LaTeX">LaTeX</A>, a document preparation
+ system originally implemented by <A HREF="http://en.wikipedia.org/wiki/Donald_Knuth">Donald Knuth</A>
+ and <A HREF="http://en.wikipedia.org/wiki/Leslie_Lamport">Leslie Lamport</A>.
+ LaTeX produces very pleasantly looking documents, can deal nicely with mathematical
+ formulas and is very flexible. If you are interested <A HREF="http://openwetware.org/wiki/Word_vs._LaTeX">here</A>
+ is a side-by-side comparison between Word and LaTeX (which LaTeX “wins” with 18 out of 21 points).
+ Computer scientists not only use LaTeX for documents,
+ but also for slides (really, nobody who wants to be cool uses Keynote or Powerpoint).
+ </p>
+
+ <p>
+ Although used widely, LaTeX seems nowadays a bit dated for producing
+ slides. Unlike documents, which are typically “static” and published in a book or journal,
+ slides often contain changing contents that might first only be partially visible and
+ only later be revealed as the “story” of a talk or lecture demands.
+ Also slides often contain animated algorithms where each state in the
+ calculation is best explained by highlighting the changing data.
+ </p>
+
+ <p>
+ It seems HTML and JavaScript are much better suited for generating
+ such animated slides. This <A HREF="http://www.impressivewebs.com/html-slidedeck-toolkits/">page</A>
+ links to 22 slide-generating programs using this combination of technologies.
+ <A HREF="http://www.impressivewebs.com/html-slidedeck-toolkits/">Here</A> are even more such
+ projects. However, the problem with all of these project is that they depend heavily on the users being
+ able to write JavaScript, CCS or HTML...not something one would like to depend on given that
+ “normal” users likely only have a LaTeX background. The aim of this project is to invent a
+ very simple language that is inspired by LaTeX and then generate from code written in this language
+ slides that can be displayed in a web-browser.
+ </p>
+
+ <p>
+ This sounds complicated, but there is already some help available:
+ <A HREF="http://www.mathjax.org">Mathjax</A> is a JavaScript library that can
+ be used to display mathematical text, for example
+
+ <blockquote>
+ <p>When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
+ \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\).</p>
+ </blockquote>
+
+ by writing code in the familiar LaTeX-way. This can be reused. There are also plenty of JavaScript
+ libraries for graphical animations (for example
+ <A HREF="http://raphaeljs.com">Raphael</A>,
+ <A HREF="http://svgjs.com">SVG.JS</A>,
+ <A HREF="http://bonsaijs.org">Bonsaijs</A>,
+ <A HREF="http://jsxgraph.uni-bayreuth.de/wp/">JSXGraph</A>). The inspiration for how the user should be able to write
+ slides could come from the LaTeX packages <A HREF="http://en.wikipedia.org/wiki/Beamer_(LaTeX)">Beamer</A>
+ and <A HREF="http://en.wikipedia.org/wiki/PGF/TikZ">PGF/TikZ</A>.
+ </p>
+
+ <p>
+ <B>Skills:</B>
+ This is a project requires good knowledge of JavaScript. You need to be able to
+ parse a language and translate it to a suitable part of JavaScript using
+ appropriate libraries. Tutorials for JavaScript are <A HREF="http://www.w3schools.com/js/">here</A>.
+ A parser generator for JavaScript is <A HREF="http://pegjs.majda.cz">here</A>. There are probably also
+ others.
+ </p>
+
+<li> <H4>[CU4] An Online Student Voting System</H4>
+
+ <p>
+ <B>Description:</B>
+ One of the more annoying aspects of giving a lecture is to ask a question
+ to the students and no matter how easy the questions is to not
+ receive an answer. Recently, the online course system
+ <A HREF="http://www.udacity.com">Udacity</A> made an art out of
+ asking questions during lectures (see for example the
+ <A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A>
+ course CS253).
+ The lecturer there gives multiple-choice questions as part of the lecture and the students need to
+ click on the appropriate answer. This works very well in the online world.
+ For “real-world” lectures, the department has some
+ <A HREF="http://en.wikipedia.org/wiki/Audience_response">clickers</A>
+ (these are little devices part of an audience response systems). However,
+ they are a logistic nightmare for the lecturer: they need to be distributed
+ during the lecture and collected at the end. Nowadays, where students
+ come with their own laptop or smartphone to lectures, this can
+ be improved.
+ </p>
+
+ <p>
+ The task of this project is to implement an online student
+ polling system. The lecturer should be able to prepare
+ questions beforehand (encoded as some web-form) and be able to
+ show them during the lecture. The students
+ can give their answers by clicking on the corresponding webpage.
+ The lecturer can then collect the responses online and evaluate them
+ immediately. Such a system is sometimes called
+ <A HREF="http://en.wikipedia.org/wiki/Audience_response#Smartphone_.2F_HTTP_voting">HTML voting</A>.
+ There are a number of commercial
+ solutions for this problem, but they are not easy to use (in addition
+ to being ridiculously expensive). A good student can easily improve upon
+ what they provide.
+ </p>
+
+ <p>
+ The problem of student polling is not as hard as
+ <A HREF="http://en.wikipedia.org/wiki/Electronic_voting">electronic voting</A>,
+ which essentially is still an unsolved problem in Computer Science. The
+ students only need to be prevented from answering question more than once thus skewing
+ any statistics. Unlike electronic voting, no audit trail needs to be kept
+ for student polling. Restricting the number of answers can probably be solved
+ by setting appropriate cookies on the students
+ computers or smart phones.
+ </p>
+
+ <p>
+ <B>Literature:</B>
+ The project requires fluency in a web-programming language (for example
+ <A HREF="http://en.wikipedia.org/wiki/JavaScript">Javascript</A>,
+ <A HREF="http://en.wikipedia.org/wiki/Go_(programming_language)">Go</A>,
+ <A HREF="http://www.scala-lang.org/">Scala</A>). However JavaScript with
+ the <A HREF="http://nodejs.org">Node.js</A> extension seems to be best suited for the job.
+ <A HREF="http://www.nodebeginner.org">Here</A> is a tutorial on Node.js for beginners.
+ For web-programming the
+ <A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A>
+ course at <A HREF="http://www.udacity.com">Udacity</A> is a good starting point
+ to be aware of the issues involved. This course uses <A HREF="http://www.python.org">Python</A>.
+ To evaluate the answers from the students, Google's
+ <A HREF="https://developers.google.com/chart/image/docs/making_charts">Chart Tools</A>
+ might be useful, which are also described in this
+ <A HREF="http://www.youtube.com/watch?v=NZtgT4jgnE8">youtube</A> video.
+ </p>
+
+ <p>
+ <B>Skills:</B>
+ In order to provide convenience for the lecturer, this project needs very good web-programming skills. A
+ <A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker mentality</A>
+ (see above) is probably very beneficial: web-programming is an area that only emerged recently and
+ many tools still lack maturity. You probably have to experiment a lot with several different
+ languages and tools.
+ </p>
+
+<li> <H4>[CU5] An Infrastructure for Displaying and Animating Code in a Web-Browser</H4>
+
+<p>
+ <B>Description:</B>
+ The project aim is to implement an infrastructure for displaying and
+ animating code in a web-browser. The infrastructure should be agnostic
+ with respect to the programming language, but should be configurable.
+ I envisage something smaller than the projects
+ <A HREF="http://www.pythontutor.com">here</A> (for Python),
+ <A HREF="http://ideone.com">here</A> (for Java),
+ <A HREF="http://codepad.org">here</A> (for multiple languages),
+ <A HREF="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro">here</A> (for HTML)
+ <A HREF="http://repl.it/languages/JavaScript">here</A> (for JavaScript),
+ and <A HREF="http://www.scala-tour.com/#/welcome">here</A> (for Scala).
+ </p>
+
+ <p>
+ The tasks in this project are being able (1) to lex and parse languages and (2) to write an interpreter.
+ The goal is to implement this as much as possible in a language-agnostic fashion.
+ </p>
+
+ <p>
+ <B>Skills:</B>
+ Good skill in lexing and language parsing, as well as being fluent with web programming (for
+ example JavaScript).
+ </p>
+
+
+<li> <H4>[CU6] Implementation of a Distributed Clock-Synchronisation Algorithm developed at NASA</H4>
+
+ <p>
+ <B>Description:</B>
+ There are many algorithms for synchronising clocks. This
+ <A HREF="http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20120000054_2011025573.pdf">paper</A>
+ describes a new algorithm for clocks that communicate by exchanging
+ messages and thereby reach a state in which (within some bound) all clocks are synchronised.
+ A slightly longer and more detailed paper about the algorithm is
+ <A HREF="http://hdl.handle.net/2060/20110020812">here</A>.
+ The point of this project is to implement this algorithm and simulate networks of clocks.
+ </p>
+
+ <p>
+ <B>Literature:</B>
+ There is a wide range of literature on clock synchronisation algorithms.
+ Some pointers are given in this
+ <A HREF="http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20120000054_2011025573.pdf">paper</A>,
+ which describes the algorithm to be implemented in this project. Pointers
+ are given also <A HREF="http://en.wikipedia.org/wiki/Clock_synchronization">here</A>.
+ </p>
+
+ <p>
+ <B>Skills:</B>
+ In order to implement a simulation of a network of clocks, you need to tackle
+ concurrency. You can do this for example in the programming language
+ <A HREF="http://www.scala-lang.org/">Scala</A> with the help of the
+ <A HREF="http://akka.io">Akka</a> library. This library enables you to send messages
+ between different <I>actors</I>. <A HREF="http://www.scala-lang.org/node/242">Here</A>
+ are some examples that explain how to implement exchanging messages between actors.
+ </p>
+
+<li> <H4>[CU7] Raspberry Pis and Arduinos</H4>
+
+ <p>
+ <B>Description:</B>
+ This project is for true hackers! <A HREF="http://en.wikipedia.org/wiki/Raspberry_Pi">Raspberry Pis</A>
+ are small Linux computers the size of a credit-card and only cost £34 (see picture left below). They were introduced
+ in 2012 and people went crazy...well some of them. There is a
+ <A HREF="https://plus.google.com/communities/113390432655174294208?hl=en">Google+</A> community about Raspberry Pis that has more
+ than 58k of followers. It is hard to keep up with what people do with these small computers. The possibilities
+ seem to be limitless. The main resource for Raspberry Pis is <A HREF="http://www.raspberrypi.org">here</A>.
+ There are <A HREF="http://www.themagpi.com">magazines</A> dedicated to them and tons of
+ <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=39">books</A> (not to mention
+ floods of <A HREF="https://www.google.co.uk/search?q=raspberry+pi">online</A> material).
+ Google just released a
+ <A HREF="http://googlecreativelab.github.io/coder/">framework</A>
+ for web-programming and for turning Raspberry Pis into webservers.
+ </p>
+
+ <p>
+ <A HREF="http://en.wikipedia.org/wiki/Arduino">Arduinos</A> are slightly older (from 2005) but still very cool (see picture right below). They
+ are small single-board micro-controllers that can talk to various external gadgets (sensors, motors, etc). Since Arduinos
+ are open-software and open-hardware there are many clones and add-on boards. Like for the Raspberry Pi, there
+ is a lot of material <A HREF="https://www.google.co.uk/search?q=arduino">available</A> about Arduinos.
+ The main reference is <A HREF="http://www.arduino.cc">here</A>. Like the Raspberry Pis, the good thing about
+ Arduinos is that they can be powered with simple AA-batteries.
+ </p>
+
+ <p>
+ I have two such Raspberry Pis including wifi-connectors and two <A HREF="http://www.raspberrypi.org/camera">cameras<A>.
+ 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
+ students for one or two projects. However, the aim is to first come up with an idea for a project. Popular projects are
+ automated temperature sensors, network servers, robots, web-cams (<A HREF="http://www.secretbatcave.co.uk/electronics/shard-rain-cam/">here</A>
+ is a <A HREF="http://www.raspberrypi.org/archives/3547">web-cam</A> directed at the Shard that can
+ <A HREF="http://www.secretbatcave.co.uk/software/shard-rain-cam-quantifying-cloudy/">tell</A>
+ you whether it is raining or cloudy). There are plenty more ideas listed
+ <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=15">here</A> for Raspberry Pis and
+ <A HREF="http://playground.arduino.cc/projects/ideas">here</A> for Arduinos.
+ </p>
+
+ <p>
+ There are essentially two kinds of projects: One is purely software-based. Software projects for Raspberry Pis are often
+ written in <A HREF="http://www.python.org">Python</A>, but since these are Linux-capable computers any other
+ language would do as well. You can also write your own operating system as done
+ <A HREF="http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/">here</A>. For example the students
+ <A HREF="http://www.recantha.co.uk/blog/?p=4918">here</A> developed their own bare-metal OS and then implemented
+ a chess-program on top of it (have a look at their very impressive
+ <A HREF="http://www.youtube.com/watch?v=-03bouPsfEQ&feature=player_embedded">youtube</A> video).
+ The other kind of project is a combination of hardware and software; usually attaching some sensors
+ or motors to the Raspberry Pi or Arduino. This might require some soldering or what is called
+ a <A HREF="http://en.wikipedia.org/wiki/Breadboard">bread-board</A>. But be careful before choosing a project
+ involving new hardware: these devices
+ can be destroyed (if “Vin connected to GND” or “drawing more than 30mA from a GPIO”
+ does not make sense to you, you should probably stay away from such a project).
+ </p>
+
+ <p>
+ <center>
+ <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;
+ "src="http://upload.wikimedia.org/wikipedia/commons/3/3d/RaspberryPi.jpg" width="313" height="209">
+
+ <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;
+ "src="http://upload.wikimedia.org/wikipedia/commons/3/38/Arduino_Uno_-_R3.jpg" width="240" height="209">
+ </center>
+ </p>
+
+ <p>
+ <B>Skills:</B>
+ Well, you must be a hacker; happy to make things.
+ </p>
+
+
+<li> <H4>[CU8] Proving Correctness of Programs</H4>
+
+ <p>
+ I am one of the main developers of the interactive theorem prover
+ <A HREF="http://isabelle.in.tum.de">Isabelle</A>. This theorem prover
+ has been used to establish the correctness of some quite large
+ programs (for example an <A HREF="http://ertos.nicta.com.au/research/l4.verified/">operating system</A>).
+ Together with colleagues from Nanjing, I used this theorem prover to establish the correctness of a
+ scheduling algorithm, called
+ <A HREF="http://en.wikipedia.org/wiki/Priority_inheritance">Priority Inheritance</A>,
+ for real time operating systems. This scheduling algorithm is part of the operating
+ system that drives, for example, the
+ <A HREF="http://en.wikipedia.org/wiki/Mars_Exploration_Rover">Mars rovers</A>.
+ Actually, the very first Mars rover mission in 1997 did not have this
+ algorithm switched on and it almost caused a catastrophic mission failure (see
+ this youtube video <A HREF="http://www.youtube.com/watch?v=lyx7kARrGeM">here</A>
+ for an explanation what happened).
+ We were able to prove the correctness of this algorithm, but were also able to
+ establish the correctness of some optimisations in this
+ <A HREF="http://www.inf.kcl.ac.uk/staff/urbanc/Publications/pip.pdf">paper</A>.
+ </p>
+
+ <p>
+ On a much smaller scale, there are a few small programs and underlying algorithms where it
+ is not really understood whether they always compute a correct result (for example the
+ regular expression matcher by Sulzmann and Lu in project [CU1]).
+ The aim of this
+ project is to completely specify an algorithm in Isabelle and then prove it correct (that is,
+ it always computes the correct result).
+ </p>
+
+ <p>
+ <B>Skills:</B>
+ This project is for a very good student with a knack for theoretical things and formal reasoning.
+ </p>
+
+
+<li> <H4>Earlier Projects</H4>
+
+ I am also open to project suggestions from you. You might find some inspiration from my earlier projects:
+ <A HREF="http://www.inf.kcl.ac.uk/staff/urbanc/bsc-projects-12.html">BSc 2012/13</A>,
+ <A HREF="http://www.inf.kcl.ac.uk/staff/urbanc/msc-projects-12.html">MSc 2012/13</A>
+
+</ul>
+</TD>
+</TR>
+</TABLE>
+
+<P>
+<!-- hhmts start --> Last modified: Sun Nov 10 21:32:10 GMT 2013 <!-- hhmts end -->
+<a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
+</BODY>
+</HTML>