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