updated
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Fri, 19 Sep 2014 11:12:02 +0100
changeset 311 841fdad7fcdc
parent 310 4846ce596db9
child 312 9506d4bc0a08
updated
bsc-projects-14.html
--- a/bsc-projects-14.html	Fri Sep 05 16:26:51 2014 +0100
+++ b/bsc-projects-14.html	Fri Sep 19 11:12:02 2014 +0100
@@ -44,7 +44,7 @@
     necessary.&rdquo; I am always happy to supervise like-minded students.</H4>  
 
 <ul class="striped">
-<li> <H4>[CU1] Regular Expression Matching and Partial Derivatives</H4>
+<li> <H4>[CU1] Regular Expression Matching and Derivatives</H4>
 
   <p>
   <B>Description:</b>  
@@ -56,15 +56,15 @@
   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>
+  FLOPS'14 conference. The task in this project is to implement their results.</p>
 
   <p>The background for this project is that some regular expressions are 
   &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
   and can &ldquo;stab you in the back&rdquo; 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 
+  in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (or also a number of other mainstream programming languages according to this
+  <A HREF="http://www. computerbytesman.com/redos/">blog</A>) 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:
@@ -76,7 +76,9 @@
   <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.
+  potentially crashing your program. Moreover (beside the problem of being painfully slow) according to this
+  <A HREF="http://www.haskell.org/haskellwiki/Regex_Posix">report</A>
+  nearly all POSIX regular expression matchers are actually buggy.
   </p>
 
   <p>
@@ -99,18 +101,19 @@
 
   <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 
+  <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">FLOPS'14-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
+  Their approach is based on the concept of 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 &ldquo;blow away&rdquo; the regular expression matchers 
-  in Python and Ruby (and possibly in Scala too).
+  in Python and Ruby (and possibly in Scala too). The application would be to implement a fast lexer for
+  programming languages. 
   </p>
 
   <p>
@@ -131,6 +134,7 @@
   <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A> very helpful.
   Test cases for &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
   regular expressions can be obtained from <A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">here</A>.
+  
   </p>
 
   <p>
@@ -179,7 +183,7 @@
   <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
+  Unfortunately, JavaScript is also 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:
@@ -239,52 +243,11 @@
   </p>
 
   <p>
-  <B>PS:</B> Compiler projects, like this [CU2] and [CU3], consistently received high marks in the past.
+  <B>PS:</B> Compiler projects, like this [CU2] and [CU6], 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] Language Translator into JavaScript</H4>
-
-  <p>
-  <b>Description:</b> 
-  <A HREF="http://www.w3schools.com/js/">JavaScript</A> is a 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>Skills:</B> 
-  This project is about exploring these two subsets of JavaScript and implement a translator
-  of a small language into them.  This is similar to the project [CU2] above and requires
-  similar skills. In addition it would be good to have already some familiarity with JavaScript.
-  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.
-  This is a project for a student who wants to get more familiar with JavaScript and Web-programming.
-  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 into 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>
-
-<li> <H4>[CU4] Slide-Making in the Web-Age</H4>
+<li> <H4>[CU3] Slide-Making in the Web-Age</H4>
 
   <p>
   The standard technology for writing scientific papers in Computer Science  is to use
@@ -345,10 +308,13 @@
   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.
+  others. If you want to avoid JavaScript there are a number of alternatives: for example the
+  <A HREF="http://elm-lang.org">Elm</A>
+  language has been especially designed for implementing easily interactive animations, which would be
+  very conveninet for this project.
   </p>
 
-<li> <H4>[CU5] An Online Student Voting System</H4>
+<li> <H4>[CU4] An Online Student Voting System</H4>
 
   <p>
   <B>Description:</B>
@@ -416,77 +382,14 @@
 
   <p>
   <B>Skills:</B> 
-  In order to provide convenience for the lecturer, this project needs very good web-programming skills. A 
+  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
+  (see above) is probably also 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>[CU6] 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>[CU7] 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>[CU8] Raspberry Pi's and Arduinos</H4>
+<li> <H4>[CU5] Raspberry Pi's and Arduinos</H4>
 
   <p>
   <B>Description:</B>
@@ -501,7 +404,7 @@
   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 Pi's into webservers.
+  for web-programming on Raspberry Pi's truning them into webservers.
   </p>
 
   <p>
@@ -560,6 +463,109 @@
   </center>
   </p>
 
+<li> <H4>[CU6] Language Translator into JavaScript</H4>
+
+  <p>
+  <b>Description:</b> 
+  <A HREF="http://www.w3schools.com/js/">JavaScript</A> is a 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>Skills:</B> 
+  This project is about exploring these two subsets of JavaScript and implement a translator
+  of a small language into them.  This is similar to the project [CU2] above and requires
+  similar skills. In addition it would be good to have already some familiarity with JavaScript.
+  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.
+  This is a project for a student who wants to get more familiar with JavaScript and Web-programming.
+  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 into 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>
+
+
+
+<li> <H4>[CU7] 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>[CU8] 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>[CU9] Proving the Correctness of Programs</H4>
 
  <p>
@@ -606,7 +612,7 @@
 </TABLE>
 
 <P>
-<!-- hhmts start --> Last modified: Tue Aug  5 17:37:49 BST 2014 <!-- hhmts end -->
+<!-- hhmts start --> Last modified: Fri Sep 19 11:11:36 BST 2014 <!-- hhmts end -->
 <a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
 </BODY>
 </HTML>