skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

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

Published:26 July 2019Publication History
Skip Abstract Section

Abstract

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.

Skip Supplemental Material Section

Supplemental Material

a109-graulund.webm

References

  1. Andrew W. Appel and David McAllester. 2001. An Indexed Model of Recursive Types for Foundational Proof-carrying Code. ACM Trans. Program. Lang. Syst. 23, 5 (Sept. 2001), 657–683. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Patrick Bahr, Hans Bugge Grathwohl, and Rasmus Ejlers Møgelberg. 2017. The clocks are ticking: No more delays!. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017. IEEE Computer Society, Washington, DC, USA, 1–12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Andrew Barber. 1996. Dual intuitionistic linear logic. Technical Report. University of Edinburgh, Edinburgh, UK.Google ScholarGoogle Scholar
  4. Lars Birkedal, Rasmus Ejlers Møgelberg, Jan Schwinghammer, and Kristian Støvring. 2011. First steps in synthetic guarded domain theory: Step-indexing in the topos of trees. In In Proc. of LICS. IEEE Computer Society, Washington, DC, USA, 55–64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Paul Caspi, Daniel Pilaud, Nicolas Halbwachs, and John A. Plaice. 1987. LUSTRE: A Declarative Language for Real-time Programming. In Proceedings of the 14th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL ’87). ACM, New York, NY, USA, 178–188. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Andrew Cave, Francisco Ferreira, Prakash Panangaden, and Brigitte Pientka. 2014. Fair Reactive Programming. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’14). ACM, San Diego, California, USA, 361–372. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Ranald Clouston. 2018. Fitch-style modal lambda calculi. In Foundations of Software Science and Computation Structures, Christel Baier and Ugo Dal Lago (Eds.), Vol. 10803. Springer, Springer International Publishing, Cham, 258–275.Google ScholarGoogle Scholar
  8. Ranald Clouston, Bassel Mannaa, Rasmus Ejlers Møgelberg, Andrew M. Pitts, and Bas Spitters. 2018. Modal Dependent Type Theory and Dependent Right Adjoints. CoRR abs/1804.05236 (2018), 1–21. arXiv: 1804.05236 http://arxiv.org/abs/ 1804.05236Google ScholarGoogle Scholar
  9. Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In Proceedings of the Second ACM SIGPLAN International Conference on Functional Programming (ICFP ’97). ACM, New York, NY, USA, 263–273. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Conal M. Elliott. 2009. Push-pull Functional Reactive Programming. In Proceedings of the 2nd ACM SIGPLAN Symposium on Haskell (Haskell ’09). ACM, New York, NY, USA, 25–36. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Pascal Raymond Erwan Jahier and Nicolas Halbwachs. 2019. The LUSTRE V6 Reference Manual. https://www- verimag. imag.fr/DIST- TOOLS/SYNCHRONE/lustre- v6/doc/lv6- ref- man.pdfGoogle ScholarGoogle Scholar
  12. Esterel Technologies SA. 2019a. Scientific Background. http://www.esterel- technologies.com/about- us/scientific- historicbackground/ .Google ScholarGoogle Scholar
  13. Esterel Technologies SA. 2019b. Success Stories. http://www.esterel- technologies.com/success- stories/ .Google ScholarGoogle Scholar
  14. Frederic Benton Fitch. 1952. Symbolic logic, an introduction. Ronald Press Co., New York, NY, USA.Google ScholarGoogle Scholar
  15. Adrien Guatto. 2018. A generalized modality for recursion. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science. ACM, 482–491. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Alan Jeffrey. 2012. LTL types FRP: linear-time temporal logic propositions as types, proofs as functional reactive programs. In Proceedings of the sixth workshop on Programming Languages meets Program Verification, PLPV 2012, Philadelphia, PA, USA, January 24, 2012, Koen Claessen and Nikhil Swamy (Eds.). ACM, Philadelphia, PA, USA, 49–60. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Alan Jeffrey. 2014. Functional Reactive Types. In 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) (CSL-LICS ’14). ACM, New York, NY, USA, Article 54, 9 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Wolfgang Jeltsch. 2013. Temporal Logic with "Until", Functional Reactive Programming with Processes, and Concrete Process Categories. In Proceedings of the 7th Workshop on Programming Languages Meets Program Verification (PLPV ’13). ACM, New York, NY, USA, 69–78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Neelakantan R. Krishnaswami. 2013. Higher-order Functional Reactive Programming Without Spacetime Leaks. In Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming (ICFP ’13). ACM, Boston, Massachusetts, USA, 221–232. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Neelakantan R. Krishnaswami and Nick Benton. 2011. Ultrametric Semantics of Reactive Programs. In 2011 IEEE 26th Annual Symposium on Logic in Computer Science. IEEE Computer Society, Washington, DC, USA, 257–266. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Neelakantan R. Krishnaswami, Nick Benton, and Jan Hoffmann. 2012. Higher-order functional reactive programming in bounded space. In Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2012, Philadelphia, Pennsylvania, USA, January 22-28, 2012, John Field and Michael Hicks (Eds.). ACM, Philadelphia, PA, USA, 45–58. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Bassel Mannaa and Rasmus Ejlers Møgelberg. 2018. The Clocks They Are Adjunctions: Denotational Semantics for Clocked Type Theory. In 3rd International Conference on Formal Structures for Computation and Deduction, FSCD 2018, July 9-12, 2018, Oxford, UK (LIPIcs), Hélène Kirchner (Ed.), Vol. 108. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, New York, NY, USA, 23:1–23:17.Google ScholarGoogle Scholar
  23. Per Martin-Löf and Giovanni Sambin. 1984. Intuitionistic type theory. Vol. 9. Bibliopolis Naples, Napoli, IT.Google ScholarGoogle Scholar
  24. Conor McBride and Ross Paterson. 2008. Applicative programming with effects. Journal of functional programming 18, 1 (2008), 1–13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Hiroshi Nakano. 2000. A modality for recursion. In Proceedings Fifteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.99CB36332). IEEE Computer Society, Washington, DC, USA, 255–266. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Henrik Nilsson, Antony Courtney, and John Peterson. 2002. Functional Reactive Programming, Continued. In Proceedings of the 2002 ACM SIGPLAN Workshop on Haskell (Haskell ’02). ACM, New York, NY, USA, 51–64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Amir Pnueli. 1977. The Temporal Logic of Programs. In Proceedings of the 18th Annual Symposium on Foundations of Computer Science. IEEE Computer Society, Washington, DC, USA, 46–57. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Marc Pouzet. 2006. Lucid synchrone, version 3. Tutorial and reference manual. Université Paris-Sud, LRI 1 (2006), 25.Google ScholarGoogle Scholar

Index Terms

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

          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

          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!