Return to search

Extensible and robust functional reactive programming

Programming GUI and multimedia in functional languages has been a long-term challenge, and no solution convinces the community at large. Purely functional GUI and multimedia toolkits enable abstract thinking, but have enormous maintenance costs. General solutions like Functional Reactive Programming present a number of limitations. FRP has traditionally resisted efficient implementation, and existing libraries sacrifice determinism and abstraction in the name of performance. FRP also enforces structural constraints that facilitate reasoning, but at the cost of modularity and separation of concerns. This work addresses those limitations with the introduction of Monadic Stream Functions, an extension to FRP parameterised over a monad. I demonstrate that, in spite of being simpler than other FRP proposals, Monadic Stream Functions subsume and exceed other FRP implementations. Unlike other proposals, Monadic Stream Functions maintain purity at the type level, which is crucial for testing and debugging. I demonstrate this advantage by introducing FRP testing facilities based on temporal logics, together with debugging tools specific for FRP. I present two uses cases for Monadic Stream Functions: First, I show how the new constructs improved the design of game features and non-trivial games. Second, I present Reactive Values and Relations, an abstraction for model-view coordination in GUI programs based on a relational language, built on top of Monadic Stream Functions. Comprehensive examples are used to illustrate the benefits of this proposal in terms of clarity, modularity, feature coverage, and its low maintenance costs. The testing facilities mentioned before are used to encode and statically check desired interaction properties.

Identiferoai:union.ndltd.org:bl.uk/oai:ethos.bl.uk:748368
Date January 2018
CreatorsPerez Dominguez, Ivan
PublisherUniversity of Nottingham
Source SetsEthos UK
Detected LanguageEnglish
TypeElectronic Thesis or Dissertation
Sourcehttp://eprints.nottingham.ac.uk/50348/

Page generated in 0.0015 seconds