ABSTRACT
In this paper we describe the architecture of the Utrecht Haskell Compiler (UHC).
UHC is a new Haskell compiler, that supports most (but not all) Haskell 98 features, plus some experimental extensions. It targets multiple backends, including a bytecode interpreter backend and a whole-program analysis backend, both via C. The implementation is rigorously organized as stepwise transformations through some explicit intermediate languages. The tree walks of all transformations are expressed as an algebra, with the aid of an Attribute Grammar based preprocessor. The compiler is just one materialization of a framework that supports experimentation with language variants, thanks to an aspect-oriented internal organization.
Supplemental Material
- L. Augustsson. The HBC compiler. http://www.cs.chalmers.se/~augustss/hbc/hbc.html, 1998.Google Scholar
- R. Bird and O. de Moor.The algebra of programming.Prentice Hall, 1996. Google ScholarDigital Library
- R. S. Bird.Using Circular Programs to Eliminate Multiple Traversals of Data.Acta Informatica, 21:239--250, 1984.Google ScholarDigital Library
- H. Boehm. A garbage collector for C and C++. http://www.hpl.hp.com/personal/Hans_Boehm/gc/, 2006.Google Scholar
- H. Boehm and M. Weiser. Garbage Collection in an Uncooperative Environment. Software Practice and Experience, pages 807--820, Sep 1988. Google ScholarDigital Library
- M. Bolingbroke and S. Peyton Jones.Types are calling conventions (submitted to Haskell Symposium 2009).2009. Google ScholarDigital Library
- U. Boquist. Code Optimisation Techniques for Lazy Functional Languages, PhD Thesis. Chalmers University of Technology, 1999.Google Scholar
- U. Boquist and T. Johnsson.The GRIN Project: A Highly Optimising Back End For Lazy Functional Languages. In Selected papers from the 8th International Workshop on Implementation of Functional Languages, 1996. Google ScholarDigital Library
- A. Dijkstra.Stepping through Haskell.PhD thesis, Utrecht University, Department of Information and Computing Sciences, 2005.Google Scholar
- A. Dijkstra, J. Fokker, and S. D. Swierstra. The Structure of the Essential Haskell Compiler, or Coping with Compiler Complexity. In Implementation of Functional Languages, 2007.Google Scholar
- A. Dijkstra, J. Fokker, and S. D. Swierstra.UHC Utrecht Haskell Compiler. http://www.cs.uu.nl/wiki/UHC, 2009.Google Scholar
- A. Dijkstra and S. D. Swierstra. Ruler: Programming Type Rules. In Functional and Logic Programming: 8th International Symposium, FLOPS 2006, Fuji-Susono, Japan, April 24--26, 2006, number 3945 in LNCS, pages 30--46. Springer-Verlag, 2006. Google ScholarDigital Library
- K.-F. Faxen.A Static Semantics for Haskell. Journal of Functional Programming, 12(4):295, 2002. Google ScholarDigital Library
- J. Fokker and S. D. Swierstra. Abstract interpretation of functional programs using an attribute grammar system. In A. Johnstone and J. Vinju, editors, Language Descriptions, Tools and Applications (LDTA08), 2008.Google Scholar
- GHC Team. The New GHC/Hugs Runtime System. http://citeseer.ist.psu.edu/marlow98new.html, 1998.Google Scholar
- Haskell' Committee. Haskell Prime. http://hackage.haskell.org/trac/haskell--prime/, 2009.Google Scholar
- B. Heeren, A. v. IJzendoorn, and J. Hage.Helium, for learning Haskell. http://www.cs.uu.nl/helium/, 2005.Google Scholar
- D. Himmelstrup, S. Bronson, and A. Seipp. LHC Haskell Compiler. http://lhc.seize.it/, 2009.Google Scholar
- ISO. Common language infrastructure (ISO/EIC standard 23271). ECMA, 2006.Google Scholar
- M. P. Jones.Typing Haskell in Haskell.In Haskell Workshop, 1999.Google Scholar
- M. P. Jones.Hugs 98.http://www.haskell.org/hugs/, 2003.Google Scholar
- D. Knuth.Semantics of context-free languages.Mathematical Systems Theory, 2(2):127--145, 1968.Google ScholarCross Ref
- D. Knuth. Literate Programming. Journal of the ACM, (42):97--111, 1984. Google ScholarDigital Library
- R. Lammel and S. Peyton Jones. Scrap your boilerplate: a practical design pattern for generic programming.In Types In Languages Design And Implementation, pages 26--37, 2003. Google ScholarDigital Library
- C. Lattner and V. Adve. LLVM: A Compilation Framework for Lifelong Program Analysis&Transformation.In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO'04), Palo Alto, California, Mar 2004. Google ScholarDigital Library
- S. Marlow and S. Peyton Jones. The Glasgow Haskell Compiler. http://www.haskell.org/ghc/, 2004.Google Scholar
- J. Meacham. Jhc Haskell Compiler. http://repetae.net/computer/jhc/, 2009.Google Scholar
- S. Peyton Jones. Compiling Haskell by program transformation: a report from the trenches.In European Symposium On Programming, pages 18--44, 1996. Google ScholarDigital Library
- S. Peyton Jones.Tackling the Awkward Squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell. In Engineering theories of software construction, Marktoberdorf Summer School, 2002.Google Scholar
- S. Peyton Jones. Haskell 98, Language and Libraries, The Revised Report.Cambridge Univ. Press, 2003.Google Scholar
- S. Peyton Jones and S. Marlow. Secrets of the Glasgow Haskell Compiler inliner. Journal of Functional Programming, pages 393--434, 2002. Google ScholarDigital Library
- S. Peyton Jones and E. Meijer.Henk: A Typed Intermediate Language. In Workshop on Types in Compilation, 1997.Google Scholar
- T. Shackell, N. Mitchell, A. Wilkinson, et al. YHC York Haskell Compiler. http://haskell.org/haskellwiki/Yhc, 2009.Google Scholar
- S. D. Swierstra, P. Azero Alocer, and J. Saraiva. Designing and Implementing Combinator Languages. In 3rd Advanced Functional Programming, number 1608 in LNCS, pages 150--206. Springer-Verlag, 1999.Google Scholar
- M. Viera, S. D. Swierstra, and W. S. Swierstra. Attribute grammars fly first class: How to do aspect oriented programming in haskell. In International Conference on Functional programming (ICFP '09), New York, NY, USA, 2009. ACM Press. Google ScholarDigital Library
- E. Visser. Stratego: A language for program transformation based on rewriting strategies. System description of Stratego 0.5. In A. Middeldorp, editor, Rewriting Techniques and Applications (RTA'01), number 2051 in LNCS, pages 357--361. Springer-Verlag, 2001. Google ScholarDigital Library
- E. Visser. Stratego Home Page. http://www.program--transformation.org/Stratego/WebHome, 2005.Google Scholar
- York Functional Programming Group. NHC98 Haskell Compiler. http://haskell.org/nhc98/, 2007.Google Scholar
Index Terms
- The architecture of the Utrecht Haskell compiler
Recommendations
The Intel labs Haskell research compiler
Haskell '13The Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult ...
The Intel labs Haskell research compiler
Haskell '13: Proceedings of the 2013 ACM SIGPLAN symposium on HaskellThe Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult ...
Layout-sensitive language extensibility with SugarHaskell
Haskell '12: Proceedings of the 2012 Haskell SymposiumProgrammers need convenient syntax to write elegant and concise programs. Consequently, the Haskell standard provides syntactic sugar for some scenarios (e.g., do notation for monadic code), authors of Haskell compilers provide syntactic sugar for more ...
Comments