Abstract
Functional reactive programming, or FRP, is a style of programming based on two key ideas: continuous time-varying behaviors, and event-based reactivity. FRP is the essence of Fran [1,2], a domain-specific language for functional reactive graphics and animation, and has recently been used in the design of Frob [3,4], a domain-specific language for functional vision and robotics. In general, FRP can be viewed as an interesting language for describing hybrid systems, which are systems comprised of both analog (continuous) and digital (discrete) subsystems. Continuous behaviors can be thought of simply as functions from time to some value: Behavior a = Time -> a. For example: an image behavior may represent an animation; a Cartesian-point behavior may be a mouse; a velocity-vector behavior may be the control vector for a robot; and a tuple-of-distances behavior may be the input from a robot’s sonar array. Both continuous behaviors and event-based reactivity have interesting pro erties worthy of independent study, but their integration is particularly interesting. At the core of the issue is that events are intended to cause discrete shifts in declarative behavior; i.e. not just shifts in the state of reactivity. Being declarative, the natural desire is for everything to be first-class and higher-order. But this causes interesting clashes in frames of reference, especially when time and space transformations are applied. In this talk the fundamental ideas behind FRP are presented, along with a discussion of various issues in its formal semantics. This is joint work with Conal Elliot at Microsoft Research, and John Peterson at Yale.
Chapter PDF
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Conal Elliott. Modeling interactive 3D and multimedia animation with an embedded language. In Proceedings of the first conference on Domain-Specific Languages, pages 285–296. USENIX, October 1997.
Conal Elliott and Paul Hudak. Functional reactive animation. In International Conference on Functional Programming, pages 163–173, June 1997.
John Peterson, Paul Hudak, and Conal Elliott. Lambda in motion: Controlling robots with haskell. In First InternationalWorkshop on Practical Aspects of Declarative Languages. SIGPLAN, Jan 1999.
A. Reid, J. Peterson, G. Hager, and P. Hudak. Prototyping real-time vision systems: An experiment in DSL design. To appear Proc. Int. Conference on Software Engineering, May 1999.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hudak, P. (1999). Functional Reactive Programming. In: Swierstra, S.D. (eds) Programming Languages and Systems. ESOP 1999. Lecture Notes in Computer Science, vol 1576. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49099-X_1
Download citation
DOI: https://doi.org/10.1007/3-540-49099-X_1
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65699-9
Online ISBN: 978-3-540-49099-9
eBook Packages: Springer Book Archive