Back to the future: time travel in FRP

Back to the future: time travel in FRP
复制标题

回到未来:FRP 中的时间旅行

DOI:
10.1145/3122955.3122957
复制
发表时间:
2017
期刊:
ACM SIGPLAN Symposium/Workshop on Haskell
影响因子:
--
通讯作者:
Ivan Perez
Ivan Perez
中科院分区:
--
文献类型:
--
作者:
Ivan Perez

文献摘要

被引文献

相似文献

函数式响应式编程(FRP)允许使用时变值以声明性的方式对交互式应用程序进行建模。然而,由于实际原因,通常会施加操作约束,例如具有固定的时间域,时间总是向前流动,并且限制了对过去的探索。在本文中,我们展示了如何克服这些约束,给出对时域、时间方向和采样步长的局部控制。我们研究了时间倒流时FRP表达式的行为,并演示了如何同步以不同采样率异步运行的子系统。我们已经用两款不同的游戏验证了我们方法的实用性,在这两款游戏中时间控制是玩法的核心。
Functional Reactive Programming (FRP) allows interactive applications to be modelled in a declarative manner using time-varying values. For practical reasons, however, operational constraints are often imposed, such as having a fixed time domain, time always flowing forward, and limiting the exploration of the past. In this paper we show how these constraints can be overcome, giving local control over the time domain, the direction of time and the sampling step. We study the behaviour of FRP expressions when time flows backwards, and demonstrate how to synchronize subsystems running asynchronously and at different sampling rates. We have verified the practicality of our approach with two non-trivial games in which time control is central to the gameplay.