bsc-projects.html
changeset 651 e69c7e03bbd1
parent 617 03c19716590d
equal deleted inserted replaced
650:516240b57cfb 651:e69c7e03bbd1
     1 <?xml version="1.0" encoding="utf-8"?>
     1 <?xml version="1.0" encoding="utf-8"?>
     2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
     2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
     3 <HEAD>
     3 <HEAD>
     4 <TITLE>2018/19 BSc Projects</TITLE>
     4 <TITLE>BSc Projects</TITLE>
     5 <BASE HREF="https://nms.kcl.ac.uk/christian.urban/">
     5 <BASE HREF="https://nms.kcl.ac.uk/christian.urban/">
     6 <script type="text/javascript" src="striper.js"></script>
     6 <script type="text/javascript" src="striper.js"></script>
     7 <link rel="stylesheet" href="nominal.css">
     7 <link rel="stylesheet" href="nominal.css">
     8 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML">
     8 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML">
     9 </script>
     9 </script>
       
    10 <style>
       
    11 .note {
       
    12   font-size: 100%;
       
    13   color: "#4169E1" ;
       
    14 }
       
    15 </style>
    10 </HEAD>
    16 </HEAD>
    11 <BODY TEXT="#000000" 
    17 <BODY TEXT="#000000" 
    12       BGCOLOR="#4169E1" 
    18       BGCOLOR="#4169E1" 
    13       LINK="#0000EF" 
    19       LINK="#0000EF" 
    14       VLINK="#51188E" 
    20       VLINK="#51188E" 
    40     stretching their capabilities, as opposed to most users, who prefer to learn only the minimum 
    46     stretching their capabilities, as opposed to most users, who prefer to learn only the minimum 
    41     necessary.&rdquo; I am always happy to supervise like-minded students.
    47     necessary.&rdquo; I am always happy to supervise like-minded students.
    42 </H4>
    48 </H4>
    43 
    49 
    44 <H4>In 2013/14, I was nominated by the students
    50 <H4>In 2013/14, I was nominated by the students
    45     for the best BSc project supervisor and best MSc project supervisor awards in the NMS
    51     for the best BSc project supervisor and best MSc project supervisor awards in the NMES
    46     faculty. Somehow I won both. In 2014/15 I was nominated again for the best MSc
    52     faculty. Somehow I won both. In 2014/15 I was nominated again for the best MSc
    47     project supervisor, but did not win it. ;o)
    53     project supervisor, but did not win it. ;o)
    48 </H4>  
    54 </H4>  
    49 
    55 
    50 <ul class="striped">
    56 <ul class="striped">
   167   <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>, etc. Python and other non-functional languages
   173   <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>, etc. Python and other non-functional languages
   168   can be also used, but seem much less convenient. If you do attend my Compilers and Formal Languages
   174   can be also used, but seem much less convenient. If you do attend my Compilers and Formal Languages
   169   module, that would obviously give you a head-start with this project.
   175   module, that would obviously give you a head-start with this project.
   170   </p>
   176   </p>
   171 
   177 
   172 <li> <H4>[CU2] Grammars and Derivative-Based Parsing Algorithms</H4>
   178 <li> <H4>[CU1a] Grammars and Derivative-Based Parsing Algorithms</H4>
   173 
   179 
   174 <p>
   180 <p>
   175 Parsing is an old nut. Generations of software developers need to do parsing of data or text.
   181 Parsing is an old nut. Generations of software developers need to do parsing of data or text.
   176 There are zillions of links, tools, papers and textbooks about parsing. One particular
   182 There are zillions of links, tools, papers and textbooks about parsing. One particular
   177 <A HREF="https://dickgrune.com/Books/PTAPG_1st_Edition/BookBody.pdf">book</A> contains something
   183 <A HREF="https://dickgrune.com/Books/PTAPG_1st_Edition/BookBody.pdf">book</A> contains something
   198 <p>
   204 <p>
   199 <B>Skills:</B> See [CU1].
   205 <B>Skills:</B> See [CU1].
   200 </p>
   206 </p>
   201 
   207 
   202 
   208 
   203 <li> <H4>[CU3] A Compiler for a small Programming Language</H4>
   209 <li> <H4>[CU2] A Compiler for a small Programming Language</H4>
   204 
   210 
   205   <p>
   211   <p>
   206   <b>Description:</b> 
   212   <b>Description:</b> 
   207   Compilers translate high-level programs that humans can read and write into
   213   Compilers translate high-level programs that humans can read and write into
   208   efficient machine code that can be run on a CPU or virtual machine.
   214   efficient machine code that can be run on a CPU or virtual machine.
   209   A compiler for a simple functional language generating X86 code is described
   215   A compiler for a simple functional language generating assembly code is described
   210   <A HREF="https://libraries.io/github/chameco/Shade">here</A>.
   216   <A HREF="https://esumii.github.io/min-caml/paper.pdf">here</A>.
   211   I recently implemented a very simple compiler for an even simpler functional
   217   I recently implemented a very simple compiler for an even simpler functional
   212   programming language following this 
   218   programming language following this 
   213   <A HREF="https://www.cs.princeton.edu/~dpw/papers/tal-toplas.pdf">paper</A> 
   219   <A HREF="https://www.cs.princeton.edu/~dpw/papers/tal-toplas.pdf">paper</A> 
   214   (also described <A HREF="https://www.cs.princeton.edu/~dpw/papers/tal-tr.pdf">here</A>).
   220   (also described <A HREF="https://www.cs.princeton.edu/~dpw/papers/tal-tr.pdf">here</A>).
   215   My code, written in <A HREF="http://www.scala-lang.org/">Scala</A>, of this compiler is 
   221   My code, written in <A HREF="http://www.scala-lang.org/">Scala</A>, for this compiler is 
   216   <A HREF="https://nms.kcl.ac.uk/christian.urban/compiler.scala">here</A>.
   222   <A HREF="https://nms.kcl.ac.uk/christian.urban/SystemF-compiler.scala">here</A>.
   217   The compiler can deal with simple programs involving natural numbers, such
   223   The compiler can only deal with simple programs involving natural numbers, such
   218   as Fibonacci numbers or factorial (but it can be easily extended - that is not the point).
   224   as Fibonacci numbers or factorial function (but it can be easily extended - that is not the point).
       
   225   The interesting feature in this compiler is that it can also deal with closure conversions and hoisting of
       
   226   nested functions. 
   219   </p>
   227   </p>
   220 
   228 
   221   <p>
   229   <p>
   222   While the hard work has been done (understanding the two papers above),
   230   While the hard work has been done (understanding the two papers above),
   223   my compiler only produces some idealised machine code. For example I
   231   my compiler only produces some idealised machine code. For example I
   224   assume there are infinitely many registers. The goal of this
   232   assume there are infinitely many registers. The goal of this
   225   project is to generate machine code that is more realistic and can
   233   project is to generate machine code that is more realistic and can
   226   run on a CPU, like X86, or run on a virtual machine, say the JVM. 
   234   run on a CPU, like X86, or run on a virtual machine, say the JVM.
       
   235   You could also compile to the LLVM-IR.
   227   This gives probably a speedup of thousand times in comparison to
   236   This gives probably a speedup of thousand times in comparison to
   228   my naive machine code and virtual machine. The project
   237   my naive machine code and tiny virtual machine. The project
   229   requires to dig into the literature about real CPUs and generating 
   238   requires to dig into the literature about real  machine code. 
   230   real machine code. 
       
   231   </p>
   239   </p>
   232   <p>
   240   <p>
   233   An alternative is to not generate machine code, but build a compiler that compiles to
   241   An alternative is to not generate machine code, but build a compiler that compiles to
   234   <A HREF="http://www.w3schools.com/js/">JavaScript</A>. This is the language that is supported by most
   242   <A HREF="http://www.w3schools.com/js/">JavaScript</A>. This is the language that is supported by most
   235   browsers and therefore is a favourite
   243   browsers and therefore is a favourite
   238   languages to program in (being designed and released in a hurry). <B>But</B> it can be used as a convenient target
   246   languages to program in (being designed and released in a hurry). <B>But</B> it can be used as a convenient target
   239   for translating programs from other languages. In particular there are two
   247   for translating programs from other languages. In particular there are two
   240   very optimised subsets of JavaScript that can be used for this purpose:
   248   very optimised subsets of JavaScript that can be used for this purpose:
   241   one is <A HREF="http://asmjs.org">asm.js</A> and the other is
   249   one is <A HREF="http://asmjs.org">asm.js</A> and the other is
   242   <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>. Since
   250   <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>. Since
   243   last year there is even the official <A HREF="http://webassembly.org">Webassembly</A>
   251   a few year ago there is even the official <A HREF="http://webassembly.org">Webassembly</A>
   244   There is a <A HREF="http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html">tutorial</A> for emscripten
   252   There is a <A HREF="http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html">tutorial</A> for emscripten
   245   and an impressive <A HREF="https://youtu.be/c2uNDlP4RiE">demo</A> which runs the
   253   and an impressive <A HREF="https://youtu.be/c2uNDlP4RiE">demo</A> which runs the
   246   <A HREF="http://en.wikipedia.org/wiki/Unreal_Engine">Unreal Engine 3</A>
   254   <A HREF="http://en.wikipedia.org/wiki/Unreal_Engine">Unreal Engine 3</A>
   247   in a browser with spectacular speed. This was achieved by compiling the
   255   in a browser with spectacular speed. This was achieved by compiling the
   248   C-code of the Unreal Engine to the LLVM intermediate language and then translating the LLVM
   256   C-code of the Unreal Engine to the LLVM intermediate language and then translating the LLVM
   249   code to JavaScript.
   257   code to JavaScript/Webassembly.
   250   </p>
   258   </p>
   251 
   259 
   252   <p>
   260   <p>
   253   <B>Literature:</B>
   261   <B>Literature:</B>
   254   There is a lot of literature about compilers 
   262   There is a lot of literature about compilers 
   269   for the intermediate language of the <A HREF="http://llvm.org">LLVM</A> compiler
   277   for the intermediate language of the <A HREF="http://llvm.org">LLVM</A> compiler
   270   (also described <A HREF="http://llvm.org/docs/LangRef.html">here</A>). If you want to see
   278   (also described <A HREF="http://llvm.org/docs/LangRef.html">here</A>). If you want to see
   271   what machine code looks like you can compile your C-program using gcc -S.
   279   what machine code looks like you can compile your C-program using gcc -S.
   272   </p>
   280   </p>
   273   <p>
   281   <p>
   274   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.
   282     If JavaScript is chosen as a target instead, then there are plenty of
       
   283     <A HREF="http://www.w3schools.com/js/">tutorials</A> on the Web.
   275   <A HREF="http://jsbooks.revolunet.com">Here</A> is a list of free books on JavaScript.
   284   <A HREF="http://jsbooks.revolunet.com">Here</A> is a list of free books on JavaScript.
   276   A project from which you can draw inspiration is this
   285   A project from which you can draw inspiration is this
   277   <A HREF="http://jlongster.com/Outlet--My-Lisp-to-Javascript-Experiment">Lisp-to-JavaScript</A>
   286   <A HREF="http://jlongster.com/Outlet--My-Lisp-to-Javascript-Experiment">Lisp-to-JavaScript</A>
   278   translator. <A HREF="https://bitbucket.org/ktg/parenjs/overview">Here</A> is another such project.
   287   translator. <A HREF="https://bitbucket.org/ktg/parenjs/overview">Here</A> is another such project.
   279   And <A HREF="https://github.com/viclib/liscript">another</A> in less than 100 lines of code.
   288   And <A HREF="https://github.com/viclib/liscript">another</A> in less than 100 lines of code.
   295   my Compiler and Formal Language module (6CCS3CFL).
   304   my Compiler and Formal Language module (6CCS3CFL).
   296   </p>
   305   </p>
   297 
   306 
   298   <p>
   307   <p>
   299   <B>PS:</B> Compiler projects consistently received high marks in the past.
   308   <B>PS:</B> Compiler projects consistently received high marks in the past.
   300   I have supervised eight so far and most of them received a mark above 70% - one even was awarded a prize.
   309   I have supervised eight so far and many of them received a mark above 70% - one even was awarded a prize.
   301   </p>
   310   However in order to achieve anything better than a passing mark, you need to go beyond the
   302 
   311   compiler presented in the CFL-module. For example you could implement
   303 <li> <H4>[CU4] Webassembly Interpreter / Compiler</H4>
   312 
       
   313   <ol class="note">
       
   314     <li>first-class functions and closure conversions</li>
       
   315     <li>recursive datatypes</li>
       
   316     <li>interesting type-systems</li>
       
   317   </ol>
       
   318   </p>
       
   319 
       
   320 <li> <H4>[CU2a] Webassembly Interpreter / Compiler</H4>
   304 
   321 
   305 <p>
   322 <p>
   306 Webassembly is a recently agreed standard for speeding up web applications in browsers. In this 
   323 Webassembly is a recently agreed standard for speeding up web applications in browsers. In this 
   307 project the aim is to implement an interpreter or compiler for webassembly. There are already
   324 project the aim is to implement an interpreter or compiler for webassembly. There are already
   308 <A HREF="https://github.com/WebAssembly/spec/tree/master/interpreter">reference interpreters</A>,
   325 <A HREF="https://github.com/WebAssembly/spec/tree/master/interpreter">reference interpreters</A>,
   317 </p>
   334 </p>
   318 <p>
   335 <p>
   319 <B>Skills:</B> See [CU1].
   336 <B>Skills:</B> See [CU1].
   320 </p>
   337 </p>
   321 
   338 
       
   339 <!--
   322 <li> <H4>[CU5] Slide-Making in the Web-Age</H4>
   340 <li> <H4>[CU5] Slide-Making in the Web-Age</H4>
   323 
   341 
   324   <p>
   342   <p>
   325   The standard technology for writing scientific papers in Computer Science  is to use
   343   The standard technology for writing scientific papers in Computer Science  is to use
   326   <A HREF="http://en.wikipedia.org/wiki/LaTeX">LaTeX</A>, a document preparation
   344   <A HREF="http://en.wikipedia.org/wiki/LaTeX">LaTeX</A>, a document preparation
   627 <li>Anything related to code books, like this
   645 <li>Anything related to code books, like this
   628    <A HREF="http://www.joelotter.com/kajero/">one</A>
   646    <A HREF="http://www.joelotter.com/kajero/">one</A>
   629 </ul>
   647 </ul>
   630 
   648 
   631 
   649 
   632 
       
   633 <li> <H4>Earlier Projects</H4>
   650 <li> <H4>Earlier Projects</H4>
   634 
   651 
   635  I am also open to project suggestions from you. You might find some inspiration from my earlier projects:
   652  I am also open to project suggestions from you. You might find some inspiration from my earlier projects:
   636  <A HREF="https://nms.kcl.ac.uk/christian.urban/bsc-projects-12.html">BSc 2012/13</A>, 
   653  <A HREF="https://nms.kcl.ac.uk/christian.urban/bsc-projects-12.html">BSc 2012/13</A>, 
   637  <A HREF="https://nms.kcl.ac.uk/christian.urban/msc-projects-12.html">MSc 2012/13</A>, 
   654  <A HREF="https://nms.kcl.ac.uk/christian.urban/msc-projects-12.html">MSc 2012/13</A>, 
   644  <A HREF="https://nms.kcl.ac.uk/christian.urban/bsc-projects-16.html">BSc 2016/17</A>,
   661  <A HREF="https://nms.kcl.ac.uk/christian.urban/bsc-projects-16.html">BSc 2016/17</A>,
   645  <A HREF="https://nms.kcl.ac.uk/christian.urban/msc-projects-16.html">MSc 2016/17</A>,
   662  <A HREF="https://nms.kcl.ac.uk/christian.urban/msc-projects-16.html">MSc 2016/17</A>,
   646  <A HREF="https://nms.kcl.ac.uk/christian.urban/bsc-projects-17.html">BSc 2017/18</A>,
   663  <A HREF="https://nms.kcl.ac.uk/christian.urban/bsc-projects-17.html">BSc 2017/18</A>,
   647  <A HREF="https://nms.kcl.ac.uk/christian.urban/msc-projects-17.html">MSc 2017/18</A>,
   664  <A HREF="https://nms.kcl.ac.uk/christian.urban/msc-projects-17.html">MSc 2017/18</A>,
   648  <A HREF="https://nms.kcl.ac.uk/christian.urban/bsc-projects-17.html">BSc 2018/19</A>
   665  <A HREF="https://nms.kcl.ac.uk/christian.urban/bsc-projects-17.html">BSc 2018/19</A>
       
   666 -->
   649 </ul>
   667 </ul>
   650 </TD>
   668 </TD>
   651 </TR>  
   669 </TR>  
   652 </TABLE>
   670 </TABLE>
   653         
   671