Meta-programming with names and necessity
2002, ACM SIGPLAN Notices
https://doi.org/10.1145/583852.581498Abstract
Meta-programming is a discipline of writing programs in a certain programming language that generate, manipulate or execute programs written in another language. In a typed setting, meta-programming languages usually contain a modal type constructor to distinguish the level of object programs (which are the manipulated data) from the meta programs (which perform the computations). In functional programming, modal types of object programs generally come in two flavors: open and closed, depending on whether the expressions they classify may contain any free variables or not. Closed object programs can be executed at run-time by the meta program, but the computations over them are more rigid, and typically produce less efficient residual code. Open object programs provide better inlining and partial evaluation, but once constructed, expressions of open modal type cannot be evaluated.
References (48)
- Attardi, Giuseppe, & Simi, Maria. (1995). A formalization of viewpoints. Fundamenta informaticae, 23(3), 149-173.
- Awodey, Steve, & Bauer, Andrej. (2001). Propositions as [Types].
- Calcagno, Cristiano, Moggi, Eugenio, & Taha, Walid. (2000). Closed types as a simple approach to safe imperative multi-stage programming. Pages 25-36 of: Montanari, Ugo, Rolim, José D. P., & Welzl, Emo (eds), Automata, languages and programming. Lecture Notes in Computer Science, vol. 1853. Springer.
- Calcagno, Cristiano, Moggi, Eugenio, & Sheard, Tim. (2001). Closed types for a safe imperative MetaML. Journal of functional programming. To appear.
- Davies, Rowan. (1996). A temporal logic approach to binding-time analysis. Pages 184- 195 of: Symposium on Logic in Computer Science, LICS'96.
- Davies, Rowan, & Pfenning, Frank. (2001). A modal analysis of staged computation. Journal of the ACM, 48(3), 555-604.
- Despeyroux, Joëlle, Pfenning, Frank, & Schürmann, Carsten. (1997). Primitive recursion for higher-order abstract syntax. Pages 147-163 of: de Groote, Philippe, & Hindley, J. Roger (eds), Typed lambda calculi and applications. Lecture Notes in Computer Science, vol. 1210. Springer.
- Ershov, A. P. (1977). On the partial computation principle. Information processing letters, 6(2), 38-41.
- Fiore, Marcelo. (2002). Semantic analysis of normalization by evaluation for typed lambda calculus. Pages 26-37 of: International Conference on Principles and Practice of Declar- ative Programming, PPDP'02.
- Fiore, Marcelo, Plotkin, Gordon, & Turi, Daniele. (1999). Abstract syntax and variable binding. Pages 193-202 of: Symposium on Logic in Computer Science, LICS'99.
- Fitting, Melvin, & Mendelsohn, Richard L. (1999). First-order modal logic. Kluwer.
- Futamura, Yoshihiko. (1971). Partial evaluation of computation process -an approach to a compiler-compiler. Systems, computers, controls, 2(5), 45-50.
- Gabbay, Murdoch J. 2000 (August). A theory of inductive definitions with α-equivalence. Ph.D. thesis, Cambridge University.
- Gabbay, Murdoch J., & Pitts, Andrew M. (2002). A new approach to abstract syntax with variable binding. Formal aspects of computing, 13, 341-363.
- Girard, Jean-Yves. (1986). The system F of variable types, fifteen years later. Theoretical computer science, 45(2), 159-192.
- Glück, Robert, & Jørgensen, Jesper. (1995). Efficient multi-level generating extensions for program specialization. Pages 259-278 of: Hermenegildo, Manuel, & Swierstra, S. Doaitse (eds), Programming languages: Implementations, logics and programs. Lec- ture Notes in Computer Science, vol. 982. Springer.
- Glück, Robert, & Jørgensen, Jesper. (1997). An automatic program generator for multi- level specialization. Lisp and symbolic computation, 10(2), 113-158.
- Griewank, Andreas. (1989). On automatic differentiation. Pages 83-108 of: Iri, Masao, & Tanabe, Kunio (eds), Mathematical programming: Recent developments and applica- tions. Kluwer.
- Harper, Robert. (1999). Proof-directed debugging. Journal of functional programming, 9(4), 463-470.
- Hofmann, Martin. (1999). Semantical analysis of higher-order abstract syntax. Pages 204-213 of: Symposium on Logic in Computer Science, LICS'99.
- Jones, Neil D., Sestoft, Peter, & Søndergaard, Harald. (1985). An experiment in partial evaluation: the generation of a compiler generator. Pages 124-140 of: Jouannaud, Jean- Pierre (ed), Rewriting techniques and applications. Lecture Notes in Computer Science, vol. 202. Springer.
- Kripke, Saul A. (1980). Naming and necessity. Harvard University Press.
- Lee, Peter, & Leone, Mark. (1996). Optimizing ML with run-time code generation. Pages 137-148 of: Conference on Programming Language Design and Implementation, PLDI'96.
- McCarthy, John. (1993). Notes on formalizing context. Pages 555-560 of: International Joint Conference on Artificial Intelligence, IJCAI'93.
- Miller, Dale. (1990). An extension to ML to handle bound variables in data structures. Pages 323-335 of: Proceedings of the first esprit BRA workshop on logical frameworks.
- Moggi, Eugenio, Taha, Walid, Benaissa, Zine-El-Abidine, & Sheard, Tim. (1999). An ide- alized MetaML: Simpler, and more expressive. Pages 193-207 of: European Symposium on Programming, ESOP'99.
- Montague, Richard. (1963). Syntactical treatment of modalities, with corollaries on re- flexion principles and finite axiomatizability. Acta philosophica fennica, 16, 153-167.
- Nanevski, Aleksandar. (2002). Meta-programming with names and necessity. Pages 206- 217 of: International Conference on Functional Programming, ICFP'02. A significant revision is available as a technical report CMU-CS-02-123R, Computer Science Depart- ment, Carnegie Mellon University.
- Nielsen, Michael Florentin. (2001). Combining closed and open code. Unpublished.
- Nielsen, Michael Florentin, & Taha, Walid. (2003). Environment classifiers. Pages 26-37 of: Symposium on Principles of Programming Languages, POPL'03.
- Odersky, Martin. (1994). A functional theory of local names. Pages 48-59 of: Symposium on Principles of Programming Languages, POPL'94.
- Pfenning, Frank. (2001). Intensionality, extensionality, and proof irrelevance in modal type theory. Pages 221-230 of: Symposium on Logic in Computer Science, LICS'01.
- Pfenning, Frank, & Davies, Rowan. (2001). A judgmental reconstruction of modal logic. Mathematical structures in computer science, 11(4), 511-540.
- Pfenning, Frank, & Elliott, Conal. (1988). Higher-order abstract syntax. Pages 199-208 of: Conference on Programming Language Design and Implementation, PLDI'88.
- Pitts, Andrew M. (2001). Nominal logic: A first order theory of names and binding. Pages 219-242 of: Kobayashi, Naoki, & Pierce, Benjamin C. (eds), Theoretical aspects of computer software. Lecture Notes in Computer Science, vol. 2215. Springer.
- Pitts, Andrew M., & Gabbay, Murdoch J. (2000). A metalanguage for programming with bound names modulo renaming. Pages 230-255 of: Backhouse, Roland, & Oliveira, José Nuno (eds), Mathematics of program construction. Lecture Notes in Computer Science, vol. 1837. Springer.
- Ramsey, Norman, & Pfeffer, Avi. (2002). Stochastic lambda calculus and monads of probability distributions. Pages 154-165 of: Symposium on Principles of Programming Languages, POPL'02.
- Reynolds, John C. (1983). Types, abstraction and parametric polymorphism. Pages 513- 523 of: Mason, R. E. A. (ed), Information processing '83. Elsevier.
- Rozas, Guillermo J. (1993). Translucent procedures, abstraction without opacity. Tech. rept. AITR-1427. Massachusetts Institute of Technology Artificial Intelligence Labora- tory.
- Schürmann, Carsten. (2000). Automating the meta-theory of deductive systems. Ph.D. thesis, Carnegie Mellon University.
- Scott, Dana. (1970). Advice on modal logic. Pages 143-173 of: Lambert, Karel (ed), Philosophical problems in logic. Dordrecht: Reidel.
- Scott, Dana. (1979). Identity and existence in intuitionistic logic. Pages 660-696 of: Fourman, Michael, Mulvey, Chris, & Scott, Dana (eds), Applications of sheaves. Lecture Notes in Mathematics, vol. 753. Springer.
- Sheard, Tim. (2001). Accomplishments and research challenges in meta-programming. Pages 2-44 of: Taha, Walid (ed), Semantics, applications, and implementation of pro- gram generation. Lecture Notes in Computer Science, vol. 2196. Springer.
- Smoryński, C. (1985). Self-reference and modal logic. Springer.
- Taha, Walid. (1999). Multi-stage programming: Its theory and applications. Ph.D. thesis, Oregon Graduate Institute of Science and Technology.
- Taha, Walid. (2000). A sound reduction semantics for untyped CBN multi-stage compu- tation. Or, the theory of MetaML is non-trival. Pages 34-43 of: Workshop on Partial Evaluation and Semantics-Based Program Manipulation, PEPM'00.
- Wickline, Philip, Lee, Peter, Pfenning, Frank, & Davies, Rowan. (1998a). Modal types as staging specifications for run-time code generation. ACM computing surveys, 30(3es).
- Wickline, Philip, Lee, Peter, & Pfenning, Frank. (1998b). Run-time code generation and Modal-ML. Pages 224-235 of: Conference on Programming Language Design and Im- plementation, PLDI'98.