skip to main content
research-article

Pure type systems with corecursion on streams: from finite to infinitary normalisation

Published:09 September 2012Publication History
Skip Abstract Section

Abstract

In this paper, we use types for ensuring that programs involving streams are well-behaved. We extend pure type systems with a type constructor for streams, a modal operator next and a fixed point operator for expressing corecursion. This extension is called Pure Type Systems with Corecursion (CoPTS). The typed lambda calculus for reactive programs defined by Krishnaswami and Benton can be obtained as a CoPTS. CoPTSs allow us to study a wide range of typed lambda calculi extended with corecursion using only one framework. In particular, we study this extension for the calculus of constructions which is the underlying formal language of Coq. We use the machinery of infinitary rewriting and formalise the idea of well-behaved programs using the concept of infinitary normalisation. The set of finite and infinite terms is defined as a metric completion. We establish a precise connection between the modal operator (• A) and the metric at a syntactic level by relating a variable of type (• A) with the depth of all its occurrences in a term. This syntactic connection between the modal operator and the depth is the key to the proofs of infinitary weak and strong normalisation.

References

  1. S. Abramsky and C.-H. L. Ong. Full abstraction in the lazy lambda calculus. Inform. and Comput., 105 (2): 159--267, 1993. ISSN 0890-5401. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. H. Barendregt. Lambda calculi with types. In S. Abramsky, D. Gabbay, and T. Maibaum, editors, Handbook of Logic in Computer Science, volume 2, pages 118--310. Oxford University Press, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H. P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. North-Holland, Amsterdam, Revised edition, 1984. ISBN 0-444-86748-1; 0-444-87508-5.Google ScholarGoogle Scholar
  4. S. Berardi. Type Dependency and Constructive Mathematics. PhD thesis, Carnegie Mellon University and Universitá di Torino, 1990.Google ScholarGoogle Scholar
  5. A. Berarducci. Infinite λ-calculus and non-sensible models. In Logic and algebra (Pontignano, 1994), pages 339--377. Dekker, New York, 1996.Google ScholarGoogle Scholar
  6. L. Birkedal, J. Schwinghammer, and K. Støvring. A metric model of lambda calculus with guarded recursion. Presented at FICS 2010, 2010.Google ScholarGoogle Scholar
  7. L. Birkedal, R. E. Møgelberg, J. Schwinghammer, and K. Støvring. First steps in synthetic guarded domain theory: Step-indexing in the topos of trees. In LICS, pages 55--64, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. T. Borghuis. Modal pure type systems. Journal of Logic, Language and Information, 7 (3): 265--296, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. Coquand. Infinite objects in type theory. In TYPES, pages 62--78, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. T. Coquand and H. Herbelin. A-translation and looping combinators in pure type systems. J. Funct. Program., 4 (1): 77--88, 1994.Google ScholarGoogle ScholarCross RefCross Ref
  11. T. Coquand and G. P. Huet. The calculus of constructions. Inf. Comput., 76 (2/3): 95--120, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H. B. Curry and R. Feys. Combinatory Logic, volume I. North-Holland, 1958.Google ScholarGoogle Scholar
  13. N. G. de Bruijn. A survey of the AUTOMATH project. In J. R. Hindley and J. Seldin, editors, To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism. Academic Press, 1980.Google ScholarGoogle Scholar
  14. J. Endrullis, C. Grabmayer, D. Hendriks, A. Isihara, and J. W. Klop. Productivity of stream definitions. Theor. Comput. Sci., 411 (4-5): 765--782, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. H. Geuvers. The Church-Rosser property for beta-eta-reduction in typed lambda-calculi. In LICS, pages 453--460, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  16. H. Geuvers and M.-J. Nederhof. Modular proof of strong normalization for the calculus of constructions. J. Funct. Program., 1 (2): 155--189, 1991.Google ScholarGoogle ScholarCross RefCross Ref
  17. H. Geuvers and J. Verkoelen. On fixed points and looping combinators in type theory. Note, 2009.Google ScholarGoogle Scholar
  18. E. Giménez. A Calculus of Infinite constructions and its applications to the verification of communicating systems. PhD thesis, Ecole Normale Supérieure de Lyon, 1996.Google ScholarGoogle Scholar
  19. E. Giménez. Structural recursive definitions in type theory. In ICALP, pages 397--408, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. E. Giménez and P. Casterán. A tutorial on {co-}inductive types in coq. Technical report, Inria, 1998.Google ScholarGoogle Scholar
  21. J.-Y. Girard. Interprétation fonctionelle et élimination des coupures de l'arithmétique d'ordre supérieur. PhD thesis, Université Paris VII, 1972.Google ScholarGoogle Scholar
  22. W. A. Howard. The formulae-as-types notion of construction. In J. R. Hindley and J. Seldin, editors, To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism. Academic Press, 1980.Google ScholarGoogle Scholar
  23. G. Hutton and M. Jaskelioff. Representing Contractive Functions on Streams. Submitted to the Journal of Functional Programming, 2011.Google ScholarGoogle Scholar
  24. J. R. Kennaway, J. W. Klop, M. R. Sleep, and F.-J. de Vries. Infinitary lambda calculi and Böhm models. In RTA, pages 257--270, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. R. Kennaway, J. W. Klop, M. R. Sleep, and F.-J. de Vries. Transfinite reductions in orthogonal term rewriting systems. Inf. Comput., 119 (1): 18--38, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. R. Kennaway, J. W. Klop, M. R. Sleep, and F.-J. de Vries. Infinitary lambda calculus. Theor. Comput. Sci., 175 (1): 93--125, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Ketema and J. G. Simonsen. Infinitary combinatory reduction systems. Inf. Comput., 209 (6): 893--926, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. W. Klop. Combinatory Reduction Systems. PhD thesis, Rijkuniversiteit Utrecht, 1980.Google ScholarGoogle Scholar
  29. J. W. Klop, V. van Oostrom, and F. van Raamsdonk. Combinatory reduction systems: Introduction and survey. Theor. Comput. Sci., 121 (1&2): 279--308, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. N. R. Krishnaswami and N. Benton. Ultrametric semantics of reactive programs. In LICS, pages 257--266, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. N. R. Krishnaswami and N. Benton. A semantic model for graphical user interfaces. In ICFP, pages 45--57, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. N. R. Krishnaswami, N. Benton, and J. Hoffmann. Higher-order functional reactive programming in bounded space. In POPL, pages 45--58, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J.-J. Lévy. An algebraic interpretation of the λβK-calculus, and an application of a labelled λ-calculus. Theoretical Computer Science, 2 (1): 97--114, 1976.Google ScholarGoogle ScholarCross RefCross Ref
  34. G. Longo. Set-theoretical models of λ-calculus: theories, expansions, isomorphisms. Ann. Pure Appl. Logic, 24 (2): 153--188, 1983. ISSN 0168-0072.Google ScholarGoogle ScholarCross RefCross Ref
  35. Z. Luo. ECC, an Extended Calculus of Constructions. In LICS, pages 386--395, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. H. Nakano. A modality for recursion. In LICS, pages 255--266, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. R. P. Nederpelt. Strong Normalization in a typed lambda calculus. PhD thesis, Technische Universiteit Eindhoven, The Netherlands, 1973.Google ScholarGoogle Scholar
  38. J. C. Reynolds. Towards a theory of type structure. In Symposium on Programming, pages 408--423, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. P. Severi and E. Poll. Pure type systems with definitions. In LFCS, pages 316--328, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. Terlouw. Een nadere bewijstheoretische analyse vanm GSTT's. Manuscript, 1989.Google ScholarGoogle Scholar
  41. B. Werner. Une théorie des constructions inductives. PhD thesis, Université Paris VII, 1994.Google ScholarGoogle Scholar
  42. H. Zantema and M. Raffelsieper. Proving productivity in infinite data structures. In RTA, pages 401--416, 2010.Google ScholarGoogle Scholar

Index Terms

  1. Pure type systems with corecursion on streams: from finite to infinitary normalisation

        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 Notices
          ACM SIGPLAN Notices  Volume 47, Issue 9
          ICFP '12
          September 2012
          368 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2398856
          Issue’s Table of Contents
          • cover image ACM Conferences
            ICFP '12: Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
            September 2012
            392 pages
            ISBN:9781450310543
            DOI:10.1145/2364527

          Copyright © 2012 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 9 September 2012

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!