skip to main content
10.1145/328690.328697acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
Article
Free Access

A sound reduction semantics for untyped CBN multi-stage computation. Or, the theory of MetaML is non-trival

Authors Info & Claims
Published:01 November 1999Publication History

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.

References

  1. 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 ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.GLUCK, R., AND JORGENSEN, J. An automatic program generator for multi-level specialization. LISP and Symbolic Computation 10, 2 (1997), 113-158.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle Scholar
  12. 12.GORDON, i., AND PITTS, A. Higher Order Operational Techniques in Semantics. Cambridge Univeristy Press, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.HATCLIFF, J., AND DANVY, O. A computational formalization for partial evaluation. Mathematical Structures in Computer Science 7, 5 (Oct. 1997), 507-541.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.JONES, N. D., GOMARD, C. K., AND SESTOFT, P. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.MITCHELL, J. C. Foundations for Programming Languages. MIT Press, Cambridge, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.MOGGI, E. Notions of computation and monads. Information and Computation 93, 1 (1991).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.MOGGI, E. A categorical account of two-level languages. In Mathematics Foundations of Program Semantics (1997), Elsevier Science.]]Google ScholarGoogle Scholar
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle Scholar
  28. 28.PLOTKIN, G. D. Call-by-name, call-by-value and the lambda-calculus. Theoretical Computer Science 1 (1975), 125-159]]Google ScholarGoogle ScholarCross RefCross Ref
  29. 29.SANDS, D. A naive time analysis and its theory of cost equivalence. Journal of Logic and Computation 5, 4 (1995)]]Google ScholarGoogle ScholarCross RefCross Ref
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle Scholar
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35.TAHA, W., AND SHEAR.D, W. MetaML: Multi-stage programming with explicit annotations. Theoretical Computer Science 248, 1-2 (In Press).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. 36.TAKAI-IASm, M. Parallel reductions in A-calculus. Information and Computation 118, 1 (Apr. 1995), 120-127.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 37.WAND, M. The theory of fexprs is trivial. Lisp and Symbolic Computation 10 (1998), 189-199.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 38.WINSKEL, G. The Formal Semantics of Programming Languages: An Introduction. Foundations of Computing series. MIT Press, Feb. 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A sound reduction semantics for untyped CBN multi-stage computation. Or, the theory of MetaML is non-trival

          Recommendations

          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 Conferences
            PEPM '00: Proceedings of the 2000 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation
            January 2000
            113 pages
            ISBN:1581132018
            DOI:10.1145/328690

            Copyright © 1999 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 November 1999

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article

            Acceptance Rates

            PEPM '00 Paper Acceptance Rate11of20submissions,55%Overall Acceptance Rate66of120submissions,55%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader