arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1905.09825cs.PL
收藏

功能反应式程序的合成

Synthesizing Functional Reactive Programs

Bernd Finkbeiner, Felix Klein, Ruzica Piskac, Mark Santolucito

摘要:

函数式反应式编程(FRP)是一种简化反应式程序构造的范例。有许多库实现了FRP的具体化,使用了抽象,如Application,Monads和Arrows。然而,找到一个好的控制流,正确地管理状态并在正确的时间切换行为,仍然是开发人员面临的一个重大挑战。一个有吸引力的替代方案是指定行为而不是编程,最近开发的逻辑:时间流逻辑(TSL)使之成为可能。然而,它还没有被探索到目前为止,如何控制流模型(CFM),从TSL规范合成,可以变成可执行代码,是与FRP上的库兼容。我们弥合这一差距,表明CFMs确实是一个合适的形式主义变成应用,一元,箭头FRP。我们证明了我们的翻译在现实世界的厨房定时器应用程序,我们翻译到桌面应用程序使用箭头化FRP库Yampa,一个Web应用程序使用的一元三便士GUI库,并使用应用硬件描述语言ClaSH硬件的有效性。

英文摘要:

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. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