HBURG 1.1.2 Released
After loads of refactoring work a new version of HBURG has been released. If you have cabal install you can easily get it by executing the following commands:
$ cabal update
$ cabal install hburg
Of course you can also use the instructions provided here.
Notable changes:
- Completely refactored back-end
- Automated integration tests via Test.hs. Execute tests by running:
$ runghc Test.hs clean configure build test
- The example Java compiler that demonstrates HBURGs usage has also been revised and updated. See HBURGs homepage for more information on the example compiler.
I am actively working on a C# back-end so you can use HBURG to generate a code generator for a compiler written in C#. This should come in handy for the advanced compiler course at the SSW.
HBURG Version 1.1
- Rewrite rule costs can now include arbitrary expressions
- Context sensitive analysis is fixed now since it was too restrictive and rejecting even correctly defined specifications
- The Gen.Tiling module has been complete removed and replaced by much simpler code
- ...
You can either get the new version from The Hackage or from HBURG's home.
Good Haskell Style
If you have written lots of Haskell code and used tabs for indentation because you have not yet read Good Haskell Style by Ian Lynagh, then the following little Perl snippet may help you to easily convert your Haskell code:
perl -e '($_ = join "",<>) =~ s/(\t)/ /g; print;'
If you are using TextMate you can easily use this snippet as a Filter Through Command…
Sources:
- Ian Lynagh post to the Haskell Libraries list.
- Good Haskell Style
HBURG Version 1.0 Released
HBURG (Haskell Bottom Up Rewrite Generator) version 1.0 is available as of today! As always there is still work to do, but it is finally the time to release a first version. A very simple example compiler showing how to use HBURG in the compiler design and development process is provided as well.
- Please visit the HBURG project website for more information.
Exploiting Parallelism in Multi-way Recursive Methods
My code generator which is still in the prototyping and experimentation phase does a lot of recursive tree traversals which is quite obvious since it needs to match tree patterns and emit code for abstract syntax trees (AST).
Especially during the code emission phase which does a top down left to right tree traversal it would be nice to recursively evaluate child nodes of an AST in parallel if the evaluation of the child nodes does not yield any side effects. The following paper nicely describes how to transform standard multi-way recursive methods into parallel mutli-way recursive methods in Java.
The transformation described is quite simple and works well for direct recursion. However, due to the attribute type grammar I want to use for my tree pattern matching code generator and the way most tree patterns are augmented with semantic actions, it seems that it would cause a bit of a mess, or at least require a lot of careful thinking how to integrate such parallelism into the tree pattern matching grammar and the code generator which is produced by the grammar specification.
Unfortunately right now this idea can not be assigned a high priority and must be post-poned…
Now it is Official
After signing the official papers my diploma thesis is official as of now. Even though it is going to be a lot of work to provide a clean, functional and good implementation, I am really looking forward to it. Especially after having messed around with and read about various compiler back end strategies.
Anyway, I am not dead but unfortunately I have almost no more time to blog. There are also some people I really really really have to send an E-Mail to and this right here is a promise that it will happen really soon!!!!