skip to main content
10.1145/503032.503043acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
Article

CPS translating inductive and coinductive types

Authors Info & Claims
Published:14 January 2002Publication History

ABSTRACT

We investigate CPS translatability of typed λ-calculi with inductive and coinductive types. We show that tenable Plotkin-style call-by-name CPS translations exist for simply typed λ-calculi with a natural number type and stream types and, more generally, with arbitrary positive inductive and coinductive types. These translations also work in the presence of control operators and generalize for dependently typed calculi where case-like eliminations are only allowed in non-dependent forms. No translation is possible along the same lines for small Σ-types and sum types with dependent case.

References

  1. 1.S. Abramsky, ed. Proc. of 5th Int. Conf. on Typed Lambda Calculi and Appl., TLCA'01, vol. 2044 of Lect. Notes in Comp. Sci.. Springer-Verlag, 2001.]]Google ScholarGoogle ScholarCross RefCross Ref
  2. 2.T. Altenkirch. Representations of first order function types as terminal coalgebras. In {1}, pp. 8-21.]]Google ScholarGoogle Scholar
  3. 3.A. Appel. Compiling with Continuations. Cambridge University Press, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.F. Barbanera and S. Berardi. A symmetric lambda calculus for classical program extraction. Information and Computation, 125(2):103-117, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.H. Barendregt. Lambda calculi with types. In S. Abramsky, D. M. Gabbay, and T. S. E. Maibaums, eds., Handbook of Logic in Computer Science, Vol. 2: Background: Computational Structures, pp. 117-309. Clarendon Press, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.G. Barthe, J. Hatcliff, and M. H. S~rensen. A notion of classical pure type system (preliminary version). In S. Brookes and M. Mislove, eds., Proc. of 13th Ann. Conf. on Math. Found. of Programming Semantics, MFPS'97, vol. 6 of Elect. Notes in Theor. Comp. Sci.. Elsevier, 1997.]]Google ScholarGoogle Scholar
  7. 7.G. Barthe, J. Hatcliff, and M. H. S~rensen. Re ections on reflections. In H. Glaser, P. Hartel, and H. Kuchen, eds., Proc. of 9th Int. Symp. on Programming Languages: Implementations, Logics, and Programs, PLILP'97, vol. 1292 of Lect. Notes in Comp. Sci., pp. 241-258. Springer-Verlag, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.G. Barthe, J. Hatcliff, and M. H. S~ensen. CPS-translations and applications: the cube and beyond. Higher-Order and Symbolic Computation, 12(2):125-170, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.G. Barthe and M. H. S~rensen. Domain-free pure type systems. J. of Funct. Prog., 10(5):417-452, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.S. Berardi, M. Bezem, and T. Coquand. A realization of the negative interpretation of the axiom of choice. In {16}, pp. 47-62.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.U. Berger. A constructive interpretation of positive inductive definitions. Unpublished draft, 1995.]]Google ScholarGoogle Scholar
  12. 12.U. Berger and H. Schwichtenberg. Program extraction from classical proofs. In D. Leivant, ed., Selected Papers from Int. Workshop on Logical and Computational Complexity, LCC'94, vol. 960 of Lect. Notes in Comp. Sci., pp. 77-97. Springer-Verlag, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.R. Constable and C. R. Murthy. Finding computational content in classical proofs. In G. Huet and G. Plotkin, eds., Logical Frameworks, pp. 341-362. Cambridge University Press, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.T. Coquand. Metamathematical investigations of a calculus of constructions. In {37}, pp. 91-122.]]Google ScholarGoogle Scholar
  15. 15.T. Coquand and C. Paulin. Inductively defined types (preliminary version). In P. Martin-Lof and G. Mints, eds., Proc. of Int. Conf. on Computer Logic, COLOG'88, vol. 417 of Lect. Notes in Comp. Sci., pp. 50-66. Springer-Verlag, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.M. Dezani-Ciancaglini and G. Plotkin, eds. Proc. of 2nd Int. Conf. on Typed Lambda Calculi and Appl., TLCA'95, vol. 902 of Lect. Notes in Comp. Sci.. Springer-Verlag, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.M. Felleisen, D. P. Friedman, E. Kohlbecker, and B. Duba. Theor. Comp. Sci., 52(3):205-237, 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.M. Felleisen and A. Sabry. Continuations in programming practice: Introduction and survey. Manuscript, 1999.]]Google ScholarGoogle Scholar
  19. 19.FLINT project. http://flint.cs.yale.edu]]Google ScholarGoogle Scholar
  20. 20.H. Geuvers. Inductive and coinductive types with iteration and recursion. In B. Nordstrom, K. Pettersson and G. Plotkin, eds., Proc. of Workshop on Types for Proofs and Programs, TYPES'92, pp. 193-217. Dept. of Comp. Sci., Chalmers Univ. of Techn. and Goteborg Univ, 1992.]]Google ScholarGoogle Scholar
  21. 21.H. Geuvers. Inconsistency of classical logic in type theory. Unpublished note, 2001.]]Google ScholarGoogle Scholar
  22. 22.H. Geuvers. Induction is not derivable in second order dependent type theory. In {1}, pp. 166-181.]]Google ScholarGoogle Scholar
  23. 23.T. G. Griffin. The formulae-as-types notion of control. In Conf. Record of 17th Annual ACM Symp. on Principles of Programming Languages, POPL'90, pp. 47-57. ACM Press, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.P. de Groote. A CPS-Translation of the -Calculus. In S. Tison, ed., Proc. of 19th Int. Coll. on Trees in Algebra and Programming, CAAP'94, vol. 787 of Lect. Notes in Comp. Sci., pp. 85-99. Springer-Verlag, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.P. de Groote. A simple calculus of exception handling.]]Google ScholarGoogle Scholar
  26. 26.P. de Groote. On the strong normalization of natural deduction with permutation- conversions. In P. Narendran and M. Rusinowitch, eds., Proc. of 10th Int. Conf. on Rewriting Techniques and Appl., RTA'99, vol. 1631 of Lect. Notes in Comp. Sci., pp. 45-59. Springer-Verlag, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.R. Harper and M. Lillibridge. Polymorphic type assignment and CPS conversion. LISP and Symbolic Computation, 6(4):361-380, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.R. Harper and M. Lillibridge. Explicit polymorphism and CPS conversion. In Conf. Record of 20th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL'93, pp. 206-219. ACM Press, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.D. Leivant. Contracting proofs to programs. In {37}, pp. 279-327.]]Google ScholarGoogle Scholar
  30. 30.R. Matthes. Extensions of System F by Iteration and Primitive Recursion on Monotone Inductive Types. PhD thesis, Ludwig-Maximilians-Universitat Munchen, 1998.]]Google ScholarGoogle Scholar
  31. 31.N. P. Mendler. Inductive types and type constraints in the second-order lambda-calculus. Ann. of Pure and Appl. Logic, 51(1-2):159-172, 1991.]]Google ScholarGoogle ScholarCross RefCross Ref
  32. 32.A. R. Meyer and M. Wand. Continuation semantics in typed lambda-calculi (summary). In R. Parikh, ed., Proc. of 3rd Workshop on Logics of Programs, vol. 193 of Lect. Notes in Comp. Sci., pp. 219-224. Springer-Verlag, 1985.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33.C. R. Murthy. An evaluation semantics for classical proofs. In Proc. of 6th Ann. IEEE Symp. on Logic in Computer Science, LICS'91, pp. 96-107. IEEE CS Press, 1991.]]Google ScholarGoogle ScholarCross RefCross Ref
  34. 34.H. Nakano. A constructive logic behind the catch and throw mechanism. Ann. of Pure and Appl. Logic, 69(2-3):269-301, 1994.]]Google ScholarGoogle ScholarCross RefCross Ref
  35. 35.C.-H. L. Ong. A semantic view of classical proofs: type-theoretic, categorical, and denotational characterizations (preliminary extended abstract). In Proc. of 11th Ann. IEEE Symp. on Logic in Computer Science, LICS'96, pp. 230-241. IEEE CS Press, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. 36.C.-H. L. Ong and C. A. Stewart. A Curry-Howard foundation for functional computation with control. In Conf. Record of 24th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL'97, pp. 215-227, ACM Press, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 37.P. Odifreddi, ed. Logic and Computer Science, vol. 31 of APIC Studies in Data Processing. Academic Press, 1990.]]Google ScholarGoogle Scholar
  38. 38.M. Parigot. -calculus: An algorithmic interpretation of classical natural deduction. In A. Voronkov, ed., Proc. of Int. Conf. on Logic Programming and Automated Reasoning, LPAR'92, vol. 624 of Lect. Notes in Comp. Sci., pp. 190-201. Springer-Verlag, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 39.M. Parigot. Classical proofs as programs. In G. Gottlob, A. Leitsch, and D. Mundici, eds., Proc. of 3rd Kurt Godel Colloquium, KGC'93, vol. 713 of Lecture Notes in Computer Science, pp. 263-276. Springer-Verlag, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. 40.C. Paulin-Mohring. Inductive definitions in the system Coq: Rules and properties. In M. Bezem and J. F. Groote, eds., Proc. of 1st Int. Conf. on Typed Lambda Calculi and Appl., TLCA'93, vol. 664 of Lect. Notes in Computer Science, pp. 328-345. Springer-Verlag, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 41.G. Plotkin. Call-by-name, call-by-value and the -calculus. Theor. Comp. Sci., 1(2):125-159, 1975.]]Google ScholarGoogle ScholarCross RefCross Ref
  42. 42.N. J. Rehof and M. H. S~rensen. The calculus. In M. Hagiya and J. Mitchell, eds., Proc. of 2nd Int. Symp. on Theor. Aspects of Comp. Sci., TACS'94, vol. 789 of Lect. Notes in Comp. Sci., pp. 516-542. Springer-Verlag, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. 43.Z. Shao, B. Saha, V. Trifonov, and N. Papaspyrou. A type system for certified binaries. To appear in Conf. Record of 29th Ann. ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL'02. ACM Press, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. 44.TAL project. http://www.cs.cornell.edu/talc]]Google ScholarGoogle Scholar
  45. 45.T. Uustalu and V. Vene. Least and greatest fixedpoints in intuitionistic natural deduction. Theor. Comp. Sci., to appear.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. 46.B. Werner. Meta-theorie du Calcul des Constructions Inductives. PhD thesis, Universite Paris 7, 1994.]]Google ScholarGoogle Scholar
  47. 47.H. Xi and C. Schurmann. CPS transform and type derivations for Dependent ML. In Proc. of 8th Workshop on Logic, Language, Information and Computation, WoLLIC'01, 2001.]]Google ScholarGoogle Scholar

Index Terms

  1. CPS translating inductive and coinductive types

                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 '02: Proceedings of the 2002 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation
                  January 2002
                  146 pages
                  ISBN:158113455X
                  DOI:10.1145/503032

                  Copyright © 2002 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: 14 January 2002

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • Article

                  Acceptance Rates

                  PEPM '02 Paper Acceptance Rate11of22submissions,50%Overall Acceptance Rate66of120submissions,55%

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader