Graphs in Compilation.

Koen Claessen · 1997

Traditionally, expression trees with explicit variable names are used within compilers to represent programs. This paper describes another way to represent programs: term graphs. We give a motivation for them, an informal definition and some advantages and problems of this approach. It appears that term graphs are an interesting structure to perform program transformations on and we will certainly further develop this idea. 1 Introduction The language Mondrian [8] is a new functional language that is momentarily in an embryonal state. The language is derived from Haskell by removing some complex constructs and generalising them to new, simpler ones. The compiler is being developed at the moment. The principle design philosophy of the Mondrian project is `consistency and simplicity'. This idea is applied troughout the whole language, from syntax design to compiler structure. At the moment, the compiler consists of four parts. The parser transforms the source code to internal abstract s...

Read the paper · More papers on PaperTik