The clocks are ticking: no more delays!: reduction semantics for type theory with guarded recursion

Guarded recursion in the sense of Nakano allows general recursive types and terms to be added to type theory without breaking consistency. Recent work has demonstrated applications of guarded recursion such as programming with codata, reasoning about coinductive types, as well as constructing and reasoning about denotational models of general recursive types. Guarded recursion can also be used as an abstract form of step-indexing for reasoning about programming languages with advanced features. Ultimately, we would like to have an implementation of a type theory with guarded recursion in which all these applications can be carried out and machine-checked. In this paper, we take a step towards this goal by devising a suitable reduction semantics. We present Clocked Type Theory, a new type theory for guarded recursion that is more suitable for reduction semantics than the existing ones. We prove confluence, strong normalisation and canonicity for its reduction semantics, constructing the theoretical basis for a future implementation. We show how coinductive types as exemplified by streams can be encoded, and derive that the type system ensures productivity of stream definitions.

[1]  Brigitte Pientka,et al.  Well-founded recursion with copatterns and sized types , 2016, Journal of Functional Programming.

[2]  Hiroshi Nakano,et al.  A modality for recursion , 2000, Proceedings Fifteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.99CB36332).

[3]  Paula Severi,et al.  Pure type systems with corecursion on streams: from finite to infinitary normalisation , 2012, ICFP.

[4]  Andrew W. Appel,et al.  An indexed model of recursive types for foundational proof-carrying code , 2001, TOPL.

[5]  Andreas Abel,et al.  A Formalized Proof of Strong Normalization for Guarded Recursive Types , 2014, APLAS.

[6]  Lars Birkedal,et al.  A Model of Countable Nondeterminism in Guarded Type Theory , 2014, RTA-TLCA.

[7]  Rasmus Ejlers Møgelberg A type theory for productive coprogramming via guarded recursion , 2014, CSL-LICS.

[8]  Nils Anders Danielsson Beating the Productivity Checker Using Embedded Languages , 2010, PAR@ITP.

[9]  Robert Harper,et al.  Constructing Type Systems over an Operational Semantics , 1992, J. Symb. Comput..

[10]  Per Martin-Löf,et al.  Intuitionistic type theory , 1984, Studies in proof theory.

[11]  Lars Birkedal,et al.  Impredicative Concurrent Abstract Predicates , 2014, ESOP.

[12]  P. Bahr,et al.  The Clocks Are Ticking : No More Delays ! ( technical appendix ) , 2017 .

[13]  Bas Spitters,et al.  Guarded Cubical Type Theory: Path Equality for Guarded Recursion , 2016, CSL.

[14]  Robert Atkey,et al.  Productive coprogramming with guarded recursion , 2013, ICFP.

[15]  Patrick Lincoln,et al.  Linear logic , 1992, SIGA.

[16]  James Cheney,et al.  A dependent nominal type theory , 2012, Log. Methods Comput. Sci..

[17]  Brigitte Pientka,et al.  Copatterns: programming infinite structures by observations , 2013, POPL.

[18]  Rasmus Ejlers Møgelberg,et al.  Denotational semantics of recursive types in synthetic guarded domain theory , 2016, 2016 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS).

[19]  Alan Jeffrey,et al.  Functional reactive types , 2014, CSL-LICS.

[20]  Masako Takahashi,et al.  Parallel reductions in λ-calculus (revised version) , 1992 .

[21]  Luís Pinto,et al.  Type-based termination of recursive definitions , 2004, Mathematical Structures in Computer Science.

[22]  Neelakantan R. Krishnaswami,et al.  Higher-order functional reactive programming without spacetime leaks , 2013, ICFP.

[23]  J. Gallier,et al.  A Proof of Strong Normalization for the Theor y of Constructions Using a Kripke-like Interpretation , 1990 .

[24]  Rasmus Ejlers Møgelberg,et al.  Guarded Dependent Type Theory with Coinductive Types , 2016, FoSSaCS.

[25]  Prakash Panangaden,et al.  Fair reactive programming , 2014, POPL.

[26]  Rasmus Ejlers Møgelberg,et al.  First Steps in Synthetic Guarded Domain Theory: Step-Indexing in the Topos of Trees , 2011, 2011 IEEE 26th Annual Symposium on Logic in Computer Science.

[27]  Amr Sabry,et al.  Proving the correctness of reactive systems using sized types , 1996, POPL '96.

[28]  William W. Tait,et al.  Intensional interpretations of functionals of finite type I , 1967, Journal of Symbolic Logic.

[29]  Thierry Coquand,et al.  Cubical Type Theory: A Constructive Interpretation of the Univalence Axiom , 2015, TYPES.