Abstract
Processing data at different rates is generally a hard problem in reactive programming. Buffering problems, lags, and concurrency issues often occur. Many of these problems are clock errors, where data at different rates is combined incorrectly. Techniques to avoid clock errors, such as type-level clocks and deterministic scheduling, exist in the field of synchronous programming, but are not implemented in general-purpose languages like Haskell.
Rhine is a clock-safe library for synchronous and asynchronous Functional Reactive Programming (FRP). It separates the aspects of clocking, scheduling and resampling from each other, and ensures clock-safety at the type level. Concurrent communication is encapsulated safely. Diverse reactive subsystems can be combined in a coherent, declarative data-flow framework, while correct interoperability of data at different rates is guaranteed by type-level clocks. This provides a general-purpose framework that simplifies multi-rate FRP systems and can be used for game development, media applications, GUIs and embedded systems, through a flexible API with many reusable components.
- Heinrich Apfelmus. 2011. Reactive-banana. https://github.com/ HeinrichApfelmus/reactive-banana .Google Scholar
- Christiaan Baaij, Matthijs Kooijman, Jan Kuper, Arjan Boeijink, and Marco Gerards. 2010. CλaSH: Structural Descriptions of Synchronous Hardware using Haskell. In Proceedings of the 13th EUROMICRO Conference on Digital System Design: Architectures, Methods and Tools . IEEE Computer Society, 714–721. Google Scholar
Digital Library
- Albert Benveniste, Paul Le Guernic, and Christian Jacquemot. 1991. Synchronous programming with events and relations: the SIGNAL language and its semantics. Science of computer programming 16, 2 (1991), 103–149. Google Scholar
Digital Library
- Stephen Blackheath. 2012. Sodium. https://github.com/SodiumFRP/ sodium .Google Scholar
- Timothy Bourke and Marc Pouzet. 2013. Zélus: A Synchronous Language with ODEs. In 16th International Conference on Hybrid Systems: Computation and Control (HSCC’13) . Philadelphia, USA, 113–118. Google Scholar
Digital Library
- Paul Caspi and Marc Pouzet. 2000. Lucid Synchrone, a functional extension of Lustre . Technical Report. Université Pierre et Marie Curie, Laboratoire LIP6.Google Scholar
- Koen Claessen and John Hughes. 2000. QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs. In Proceedings of the International Conference on Functional Programming (ICFP 2000) . ACM. Google Scholar
Digital Library
- Antony Courtney and Conal Elliott. 2001. Genuinely Functional User Interfaces. In Haskell Workshop. 41–69.Google Scholar
- Conal Elliott. 1998. Functional implementations of continuous modeled animation. In Principles of Declarative Programming. Springer, 284– 299. Google Scholar
Digital Library
- Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In Proceedings of the Second ACM SIGPLAN International Conference on Functional Programming (ICFP ’97) . ACM, 263–273. Google Scholar
Digital Library
- Conal M Elliott. 2009. Push-pull functional reactive programming. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell . ACM, 25–36. Google Scholar
Digital Library
- Gabriel Gonzalez. 2012. Pipes. https://github.com/Gabriel439/ Haskell-Pipes-Library .Google Scholar
- Jason Gregory. 2014. Game Engine Architecture, Second Edition (2nd ed.). A. K. Peters, Ltd., Natick, MA, USA. Google Scholar
Digital Library
- Nicholas Halbwachs, Paul Caspi, Pascal Raymond, and Daniel Pilaud. 1991. The synchronous data flow programming language LUSTRE. Proc. IEEE 79, 9 (1991), 1305–1320.Google Scholar
- Joe Hermaszewski. 2016. vector-sized. https://github.com/expipiplus1/ vector-sized .Google Scholar
- Justin Le. 2015. Auto. https://github.com/mstksg/auto .Google Scholar
- Paul Le Guernic, Jean-Pierre Talpin, and Jean-Christophe Le Lann. 2003. Polychrony for system design. Journal of Circuits, Systems, and Computers 12, 03 (2003), 261–303.Google Scholar
Cross Ref
- Ben Lippmeier. 2010. Gloss. https://github.com/benl23x5/gloss .Google Scholar
- Thomas D. C. Little and Arif Ghafoor. 1990. Synchronization and storage models for multimedia objects. IEEE journal on selected areas in communications 8, 3 (1990), 413–427. 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 (Haskell ’02) . ACM, 51–64. Google Scholar
Digital Library
- Gergely Patai. 2011. Efficient and Compositional Higher-order Streams. In Proceedings of the 19th International Conference on Functional and Constraint Logic Programming (WFLP’10) . 137–154. Google Scholar
Digital Library
- Ivan Perez. 2017. Back to the Future: Time Travel in FRP. In Proceedings of the 10th ACM SIGPLAN International Symposium on Haskell (Haskell 2017) . ACM, 105–116. Google Scholar
Digital Library
- Ivan Perez. 2018. Fault Tolerant Functional Reactive Programming (Functional Pearl). Proceedings of the ACM on Programming Languages 2, ICFP, Article 96 (July 2018), 30 pages. 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. 2015. Bridging the GUI Gap with Reactive Values and Relations. In Haskell Symposium. 47–58. Google Scholar
Digital Library
- Ivan Perez and Henrik Nilsson. 2017. Testing and Debugging Functional Reactive Programming. Proceedings of the ACM on Programming Languages 1, ICFP, Article 2 (Aug. 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 (ICFP 2015) . ACM, 302–314. Google Scholar
Digital Library
- Basant Rajan and RK Shyamasundar. 2000. Multiclock ESTEREL: A reactive framework for asynchronous design. In Parallel and Distributed Processing Symposium, 2000. IPDPS 2000. Proceedings. 14th International . IEEE, 201–209. Google Scholar
Digital Library
- Schell Scivally. 2015. varying. https://github.com/schell/varying .Google Scholar
- Michael Snoyman. 2011. Conduit. https://github.com/snoyberg/ conduit .Google Scholar
- Ertugrul Söylemez. 2016. Netwire. https://github.com/esoeylemez/ netwire .Google Scholar
- Daniel Winograd-Cort and Paul Hudak. 2012. Wormholes: Introducing Effects to FRP. In Proceedings of the 2012 Haskell Symposium (Haskell ’12) . ACM, 91–104. Google Scholar
Digital Library
Index Terms
Rhine: FRP with type-level clocks
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