Abstract
In an extensible programming language, programmers write code that must run at different times - in particular, at compile time versus run time. The module system of the Racket programming language enables a programmer to reason about programs in the face of such extensibility, because the distinction between run-time and compile-time phases is built into the language model. Submodules extend Racket's module system to make the phase-separation facet of the language extensible. That is, submodules give programmers the capability to define new phases, such as "test time" or "documentation time," with the same reasoning and code-management benefits as the built-in distinction between run time and compile time.
Supplemental Material
Available for Download
The file "model.rkt" implements the formal model that is presented in the paper. It runs in Racket v5.3 and later.
- Jason Baker and Wilson C. Hsieh. Maya: Multiple-Dispatch Syntax Extension in Java. In Proc. ACM Conf. Programming Language Design and Implementation, pp. 270--281, 2002. Google Scholar
Digital Library
- Ryan Culpepper, Sam Tobin-Hochstadt, and Matthew Flatt. Advanced Macrology and the Implementation of Typed Scheme. In Proc. Wksp. Scheme and Functional Programming, 2007.Google Scholar
- R. Kent Dybvig, Robert Hieb, and Carl Bruggeman. Syntactic Abstraction in Scheme. Lisp and Symbolic Computation 5(4), pp. 295--326, 1993. Google Scholar
Digital Library
- Sebastian Erdweg, Tillmann Rendel, Christian Kästner, and Klaus Ostermann. SugarJ: Library-Based Syntactic Language Extensibility. In Proc. ACM Conf. Object-Oriented Programming, Systems, Languages and Applications, pp. 391--406, 2011. Google Scholar
Digital Library
- Matthias Felleisen, Robert Bruce Findler, and Matthew Flatt. Semantics Engineering with PLT Redex. MIT Press, 2010. Google Scholar
Digital Library
- Matthew Flatt. Composable and Compilable Macros: You Want it When? In Proc. ACM Intl. Conf. Functional Programming, pp. 72--83, 2002. Google Scholar
Digital Library
- Matthew Flatt, Eli Barzilay, and Robert Bruce Findler. Scribble: Closing the Book on Ad Hoc Documentation Tools. In Proc. ACM Intl. Conf. Functional Programming, pp. 109--120, 2009. Google Scholar
Digital Library
- Matthew Flatt, Ryan Culpepper, Robert Bruce Findler, and David Darais. Macros that Work Together: Compile-Time Bindings, Partial Expansion, and Definition Contexts. J. Functional Programming 22(2), pp. 181--216, 2012. Google Scholar
Digital Library
- Abdulaziz Ghuloum and R. Kent Dybvig. Implicit Phasing for R6RS Libraries. In Proc. ACM Intl. Conf. Functional Programming, pp. 303--314, 2007. Google Scholar
Digital Library
- Simon Peyton Jones and Tim Sheard. Template metaprogramming for Haskell. In Proc. ACM Wksp. Haskell, pp. 1--16, 2002. Google Scholar
Digital Library
- Casey Klein, John Clements, Christos Dimoulas, Carl Eastlund, Matthias Felleisen, Matthew Flatt, Jay McCarthy, Jon Rafkind, Sam Tobin-Hochstadt, and Robert Bruce Findler. Run Your Research: On the Effectiveness of Lightweight Mechanization. In Proc. ACM Sym. Principles of Programming Languages, 2012. Google Scholar
Digital Library
- Eugene Kohlbecker, Daniel P. Friedman, Matthias Felleisen, and Bruce Duba. Hygienic Macro Expansion. In Proc. Lisp and Functional Programming, pp. 151--181, 1986. Google Scholar
Digital Library
- Simon Marlow. Haddock, a Haskell Documentation Tool. In Proc. ACM Wksp. Haskell, pp. 78--89, 2002. Google Scholar
Digital Library
- Tiark Rompf. Lightweight Modular Staging and Embedded Compilers: Abstraction without Regret for High-Level High-Performance Programming. PhD dissertation, ÉEcole Polytechnique Féedérale de Lausanne, 2012.Google Scholar
- Tiark Rompf and Martin Odersky. Lightweight Modular Staging: a Pragmatic Approach to Runtime Code Generation and Compiled DSLs. In Proc. Generative Programming and Component Engineering, pp. 127--136, 2010. Google Scholar
Digital Library
- Michael Sperber (Ed.). The Revised6 Report on the Algorithmic Language Scheme. 2007. Google Scholar
Digital Library
- Walid Taha and Tim Sheard. MetaML and Multi-Stage Programming with Explicit Annotations. Theoretical Computer Science 248(1-2), pp. 211--242, 2000. Google Scholar
Digital Library
- Sam Tobin-Hochstadt and Matthias Felleisen. The Design and Implementation of Typed Scheme. In Proc. ACM Sym. Principles of Programming Languages, pp. 395--406, 2008. Google Scholar
Digital Library
- Laurence Tratt. Compile-time Meta-programming in a Dynamically Typed OO Language. In Proc. Dynamic Languages Symposium, pp. 49--63, 2005. Google Scholar
Digital Library
- Oscar Waddell and R. Kent Dybvig. Extending the Scope of Syntactic Abstraction. In Proc. ACM Sym. Principles of Programming Languages, pp. 203--213, 1999. Google Scholar
Digital Library
Index Terms
Submodules in racket: you want it when, again?
Recommendations
Composable and compilable macros:: you want it when?
ICFP '02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programmingMany macro systems, especially for Lisp and Scheme, allow macro transformers to perform general computation. Moreover, the language for implementing compile-time macro transformers is usually the same as the language for implementing run-time functions. ...
Composable and compilable macros:: you want it when?
Many macro systems, especially for Lisp and Scheme, allow macro transformers to perform general computation. Moreover, the language for implementing compile-time macro transformers is usually the same as the language for implementing run-time functions. ...
Submodules in racket: you want it when, again?
GPCE '13: Proceedings of the 12th international conference on Generative programming: concepts & experiencesIn an extensible programming language, programmers write code that must run at different times - in particular, at compile time versus run time. The module system of the Racket programming language enables a programmer to reason about programs in the ...







Comments