Abstract
Functional Reactive Programming (FRP) allows interactive applications to be modelled in a declarative manner using time-varying values. For practical reasons, however, operational constraints are often imposed, such as having a fixed time domain, time always flowing forward, and limiting the exploration of the past.
In this paper we show how these constraints can be overcome, giving local control over the time domain, the direction of time and the sampling step. We study the behaviour of FRP expressions when time flows backwards, and demonstrate how to synchronize subsystems running asynchronously and at different sampling rates. We have verified the practicality of our approach with two non-trivial games in which time control is central to the gameplay.
- CPR Baaij, M Kooijman, J Kuper, A Boeijink, and M Gerards. 2010. CLaSH: Structural descriptions of synchronous hardware using haskell. In EUROMICRO.Google Scholar
- Manuel Bärenz. 2017. Rhine - FRP with type-level clocks. http://www. manuelbaerenz.de/sites/default/files/Rhine.pdf (Draft).Google Scholar
- Antony Courtney. 2004. Modeling User Interfaces in a Functional Language. Ph.D. Dissertation. New Haven, CT, USA. AAI3125177. Google Scholar
Digital Library
- Antony Courtney and Conal Elliott. 2001. Genuinely Functional User Interfaces. In Haskell Workshop. 41–69.Google Scholar
- Antony Courtney, Henrik Nilsson, and John Peterson. 2003. The Yampa arcade. In Proceedings of the 2003 ACM SIGPLAN workshop on Haskell. ACM, 7–18. Google Scholar
Digital Library
- Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In ACM SIGPLAN Notices , Vol. 32(8). 263–273. Google Scholar
Digital Library
- John Hughes. 2000. Generalising monads to arrows. Science of Computer Programming 37, 1 (2000), 67 – 111. Google Scholar
Digital Library
- Jonathan Blow. 2008. Braid. http://braid-game.com/ . (2008).Google Scholar
- Adam Megacz Joseph. 2014. Generalized Arrows. Ph.D. Dissertation. EECS Department, University of California, Berkeley.Google Scholar
- 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, 221–232. Google Scholar
Digital Library
- Henrik Nilsson, Antony Courtney, and John Peterson. 2002. Functional reactive programming, continued. In Proceedings of the 2002 ACM SIGPLAN workshop on Haskell . ACM, 51–64. Google Scholar
Digital Library
- Gergely Patai. 2010. Efficient and compositional higher-order streams. In Functional and Constraint Logic Programming . 137–154. Google Scholar
Digital Library
- Ross Paterson. 2001. A New Notation for Arrows. In Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming (ICFP ’01) . ACM, 229–240. Google Scholar
Digital Library
- Ivan Perez, Manuel Bärenz, and Henrik Nilsson. 2016. Functional Reactive Programming, Refactored. In Proceedings of the 9th International Symposium on Haskell (Haskell 2016) . ACM, 33–44. Google Scholar
Digital Library
- Ivan Perez and Henrik Nilsson. 2017. Testing and Debugging Functional Reactive Programming. Proc. ACM Program. Lang. 1, ICFP, Article 2 (Sept. 2017), 27 pages. Google Scholar
Digital Library
- Atze van der Ploeg and Koen Claessen. 2015. Practical Principled FRP: Forget the Past, Change the Future, FRPNow!. In Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming . ACM, 302–314. Google Scholar
Digital Library
- M Pouzet. 2001. Lucid Synchrone, version 2. Tutorial and reference manual. (2001).Google Scholar
- Kenneth Christian Rovers. 2011. Functional model-based design of embedded systems with UniTi . Ph.D. Dissertation.Google Scholar
- Ertugrul Söylemez. 2011. Netwire. https://github.com/esoeylemez/netwire . (2011).Google Scholar
Index Terms
Back to the future: time travel in FRP
Recommendations
Functional reactive programming, refactored
Haskell 2016: Proceedings of the 9th International Symposium on HaskellFunctional 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 ...
Functional reactive programming, refactored
Haskell '16Functional 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 ...
Fault tolerant functional reactive programming (functional pearl)
Highly critical application domains, like medicine and aerospace, require the use of strict design, implementation and validation techniques. Functional languages have been used in these domains to develop synchronous dataflow programming languages for ...







Comments