bsc-projects-17.html
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 09 Aug 2021 00:23:36 +0200
changeset 610 671c338c1fc7
parent 515 90b45f94927b
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
<HEAD>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
<TITLE>2017/18 BSc/MSci Projects</TITLE>
492
b158f911419b updated
Christian Urban <urbanc@in.tum.de>
parents: 491
diff changeset
     5
<BASE HREF="https://nms.kcl.ac.uk/christian.urban/">
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
<script type="text/javascript" src="striper.js"></script>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
<link rel="stylesheet" href="nominal.css">
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
</script>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
</HEAD>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
<BODY TEXT="#000000" 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
      BGCOLOR="#4169E1" 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
      LINK="#0000EF" 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
      VLINK="#51188E" 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
      ALINK="#FF0000"
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
      ONLOAD="striper('ul','striped','li','first,second')">
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
<TABLE WIDTH="100%" 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
       BGCOLOR="#4169E1" 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
       BORDER="0"   
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
       FRAME="border"  
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
       CELLPADDING="10"     
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
       CELLSPACING="2"
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
       RULES="all">
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
<TR>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
<TD BGCOLOR="#FFFFFF" 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
    WIDTH="75%" 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
    VALIGN="TOP">
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
<H2>2017/18 BSc/MSci Projects</H2>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
<H4>Supervisor: Christian Urban</H4> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
<H4>Email: christian dot urban at kcl dot ac dot uk,  Office: Bush House N7.07</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
<H4>If you are interested in a project, please send me an email and we can discuss details. Please include
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
a short description about your programming skills and Computer Science background in your first email. 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
Thanks.</H4> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
<H4>Note that besides being a lecturer at the theoretical end of Computer Science, I am also a passionate
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
    <A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker</A> &hellip;
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
    defined as &ldquo;a person who enjoys exploring the details of programmable systems and 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
    stretching their capabilities, as opposed to most users, who prefer to learn only the minimum 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
    necessary.&rdquo; I am always happy to supervise like-minded students.
484
36b7548c353a updated
Christian Urban <urbanc@in.tum.de>
parents: 483
diff changeset
    45
</H4>
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
484
36b7548c353a updated
Christian Urban <urbanc@in.tum.de>
parents: 483
diff changeset
    47
<H4>In 2013/14, I was nominated by the students
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
    for the best BSc project supervisor and best MSc project supervisor awards in the NMS
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
    faculty. Somehow I won both. In 2014/15 I was nominated again for the best MSc
484
36b7548c353a updated
Christian Urban <urbanc@in.tum.de>
parents: 483
diff changeset
    50
    project supervisor, but did not win it. ;o)
482
f0a42a598e4d updated
Christian Urban <urbanc@in.tum.de>
parents: 481
diff changeset
    51
</H4>  
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
<ul class="striped">
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
<li> <H4>[CU1] Regular Expressions, Lexing and Derivatives</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
  <B>Description:</b>  
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
  <A HREF="http://en.wikipedia.org/wiki/Regular_expression">Regular expressions</A> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
  are extremely useful for many text-processing tasks, such as finding patterns in hostile network traffic,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
  lexing programs, syntax highlighting and so on. Given that regular expressions were
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
  introduced in 1950 by <A HREF="http://en.wikipedia.org/wiki/Stephen_Cole_Kleene">Stephen Kleene</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
  you might think regular expressions have since been studied and implemented to death. But you would definitely be
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
  mistaken: in fact they are still an active research area. On the top of my head, I can give
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
  you at least ten research papers that appeared in the last few years.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
  For example
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
  <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/regex-parsing-derivatives.pdf">this paper</A> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
  about regular expression matching and derivatives was presented in 2014 at the international 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
  FLOPS conference. Another <A HREF="http://nms.kcl.ac.uk/christian.urban/Publications/posix.pdf">paper</A> by my PhD student and me was presented in 2016
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
  at the international ITP conference.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
  The task in this project is to implement these results and use them for lexing.</p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
  <p>The background for this project is that some regular expressions are 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
  &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
  and can &ldquo;stab you in the back&rdquo; according to
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
  this <A HREF="http://peterscott.github.io/2013/01/17/regular-expressions-will-stab-you-in-the-back/">blog post</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
  For example, if you use in <A HREF="http://www.python.org">Python</A> or 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
  in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (or also in a number of other mainstream programming languages) the 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
  innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
  <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
  Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself:
509
4e15afaadde0 updated
Christian Urban <urbanc@in.tum.de>
parents: 507
diff changeset
    81
  <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.py">catastrophic.py</A> (Python version) and 
4e15afaadde0 updated
Christian Urban <urbanc@in.tum.de>
parents: 507
diff changeset
    82
  <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.rb">catastrophic.rb</A> 
4e15afaadde0 updated
Christian Urban <urbanc@in.tum.de>
parents: 507
diff changeset
    83
  (Ruby version). Here is a similar problem in Java: <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.rb">catastrophic.java</A> 
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
  </p> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
  You can imagine an attacker
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
  mounting a nice <A HREF="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attack</A> against 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  your program if it contains such an &ldquo;evil&rdquo; regular expression. But it can also happen by accident:
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
  on 20 July 2016 the website <A HREF="http://stackstatus.net/post/147710624694/outage-postmortem-july-20-2016">Stack Exchange</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  was knocked offline because of an evil regular expression. One of their engineers talks about this in this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
  <A HREF="https://vimeo.com/112065252">video</A>. A similar problem needed to be fixed in the
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  <A HREF="http://davidvgalbraith.com/how-i-fixed-atom/">Atom</A> editor.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
  A few implementations of regular expression matchers are almost immune from such problems.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  For example, <A HREF="http://www.scala-lang.org/">Scala</A> can deal with strings of up to 4,300 <code>a</code>s in less than a second. But if you scale
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
  the regular expression and string further to, say, 4,600 <code>a</code>s, then you get a <code>StackOverflowError</code> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  potentially crashing your program. Moreover (beside the "minor" problem of being painfully slow) according to this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
  <A HREF="http://www.haskell.org/haskellwiki/Regex_Posix">report</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
  nearly all regular expression matchers using the POSIX rules are actually buggy.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
  On a rainy afternoon, I implemented 
509
4e15afaadde0 updated
Christian Urban <urbanc@in.tum.de>
parents: 507
diff changeset
   104
  <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re3.scala">this</A> 
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
  regular expression matcher in Scala. It is not as fast as the official one in Scala, but
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
  it can match up to 11,000 <code>a</code>s in less than 5 seconds  without raising any exception
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
  (remember Python and Ruby both need nearly 30 seconds to process 28(!) <code>a</code>s, and Scala's
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
  official matcher maxes out at 4,600 <code>a</code>s). My matcher is approximately
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
  85 lines of code and based on the concept of 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
  <A HREF="http://lambda-the-ultimate.org/node/2293">derivatives of regular expressions</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
  These derivatives were introduced in 1964 by <A HREF="http://en.wikipedia.org/wiki/Janusz_Brzozowski_(computer_scientist)">
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
  Janusz Brzozowski</A>, but according to this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
  <A HREF="https://www.cs.kent.ac.uk/people/staff/sao/documents/jfp09.pdf">paper</A> had been lost in the &ldquo;sands of time&rdquo;.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
  The advantage of derivatives is that they side-step completely the usual 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
  <A HREF="http://hackingoff.com/compilers/regular-expression-to-nfa-dfa">translations</A> of regular expressions
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
  into NFAs or DFAs, which can introduce the exponential behaviour exhibited by the regular
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
  expression matchers in Python, Java and Ruby.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
  Now the authors from the 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
  <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/regex-parsing-derivatives.pdf">FLOPS'14-paper</A> mentioned 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
  above claim they are even faster than me and can deal with even more features of regular expressions
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
  (for example subexpression matching, which my rainy-afternoon matcher cannot). I am sure they thought
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
  about the problem much longer than a single afternoon. The task 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
  in this project is to find out how good they actually are by implementing the results from their paper. 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
  Their approach to regular expression matching is also based on the concept of derivatives.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
  I used derivatives very successfully once for something completely different in a
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
  <A HREF="http://nms.kcl.ac.uk/christian.urban/Publications/rexp.pdf">paper</A> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
  about the <A HREF="http://en.wikipedia.org/wiki/Myhill–Nerode_theorem">Myhill-Nerode theorem</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
  So I know they are worth their money. Still, it would be interesting to actually compare their results
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
  with my simple rainy-afternoon matcher and potentially &ldquo;blow away&rdquo; the regular expression matchers 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
  in Python, Ruby and Java (and possibly in Scala too). The application would be to implement a fast lexer for
481
f1cde0b6cc30 updated
Christian Urban <urbanc@in.tum.de>
parents: 477
diff changeset
   134
  programming languages, or improve the network traffic analysers in the tools <A HREF="https://www.snort.org">Snort</A> and
f1cde0b6cc30 updated
Christian Urban <urbanc@in.tum.de>
parents: 477
diff changeset
   135
  <A HREF="https://www.bro.org">Bro</A>.
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
  <B>Literature:</B> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
  The place to start with this project is obviously this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
  <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/regex-parsing-derivatives.pdf">paper</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
  and this <A HREF="http://nms.kcl.ac.uk/christian.urban/Publications/posix.pdf">one</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
  Traditional methods for regular expression matching are explained
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
  in the Wikipedia articles 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
  <A HREF="http://en.wikipedia.org/wiki/DFA_minimization">here</A> and 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
  <A HREF="http://en.wikipedia.org/wiki/Powerset_construction">here</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
  The authoritative <A HREF="http://infolab.stanford.edu/~ullman/ialc.html">book</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
  on automata and regular expressions is by John Hopcroft and Jeffrey Ullmann (available in the library). 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
  There is also an online course about this topic by Ullman at 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
  <A HREF="https://www.coursera.org/course/automata">Coursera</A>, though IMHO not 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
  done with love. 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
  There are millions of other pointers about regular expression
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
  matching on the Web. I found the chapter on Lexing in this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
  <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A> very helpful. Finally, it will
511
55bc18956577 updated
cu
parents: 510
diff changeset
   155
  be of great help for this project to take part in my Compiler and Formal Language module (6CCS3CFL).
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
  Test cases for &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
  regular expressions can be obtained from <A HREF="http://www.haskell.org/haskellwiki/Regex_Posix">here</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
  <B>Skills:</B> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
  This is a project for a student with an interest in theory and with
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
  good programming skills. The project can be easily implemented
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164
  in functional languages like
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
  <A HREF="http://www.scala-lang.org/">Scala</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   166
  <A HREF="http://fsharp.org">F#</A>, 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
  <A HREF="http://en.wikipedia.org/wiki/Standard_ML">ML</A>,  
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
  <A HREF="http://haskell.org/haskellwiki/Haskell">Haskell</A>, etc. Python and other non-functional languages
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
  can be also used, but seem much less convenient. If you do attend my Compilers and Formal Languages
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
  module, that would obviously give you a head-start with this project.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
  
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
<li> <H4>[CU2] A Compiler for a small Programming Language</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   174
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   175
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   176
  <b>Description:</b> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   177
  Compilers translate high-level programs that humans can read and write into
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   178
  efficient machine code that can be run on a CPU or virtual machine.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179
  A compiler for a simple functional language generating X86 code is described
507
119c1a7b46ca updated
Christian Urban <urbanc@in.tum.de>
parents: 502
diff changeset
   180
  <A HREF="https://libraries.io/github/chameco/Shade">here</A>.
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   181
  I recently implemented a very simple compiler for an even simpler functional
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   182
  programming language following this 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   183
  <A HREF="https://www.cs.princeton.edu/~dpw/papers/tal-toplas.pdf">paper</A> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   184
  (also described <A HREF="https://www.cs.princeton.edu/~dpw/papers/tal-tr.pdf">here</A>).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
  My code, written in <A HREF="http://www.scala-lang.org/">Scala</A>, of this compiler is 
509
4e15afaadde0 updated
Christian Urban <urbanc@in.tum.de>
parents: 507
diff changeset
   186
  <A HREF="https://nms.kcl.ac.uk/christian.urban/compiler.scala">here</A>.
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   187
  The compiler can deal with simple programs involving natural numbers, such
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   188
  as Fibonacci numbers or factorial (but it can be easily extended - that is not the point).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   191
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   192
  While the hard work has been done (understanding the two papers above),
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   193
  my compiler only produces some idealised machine code. For example I
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   194
  assume there are infinitely many registers. The goal of this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   195
  project is to generate machine code that is more realistic and can
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   196
  run on a CPU, like X86, or run on a virtual machine, say the JVM. 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   197
  This gives probably a speedup of thousand times in comparison to
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   198
  my naive machine code and virtual machine. The project
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   199
  requires to dig into the literature about real CPUs and generating 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
  real machine code. 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
  An alternative is to not generate machine code, but build a compiler that compiles to
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   204
  <A HREF="http://www.w3schools.com/js/">JavaScript</A>. This is the language that is supported by most
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   205
  browsers and therefore is a favourite
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   206
  vehicle for Web-programming. Some call it <B>the</B> scripting language of the Web.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   207
  Unfortunately, JavaScript is also probably one of the worst
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   208
  languages to program in (being designed and released in a hurry). <B>But</B> it can be used as a convenient target
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   209
  for translating programs from other languages. In particular there are two
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   210
  very optimised subsets of JavaScript that can be used for this purpose:
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   211
  one is <A HREF="http://asmjs.org">asm.js</A> and the other is
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   212
  <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>. Since
481
f1cde0b6cc30 updated
Christian Urban <urbanc@in.tum.de>
parents: 477
diff changeset
   213
  last year there is even the official <A HREF="http://webassembly.org">Webassembly</A>
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   214
  There is a <A HREF="http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html">tutorial</A> for emscripten
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   215
  and an impressive <A HREF="https://youtu.be/c2uNDlP4RiE">demo</A> which runs the
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   216
  <A HREF="http://en.wikipedia.org/wiki/Unreal_Engine">Unreal Engine 3</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   217
  in a browser with spectacular speed. This was achieved by compiling the
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
  C-code of the Unreal Engine to the LLVM intermediate language and then translating the LLVM
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   219
  code to JavaScript.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   221
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   222
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   223
  <B>Literature:</B>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   224
  There is a lot of literature about compilers 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   225
  (for example <A HREF="http://www.cs.princeton.edu/~appel/papers/cwc.html">this book</A> -
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   226
  I can lend you my copy for the duration of the project, or this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   227
  <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A>). A very good overview article
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   228
  about implementing compilers by 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   229
  <A HREF="http://tratt.net/laurie/">Laurie Tratt</A> is 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   230
  <A HREF="http://tratt.net/laurie/tech_articles/articles/how_difficult_is_it_to_write_a_compiler">here</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   231
  An online book about the Art of Assembly Language is
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   232
  <A HREF="http://flint.cs.yale.edu/cs422/doc/art-of-asm/pdf/">here</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   233
  An introduction into x86 machine code is <A HREF="http://ianseyler.github.com/easy_x86-64/">here</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   234
  Intel's official manual for the x86 instruction is 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   235
  <A HREF="http://download.intel.com/design/intarch/manuals/24319101.pdf">here</A>. 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   236
  Two assemblers for the JVM are described <A HREF="http://jasmin.sourceforge.net">here</A>
