skip to main content
article
Free Access

Reasoning about programs in continuation-passing style.

Published:01 January 1992Publication History
Skip Abstract Section

Abstract

Plotkin's λ-value calculus is sound but incomplete for reasoning about βeegr;-transformations on programs in continuation-passing style (CPS). To find a complete extension, we define a new, compactifying CPS transformation and an “inverse”mapping, un-CPS, both of which are interesting in their own right. Using the new CPS transformation, we can determine the precise language of CPS terms closed under β7eegr;-transformations. Using the un-CPS transformation, we can derive a set of axioms such that every equation between source programs is provable if and only if βη can prove the corresponding equation between CPS programs. The extended calculus is equivalent to an untyped variant of Moggi's computational λ-calculus.

References

  1. 1 APPEL, A. AND T. JIM. Continuation-passing, closure-passing style. In Proc. 16th A aM Sympos,um on Principles of Programming Languages, 1982, 293-302. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 BARENDREGT, H.P. The Lambda Calculus: Its Syntaz and Semantics. Revised Edition. Studies in Logic and the Foundations of Mathematics 103. North-Holland, Amsterdam, 1984.Google ScholarGoogle Scholar
  3. 3 DANVY, O. Back to direct style. In 4th Proc. European Symposium on Programming. Springer Lecture Notes in Computer Science, 582. Springer Verlag, Berlin, 1992, 130-150. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4 DANVY, O. Three steps for the CPS transformation. Tech. Rep. CIS-92-2. Kansas State University, 1992.Google ScholarGoogle Scholar
  5. 5 DANVY, O. AND A. FILINSKI. Representing control: A study of the CPS transformation. Tech. Rpt. CIS-91-2. Kansas State University, 1991.Google ScholarGoogle Scholar
  6. 6 DANVY, O. AND J. LAWALL. Back to direct style II: First-class continuations. In Proc. 1992 A CM Conference on Lisp and Functional Programming, 1992, this volume. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 FELLC. ISEN, M. AND D.P. FRIEDMAN. Control operators, the SECD-machine, and the A-calculus. In Formal Description of Programming Concepts III, edited by M. Wirsing. Elsevier Science Publishers B.V. (North-Holland), Amsterdam, 1986, 193-217.Google ScholarGoogle Scholar
  8. 8 FELLEISEN, M. AND R. HIEB. The revised report on the syntactic theories of sequential control and state. Technical l~eport 100, Rice University, June 1989. Theor. Comput. Sci., 1991, to appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9 FELLEISEN, M., I). FRIEDMAN, E. KOHLBECKER, AND B. DUBA. A syntactic theory of sequential control. Theor. Comput. Sci. 52(3), 1987, 205- 237. Preliminary version in: Proc. Symposium on Logic in Computer Science, 1986, 131-141. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10 FISCHER, M.J. Lambda calculus schemata. In Proc. A CM Conference on Proving Assertions About Programs, $IGPLAN Notices 7(1), 1972, 104-109. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11 GATELEY~ J. AND B.F. DUBA. Call-by-valuecombinatory logic and the lambda-valuc calculus. In Proc. 1991 Workshop on Mathematical Foundations of Programming Semantics. Lecture Notes in Computer Science 517, to appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12 HIEB R., P~. K. DYBVIG, AND C. BRUGGEMAN. Representing control in the presence of first-class continuations. In Proceedings of the SIGPLAN '90 Conference on Programming Language Design and Implementation, June 1990, 66-77. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13 KRANZ, D., et al. ORBIT: An optimizing compiler for Scheme. In Proc. $IGPLAN 1986 Symposium on Compiler Construction, SIGPLAN Notices 21(7), 1986, 219-233. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14 LANDIN, P.J. The mechanical evaluation of expressions. Comput. J. 6(4), 1964, 308-320.Google ScholarGoogle ScholarCross RefCross Ref
  15. 15 LEaOY, X. The Zinc experiement. Technical Report 117. iNRIA, 1990.Google ScholarGoogle Scholar
  16. 16 MOGGI, E. Computational lambda-calculus and monads. In Proc. Symposium on Logic ~n Computer Science, 1989, 14-23. Also appeared as: LFCS Report ECS-LFCS-88-66, University of Edinburgh, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17 PLOTKIN, G.D. Call-by-name, call-by-value, and the A-calculus. Theor. Comput. Sci. 1, 1975, 125- 159.Google ScholarGoogle ScholarCross RefCross Ref
  18. 18 REYNOLDS, J.C. Definitional interpreters for higher-order programming languages. In Proc. A CM Annual Conference, 1972, 717-740. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19 SHIVERS, O. Control-flow Analysis of Higher-Order Languages or Taming Lambda. Ph.D. dissertation, Carnegie-Mellon University, t991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20 STEELE, G.L., Ja. RABBIT: A compiler for SCHEME. Memo 474, MIT AI Lab, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Reasoning about programs in continuation-passing style.

            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

            Full Access

            • Published in

              cover image ACM SIGPLAN Lisp Pointers
              ACM SIGPLAN Lisp Pointers  Volume V, Issue 1
              Jan. 1992
              357 pages
              ISSN:1045-3563
              DOI:10.1145/141478
              Issue’s Table of Contents
              • cover image ACM Conferences
                LFP '92: Proceedings of the 1992 ACM conference on LISP and functional programming
                January 1992
                365 pages
                ISBN:0897914813
                DOI:10.1145/141471

              Copyright © 1992 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 January 1992

              Check for updates

              Qualifiers

              • article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader