ABSTRACT
A multi-stage computation is one involving more than one stage of execution. MetaML is a language for programming multi-stage computations. Previous studies presented big-step semantics, categorical semantics, and sound type systems for MetaML. In this paper, we report on a confluent and sound reduction semantics for untyped call-by name (CBN) MetaML. The reduction semantics can be used to formally justify some optimization performed by a CBN MetaML implementation. The reduction semantics demonstrates that non-trivial equalities hold for object-code, even in the untyped setting. The paper also emphasizes that adding intensional analysis (that is, taking-apart object programs) to MetaML remains an interesting open problem.
- 1.BARENDREGT, H. P. The Lambda Calculus: Its Syntax and Semantics, revised ed., vol. 103 of Studies in Logic and the Foundations of Mathematics. North-Holland, Amsterdam, 1984.]]Google Scholar
- 2.BAWDEN, A. Quasiquotation in LISP. In A CM SIG- PLAN Workshop on Partial Evaluation and Semantics- Based Program Manipulation (San Antonio, Jan. 1999), O. Danvy, Ed., University of Aarhus, Dept. of Computer Science, pp. 88-99. Invited talk.]]Google Scholar
- 3.BENAISSA, Z. E.-A., MOGGI, E., TAHA, W., AND SrlEARD, T. A categorical analysis of multi-level languages (extended abstract). Tech. Rep. CSE-98-018, Department of Computer Science, Oregon Graduate Institute, Dec. 1998. Available from {27}.]] Google ScholarDigital Library
- 4.BENAISSA, Z. E.-A., MOGGI, E., TAItA, W., AND SItEArtD, T. Logical modalities and multi-stage programming. In Federated Logic Conference (FLoC) Satellite Workshop on Intuitionistic Modal Logics and Applications (IMLA) (July 1999). To appear.]]Google Scholar
- 5.DAVIES, R. A temporal-logic approach to binding-time analysis. In Proceedings, 1 lth Annual IEEE Symposium on Logic in Computer Science (New Brunswick, July 1996), |EEE Computer Society Press, pp. 184-195.]] Google ScholarDigital Library
- 6.DAVIES, R., AND PFENNING, F. A modal analysis of staged computation. In 23rd Annual A CM Symposium on Principles of Programming Languages (POPL'96) (St. Petersburg Beach, Jan. 1996), pp. 258-270.]] Google ScholarDigital Library
- 7.GL~ICK, R., HATCLIFF, J., AND JORGENSEN, J. Generalization in hierarchies of online program specialization systems, in Logic-Based Program Synthesis and Trans. }ormatiort (1999), P. Flener, Ed., vol. 1559 of Lecture Notes in Computer Science, Springer-Verlag, pp. 179- 198.]] Google ScholarDigital Library
- 8.GL(JCK, R., AND JORGENSEN, J. Efficient multi-level generating extensions for program specialization. In Programming Languages: Implementations, Logics and Programs (PLILP'95) (1995), S. D. Swierstra and M. Hermenegildo, Eds., vol. 982 of Lecture Notes in Computer Science, Springer-Verlag, pp. 259--278.]] Google ScholarDigital Library
- 9.GL~rCK, R., AND JORGENSEN, J. Fast binding-time analysis for multi-level specialization. In Perspectives of System Informatics (1996), D. Bjorner, M. Broy, and I. V. Pottosin, Eds., vol. 1181 oi Lecture Notes in Computer Science, Springer-Verlag, pp. 261-272.]] Google ScholarDigital Library
- 10.GLUCK, R., AND JORGENSEN, J. An automatic program generator for multi-level specialization. LISP and Symbolic Computation 10, 2 (1997), 113-158.]] Google ScholarDigital Library
- 11.GOMARD, C. K., AND JONES, i. D. A partial evaluator for untyped lambda calculus. Journal o/Functional Programming 1, 1 (Jan. 1991), 21-69.]]Google Scholar
- 12.GORDON, i., AND PITTS, A. Higher Order Operational Techniques in Semantics. Cambridge Univeristy Press, 1998.]] Google ScholarDigital Library
- 13.HATCLIFF, J., AND DANVY, O. A computational formalization for partial evaluation. Mathematical Structures in Computer Science 7, 5 (Oct. 1997), 507-541.]] Google ScholarDigital Library
- 14.HATCLIFF, J., AND GL~ICK, R. Reasoning about hierarchies of online specialization systems. In Partial Evaluation (1996), O. Danvy, R. Gl/ick, and P. Thiemann, Eds., vol. 1110 of Lecture Notes in Computer Science, Springer-Verlag, pp. 161-182.]] Google ScholarDigital Library
- 15.JONES, N. D., GOMARD, C. K., AND SESTOFT, P. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.]] Google ScholarDigital Library
- 16.JONES, N. D., SESTOFT, P., AND SONDERGRAARD, H. An experiment in partial evaluation: The generation of a compiler generator. In Rewriting Techniques and Applications, J.-P. Jouannaud, Ed., vol. 202 of Lecture Notes in Computer Science. Springer-Verlag, 1985, pp. 124-140.]] Google ScholarDigital Library
- 17.LAWALL, J., AND THIEMANN, P. Sound specialization in the presence of computational effects. In Theoretical Aspects of Computer Software, Sendal, Japan, vol. 1281 of Lecture Notes in Computer Science. Berlin: Springer- Verlag, 1997, pp. 165-190.]] Google ScholarDigital Library
- 18.MITCHELL, J. C. On abstraction and the expressive power of programming languages. In Theoretical Aspects of Computer Software (Sept. 1991), T. Ito and A. R. Meyer, Eds., vol. 526 of Lecture Notes in Computer Science, Springer-Verlag, pp. 290-310.]] Google ScholarDigital Library
- 19.MITCHELL, J. C. Foundations for Programming Languages. MIT Press, Cambridge, 1996.]] Google ScholarDigital Library
- 20.MOGGI, E. Notions of computation and monads. Information and Computation 93, 1 (1991).]] Google ScholarDigital Library
- 21.MOGGI, E. A categorical account of two-level languages. In Mathematics Foundations of Program Semantics (1997), Elsevier Science.]]Google Scholar
- 22.MOGGr, E., TAHA, W., BENAISSA, Z., AND SHEARD, T. An idealized MetaML: Simpler, and more expressive (includes proofs). Tech. Rep. CSE-98-017, OGI, Oct. 1998. Available from {27}.]] Google ScholarDigital Library
- 23.MOGGI, E., TAHA, W., BENAISSA, Z., AND SHEARD, T. An idealized MetaML: Simpler, and more expressive. in European Symposium on Programming (ESOP) (1999), vol. 1576 of Lecture Notes ~n Computer Science, Springer-Verlag, pp. 193-207. An extended version appears in {22}.]] Google ScholarDigital Library
- 24.MULLER, R. M-LISP: A representation-independent dialect of LISP with reduction semantics. A CM Transactions on Programming Languages and Systems 14, 4 (Oct. 1992), 589-616.]] Google ScholarDigital Library
- 25.MULLER, R. A staging calculus and its application to the verification of translators. In Conference Record of POPL '94: 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Portland, Jan. 1994), pp. 389-396.]] Google ScholarDigital Library
- 26.NIELSON, F., AND NIELSON, H. R. Two-Level Functional Languages. No. 34 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge, 1992.]] Google ScholarDigital Library
- 27.Oregon Graduate Institute Technical Reports. P.O. Box 91000, Portland, OR 97291-1000,USA. Available online from ftp://cse.ogi .edu/pu b/tech-reports/READM E.ht ml. Last viewed August 1999.]]Google Scholar
- 28.PLOTKIN, G. D. Call-by-name, call-by-value and the lambda-calculus. Theoretical Computer Science 1 (1975), 125-159]]Google ScholarCross Ref
- 29.SANDS, D. A naive time analysis and its theory of cost equivalence. Journal of Logic and Computation 5, 4 (1995)]]Google ScholarCross Ref
- 30.SHIELDS, M., SHEAR/), T., AND JONES, S. P. Dynamic typing through staged type inference. In Proceedings of the 25th A CM SIGPLAN-SIGA CT Symposium on Principles of Programming Languages (Jan. 1998), pp. 289-302.]] Google ScholarDigital Library
- 31.TAHA, W. Multi-Stage Programming: Its Theory and Applications. PhD thesis, Oregon Graduate Institute of Science and Technology, July 1999. Revised October 99. Available from author ([email protected]).]] Google ScholarDigital Library
- 32.TArlA, W. A sound reduction semantics for untyped cbn multi-stage computation. Or, the theory of MetaML is non-trivial (preliminary report). Tech. Rep. CSE-99-014, OGI, Oct. 1999. Available from {27}.]]Google Scholar
- 33.TAHA, W., BENAISSA, Z.-E.-A., AND SHEARD, T. Multi-stage programming: Axiomatization and typesafety. In 25th International Colloquium on Automata, Languages, and Programming (Aalborg, July 1998), vol. 1443 of Lecture Notes in Computer Science, pp. 918-929.]] Google ScholarDigital Library
- 34.TAI-IA, W., AND SHEARD, T. Multi-stage programming with explicit annotations. In Proceedings of the A CM- SIGPLAN Symposium on Partial Evaluation and se. mantic based program manipulations PEPM'97, Amsterdam (1997), ACM, pp. 203-217: An extended and revised version appears in {35}.]] Google ScholarDigital Library
- 35.TAHA, W., AND SHEAR.D, W. MetaML: Multi-stage programming with explicit annotations. Theoretical Computer Science 248, 1-2 (In Press).]] Google ScholarDigital Library
- 36.TAKAI-IASm, M. Parallel reductions in A-calculus. Information and Computation 118, 1 (Apr. 1995), 120-127.]] Google ScholarDigital Library
- 37.WAND, M. The theory of fexprs is trivial. Lisp and Symbolic Computation 10 (1998), 189-199.]] Google ScholarDigital Library
- 38.WINSKEL, G. The Formal Semantics of Programming Languages: An Introduction. Foundations of Computing series. MIT Press, Feb. 1993.]] Google ScholarDigital Library
Index Terms
- A sound reduction semantics for untyped CBN multi-stage computation. Or, the theory of MetaML is non-trival
Recommendations
A sound reduction semantics for untyped CBN multi-stage computation. Or, the theory of MetaML is non-trival
A multi-stage computation is one involving more than one stage of execution. MetaML is a language for programming multi-stage computations. Previous studies presented big-step semantics, categorical semantics, and sound type systems for MetaML. In this ...
Comments