skip to main content
10.1145/1596638.1596650acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

The architecture of the Utrecht Haskell compiler

Published:03 September 2009Publication History

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.

Skip Supplemental Material Section

Supplemental Material

thearchitecturesoftheutrechthaskellcompileronvimeo.mp4

mp4

124.4 MB

References

  1. L. Augustsson. The HBC compiler. http://www.cs.chalmers.se/~augustss/hbc/hbc.html, 1998.Google ScholarGoogle Scholar
  2. R. Bird and O. de Moor.The algebra of programming.Prentice Hall, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. S. Bird.Using Circular Programs to Eliminate Multiple Traversals of Data.Acta Informatica, 21:239--250, 1984.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. H. Boehm. A garbage collector for C and C++. http://www.hpl.hp.com/personal/Hans_Boehm/gc/, 2006.Google ScholarGoogle Scholar
  5. H. Boehm and M. Weiser. Garbage Collection in an Uncooperative Environment. Software Practice and Experience, pages 807--820, Sep 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Bolingbroke and S. Peyton Jones.Types are calling conventions (submitted to Haskell Symposium 2009).2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. U. Boquist. Code Optimisation Techniques for Lazy Functional Languages, PhD Thesis. Chalmers University of Technology, 1999.Google ScholarGoogle Scholar
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Dijkstra.Stepping through Haskell.PhD thesis, Utrecht University, Department of Information and Computing Sciences, 2005.Google ScholarGoogle Scholar
  10. 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 ScholarGoogle Scholar
  11. A. Dijkstra, J. Fokker, and S. D. Swierstra.UHC Utrecht Haskell Compiler. http://www.cs.uu.nl/wiki/UHC, 2009.Google ScholarGoogle Scholar
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. K.-F. Faxen.A Static Semantics for Haskell. Journal of Functional Programming, 12(4):295, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle Scholar
  15. GHC Team. The New GHC/Hugs Runtime System. http://citeseer.ist.psu.edu/marlow98new.html, 1998.Google ScholarGoogle Scholar
  16. Haskell' Committee. Haskell Prime. http://hackage.haskell.org/trac/haskell--prime/, 2009.Google ScholarGoogle Scholar
  17. B. Heeren, A. v. IJzendoorn, and J. Hage.Helium, for learning Haskell. http://www.cs.uu.nl/helium/, 2005.Google ScholarGoogle Scholar
  18. D. Himmelstrup, S. Bronson, and A. Seipp. LHC Haskell Compiler. http://lhc.seize.it/, 2009.Google ScholarGoogle Scholar
  19. ISO. Common language infrastructure (ISO/EIC standard 23271). ECMA, 2006.Google ScholarGoogle Scholar
  20. M. P. Jones.Typing Haskell in Haskell.In Haskell Workshop, 1999.Google ScholarGoogle Scholar
  21. M. P. Jones.Hugs 98.http://www.haskell.org/hugs/, 2003.Google ScholarGoogle Scholar
  22. D. Knuth.Semantics of context-free languages.Mathematical Systems Theory, 2(2):127--145, 1968.Google ScholarGoogle ScholarCross RefCross Ref
  23. D. Knuth. Literate Programming. Journal of the ACM, (42):97--111, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. Marlow and S. Peyton Jones. The Glasgow Haskell Compiler. http://www.haskell.org/ghc/, 2004.Google ScholarGoogle Scholar
  27. J. Meacham. Jhc Haskell Compiler. http://repetae.net/computer/jhc/, 2009.Google ScholarGoogle Scholar
  28. S. Peyton Jones. Compiling Haskell by program transformation: a report from the trenches.In European Symposium On Programming, pages 18--44, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle Scholar
  30. S. Peyton Jones. Haskell 98, Language and Libraries, The Revised Report.Cambridge Univ. Press, 2003.Google ScholarGoogle Scholar
  31. S. Peyton Jones and S. Marlow. Secrets of the Glasgow Haskell Compiler inliner. Journal of Functional Programming, pages 393--434, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. S. Peyton Jones and E. Meijer.Henk: A Typed Intermediate Language. In Workshop on Types in Compilation, 1997.Google ScholarGoogle Scholar
  33. T. Shackell, N. Mitchell, A. Wilkinson, et al. YHC York Haskell Compiler. http://haskell.org/haskellwiki/Yhc, 2009.Google ScholarGoogle Scholar
  34. 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 ScholarGoogle Scholar
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. E. Visser. Stratego Home Page. http://www.program--transformation.org/Stratego/WebHome, 2005.Google ScholarGoogle Scholar
  38. York Functional Programming Group. NHC98 Haskell Compiler. http://haskell.org/nhc98/, 2007.Google ScholarGoogle Scholar

Index Terms

  1. The architecture of the Utrecht Haskell compiler

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          Haskell '09: Proceedings of the 2nd ACM SIGPLAN symposium on Haskell
          September 2009
          148 pages
          ISBN:9781605585086
          DOI:10.1145/1596638

          Copyright © 2009 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 3 September 2009

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate57of143submissions,40%

          Upcoming Conference

          ICFP '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader