skip to main content
research-article

Practical principled FRP: forget the past, change the future, FRPNow!

Published:29 August 2015Publication History
Skip Abstract Section

Abstract

We present a new interface for practical Functional Reactive Programming (FRP) that (1) is close in spirit to the original FRP ideas, (2) does not have the original space-leak problems, without using arrows or advanced types, and (3) provides a simple and expressive way for performing IO actions from FRP code. We also provide a denotational semantics for this new interface, and a technique (using Kripke logical relations) for reasoning about which FRP functions may "forget their past", i.e. which functions do not have an inherent space-leak. Finally, we show how we have implemented this interface as a Haskell library called FRPNow.

References

  1. Heinrich Apfelmus. Reactive banana. Available at: hackage.haskell.org/package/reactive-banana.Google ScholarGoogle Scholar
  2. Gérard Berry and Georges Gonthier. The esterel synchronous programming language: Design, semantics, implementation. Science of computer programming, 19(2):87–152, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. Caspi, D. Pilaud, N. Halbwachs, and J. A. Plaice. Lustre: A declarative language for real-time programming. In Principles of Programming Languages (POPL), pages 178–188, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Jean-Louis Colac¸o, Alain Girault, Grégoire Hamon, and Marc Pouzet. Towards a Higher-order Synchronous Data-flow Language. In Conference on Embedded Software, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Antony Courtney and Conal Elliott. Genuinely functional user interfaces. In Haskell Workshop, 2001.Google ScholarGoogle Scholar
  6. Evan Czaplicki and Stephen Chong. Asynchronous functional reactive programming for GUIs. In PLDI, pages 411–422, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Conal Elliott. Push-pull functional reactive programming. In Haskell Symposium, pages 25–36, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Conal Elliott and Paul Hudak. Functional reactive animation. In International Conference on Functional Programming (ICFP), 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Wolfgang Jeltsch. Signals, not generators! Trends in Functional Programming, pages 145–160, 2009.Google ScholarGoogle Scholar
  10. Simon Peyton Jones. Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell. In Engineering theories of software construction, 2001.Google ScholarGoogle Scholar
  11. Neelakantan R Krishnaswami. Higher-order functional reactive programming without spacetime leaks. In International Conference on Functional Programming (ICFP), 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. John Launchbury and Simon L. Peyton Jones. Lazy functional state threads. In Programming Language Design and Implementation (PLDI), pages 24–35, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Simon Marlow, Ryan Newton, and Simon Peyton Jones. A monad for deterministic parallelism. In Haskell Symposium, pages 71–82, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Conor Mcbride and Ross Paterson. Applicative programming with effects. J. Funct. Program., 18(1):1–13, January 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Henrik Nilsson, Antony Courtney, and John Peterson. Functional reactive programming, continued. In Haskell Workshop, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Gergely Patai. Efficient and compositional higher-order streams. In Functional and Constraint Logic Programming (WFLP). 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. John Peterson, Paul Hudak, and Conal Elliott. Lambda in motion: Controlling robots with haskell. In Practical Aspects of‘ Declarative Languages (PADL), 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Simon L. Peyton Jones, Simon Marlow, and Conal Elliott. Stretching the storage manager: Weak pointers and stable names in haskell. In Implementation of Functional Languages (IFL), pages 37–58, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Marc Pouzet. Lucid Synchrone, version 3. Tutorial and reference manual. Université Paris-Sud, LRI, April 2006. Available at www.lri.fr/∼pouzet/lucid-synchrone.Google ScholarGoogle Scholar
  20. Atze van der Ploeg. Monadic functional reactive programming. In Haskell Symposium, pages 117–128, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Daniel Winograd-Cort, Hai Liu, and Paul Hudak. Virtualizing realworld objects in FRP. In Practical Aspects of Declarative Languages (PADL), pages 227–241. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Practical principled FRP: forget the past, change the future, FRPNow!

    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!