Synthesizing Functional Reactive Programs

Bernd Finkbeiner, Felix Klein, Ruzica Piskac, Mark Santolucito
5/23/2019
cs.PL

Official code: reactive-systems/tsltools (9 stars, Haskell, last commit 2023-11-01).

Abstract

Functional Reactive Programming (FRP) is a paradigm that has simplified the construction of reactive programs. There are many libraries that implement incarnations of FRP, using abstractions such as Applicative, Monads, and Arrows.

Show full abstract

However, finding a good control flow, that correctly manages state and switches behaviors at the right times, still poses a major challenge to developers. An attractive alternative is specifying the behavior instead of programming it, as made possible by the recently developed logic: Temporal Stream Logic (TSL). However, it has not been explored so far how Control Flow Models (CFMs), as synthesized from TSL specifications, can be turned into executable code that is compatible with libraries building on FRP. We bridge this gap, by showing that CFMs are indeed a suitable formalism to be turned into Applicative, Monadic, and Arrowized FRP. We demonstrate the effectiveness of our translations on a real-world kitchen timer application, which we translate to a desktop application using the Arrowized FRP library Yampa, a web application using the Monadic threepenny-gui library, and to hardware using the Applicative hardware description language ClaSH.

View on arXivView PDF

Code Implementations(1)

Library and tools for the TSL specification format

913Haskell, MakefileMay 7, 20193 years agoNOASSERTION

Similar Papers

Cite this paper

@article{finkbeiner2019synthesizing,
  title  = {Synthesizing Functional Reactive Programs},
  author = {Bernd Finkbeiner and Felix Klein and Ruzica Piskac and Mark Santolucito},
  year   = {2019},
  eprint = {1905.09825},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1905.09825}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1905.09825.svg)](https://codeofpaper.com/paper/1905.09825)

Discussion