Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/857172.857252guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Modular Compilers Based on Monad Transformers

Published: 14 May 1998 Publication History

Abstract

The monadic style of language specification has the advantages of modularity and extensibility: it is simple to add or change features in an interpreter to reflect modifications in the source language. It has proven difficult to extend the method to compilation. We demonstrate that by introducing machine-like stores (code and data) into the monadic semantics and then partially evaluating the resulting semantic expressions, we can achieve many of the same advantages for a compiler as for an interpreter. A number of language constructs and features are compiled: expressions, CBV and CBN evaluation of lambda-expressions, dynamic scoping, and various imperative features. The treatment of recursive procedures is outlined as well. The resulting method allows compilers to be constructed in a mix-and-match fashion just as in a monad-structured interpreter.

Cited By

View all
  • (2011)Reasoning about i/o in functional programsProceedings of the 4th Summer School conference on Central European Functional Programming School10.1007/978-3-642-32096-5_3(93-141)Online publication date: 14-Jun-2011
  • (2007)A history of HaskellProceedings of the third ACM SIGPLAN conference on History of programming languages10.1145/1238844.1238856(12-1-12-55)Online publication date: 9-Jun-2007
  • (2006)A monadic approach for avoiding code duplication when staging memoized functionsProceedings of the 2006 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation10.1145/1111542.1111570(160-169)Online publication date: 9-Jan-2006
  • Show More Cited By

Index Terms

  1. Modular Compilers Based on Monad Transformers
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image Guide Proceedings
      ICCL '98: Proceedings of the 1998 International Conference on Computer Languages
      May 1998
      ISBN:0818684542

      Publisher

      IEEE Computer Society

      United States

      Publication History

      Published: 14 May 1998

      Author Tags

      1. Compilers
      2. Monad Transformers
      3. Monads
      4. Partial Evaluation
      5. Pass Separation.
      6. Programming Language Semantics
      7. Semantics-Based Compilation

      Qualifiers

      • Article

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)0
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 15 Oct 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2011)Reasoning about i/o in functional programsProceedings of the 4th Summer School conference on Central European Functional Programming School10.1007/978-3-642-32096-5_3(93-141)Online publication date: 14-Jun-2011
      • (2007)A history of HaskellProceedings of the third ACM SIGPLAN conference on History of programming languages10.1145/1238844.1238856(12-1-12-55)Online publication date: 9-Jun-2007
      • (2006)A monadic approach for avoiding code duplication when staging memoized functionsProceedings of the 2006 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation10.1145/1111542.1111570(160-169)Online publication date: 9-Jan-2006
      • (2003)TinkerType: a language for playing with formal systemsJournal of Functional Programming10.1017/S095679680200455013:2(295-316)Online publication date: 1-Mar-2003
      • (2001)Dynamically adaptable software with metacomputations in a staged languageProceedings of the 2nd international conference on Semantics, applications, and implementation of program generation10.5555/1792034.1792046(163-182)Online publication date: 6-Sep-2001
      • (1998)Type-Directed Partial EvaluationPartial Evaluation - Practice and Theory, DIKU 1998 International Summer School10.5555/645795.665909(367-411)Online publication date: 29-Jun-1998

      View Options

      View options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media