skip to main content
10.1145/2976002.2976010acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Functional reactive programming, refactored

Published:08 September 2016Publication History

ABSTRACT

Functional Reactive Programming (FRP) has come to mean many things. Yet, scratch the surface of the multitude of realisations, and there is great commonality between them. This paper investigates this commonality, turning it into a mathematically coherent and practical FRP realisation that allows us to express the functionality of many existing FRP systems and beyond by providing a minimal FRP core parameterised on a monad. We give proofs for our theoretical claims and we have verified the practical side by benchmarking a set of existing, non-trivial Yampa applications running on top of our new system with very good results.

References

  1. Reification of time in FRP. http://pchiusano.blogspot.co.uk/ 2010/07/reification-of-time-in-frp-is.html.Google ScholarGoogle Scholar
  2. Haskanoid. github.com/ivanperez-keera/haskanoid.Google ScholarGoogle Scholar
  3. Magic Cookies! https://play.google.com/store/apps/ details?id=uk.co.keera.games.magiccookies.Google ScholarGoogle Scholar
  4. Pipes. https://hackage.haskell.org/package/pipes.Google ScholarGoogle Scholar
  5. E. Bainomugisha, A. L. Carreton, T. v. Cutsem, S. Mostinckx, and W. d. Meuter. A survey on reactive programming. ACM Computing Surveys (CSUR), 45(4):52, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Bärenz, I. Perez, and H. Nilsson. Mathematical Properties of Monadic Stream Functions. http://cs.nott.ac.uk/~ixp/ papers/msfmathprops.pdf, 2016.Google ScholarGoogle Scholar
  7. K. Claessen and J. Hughes. QuickCheck: a lightweight tool for random testing of Haskell programs. ACM Sigplan Notices, 46:53– 64, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Courtney and C. Elliott. Genuinely Functional User Interfaces. In Haskell Workshop, pages 41–69, Sept. 2001.Google ScholarGoogle Scholar
  9. A. Courtney, H. Nilsson, and J. Peterson. The Yampa arcade. In Haskell Workshop, pages 7–18, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Elliott and P. Hudak. Functional Reactive Animation. In ACM SIGPLAN Notices, volume 32(8), pages 263–273, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Gibbons and G. Hutton. Proof Methods for Corecursive Programs. Fundamenta Informaticae Special Issue on Program Transformation, 66(4):353–366, April-May 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Hughes. Generalising monads to arrows. Science of Computer Programming, 37(1):67 – 111, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Hughes. Programming with Arrows. In V. Vene and T. Uustalu, editors, 5th International School on Advanced Functional Programming, volume 3622, pages 73–129, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. O. Kiselyov. Iteratees. In Functional and Logic Programming: 11th International Symposium, FLOPS 2012, pages 166–181, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Liang, P. Hudak, and M. Jones. Monad transformers and modular interpreters. In Symposium on Principles of programming languages, pages 333–343, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. H. Liu, E. Cheng, and P. Hudak. Causal commutative arrows and their optimization. In ACM Sigplan Notices, volume 44, pages 35–46, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. H. Nilsson. Dynamic Optimization for FRP using Generalized Algebraic Data Types. International Conference on Functional Programming, pages 54–65, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. H. Nilsson, A. Courtney, and J. Peterson. Functional reactive programming, continued. In Haskell Workshop, pages 51–64, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. Patai. Efficient and compositional higher-order streams. In Functional and Constraint Logic Programming, pages 137–154. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Paterson. A new notation for arrows. In International Conference on Functional Programming, pages 229–240, Sept. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. I. Perez and H. Nilsson. Bridging the GUI Gap with Reactive Values and Relations. In Haskell Symposium, pages 47–58, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. K. C. Rovers. Functional model-based design of embedded systems with UniTi. PhD thesis, 2011.Google ScholarGoogle ScholarCross RefCross Ref
  23. N. Sculthorpe. Towards Safe and Efficient Functional Reactive Programming. PhD thesis, School of Computer Science, University of Nottingham, July 2011.Google ScholarGoogle Scholar
  24. A. van der Ploeg. Monadic Functional Reactive Programming. In Haskell Symposium, pages 117–128, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Z. Wan and P. Hudak. Functional Reactive Programming from First Principles. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 242–252, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. Winograd-Cort and P. Hudak. Wormholes: Introducing Effects to FRP. In Haskell Symposium, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Functional reactive programming, refactored

    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
    • Published in

      cover image ACM Conferences
      Haskell 2016: Proceedings of the 9th International Symposium on Haskell
      September 2016
      192 pages
      ISBN:9781450344340
      DOI:10.1145/2976002

      Copyright © 2016 ACM

      © 2016 Association for Computing Machinery. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of a national government. As such, the Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only.

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 8 September 2016

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate57of143submissions,40%

      Upcoming Conference

      ICFP '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader