Simply RaTT: a fitch-style modal calculus for reactive programming without space leaks

Functional reactive programming (FRP) is a paradigm for programming with signals and events, allowing the user to describe reactive programs on a high level of abstraction. For this to make sense, an FRP language must ensure that all programs are causal, and can be implemented without introducing space leaks and time leaks. To this end, some FRP languages do not give direct access to signals, but just to signal functions. Recently, modal types have been suggested as an alternative approach to ensuring causality in FRP languages in the synchronous case, giving direct access to the signal and event abstractions. This paper presents Simply RaTT, a new modal calculus for reactive programming. Unlike prior calculi, Simply RaTT uses a Fitch-style approach to modal types, which simplifies the type system and makes programs more concise. Echoing a previous result by Krishnaswami for a different language, we devise an operational semantics that safely executes Simply RaTT programs without space leaks. We also identify a source of time leaks present in other modal FRP languages: The unfolding of fixed points in delayed computations. The Fitch-style presentation allows an easy way to rules out these leaks, which appears not to be possible in the more traditional dual context approach.

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

[2]  Marc Pouzet,et al.  Lucid Synchrone - version 2.0: Tutorial and reference manual , 2001 .

[3]  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.

[4]  Peter Dybjer,et al.  Intuitionistic Type Theory , 2016 .

[5]  Conal Elliott,et al.  Push-pull functional reactive programming , 2009, Haskell.

[6]  Bas Spitters,et al.  Modal dependent type theory and dependent right adjoints , 2018, Mathematical Structures in Computer Science.

[7]  Kristin Shrader-frechette General The Scientific Background , 1993 .

[8]  Henrik Nilsson,et al.  Functional reactive programming, continued , 2002, Haskell '02.

[9]  Paul Hudak,et al.  Functional reactive animation , 1997, ICFP '97.

[10]  Alan Jeffrey,et al.  LTL types FRP: linear-time temporal logic propositions as types, proofs as functional reactive programs , 2012, PLPV '12.

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

[12]  Richmond H. Thomason,et al.  Symbolic logic : an introduction , 1969 .

[13]  Conor McBride,et al.  Applicative programming with effects , 2008, J. Funct. Program..

[14]  José Manuél Gómez-Pérez,et al.  Success Stories , 2019, Exploiting Linked Data and Knowledge Graphs in Large Organisations.

[15]  Rasmus Ejlers Møgelberg,et al.  The clocks they are adjunctions: Denotational semantics for Clocked Type Theory , 2018, FSCD.

[16]  Nick Benton,et al.  Ultrametric Semantics of Reactive Programs , 2011, 2011 IEEE 26th Annual Symposium on Logic in Computer Science.

[17]  Adrien Guatto,et al.  A Generalized Modality for Recursion , 2018, LICS.

[18]  Nick Benton,et al.  Higher-order functional reactive programming in bounded space , 2012, POPL '12.

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

[20]  Gérard Berry,et al.  The ESTEREL Synchronous Programming Language and its Mathematical Semantics , 1984, Seminar on Concurrency.

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

[22]  Nicolas Halbwachs,et al.  LUSTRE: a declarative language for real-time programming , 1987, POPL '87.

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

[24]  Fred Kröger,et al.  Temporal Logic of Programs , 1987, EATCS Monographs on Theoretical Computer Science.

[25]  Ranald Clouston,et al.  Fitch-Style Modal Lambda Calculi , 2017, FoSSaCS.

[26]  Wolfgang Jeltsch Temporal logic with "Until", functional reactive programming with processes, and concrete process categories , 2013, PLPV '13.

[27]  Rasmus Ejlers Møgelberg,et al.  The clocks are ticking: No more delays! , 2017, 2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS).

[28]  Andrew Barber,et al.  Dual Intuitionistic Linear Logic , 1996 .