| 154 |      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 MSc 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 MSc Projects</H2>
 | 
|  |     32 | <H4>Supervisor: Christian Urban</H4> 
 | 
|  |     33 | <H4>Email: christian dot urban at kcl dot ac dot uk,  Office: Strand Building S1.27</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 | 
 | 
| 163 |     38 | <H4>Note that besides being a lecturer in the theoretical part of Computer Science, I am also a passionate
 | 
| 154 |     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] Regular Expression Matching and Partial Derivatives</H4>
 | 
|  |     46 | 
 | 
|  |     47 |   <p>
 | 
|  |     48 |   <B>Description:</b>  
 | 
|  |     49 |   <A HREF="http://en.wikipedia.org/wiki/Regular_expression">Regular expressions</A> 
 | 
| 164 |     50 |   are extremely useful for many text-processing tasks such as finding patterns in texts,
 | 
| 154 |     51 |   lexing programs, syntax highlighting and so on. Given that regular expressions were
 | 
|  |     52 |   introduced in 1950 by <A HREF="http://en.wikipedia.org/wiki/Stephen_Cole_Kleene">Stephen Kleene</A>, you might think 
 | 
| 163 |     53 |   regular expressions have since been studied and implemented to death. But you would definitely be mistaken: in fact they are still
 | 
| 154 |     54 |   an active research area. For example
 | 
|  |     55 |   <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">this paper</A> 
 | 
|  |     56 |   about regular expression matching and partial derivatives was presented this summer at the international 
 | 
| 163 |     57 |   PPDP'12 conference. The task in this project is to implement the results from this paper.</p>
 | 
| 154 |     58 | 
 | 
|  |     59 |   <p>The background for this project is that some regular expressions are 
 | 
| 165 |     60 |   “<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>”
 | 
|  |     61 |   and can “stab you in the back” according to
 | 
| 163 |     62 |   this <A HREF="http://tech.blog.cueup.com/regular-expressions-will-stab-you-in-the-back">blog post</A>.
 | 
| 154 |     63 |   For example, if you use in <A HREF="http://www.python.org">Python</A> or 
 | 
|  |     64 |   in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (probably also in other mainstream programming languages) the 
 | 
|  |     65 |   innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string 
 | 
| 155 |     66 |   <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact,
 | 
| 163 |     67 |   Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself:
 | 
| 154 |     68 |   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/re.py">re.py</A> (Python version) and 
 | 
|  |     69 |   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/re-internal.rb">re.rb</A> 
 | 
|  |     70 |   (Ruby version). You can imagine an attacker
 | 
|  |     71 |   mounting a nice <A HREF="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attack</A> against 
 | 
| 165 |     72 |   your program if it contains such an “evil” regular expression. Actually 
 | 
| 154 |     73 |   <A HREF="http://www.scala-lang.org/">Scala</A> (and also Java) are almost immune from such
 | 
|  |     74 |   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
 | 
| 163 |     75 |   the regular expression and string further to, say, 4,600 <code>a</code>s, then you get a <code>StackOverflowError</code> 
 | 
| 164 |     76 |   potentially crashing your program.
 | 
| 154 |     77 |   </p>
 | 
|  |     78 | 
 | 
|  |     79 |   <p>
 | 
|  |     80 |   On a rainy afternoon, I implemented 
 | 
|  |     81 |   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/re3.scala">this</A> 
 | 
|  |     82 |   regular expression matcher in Scala. It is not as fast as the official one in Scala, but
 | 
|  |     83 |   it can match up to 11,000 <code>a</code>s in less than 5 seconds  without raising any exception
 | 
|  |     84 |   (remember Python and Ruby both need nearly 30 seconds to process 28(!) <code>a</code>s, and Scala's
 | 
| 164 |     85 |   official matcher maxes out at 4,600 <code>a</code>s). My matcher is approximately
 | 
| 154 |     86 |   85 lines of code and based on the concept of 
 | 
| 164 |     87 |   <A HREF="http://lambda-the-ultimate.org/node/2293">derivatives of regular expressions</A>.
 | 
| 156 |     88 |   These derivatives were introduced in 1964 by <A HREF="http://en.wikipedia.org/wiki/Janusz_Brzozowski_(computer_scientist)">
 | 
| 154 |     89 |   Janusz Brzozowski</A>, but according to this 
 | 
| 165 |     90 |   <A HREF="http://www.cl.cam.ac.uk/~so294/documents/jfp09.pdf">paper</A> had been lost in the “sands of time”.
 | 
| 154 |     91 |   The advantage of derivatives is that they side-step completely the usual 
 | 
|  |     92 |   <A HREF="http://hackingoff.com/compilers/regular-expression-to-nfa-dfa">translations</A> of regular expressions
 | 
|  |     93 |   into NFAs or DFAs, which can introduce the exponential behaviour exhibited by the regular
 | 
|  |     94 |   expression matchers in Python and Ruby.
 | 
|  |     95 |   </p>
 | 
|  |     96 | 
 | 
|  |     97 |   <p>
 | 
|  |     98 |   Now the guys from the 
 | 
|  |     99 |   <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">PPDP'12-paper</A> mentioned 
 | 
|  |    100 |   above claim they are even faster than me and can deal with even more features of regular expressions
 | 
| 163 |    101 |   (for example subexpression matching, which my rainy-afternoon matcher cannot). I am sure they thought
 | 
| 154 |    102 |   about the problem much longer than a single afternoon. The task 
 | 
|  |    103 |   in this project is to find out how good they actually are by implementing the results from their paper. 
 | 
|  |    104 |   Their approach is based on the concept of partial derivatives introduced in 1994 by
 | 
|  |    105 |   <A HREF="http://reference.kfupm.edu.sa/content/p/a/partial_derivatives_of_regular_expressio_1319383.pdf">Valentin Antimirov</A>.
 | 
| 156 |    106 |   I used them once myself in a <A HREF="http://www.inf.kcl.ac.uk/staff/urbanc/Publications/rexp.pdf">paper</A> 
 | 
|  |    107 |   in order to prove the <A HREF="http://en.wikipedia.org/wiki/Myhill–Nerode_theorem">Myhill-Nerode theorem</A>.
 | 
| 157 |    108 |   So I know they are worth their money. Still, it would be interesting to actually compare their results
 | 
| 165 |    109 |   with my simple rainy-afternoon matcher and potentially “blow away” the regular expression matchers 
 | 
| 163 |    110 |   in Python and Ruby (and possibly in Scala too).
 | 
| 154 |    111 |   </p>
 | 
|  |    112 | 
 | 
|  |    113 |   <p>
 | 
|  |    114 |   <B>Literature:</B> 
 | 
|  |    115 |   The place to start with this project is obviously this
 | 
|  |    116 |   <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">paper</A>.
 | 
|  |    117 |   Traditional methods for regular expression matching are explained
 | 
| 159 |    118 |   in the Wikipedia articles 
 | 
| 154 |    119 |   <A HREF="http://en.wikipedia.org/wiki/DFA_minimization">here</A> and 
 | 
|  |    120 |   <A HREF="http://en.wikipedia.org/wiki/Powerset_construction">here</A>.
 | 
|  |    121 |   The authoritative <A HREF="http://infolab.stanford.edu/~ullman/ialc.html">book</A>
 | 
|  |    122 |   on automata and regular expressions is by John Hopcroft and Jeffrey Ullmann (available in the library). 
 | 
|  |    123 |   There is also an online course about this topic by Ullman at 
 | 
|  |    124 |   <A HREF="https://www.coursera.org/course/automata">Coursera</A>, though IMHO not 
 | 
|  |    125 |   done with love. 
 | 
|  |    126 |   Finally, there are millions of other pointers about regular expression
 | 
| 165 |    127 |   matching on the Net. Test cases for “<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>”
 | 
| 154 |    128 |   regular expressions can be obtained from <A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">here</A>.
 | 
|  |    129 |   </p>
 | 
|  |    130 | 
 | 
|  |    131 |   <p>
 | 
|  |    132 |   <B>Skills:</B> 
 | 
|  |    133 |   This is a project for a student with an interest in theory and some
 | 
|  |    134 |   reasonable programming skills. The project can be easily implemented
 | 
|  |    135 |   in languages like
 | 
|  |    136 |   <A HREF="http://www.scala-lang.org/">Scala</A>,
 | 
|  |    137 |   <A HREF="http://en.wikipedia.org/wiki/Standard_ML">ML</A>,  
 | 
|  |    138 |   <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>, 
 | 
|  |    139 |   <A HREF="http://www.python.org">Python</A>, etc.
 | 
|  |    140 |   </p>
 | 
|  |    141 | 
 | 
| 160 |    142 | 
 | 
| 161 |    143 | <li> <H4>[CU2] Automata Theory in Your Web-Browser</H4>
 | 
| 160 |    144 | 
 | 
| 162 |    145 | <p>
 | 
| 164 |    146 | This project is about web-programming (but not in Java):
 | 
|  |    147 | There are a number of classic algorithms in automata theory (such as the 
 | 
|  |    148 | <A HREF="http://hackingoff.com/compilers/regular-expression-to-nfa-dfa">transformation</A> of regular
 | 
|  |    149 | expressions into NFAs and DFAs, 
 | 
|  |    150 | <A HREF="http://en.wikipedia.org/wiki/DFA_minimization">automata minimisation</A>, 
 | 
|  |    151 | <A HREF="http://en.wikipedia.org/wiki/Powerset_construction">subset construction</A>). 
 | 
|  |    152 | All these algorithms involve a fair 
 | 
|  |    153 | amount of calculations, which cannot be easily done by hand. There are a few web applications, typically
 | 
|  |    154 | written in <A HREF="http://en.wikipedia.org/wiki/JavaScript">Javascript</A>,  that animate these 
 | 
| 163 |    155 | calculations, for example <A HREF="http://hackingoff.com/compilers/regular-expression-to-nfa-dfa">this one<A/>.
 | 
| 164 |    156 | But they all have their deficiencies and can be improved with more modern technology.
 | 
| 166 |    157 | An instance is the impressive animation of Phython code found 
 | 
|  |    158 | <A HREF="http://www.pythontutor.com">here</A>. 
 | 
| 163 |    159 | </p>
 | 
|  |    160 | 
 | 
|  |    161 | <p>
 | 
| 164 |    162 | There now many useful libraries for JavaScript, for example, this 
 | 
|  |    163 | <A HREF="http://getspringy.com">one</A> for graphs or this 
 | 
|  |    164 | <A HREF="http://demos.bonsaijs.org/demos/star/index.html">one</A> for graphics. 
 | 
|  |    165 | 
 | 
|  |    166 | There are also
 | 
|  |    167 | a number of new programming languages targeting JavaScript, for example
 | 
|  |    168 | <A HREF="http://www.typescriptlang.org">TypeScript</A>,
 | 
|  |    169 | <A HREF="http://coffeescript.org">CoffeeScript</A>, 
 | 
|  |    170 | <A HREF="http://www.dartlang.org">Dart</A>,
 | 
|  |    171 | <A HREF="http://scriptsharp.com">Script#</A>,
 | 
|  |    172 | <A HREF="http://clojure.org">Clojure</A>
 | 
|  |    173 |  and so on.
 | 
|  |    174 | The task in this project is to use a web-programming
 | 
|  |    175 | language and suitable library to animate algorithms from automata theory (and also parsing, if wanted).
 | 
|  |    176 | This project is for someone who
 | 
|  |    177 | want to get to know these new languages.
 | 
| 163 |    178 | </p>
 | 
|  |    179 | 
 | 
|  |    180 |   <B>Literature:</B> 
 | 
|  |    181 |   The same general literature as in [CU1].
 | 
|  |    182 |   </p>  
 | 
|  |    183 | 
 | 
|  |    184 | <p>
 | 
| 162 |    185 |   <B>Skills:</B> 
 | 
| 164 |    186 |   This is a project for a student with very good programming 
 | 
|  |    187 |   and <A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacking</A> skills. 
 | 
| 165 |    188 |   Some knowledge in JavaScript, HTML and CSS cannot hurt. The algorithms from automata
 | 
| 164 |    189 |   theory are fairly standard material.
 | 
| 162 |    190 |   </p>
 | 
|  |    191 | 
 | 
|  |    192 | 
 | 
| 154 |    193 | <!--
 | 
|  |    194 | <li> <H4>[CU2] Equivalence Checking of Regular Expressions</H4>
 | 
|  |    195 | 
 | 
|  |    196 |   <p>
 | 
|  |    197 |   <B>Description:</b>  
 | 
|  |    198 |   Solving the problem of deciding the equivalence of regular expressions can be used
 | 
|  |    199 |   to decide a number of problems in automated reasoning. Recently, 
 | 
|  |    200 |   <A HREF="http://www.cs.unibo.it/~asperti/">Andreas Asperti</A>
 | 
|  |    201 |   proposed a simple method for deciding regular expression equivalence described
 | 
|  |    202 |   <A HREF="http://www.cs.unibo.it/~asperti/PAPERS/compact.pdf">here</A>. 
 | 
|  |    203 |   The task is to implement this method and test it on examples.
 | 
|  |    204 |   It would be also interesting to see whether Asperti's method applies to
 | 
|  |    205 |   extended regular expressions, described
 | 
|  |    206 |   <A HREF="http://ww2.cs.mu.oz.au/~sulzmann/manuscript/reg-exp-partial-derivatives.pdf">here</A>.
 | 
|  |    207 |   </p>
 | 
|  |    208 | 
 | 
|  |    209 |   <p>
 | 
|  |    210 |   <B>Literature:</B> 
 | 
|  |    211 |   The central literature is obviously the papers
 | 
|  |    212 |   <A HREF="http://www.cs.unibo.it/~asperti/PAPERS/compact.pdf">here</A> and
 | 
|  |    213 |   <A HREF="http://ww2.cs.mu.oz.au/~sulzmann/manuscript/reg-exp-partial-derivatives.pdf">here</A>.
 | 
|  |    214 |   Asperti has also some slides <A HREF="http://www.cs.unibo.it/~asperti/SLIDES/regular.pdf">here</a>.
 | 
|  |    215 |   More references about regular expressions can be found
 | 
|  |    216 |   <A HREF="http://en.wikipedia.org/wiki/Regular_expression">here</A>. Like in
 | 
|  |    217 |   [CU1], I will give a lot of the background pf this project in
 | 
|  |    218 |   my Automata and Formal Languages course (6CCS3AFL).
 | 
|  |    219 |   </p>  
 | 
|  |    220 | 
 | 
|  |    221 |   <p>
 | 
|  |    222 |   <B>Skills:</B> 
 | 
|  |    223 |   This is a project for a student with a passion for theory and some
 | 
|  |    224 |   reasonable programming skills. The project can be easily implemented
 | 
|  |    225 |   in languages like Scala
 | 
|  |    226 |   <A HREF="http://www.scala-lang.org/">Scala</A>,
 | 
|  |    227 |   <A HREF="http://en.wikipedia.org/wiki/Standard_ML">ML</A>,  
 | 
|  |    228 |   <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>, 
 | 
|  |    229 |   <A HREF="http://www.python.org">Python</A>, etc.
 | 
|  |    230 |   Being able to read <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>
 | 
|  |    231 |   code is beneficial for the part involving extended regular expressions.
 | 
|  |    232 |   </p>
 | 
|  |    233 | -->
 | 
|  |    234 | 
 | 
|  |    235 | <li> <H4>[CU3] Machine Code Generation for a Simple Compiler</H4>
 | 
|  |    236 | 
 | 
|  |    237 |   <p>
 | 
|  |    238 |   <b>Description:</b> 
 | 
| 163 |    239 |   Compilers translate high-level programs that humans can read into
 | 
| 154 |    240 |   efficient machine code that can be run on a CPU or virtual machine.
 | 
|  |    241 |   I recently implemented a very simple compiler for a very simple functional
 | 
|  |    242 |   programming language following this 
 | 
|  |    243 |   <A HREF="http://www.cs.princeton.edu/~dpw/papers/tal-toplas.pdf">paper</A> 
 | 
|  |    244 |   (also described <A HREF="http://www.cs.princeton.edu/~dpw/papers/tal-tr.pdf">here</A>).
 | 
|  |    245 |   My code, written in <A HREF="http://www.scala-lang.org/">Scala</A>, of this compiler is 
 | 
|  |    246 |   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/compiler.scala">here</A>.
 | 
|  |    247 |   The compiler can deal with simple programs involving natural numbers, such
 | 
| 163 |    248 |   as Fibonacci 
 | 
| 154 |    249 |   or factorial (but it can be easily extended - that is not the point).
 | 
|  |    250 |   </p>
 | 
|  |    251 | 
 | 
|  |    252 |   <p>
 | 
|  |    253 |   While the hard work has been done (understanding the two papers above),
 | 
|  |    254 |   my compiler only produces some idealised machine code. For example I
 | 
|  |    255 |   assume there are infinitely many registers. The goal of this
 | 
|  |    256 |   project is to generate machine code that is more realistic and can
 | 
|  |    257 |   run on a CPU, like x86, or run on a virtual machine, say the JVM. 
 | 
|  |    258 |   This gives probably a speedup of thousand times in comparison to
 | 
|  |    259 |   my naive machine code and virtual machine. The project
 | 
|  |    260 |   requires to dig into the literature about real CPUs and generating 
 | 
|  |    261 |   real machine code. 
 | 
|  |    262 |   </p>
 | 
|  |    263 | 
 | 
|  |    264 |   <p>
 | 
|  |    265 |   <B>Literature:</B>
 | 
|  |    266 |   There is a lot of literature about compilers 
 | 
|  |    267 |   (for example <A HREF="http://www.cs.princeton.edu/~appel/papers/cwc.html">this book</A> -
 | 
|  |    268 |   I can lend you my copy for the duration of the project). A very good overview article
 | 
|  |    269 |   about implementing compilers by 
 | 
|  |    270 |   <A HREF="http://tratt.net/laurie/">Laurie Tratt</A> is 
 | 
|  |    271 |   <A HREF="http://tratt.net/laurie/tech_articles/articles/how_difficult_is_it_to_write_a_compiler">here</A>.
 | 
|  |    272 |   An introduction into x86 machine code is <A HREF="http://ianseyler.github.com/easy_x86-64/">here</A>.
 | 
|  |    273 |   Intel's official manual for the x86 instruction is 
 | 
|  |    274 |   <A HREF="http://download.intel.com/design/intarch/manuals/24319101.pdf">here</A>. 
 | 
|  |    275 |   A simple assembler for the JVM is described <A HREF="http://jasmin.sourceforge.net">here</A>.
 | 
|  |    276 |   An interesting twist of this project is to not generate code for a CPU, but
 | 
|  |    277 |   for the intermediate language of the <A HREF="http://llvm.org">LLVM</A> compiler
 | 
|  |    278 |   (also described <A HREF="https://wiki.aalto.fi/display/t1065450/LLVM+IR">here</A> and
 | 
|  |    279 |   <A HREF="http://llvm.org/docs/LangRef.html">here</A>). If you want to see
 | 
|  |    280 |   what machine code looks like you can compile your C-program using gcc -S.
 | 
|  |    281 |   </p>
 | 
|  |    282 | 
 | 
|  |    283 |   <p>
 | 
|  |    284 |   <B>Skills:</B> 
 | 
|  |    285 |   This is a project for a student with a deep interest in programming languages and
 | 
|  |    286 |   compilers. Since my compiler is implemented in <A HREF="http://www.scala-lang.org/">Scala</A>,
 | 
|  |    287 |   it would make sense to continue this project in this language. I can be
 | 
|  |    288 |   of help with questions and books about <A HREF="http://www.scala-lang.org/">Scala</A>.
 | 
| 163 |    289 |   But if Scala is a problem, my code can also be translated quickly into any other
 | 
| 154 |    290 |   language. 
 | 
|  |    291 |   </p>
 | 
|  |    292 | 
 | 
|  |    293 | <li> <H4>[CU4] Implementation of Register Spilling Algorithms</H4>
 | 
|  |    294 |   
 | 
|  |    295 |   <p>
 | 
|  |    296 |   <b>Description:</b> 
 | 
