10.1145/3310232.3310238acmotherconferencesArticle/Chapter ViewAbstractPublication PagesiflConference Proceedingsconference-collections
research-article

MIL, a Monadic Intermediate Language for Implementing Functional Languages

Published:05 September 2018Publication History

ABSTRACT

This paper describes MIL, a "monadic intermediate language" that is designed for use in optimizing compilers for strict, strongly typed functional languages. By using a notation that exposes the construction and use of closures and algebraic datatype values, for example, the MIL optimizer is able to detect and eliminate many unnecessary uses of these structures prior to code generation. One feature that distinguishes MIL from other intermediate languages in this area is the use of a typed, parameterized notion for basic blocks. This both enables new optimization techniques, such as the ability to create specialized versions of basic blocks, and leads to a new approach for implementing changes in data representation.

References

  1. Andrew W. Appel. 1992. Compiling with Continuations. Cambridge University Press, New York, NY, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Justin Bailey. 2012. Using Dataflow Optimization Techniques with a Monadic Intermediate Language. Master's thesis. Department of Computer Science, Portland State University, Portland, OR.Google ScholarGoogle Scholar
  3. Adam Chlipala. 2015. An Optimizing Compiler for a Purely Functional Web-application Language. In Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming (ICFP 2015). ACM, New York, NY, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Iavor S. Diatchki, Mark P. Jones, and Rebekah Leslie. 2005. High-level views on low-level representations. In Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming, ICFP 2005, Tallinn, Estonia, September 26-28, 2005. ACM, 168--179. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Matthew Fluet and Stephen Weeks. 2001. Contification Using Dominators. In Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming (ICFP '01). ACM, New York, NY, USA, 2--13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Thomas Johnsson. 1985. Lambda Lifting: Transforming Programs to Recursive Equations. In Proceedings of the IFIP conference on Functional Programming Languages and Computer Architecture (Lecture Notes in Computer Science, 201). Springer-Verlag, 190--203. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Mark P. Jones. 1994. Dictionary-free Overloading by Partial Evaluation. In ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM '94).Google ScholarGoogle Scholar
  8. Andrew Kennedy. 2007. Compiling with Continuations, Continued. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming (ICFP '07). ACM, New York, NY, USA, 177--190. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Chris Lattner. 2002. LLVM: An Infrastructure for Multi-Stage Optimization. Master's thesis. Computer Science Dept., University of Illinois at Urbana-Champaign, Urbana, IL.Google ScholarGoogle Scholar
  10. LLVM 2018. The LLVM Compiler Infrastructure. http://llvm.org.Google ScholarGoogle Scholar
  11. Luke Maurer, Zena Ariola, Paul Downen, and Simon Peyton Jones. 2017. Compiling without continuations. In ACM Conference on Programming Languages Design and Implementation (PLDI'17). ACM, 482--494. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Moggi. 1989. Computational Lambda-calculus and Monads. In Proceedings of the Fourth Annual Symposium on Logic in Computer Science. IEEE Press, Piscataway, NJ, USA, 14--23. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Alan Mycroft. 1984. Polymorphic Type Schemes and Recursive Definitions. In Proceedings of the 6th Colloquium on International Symposium on Programming. Springer-Verlag, London, UK, UK, 217--228. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Simon Peyton Jones (Ed.). 2003. Haskell 98 Language and Libraries -- The Revised Report. Cambridge University Press.Google ScholarGoogle Scholar
  15. The Hasp Project. 2010. The Habit Programming Language: The Revised Preliminary Report. http://github.com/habit-lang/language-report.Google ScholarGoogle Scholar
  16. Philip Wadler. 1990. Comprehending Monads. In Proceedings of the 1990 ACM Conference on LISP and Functional Programming (LFP '90). 61--78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Stephen Weeks. 2006. Whole-program Compilation in MLton. In Proceedings of the 2006 Workshop on ML (ML '06). ACM, New York, NY, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

(auto-classified)
  1. MIL, a Monadic Intermediate Language for Implementing Functional Languages

      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 Other conferences
        IFL 2018: Proceedings of the 30th Symposium on Implementation and Application of Functional Languages
        September 2018
        143 pages
        ISBN:9781450371438
        DOI:10.1145/3310232

        Copyright © 2018 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 5 September 2018

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed limited

        Acceptance Rates

        Overall Acceptance Rate 19 of 36 submissions, 53%
      • Article Metrics

        • Downloads (Last 12 months)33
        • Downloads (Last 6 weeks)4

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!