511
55bc18956577 updated
cu
parents: 510
diff changeset
   237
  and <A HREF="https://github.com/Storyyeller/Krakatau">here</A>.
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   238
  An interesting twist of this project is to not generate code for a CPU, but
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
  for the intermediate language of the <A HREF="http://llvm.org">LLVM</A> compiler
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   240
  (also described <A HREF="http://llvm.org/docs/LangRef.html">here</A>). If you want to see
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   241
  what machine code looks like you can compile your C-program using gcc -S.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   242
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   243
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   244
  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.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   245
  <A HREF="http://jsbooks.revolunet.com">Here</A> is a list of free books on JavaScript.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   246
  A project from which you can draw inspiration is this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   247
  <A HREF="http://jlongster.com/Outlet--My-Lisp-to-Javascript-Experiment">Lisp-to-JavaScript</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   248
  translator. <A HREF="https://bitbucket.org/ktg/parenjs/overview">Here</A> is another such project.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   249
  And <A HREF="https://github.com/viclib/liscript">another</A> in less than 100 lines of code.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   250
  <A HREF="http://en.wikipedia.org/wiki/CoffeeScript">Coffeescript</A> is a similar project
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   251
  except that it is already quite <A HREF="http://coffeescript.org">mature</A>. And finally not to
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   252
  forget <A HREF="http://www.typescriptlang.org">TypeScript</A> developed by Microsoft. The main
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   253
  difference between these projects and this one is that they translate into relatively high-level
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   254
  JavaScript code; none of them use the much lower levels <A HREF="http://asmjs.org">asm.js</A> and 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   255
  <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   256
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   257
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   258
  <B>Skills:</B> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   259
  This is a project for a student with a deep interest in programming languages and
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   260
  compilers. Since my compiler is implemented in <A HREF="http://www.scala-lang.org/">Scala</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   261
  it would make sense to continue this project in this language. I can be
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   262
  of help with questions and books about <A HREF="http://www.scala-lang.org/">Scala</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   263
  But if Scala is a problem, my code can also be translated quickly into any other functional
511
55bc18956577 updated
cu
parents: 510
diff changeset
   264
  language. Again,  it will be of great help for this project to take part in
55bc18956577 updated
cu
parents: 510
diff changeset
   265
  my Compiler and Formal Language module (6CCS3CFL).
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   266
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   267
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   268
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   269
  <B>PS:</B> Compiler projects consistently received high marks in the past.
510
d08c5a952d53 updated
Christian Urban <urbanc@in.tum.de>
parents: 509
diff changeset
   270
  I have supervised eight so far and most of them received a mark above 70% - one even was awarded a prize.
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   271
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   272
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   273
<li> <H4>[CU3] Slide-Making in the Web-Age</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   274
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   275
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   276
  The standard technology for writing scientific papers in Computer Science  is to use
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   277
  <A HREF="http://en.wikipedia.org/wiki/LaTeX">LaTeX</A>, a document preparation
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   278
  system originally implemented by <A HREF="http://en.wikipedia.org/wiki/Donald_Knuth">Donald Knuth</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   279
  and <A HREF="http://en.wikipedia.org/wiki/Leslie_Lamport">Leslie Lamport</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   280
  LaTeX produces very pleasantly looking documents, can deal nicely with mathematical
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   281
  formulas and is very flexible. If you are interested, <A HREF="http://openwetware.org/wiki/Word_vs._LaTeX">here</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   282
  is a side-by-side comparison between Word and LaTeX (which LaTeX &ldquo;wins&rdquo; with 18 out of 21 points).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   283
  Computer scientists not only use LaTeX for documents,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   284
  but also for slides (really, nobody who wants to be cool uses Keynote or Powerpoint).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   285
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   286
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   287
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   288
  Although used widely, LaTeX seems nowadays a bit dated for producing
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   289
  slides. Unlike documents, which are typically &ldquo;static&rdquo; and published in a book or journal,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   290
  slides often contain changing contents that might first only be partially visible and
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   291
  only later be revealed as the &ldquo;story&rdquo; of a talk or lecture demands.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   292
  Also slides often contain animated algorithms where each state in the
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   293
  calculation is best explained by highlighting the changing data.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   294
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   295
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   296
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   297
  It seems HTML and JavaScript are much better suited for generating
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   298
  such animated slides. This <A HREF="http://www.impressivewebs.com/html-slidedeck-toolkits/">page</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   299
  links to slide-generating programs using this combination of technologies. 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   300
  However, the problem with all of these project is that they depend heavily on the users being
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   301
  able to write JavaScript, CCS or HTML...not something one would like to depend on given that
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   302
  &ldquo;normal&rdquo; users likely only have a LaTeX background. The aim of this project is to invent a
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   303
  very simple language that is inspired by LaTeX and then generate from code written in this language
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   304
  slides that can be displayed in a web-browser. An example would be the
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   305
  <A HREF="https://www.madoko.net">Madoko</A> project.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   306
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   307
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   308
 <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   309
 This sounds complicated, but there is already some help available:
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   310
 <A HREF="http://www.mathjax.org">Mathjax</A> is a JavaScript library that can
485
15741bc8fe96 updated
Christian Urban <urbanc@in.tum.de>
parents: 484
diff changeset
   311
 be used to display mathematical text, for example</p>
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   312
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   313
 <blockquote>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   314
 <p>When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   315
 \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\).</p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   316
 </blockquote>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   317
485
15741bc8fe96 updated
Christian Urban <urbanc@in.tum.de>
parents: 484
diff changeset
   318
 <p> 
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   319
 by writing code in the familiar LaTeX-way. This can be reused.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   320
 Another such library is <A HREF="http://khan.github.io/KaTeX/">KaTeX</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   321
 There are also plenty of JavaScript
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   322
 libraries for graphical animations (for example
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   323
 <A HREF="http://raphaeljs.com">Raphael</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   324
 <A HREF="http://svgjs.com">SVG.JS</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   325
 <A HREF="http://bonsaijs.org">Bonsaijs</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   326
 <A HREF="http://jsxgraph.uni-bayreuth.de/wp/">JSXGraph</A>). The inspiration for how the user should be able to write
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   327
 slides could come from the LaTeX packages <A HREF="http://en.wikipedia.org/wiki/Beamer_(LaTeX)">Beamer</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   328
 and <A HREF="http://en.wikipedia.org/wiki/PGF/TikZ">PGF/TikZ</A>. A slide-making project from which
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   329
 inspiration can be drawn is <A HREF="http://maciejczyzewski.me/hyhyhy/">hyhyhy</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   330
 </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   331
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   332
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   333
  <B>Skills:</B> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   334
  This is a project that requires good knowledge of JavaScript. You need to be able to
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   335
  parse a language and translate it to a suitable part of JavaScript using
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   336
  appropriate libraries. Tutorials for JavaScript are <A HREF="http://www.w3schools.com/js/">here</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   337
  A parser generator for JavaScript is <A HREF="http://pegjs.majda.cz">here</A>. There are probably also
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   338
  others. If you want to avoid JavaScript there are a number of alternatives: for example the
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   339
  <A HREF="http://elm-lang.org">Elm</A>
511
55bc18956577 updated
cu
parents: 510
diff changeset
   340
  language has been especially designed for implementing interactive animations, which would be
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   341
  very convenient for this project. A nice slide making project done by a previous student is 
515
90b45f94927b updated
cu
parents: 514
diff changeset
   342
  <A HREF="http://www.markslides.org">MarkSlides</A> by Oleksandr Cherednychenko. 
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   343
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   344
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   345
<li> <H4>[CU4] Raspberry Pi's and Arduinos</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   346
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   347
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   348
  <B>Description:</B>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   349
  This project is for true hackers! <A HREF="http://en.wikipedia.org/wiki/Raspberry_Pi">Raspberry Pi's</A>
512
a2a2afc15796 updated
cu
parents: 511
diff changeset
   350
  are small Linux computers the size of a credit-card and only cost &pound;26, the
a2a2afc15796 updated
cu
parents: 511
diff changeset
   351
  simplest version even costs only &pound;5 (see pictures on the left below). They were introduced
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   352
  in 2012 and people went crazy...well some of them. There is a
512
a2a2afc15796 updated
cu
parents: 511
diff changeset
   353
  <A HREF="https://plus.google.com/communities/113390432655174294208?hl=en">Google+</A>
a2a2afc15796 updated
cu
parents: 511
diff changeset
   354
  community about Raspberry Pi's that has more
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   355
  than 197k of followers. It is hard to keep up with what people do with these small computers. The possibilities
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   356
  seem to be limitless. The main resource for Raspberry Pi's is <A HREF="http://www.raspberrypi.org">here</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   357
  There are <A HREF="https://www.raspberrypi.org/magpi/">magazines</A> dedicated to them and tons of
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   358
  <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=39">books</A> (not to mention
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   359
  floods of <A HREF="https://www.google.co.uk/search?q=raspberry+pi">online</A> material,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   360
  such as the <A HREF="https://www.raspberrypi.org/magpi-issues/Projects_Book_v1.pdf">RPi projects book</A>).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   361
  Google just released a
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   362
  <A HREF="http://googlecreativelab.github.io/coder/">framework</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   363
  for web-programming on Raspberry Pi's turning them into webservers.
511
55bc18956577 updated
cu
parents: 510
diff changeset
   364
  In my home one Raspberry Pi has the very important task of automatically filtering out
55bc18956577 updated
cu
parents: 510
diff changeset
   365
  nearly all advertisments using the 
55bc18956577 updated
cu
parents: 510
diff changeset
   366
  <A HREF="https://github.com/pi-hole/pi-hole">Pi-Hole</A> software
55bc18956577 updated
cu
parents: 510
diff changeset
   367
  (you cannot imagine what difference this does to your web experience...you just sit back and read what
55bc18956577 updated
cu
parents: 510
diff changeset
   368
  is important).
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   369
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   370
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   371
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   372
  <A HREF="http://en.wikipedia.org/wiki/Arduino">Arduinos</A> are slightly older (from 2005) but still very cool (see picture on the right below). They
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   373
  are small single-board micro-controllers that can talk to various external gadgets (sensors, motors, etc). Since Arduinos
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   374
  are open-software and open-hardware there are many clones and add-on boards. Like for the Raspberry Pi, there
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   375
  is a lot of material <A HREF="https://www.google.co.uk/search?q=arduino">available</A> about Arduinos.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   376
  The main reference is <A HREF="http://www.arduino.cc">here</A>. Like the Raspberry Pi's, the good thing about
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   377
  Arduinos is that they can be powered with simple AA-batteries.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   378
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   379
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   380
  <p>
511
55bc18956577 updated
cu
parents: 510
diff changeset
   381
  I have several Raspberry Pi's including wifi-connectors and two <A HREF="http://www.raspberrypi.org/camera">cameras</A>.
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   382
  I also have two <A HREF="http://www.freaklabs.org/index.php/Blog/Store/Introducing-the-Freakduino-Chibi-An-Arduino-based-Board-For-Wireless-Sensor-Networking.html">Freakduino Boards</A> that are Arduinos extended with wireless communication. I can lend them to responsible
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   383
  students for one or two projects. However, the aim is to first come up with an idea for a project. Popular projects are
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   384
  automated temperature sensors, network servers, robots, web-cams (<A HREF="http://www.secretbatcave.co.uk/electronics/shard-rain-cam/">here</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   385
  is a <A HREF="http://www.raspberrypi.org/archives/3547">web-cam</A> directed at the Shard that can
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   386
  <A HREF="http://www.secretbatcave.co.uk/software/shard-rain-cam-quantifying-cloudy/">tell</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   387
  you whether it is raining or cloudy). There are plenty more ideas listed
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   388
  <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=15">here</A> for Raspberry Pi's and
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   389
  <A HREF="http://playground.arduino.cc/projects/ideas">here</A> for Arduinos.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   390
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   391
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   392
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   393
  There are essentially two kinds of projects: One is purely software-based. Software projects for Raspberry Pi's are often
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   394
  written in <A HREF="http://www.python.org">Python</A>, but since these are Linux-capable computers any other
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   395
  language would do as well. You can also write your own operating system as done
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   396
  <A HREF="http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/">here</A>. For example the students
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   397
  <A HREF="http://www.recantha.co.uk/blog/?p=4918">here</A> developed their own bare-metal OS and then implemented
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   398
  a chess-program on top of it (have a look at their very impressive
486
486f57efeaff updated
Christian Urban <urbanc@in.tum.de>
parents: 485
diff changeset
   399
  <A HREF="http://www.youtube.com/watch?v=-03bouPsfEQ&amp;feature=player_embedded">youtube</A> video).
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   400
  The other kind of project is a combination of hardware and software; usually attaching some sensors
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   401
  or motors to the Raspberry Pi or Arduino. This might require some soldering or what is called
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   402
  a <A HREF="http://en.wikipedia.org/wiki/Breadboard">bread-board</A>. But be careful before choosing a project
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   403
  involving new hardware: these devices
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   404
  can be destroyed (if &ldquo;Vin connected to GND&rdquo; or &ldquo;drawing more than 30mA from a GPIO&rdquo;
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   405
  does not make sense to you, you should probably stay away from such a project). 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   406
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   407
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   408
  <center>
487
a7b67cc34c80 updated
Christian Urban <urbanc@in.tum.de>
parents: 486
diff changeset
   409
    <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;"
a7b67cc34c80 updated
Christian Urban <urbanc@in.tum.de>
parents: 486
diff changeset
   410
         src="http://upload.wikimedia.org/wikipedia/commons/3/3d/RaspberryPi.jpg"
a7b67cc34c80 updated
Christian Urban <urbanc@in.tum.de>
parents: 486
diff changeset
   411
         alt="Raspberry Pi"
a7b67cc34c80 updated
Christian Urban <urbanc@in.tum.de>
parents: 486
diff changeset
   412
         width="313" height="209">
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   413
487
a7b67cc34c80 updated
Christian Urban <urbanc@in.tum.de>
parents: 486
diff changeset
   414
    <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;"
512
a2a2afc15796 updated
cu
parents: 511
diff changeset
   415
         src="https://upload.wikimedia.org/wikipedia/commons/7/7e/Raspberry-Pi-Zero-FL.jpg"
a2a2afc15796 updated
cu
parents: 511
diff changeset
   416
         alt="Raspberry Pi Zero"
a2a2afc15796 updated
cu
parents: 511
diff changeset
   417
         width="313" height="209">  
a2a2afc15796 updated
cu
parents: 511
diff changeset
   418
a2a2afc15796 updated
cu
parents: 511
diff changeset
   419
    <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;"
487
a7b67cc34c80 updated
Christian Urban <urbanc@in.tum.de>
parents: 486
diff changeset
   420
         src="http://upload.wikimedia.org/wikipedia/commons/3/38/Arduino_Uno_-_R3.jpg"
a7b67cc34c80 updated
Christian Urban <urbanc@in.tum.de>
parents: 486
diff changeset
   421
         alt="Arduino"
a7b67cc34c80 updated
Christian Urban <urbanc@in.tum.de>
parents: 486
diff changeset
   422
         width="240" height="209">
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   423
  </center>
488
aa66c34fca10 updated
Christian Urban <urbanc@in.tum.de>
parents: 487
diff changeset
   424
  
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   425
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   426
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   427
  <B>Skills:</B> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   428
  Well, you must be a hacker; happy to make things. Your desk might look like the photo below on the left.
512
a2a2afc15796 updated
cu
parents: 511
diff changeset
   429
  The photo below on the middle shows an earlier student project which connects wirelessly a wearable Arduino (packaged
a2a2afc15796 updated
cu
parents: 511
diff changeset
   430
  in a "self-3d-printed" watch) to a Raspberry Pi seen in the background. The Arduino in the foreground takes
a2a2afc15796 updated
cu
parents: 511
diff changeset
   431
  measurements of 
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   432
  heart rate and body temperature; the Raspberry Pi collects this data and makes it accessible via a simple
512
a2a2afc15796 updated
cu
parents: 511
diff changeset
   433
  web-service. The picture on the right is another project that implements an airmouse using an Arduino.
489
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   434
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   435
  <center>
489
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   436
    <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;"
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   437
         src="http://nms.kcl.ac.uk/christian.urban/rpi-photo.jpg"
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   438
         alt="Raspberry Pi"
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   439
         width="209" height="313">
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   440
489
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   441
    <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;"
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   442
         src="http://nms.kcl.ac.uk/christian.urban/rpi-watch.jpg"
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   443
         alt="Raspberry Pi"
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   444
         width="450" height="254">
512
a2a2afc15796 updated
cu
parents: 511
diff changeset
   445
a2a2afc15796 updated
cu
parents: 511
diff changeset
   446
    <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;"
a2a2afc15796 updated
cu
parents: 511
diff changeset
   447
         src="http://nms.kcl.ac.uk/christian.urban/rpi-airmouse.jpg"
a2a2afc15796 updated
cu
parents: 511
diff changeset
   448
         alt="Raspberry Pi"
514
b6a2b792900f updated
cu
parents: 513
diff changeset
   449
         width="250" height="254">  
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   450
  </center>
489
61fcb8f96fae updated
Christian Urban <urbanc@in.tum.de>
parents: 488
diff changeset
   451
 
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   452
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   453
<li> <H4>[CU5] An Infrastructure for Displaying and Animating Code in a Web-Browser</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   454
  
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   455
<p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   456
  <B>Description:</B>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   457
  The project aim is to implement an infrastructure for displaying and
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   458
  animating code in a web-browser. The infrastructure should be agnostic
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   459
  with respect to the programming language, but should be configurable.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   460
  I envisage something smaller than the projects 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   461
  <A HREF="http://www.pythontutor.com">here</A> (for Python),
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   462
  <A HREF="http://ideone.com">here</A> (for Java),
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   463
  <A HREF="http://codepad.org">here</A> (for multiple languages),
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   464
  <A HREF="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro">here</A> (for HTML)
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   465
  <A HREF="http://repl.it/languages/JavaScript">here</A> (for JavaScript),
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   466
  and <A HREF="http://www.scala-tour.com/#/welcome">here</A> (for Scala).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   467
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   468
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   469
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   470
  The tasks in this project are being able (1) to lex and parse languages and (2) to write an interpreter.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   471
  The goal is to implement this as much as possible in a language-agnostic fashion.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   472
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   473
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   474
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   475
  <B>Skills:</B> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   476
  Good skills in lexing and language parsing, as well as being fluent with web programming (for
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   477
  example JavaScript).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   478
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   479
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   480
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   481
<li> <H4>[CU6] Proving the Correctness of Programs</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   482
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   483
 <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   484
 I am one of the main developers of the interactive theorem prover
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   485
 <A HREF="http://isabelle.in.tum.de">Isabelle</A>. This theorem prover
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   486
 has been used to establish the correctness of some quite large
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   487
 programs (for example an <A HREF="http://ertos.nicta.com.au/research/l4.verified/">operating system</A>).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   488
 Together with colleagues from Nanjing, I used this theorem prover to establish the correctness of a
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   489
 scheduling algorithm, called
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   490
 <A HREF="http://en.wikipedia.org/wiki/Priority_inheritance">Priority Inheritance</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   491
 for real-time operating systems. This scheduling algorithm is part of the operating
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   492
 system that drives, for example, the 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   493
 <A HREF="http://en.wikipedia.org/wiki/Mars_Exploration_Rover">Mars rovers</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   494
 Actually, the very first Mars rover mission in 1997 did not have this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   495
 algorithm switched on and it almost caused a catastrophic mission failure (see
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   496
 this youtube video <A HREF="http://www.youtube.com/watch?v=lyx7kARrGeM">here</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   497
 for an explanation what happened).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   498
 We were able to prove the correctness of this algorithm, but were also able to
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   499
 establish the correctness of some optimisations in this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   500
 <A HREF="http://nms.kcl.ac.uk/christian.urban/Publications/pip.pdf">paper</A>.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   501
 </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   502
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   503
 <p>On a much smaller scale, there are a few small programs and underlying algorithms where it
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   504
 is not really understood whether they always compute a correct result (for example the
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   505
 regular expression matcher by Sulzmann and Lu in project [CU1]). The aim of this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   506
 project is to completely specify an algorithm in Isabelle and then prove it correct (that is,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   507
 it always computes the correct result).
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   508
</p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   509
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   510
  <p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   511
  <B>Skills:</B> 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   512
  This project is for a very good student with a knack for theoretical things and formal reasoning.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   513
  </p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   514
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   515
<li> <H4>[CU7] Anything Security Related that is Interesting</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   516
  
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   517
<p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   518
If you have your own project that is related to security (must be
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   519
something interesting), please propose it. We can then have a look
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   520
whether it would be suitable for a project.
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   521
</p>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   522
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   523
<li> <H4>[CU8] Anything Interesting in the Areas</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   524
  
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   525
<ul>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   526
<li><A HREF="http://elm-lang.org">Elm</A> (a reactive functional language for animating webpages; have a look at the cool examples, or <A HREF="http://pragmaticstudio.com/blog/2014/12/19/getting-started-with-elm">here</A> for an introduction)
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   527
<li><A HREF="http://www.smlserver.org/smltojs/">SMLtoJS</A> (a ML compiler to JavaScript; or anything else related to
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   528
  sane languages that compile to JavaScript)
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   529
<li>Any statistical data related to Bitcoins (in the spirit of this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   530
<A HREF="http://people.csail.mit.edu/spillai/data/papers/bitcoin-transaction-graph-analysis.pdf">paper</A> or
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   531
  this <A HREF="https://eprint.iacr.org/2012/584.pdf">one</A>; this will probably require some extensive C knowledge or any
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   532
  other heavy-duty programming language)
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   533
<li>Anything related to programming languages and formal methods (like
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   534
  <A HREF="http://matt.might.net/articles/intro-static-analysis/">static program analysis</A>)  
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   535
<li>Anything related to low-cost, hands-on hardware like Raspberry Pi, Arduino,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   536
  <A HREF="http://en.wikipedia.org/wiki/Cubieboard">Cubieboard</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   537