|  |    297 |   This project is similar to [CU3]. The emphasis here, however, is on the
 | 
|  |    298 |   implementation and comparison of register spilling algorithms, also often called register allocation 
 | 
|  |    299 |   algorithms. They are part of any respectable compiler.  As said
 | 
| 165 |    300 |   in [CU3] my simple compiler lacks them and assumes an infinite amount of registers instead.
 | 
| 154 |    301 |   Real CPUs however only provide a fixed amount of registers (for example
 | 
|  |    302 |   x86-64 has 16 general purpose registers). Whenever a program needs
 | 
|  |    303 |   to hold more values than registers, the values need to be “spilled”
 | 
|  |    304 |   into the main memory. Register spilling algorithms try to minimise
 | 
|  |    305 |   this spilling, since fetching values from main memory is a costly 
 | 
|  |    306 |   operation. 
 | 
|  |    307 |   </p>
 | 
|  |    308 | 
 | 
|  |    309 |   <p>
 | 
|  |    310 |   The classic algorithm for register spilling uses a
 | 
|  |    311 |   <A HREF="http://en.wikipedia.org/wiki/Register_allocation">graph-colouring method</A>.
 | 
|  |    312 |   However, for some time the <A HREF="http://llvm.org">LLVM</A> compiler
 | 
|  |    313 |   used a supposedly more efficient method, called the linear scan allocation method
 | 
|  |    314 |   (described 
 | 
|  |    315 |   <A HREF="http://www.cs.ucla.edu/~palsberg/course/cs132/linearscan.pdf">here</A>).
 | 
|  |    316 |   However, it was later decided to abandon this method in favour of 
 | 
|  |    317 |   a <A HREF="http://blog.llvm.org/2011/09/greedy-register-allocation-in-llvm-30.html">
 | 
|  |    318 |   greedy register allocation</A> method. It would be nice if this project can find out
 | 
|  |    319 |   what the issues are with these methods and implement at least one of them for the 
 | 
|  |    320 |   simple compiler referenced in [CU3].
 | 
|  |    321 |   </p>
 | 
|  |    322 | 
 | 
|  |    323 |   <p>
 | 
|  |    324 |   <B>Literature:</B> 
 | 
|  |    325 |   The graph colouring method is described in Andrew Appel's 
 | 
|  |    326 |   <A HREF="http://www.cs.princeton.edu/~appel/modern/java/">book</A> on compilers
 | 
|  |    327 |   (I can give you my copy of this book, if it is not available in the library).
 | 
|  |    328 |   There is also a survey 
 | 
|  |    329 |   <A HREF="http://compilers.cs.ucla.edu/fernando/publications/drafts/survey.pdf">article</A> 
 | 
|  |    330 |   about register allocation algorithms with further pointers.
 | 
|  |    331 |   </p>
 | 
|  |    332 | 
 | 
|  |    333 |   <p>
 | 
|  |    334 |   <B>Skills:</B> 
 | 
|  |    335 |   Same skills as [CU3].
 | 
|  |    336 |   </p>
 | 
|  |    337 | 
 | 
|  |    338 | <li> <H4>[CU5] A Student Polling System</H4>
 | 
|  |    339 | 
 | 
|  |    340 |   <p>
 | 
|  |    341 |   <B>Description:</B>
 | 
|  |    342 |   One of the more annoying aspects of giving a lecture is to ask a question
 | 
|  |    343 |   to the students and no matter how easy the questions is to not 
 | 
|  |    344 |   receive an answer. Recently, the online course system 
 | 
|  |    345 |   <A HREF="http://www.udacity.com">Udacity</A> made an art out of
 | 
|  |    346 |   asking questions during lectures (see for example the
 | 
|  |    347 |   <A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A> 
 | 
|  |    348 |   course CS253).
 | 
|  |    349 |   The lecturer there gives multiple-choice questions as part of the lecture and the students need to 
 | 
|  |    350 |   click on the appropriate answer. This works very well in the online world. 
 | 
|  |    351 |   For  “real-world” lectures, the department has some 
 | 
|  |    352 |   <A HREF="http://en.wikipedia.org/wiki/Audience_response">clickers</A>
 | 
