[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/2784731.2784752acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

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

Published: 29 August 2015 Publication History

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.
[2]
Gérard Berry and Georges Gonthier. The esterel synchronous programming language: Design, semantics, implementation. Science of computer programming, 19(2):87–152, 1992.
[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.
[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.
[5]
Antony Courtney and Conal Elliott. Genuinely functional user interfaces. In Haskell Workshop, 2001.
[6]
Evan Czaplicki and Stephen Chong. Asynchronous functional reactive programming for GUIs. In PLDI, pages 411–422, 2013.
[7]
Conal Elliott. Push-pull functional reactive programming. In Haskell Symposium, pages 25–36, 2009.
[8]
Conal Elliott and Paul Hudak. Functional reactive animation. In International Conference on Functional Programming (ICFP), 1997.
[9]
Wolfgang Jeltsch. Signals, not generators! Trends in Functional Programming, pages 145–160, 2009.
[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.
[11]
Neelakantan R Krishnaswami. Higher-order functional reactive programming without spacetime leaks. In International Conference on Functional Programming (ICFP), 2013.
[12]
John Launchbury and Simon L. Peyton Jones. Lazy functional state threads. In Programming Language Design and Implementation (PLDI), pages 24–35, 1994.
[13]
Simon Marlow, Ryan Newton, and Simon Peyton Jones. A monad for deterministic parallelism. In Haskell Symposium, pages 71–82, 2011.
[14]
Conor Mcbride and Ross Paterson. Applicative programming with effects. J. Funct. Program., 18(1):1–13, January 2008.
[15]
Henrik Nilsson, Antony Courtney, and John Peterson. Functional reactive programming, continued. In Haskell Workshop, 2002.
[16]
Gergely Patai. Efficient and compositional higher-order streams. In Functional and Constraint Logic Programming (WFLP). 2011.
[17]
John Peterson, Paul Hudak, and Conal Elliott. Lambda in motion: Controlling robots with haskell. In Practical Aspects of‘ Declarative Languages (PADL), 1999.
[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.
[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.
[20]
Atze van der Ploeg. Monadic functional reactive programming. In Haskell Symposium, pages 117–128, 2013.
[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.

Cited By

View all
  • (2023)Asynchronous Modal FRPProceedings of the ACM on Programming Languages10.1145/36078477:ICFP(476-510)Online publication date: 30-Aug-2023
  • (2022)Modal FRP for all: Functional reactive programming without space leaks in HaskellJournal of Functional Programming10.1017/S095679682200013232Online publication date: 26-Dec-2022
  • (2021)Trampoline variables: a general method for state accumulation in reactive programmingProceedings of the 8th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems10.1145/3486605.3486787(27-40)Online publication date: 18-Oct-2021
  • Show More Cited By

Index Terms

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

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming
    August 2015
    436 pages
    ISBN:9781450336697
    DOI:10.1145/2784731
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 50, Issue 9
      ICFP '15
      September 2015
      436 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2858949
      • Editor:
      • Andy Gill
      Issue’s Table of Contents
    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

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 29 August 2015

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Functional Reactive Programming
    2. Kripke Logical Relations
    3. Purely Functional IO
    4. Space-leak

    Qualifiers

    • Research-article

    Conference

    ICFP'15
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 333 of 1,064 submissions, 31%

    Upcoming Conference

    ICFP '25
    ACM SIGPLAN International Conference on Functional Programming
    October 12 - 18, 2025
    Singapore , Singapore

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)22
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 07 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Asynchronous Modal FRPProceedings of the ACM on Programming Languages10.1145/36078477:ICFP(476-510)Online publication date: 30-Aug-2023
    • (2022)Modal FRP for all: Functional reactive programming without space leaks in HaskellJournal of Functional Programming10.1017/S095679682200013232Online publication date: 26-Dec-2022
    • (2021)Trampoline variables: a general method for state accumulation in reactive programmingProceedings of the 8th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems10.1145/3486605.3486787(27-40)Online publication date: 18-Oct-2021
    • (2020)Hailstorm: A Statically-Typed, Purely Functional Language for IoT ApplicationsProceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming10.1145/3414080.3414092(1-16)Online publication date: 8-Sep-2020
    • (2020)Towards secure IoT programming in HaskellProceedings of the 13th ACM SIGPLAN International Symposium on Haskell10.1145/3406088.3409027(136-150)Online publication date: 27-Aug-2020
    • (2019)Synthesizing functional reactive programsProceedings of the 12th ACM SIGPLAN International Symposium on Haskell10.1145/3331545.3342601(162-175)Online publication date: 8-Aug-2019
    • (2019)Screaming in the IO monad: a realtime audio processing and control experiment in HaskellProceedings of the 7th ACM SIGPLAN International Workshop on Functional Art, Music, Modeling, and Design10.1145/3331543.3342585(71-82)Online publication date: 23-Aug-2019
    • (2019)Temporal Stream Logic: Synthesis Beyond the BoolsComputer Aided Verification10.1007/978-3-030-25540-4_35(609-629)Online publication date: 12-Jul-2019
    • (2018)Rhine: FRP with type-level clocksACM SIGPLAN Notices10.1145/3299711.324275753:7(145-157)Online publication date: 17-Sep-2018
    • (2018)Rhine: FRP with type-level clocksProceedings of the 11th ACM SIGPLAN International Symposium on Haskell10.1145/3242744.3242757(145-157)Online publication date: 17-Sep-2018
    • 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

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media