Higher-order functional reactive programming in bounded space
Neelakantan R. Krishnaswami, Nick Benton, Jan Hoffmann · ACM SIGPLAN Notices · 2012
Functional reactive programming (FRP) is an elegant and successful approach to programming reactive systems declaratively. The high levels of abstraction and expressivity that make FRP attractive as a programming model do, however, often lead to programs whose resource usage is excessive and hard to predict. In this paper, we address the problem of space leaks in discrete-time functional reactive programs. We present a functional reactive programming language that statically bounds the size of the dataflow graph a reactive program creates, while still permitting use of higher-order functions and higher-type streams such as streams of streams. We achieve this with a novel linear type theory that both controls allocation and ensures that all recursive definitions are well-founded. We also give a denotational semantics for our language by combining recent work on metric spaces for the interpretation of higher-order causal functions with length-space models of space-bounded computation. The resulting category is doubly closed and hence forms a model of the logic of bunched implications.
Cited by 36 works. doi:10.1145/2103621.2103665
Authors
References
- The ESTEREL synchronous programming language and its mathematical semantics
- LUSTRE: a declarative language for real-time programming
- Functional reactive animation
- The Logic of Bunched Implications
- Generalising monads to arrows
- Functional reactive programming, continued
- Event-Driven FRP
- Embedding Dynamic Dataflow in a Call-by-Value Language
- Arrows, Robots, and Functional Reactive Programming
- A type system for bounded space and functional in-place update