|  |    353 |   (these are little devices part of an audience response systems). However, 
 | 
|  |    354 |   they are a logistic nightmare for the lecturer: they need to be distributed 
 | 
|  |    355 |   during the lecture and collected at the end. Nowadays, where students
 | 
|  |    356 |   come with their own laptop or smartphone to lectures, this can
 | 
|  |    357 |   be improved.
 | 
|  |    358 |   </p>
 | 
|  |    359 | 
 | 
|  |    360 |   <p>
 | 
|  |    361 |   The task of this project is to implement an online student
 | 
|  |    362 |   polling system. The lecturer should be able to prepare 
 | 
|  |    363 |   questions beforehand (encoded as some web-form) and be able to 
 | 
|  |    364 |   show them during the lecture. The students
 | 
|  |    365 |   can give their answers by clicking on the corresponding webpage.
 | 
|  |    366 |   The lecturer can then collect the responses online and evaluate them 
 | 
|  |    367 |   immediately. Such a system is sometimes called
 | 
|  |    368 |   <A HREF="http://en.wikipedia.org/wiki/Audience_response#Smartphone_.2F_HTTP_voting">HTML voting</A>. 
 | 
|  |    369 |   There are a number of commercial
 | 
|  |    370 |   solutions for this problem, but they are not easy to use (in addition
 | 
|  |    371 |   to being ridiculously expensive). A good student can easily improve upon
 | 
|  |    372 |   what they provide. 
 | 
|  |    373 |   </p>
 | 
|  |    374 | 
 | 
|  |    375 |   <p>
 | 
|  |    376 |   The problem of student polling is not as hard as 
 | 
|  |    377 |   <A HREF="http://en.wikipedia.org/wiki/Electronic_voting">electronic voting</A>, 
 | 
|  |    378 |   which essentially is still an unsolved problem in Computer Science. The
 | 
|  |    379 |   students only need to be prevented from answering question more than once thus skewing
 | 
|  |    380 |   any statistics. Unlike electronic voting, no audit trail needs to be kept
 | 
|  |    381 |   for student polling. Restricting the number of answers can probably be solved 
 | 
| 163 |    382 |   by setting appropriate cookies on the students'
 | 
| 154 |    383 |   computers or smart phones.
 | 
|  |    384 |   </p>
 | 
|  |    385 | 
 | 
|  |    386 |   <p>
 | 
| 163 |    387 |   However, there is one restriction that makes this project harder than it seems
 | 
| 165 |    388 |   at first sight: The department does not allow large server applications and databases
 | 
|  |    389 |   to be run on calcium, which is the central server in the department. So the problem 
 | 
|  |    390 |   should be solved with as few resources as possible 
 | 
|  |    391 |   on the “back-end” collecting the votes. 
 | 
| 163 |    392 |   </p>
 | 
|  |    393 | 
 | 
|  |    394 |   <p>
 | 
| 154 |    395 |   <B>Literature:</B> 
 | 
|  |    396 |   The project requires fluency in a web-programming language (for example 
 | 
| 164 |    397 |   <A HREF="http://en.wikipedia.org/wiki/JavaScript">JavaScript</A>,
 | 
| 154 |    398 |   <A HREF="http://en.wikipedia.org/wiki/PHP">PHP</A>, 
 | 
|  |    399 |   Java, <A HREF="http://www.python.org">Python</A>, 
 | 
|  |    400 |   <A HREF="http://en.wikipedia.org/wiki/Go_(programming_language)">Go</A>, 
 | 
|  |    401 |   <A HREF="http://www.scala-lang.org/">Scala</A>,
 | 
| 163 |    402 |   <A HREF="http://en.wikipedia.org/wiki/Ruby_(programming_language)">Ruby</A>). 
 | 
| 154 |    403 |   For web-programming the 
 | 
|  |    404 |   <A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A>
 | 
|  |    405 |   course at <A HREF="http://www.udacity.com">Udacity</A> is a good starting point 
 | 
|  |    406 |   to be aware of the issues involved. This course uses <A HREF="http://www.python.org">Python</A>.
 | 
|  |    407 |   To evaluate the answers from the student, Google's 
 | 
