Article ID Journal Published Year Pages File Type
422430 Electronic Notes in Theoretical Computer Science 2007 17 Pages PDF
Abstract

Metaprogramming consists of writing programs that generate or manipulate other programs. Template Haskell is a recent extension of Haskell, currently implemented in the Glasgow Haskell Compiler, giving support to metaprogramming at compile time. Our aim is to apply these facilities in order to statically analyse programs and transform them at compile time. In this paper we use Template Haskell to implement an abstract interpretation based strictness analysis and a let-to-case transformation that uses the results of the analysis. This work shows the advantages and disadvantages of the tool in order to incorporate new analyses and transformations into the compiler without modifying it.

Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics