[Haskell] Compiler Construction course using Haskell?
andreas.abel at ifi.lmu.de
Sun Aug 31 16:05:32 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
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).
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
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:
> 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
Andreas Abel <>< Du bist der geliebte Mensch.
Theoretical Computer Science, University of Munich
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Haskell