|  |    408 |   <A HREF="https://developers.google.com/chart/image/docs/making_charts">Chart Tools</A>
 | 
| 164 |    409 |   might be useful, which are also described in this 
 | 
| 154 |    410 |   <A HREF="http://www.youtube.com/watch?v=NZtgT4jgnE8">youtube</A> video.
 | 
|  |    411 |   </p>
 | 
|  |    412 | 
 | 
|  |    413 |   <p>
 | 
|  |    414 |   <B>Skills:</B> 
 | 
| 163 |    415 |   This project needs very good web-programming skills. A 
 | 
| 154 |    416 |   <A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker mentality</A>
 | 
|  |    417 |   (see above) is probably very beneficial: web-programming is an area that only emerged recently and
 | 
|  |    418 |   many tools still lack maturity. You probably have to experiment a lot with several different
 | 
|  |    419 |   languages and tools.
 | 
|  |    420 |   </p>
 | 
|  |    421 | 
 | 
|  |    422 | <li> <H4>[CU6] Implementation of a Distributed Clock-Synchronisation Algorithm developed at NASA</H4>
 | 
|  |    423 |   
 | 
|  |    424 |   <p>
 | 
|  |    425 |   <B>Description:</B>
 | 
|  |    426 |   There are many algorithms for synchronising clocks. This
 | 
|  |    427 |   <A HREF="http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20120000054_2011025573.pdf">paper</A> 
 | 
| 164 |    428 |   describes a new algorithm developed by NASA for clocks that communicate by exchanging
 | 
| 154 |    429 |   messages and thereby reach a state in which (within some bound) all clocks are synchronised.
 | 
|  |    430 |   A slightly longer and more detailed paper about the algorithm is 
 | 
|  |    431 |   <A HREF="http://hdl.handle.net/2060/20110020812">here</A>.
 | 
| 164 |    432 |   The point of this project is to implement this algorithm and simulate a networks of clocks.
 | 
| 154 |    433 |   </p>
 | 
|  |    434 | 
 | 
|  |    435 |   <p>
 | 
|  |    436 |   <B>Literature:</B> 
 | 
| 164 |    437 |   There is a wide range of literature on clock synchronisation algorithms. 
 | 
| 154 |    438 |   Some pointers are given in this
 | 
|  |    439 |   <A HREF="http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20120000054_2011025573.pdf">paper</A>,
 | 
|  |    440 |   which describes the algorithm to be implemented in this project. Pointers
 | 
|  |    441 |   are given also <A HREF="http://en.wikipedia.org/wiki/Clock_synchronization">here</A>.
 | 
|  |    442 |   </p>
 | 
|  |    443 | 
 | 
|  |    444 |   <p>
 | 
|  |    445 |   <B>Skills:</B> 
 | 
|  |    446 |   In order to implement a simulation of a network of clocks, you need to tackle
 | 
|  |    447 |   concurrency. You can do this for example in the programming language
 | 
|  |    448 |   <A HREF="http://www.scala-lang.org/">Scala</A> with the help of the 
 | 
|  |    449 |   <A HREF="http://akka.io">Akka</a> library. This library enables you to send messages
 | 
|  |    450 |   between different <I>actors</I>. <A HREF="http://www.scala-lang.org/node/242">Here</A> 
 | 
|  |    451 |   are some examples that explain how to implement exchanging messages between actors. 
 | 
|  |    452 |   </p>
 | 
|  |    453 | 
 | 
|  |    454 | </ul>
 | 
|  |    455 | </TD>
 | 
|  |    456 | </TR>
 | 
|  |    457 | </TABLE>
 | 
|  |    458 | 
 | 
|  |    459 | <P>
 | 
|  |    460 | <!-- Created: Tue Mar  4 00:23:25 GMT 1997 -->
 | 
|  |    461 | <!-- hhmts start -->
 | 
|  |    462 | Last modified: Wed Sep 12 16:30:03 GMT 2012
 | 
|  |    463 | <!-- hhmts end -->
 | 
|  |    464 | <a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
 | 
|  |    465 | </BODY>
 | 
|  |    466 | </HTML>
 |