<li>Anything related to unikernel operating systems, like
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   538
  <A HREF="http://www.xenproject.org">Xen</A> or
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   539
  <A HREF="http://www.openmirage.org">Mirage OS</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   540
<li>Any kind of applied hacking, for example the Arduino-based keylogger described
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   541
   <A HREF="http://samy.pl/keysweeper/">here</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   542
<li>Anything related to code books, like this
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   543
   <A HREF="http://www.joelotter.com/kajero/">one</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   544
</ul>
490
150be5a1d720 updated
Christian Urban <urbanc@in.tum.de>
parents: 489
diff changeset
   545
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   546
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   547
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   548
<li> <H4>Earlier Projects</H4>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   549
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   550
 I am also open to project suggestions from you. You might find some inspiration from my earlier projects:
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   551
 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-12.html">BSc 2012/13</A>, 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   552
 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-12.html">MSc 2012/13</A>, 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   553
 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-13.html">BSc 2013/14</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   554
 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-13.html">MSc 2013/14</A>, 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   555
 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-14.html">BSc 2014/15</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   556
 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-14.html">MSc 2014/15</A>, 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   557
 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-15.html">BSc 2015/16</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   558
 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-15.html">MSc 2015/16</A>, 
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   559
 <A HREF="http://nms.kcl.ac.uk/christian.urban/bsc-projects-16.html">BSc 2016/17</A>,
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   560
 <A HREF="http://nms.kcl.ac.uk/christian.urban/msc-projects-16.html">MSc 2016/17</A>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   561
</ul>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   562
</TD>
501
466c2c762bb4 updated
Christian Urban <urbanc@in.tum.de>
parents: 500
diff changeset
   563
</TR>  
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   564
</TABLE>
501
466c2c762bb4 updated
Christian Urban <urbanc@in.tum.de>
parents: 500
diff changeset
   565
        
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   566
<P>
510
d08c5a952d53 updated
Christian Urban <urbanc@in.tum.de>
parents: 509
diff changeset
   567
Time-stamp: <- 2017-09-27 12:44:13 by Christian Urban>
491
41a9df099ee6 updated
Christian Urban <urbanc@in.tum.de>
parents: 490
diff changeset
   568
<a href="https://validator.w3.org/check/referer">[Validate this page.]</a>
483
a181b0c530fe updated
Christian Urban <urbanc@in.tum.de>
parents: 482
diff changeset
   569
</P>
477
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   570
</BODY>
65d3f6e3e935 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   571
</HTML>
497
8aa5eff33974 updated
Christian Urban <urbanc@in.tum.de>
parents: 496
diff changeset
   572
 
498
0dd6cb8c8fb6 updated
Christian Urban <urbanc@in.tum.de>
parents: 497
diff changeset
   573
 
500
5d1fa01b3c85 updated
Christian Urban <urbanc@in.tum.de>
parents: 499
diff changeset
   574