[Haskell] Compiler Construction course using Haskell?

Andreas Abel andreas.abel at ifi.lmu.de
Sun Aug 31 16:05:32 EDT 2008

Hash: SHA1

Dear Johannes,

Hans-Wolfgang Loidl and I have given a course on compiler construction
using Andrew Appel's book.  There was free choice of the implementation
language, and we had Java (2 teams and Hans-Wolfgang), python (one
team), and Haskell (me).

http://www.tcs.ifi.lmu.de/lehre/WS07-08/Compiler/schedule.html (German)

I found Haskell very pleasent to use.  However, one traversal of the
abstract syntax tree did not suffice to generate Intel code.  We used an
intermediate language on which one can perform optimizations, a greedy
instruction selector, and then liveness analysis and graph coloring for
register allocation.

We developed some tools to support the compiler development, such as an
interpreter for the intermediate language and one for a relevant subset
of the 386 assembly language (all programmed in Haskell).


Johannes Waldmann wrote:
> Hello.
> I plan to give a course in compiler construction,
> using Haskell as the implementation language
> (not as source or target language).
> Something along these lines:
> 1. combinator parsers (Parsec),
> 2. simple interpreter (arithmetical expressions)
> 3. add algebraic data types, functions
> 4. type checker
> 5. code generator.
> Ideally, 2..5 would be using the very same tree traversal code
> and just change the monad for evaluation.
> Any comments appreciated. Have you given such a course? Taken?
> If I really decide to do it,
> then slides (in German) will be made available.
> Best regards, J.W.
> ------------------------------------------------------------------------
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell

- --
Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Haskell mailing list