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