skip to main content
10.1145/2603088.2603132acmconferencesArticle/Chapter ViewAbstractPublication PageslicsConference Proceedingsconference-collections
research-article

A type theory for productive coprogramming via guarded recursion

Published: 14 July 2014 Publication History

Abstract

To ensure consistency and decidability of type checking, proof assistants impose a requirement of productivity on corecursive definitions. In this paper we investigate a type-based alternative to the existing syntactic productivity checks of Coq and Agda, using a combination of guarded recursion and quantification over clocks. This approach was developed by Atkey and McBride in the simply typed setting, here we extend it to a calculus with dependent types. Building on previous work on the topos-of-trees model we construct a model of the calculus using a family of presheaf toposes, each of which can be seen as a multi-dimensional version of the topos-of-trees. As part of the model construction we must solve the coherence problem for modelling dependent types in locally cartesian closed categories simulatiously in a whole family of locally cartesian closed categories. We do this by embedding all the categories in a large one and applying a recent approach to the coherence problem due to Streicher and Voevodsky.

References

[1]
A. Abel. Type-based termination, inflationary fixed-points, and mixed inductive-coinductive types. In FICS, volume 77 of EPTCS, pages 1--11, 2012.
[2]
T. Altenkirch and P. Morris. Indexed containers. In LICS, pages 277--285. IEEE Computer Society, 2009.
[3]
A. W. Appel and D. McAllester. An indexed model of recursive types for foundational proof-carrying code. ACM Transactions on Programming Languages and Systems, 23(5):657--683, September 2001.
[4]
A. W. Appel, P.-A. Melliès, C. D. Richards, and J. Vouillon. A very modal model of a modern, major, general type system. In Proc. of POPL, 2007.
[5]
R. Atkey and C. McBride. Productive coprogramming with guarded recursion. In ICFP, pages 197--208. ACM, 2013.
[6]
L. Birkedal, R. Møgelberg, J. Schwinghammer, and K. Støvring. First steps in synthetic guarded domain theory: step-indexing in the topos of trees. In Proceedings of LICS, 2011.
[7]
L. Birkedal, R. Møgelberg, J. Schwinghammer, and K. Støvring. First steps in synthetic guarded domain theory: step-indexing in the topos of trees. Logical Methods in Computer Science, 8(4), October 2012.
[8]
L. Birkedal and R. E. Møgelberg. Intensional type theory with guarded recursive types qua fixed points on universes. In LICS, pages 213--222. IEEE Computer Society, 2013.
[9]
N. A. Danielsson. Beating the productivity checker using embedded languages. In Proceedings of PAR, Electronic Proceedings of Theoretical Computer Science, 2010.
[10]
N. Ghani, P. Hancock, and D. Pattinson. Representations of stream processors using nested fixed points. Logical Methods in Computer Science, 5(3), 2009.
[11]
M. Hofmann. On the interpretation of type theory in locally cartesian closed categories. In Proc. of CSL, 1994.
[12]
M. Hofmann and T. Streicher. Lifting grothendieck universes. Unpublished manuscript.
[13]
C. Kapulkin, P. L. Lumsdaine, and V. Voevodsky. The simplicial model of univalent foundations. arXiv, 1211.2851, 2012.
[14]
N. R. Krishnaswami and N. Benton. Ultrametric semantics of reactive programs. In Proceedings LICS, 2011.
[15]
C. McBride and R. Paterson. Applicative programming with effects. Journal of Functional Programming, 18(1), 2008.
[16]
I. Moerdijk and E. Palmgren. Wellfounded trees in categories. Annals of Pure and Appl. Logic, 104:189--218, 2000.
[17]
H. Nakano. A modality for recursion. In Proc. of LICS, 2000.
[18]
J. L. Sacchini. Type-based productivity of stream definitions in the calculus of constructions. In LICS, pages 233--242. IEEE Computer Society, 2013.
[19]
M. Shulman. Univalence for inverse diagrams and homotopy canonicity. arxiv, 1203.3253, 2013.
[20]
T. Streicher. A model of type theory in simplicial sets. Unpublished, 2011.

Cited By

View all
  • (2025)A Modal Deconstruction of Löb InductionProceedings of the ACM on Programming Languages10.1145/37048669:POPL(864-892)Online publication date: 9-Jan-2025
  • (2024)Productivity Verification for Functional Programs by Reduction to Termination VerificationProceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation10.1145/3635800.3636963(70-82)Online publication date: 11-Jan-2024
  • (2022)On Coevaluation Behavior and EquivalenceMathematics10.3390/math1020380010:20(3800)Online publication date: 14-Oct-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CSL-LICS '14: Proceedings of the Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)
July 2014
764 pages
ISBN:9781450328869
DOI:10.1145/2603088
  • Program Chairs:
  • Thomas Henzinger,
  • Dale Miller
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 the author(s) 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].

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 July 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. categorical semantics
  2. corecursion
  3. denotational semantics
  4. dependent types
  5. guarded recursion

Qualifiers

  • Research-article

Conference

CSL-LICS '14
Sponsor:

Acceptance Rates

CSL-LICS '14 Paper Acceptance Rate 74 of 212 submissions, 35%;
Overall Acceptance Rate 215 of 622 submissions, 35%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)15
  • Downloads (Last 6 weeks)4
Reflects downloads up to 14 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2025)A Modal Deconstruction of Löb InductionProceedings of the ACM on Programming Languages10.1145/37048669:POPL(864-892)Online publication date: 9-Jan-2025
  • (2024)Productivity Verification for Functional Programs by Reduction to Termination VerificationProceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation10.1145/3635800.3636963(70-82)Online publication date: 11-Jan-2024
  • (2022)On Coevaluation Behavior and EquivalenceMathematics10.3390/math1020380010:20(3800)Online publication date: 14-Oct-2022
  • (2021)Polymorphic Iterable Sequential Effect SystemsACM Transactions on Programming Languages and Systems10.1145/345027243:1(1-79)Online publication date: 17-Apr-2021
  • (2021)Temporal Refinements for Guarded Recursive TypesProgramming Languages and Systems10.1007/978-3-030-72019-3_20(548-578)Online publication date: 23-Mar-2021
  • (2020)Denotational semantics for guarded dependent type theoryMathematical Structures in Computer Science10.1017/S096012952000008030:4(342-378)Online publication date: 8-May-2020
  • (2019)Differentiable causal computations via delayed traceProceedings of the 34th Annual ACM/IEEE Symposium on Logic in Computer Science10.5555/3470152.3470168(1-12)Online publication date: 24-Jun-2019
  • (2019)Bisimulation as path type for guarded recursive typesProceedings of the ACM on Programming Languages10.1145/32903173:POPL(1-29)Online publication date: 2-Jan-2019
  • (2019)Differentiable Causal Computations via Delayed Trace2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)10.1109/LICS.2019.8785670(1-12)Online publication date: Jun-2019
  • (2019)Well-definedness and observational equivalence for inductive–coinductive programsJournal of Logic and Computation10.1093/logcom/exv09129:4(419-468)Online publication date: 8-Jul-2019
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media