UUAGC is the Utrecht University Attribute Grammar Compiler It is a preprocessor for Haskell which makes it easy to write catamorphisms (that is, functions that do to any datatype what foldr does to lists). You can define tree walks using the intuitive concepts of inherited and synthesized attributes, while keeping the full expressive power of Haskell.


You can get the latest stable release in the Download page. UUAGC is distributed under the GNU General Public License.


Examples of projects building on UUAGC

AG system

The font end of the UUAG system has been bootstrapped using the UUAGC system itself. As a consequence the distribution contains both a generated UUAGC system, and the code to generate it from. Just to get you up and running.

Tiger compiler

In order to compare the UUAGC approach with other approaches we have encode a compiler for the Tiger language, as used in Andrew Appel's books on compiler construction, in AG. For a comparison using Stratego, see here.

Pretty Printing Combinators

A long time ago we implemented a collection of pretty printing combinators, in which one could specify alternative layouts. The development of this has been described in the paper mentioned above. A paper describing online pretty printers developed from an UUAG description has been submitted to JFP. A predecessor of this paper can be found in this technical report.


Our own, home grown Haskell compiler, is completely UUAGC based. For more information see the UHC home page.

-- DoaitseSwierstra - 29 Aug 2009
Topic revision: r16 - 14 Jul 2016, AtzeDijkstra





This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding UUCS? Send feedback