Back to the future: Time travel in FRP

被引:0
作者
Perez I. [1 ]
机构
[1] School of Computer Science, University of Nottingham
来源
Perez, Ivan (ixp@cs.nottingham.ac.uk) | 1600年 / Association for Computing Machinery, 2 Penn Plaza, Suite 701, New York, NY 10121-0701, United States卷 / 52期
关键词
functional reactive programming; game programming; Haskell; monadic streams; stream programming; time;
D O I
10.1145/3122955.3122957
中图分类号
学科分类号
摘要
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. © 2017 ACM.
引用
收藏
页码:105 / 116
页数:11
相关论文
共 19 条
  • [1] Baaij C., Kooijman M., Kuper J., Boeijink A., Gerards M., CLaSH: Structural descriptions of synchronous hardware using haskell, EUROMICRO, (2010)
  • [2] Barenz M., Rhine-FRP with Type-level Clocks, (2017)
  • [3] Courtney A., Modeling User Interfaces in A Functional Language, (2004)
  • [4] Courtney A., Elliott C., Genuinely functional user interfaces, Haskell Workshop, pp. 41-69, (2001)
  • [5] Courtney A., Nilsson H., Peterson J., The yampa arcade, Proceedings of the 2003 ACM SIGPLAN Workshop on Haskell, pp. 7-18, (2003)
  • [6] Elliott C., Hudak P., Functional reactive animation, ACM SIGPLAN Notices, 32, 8, pp. 263-273, (1997)
  • [7] Hughes J., Generalising monads to arrows, Science of Computer Programming, 37, 1, pp. 67-111, (2000)
  • [8] Blow J., Braid, (2008)
  • [9] Joseph A.M., Generalized Arrows, (2014)
  • [10] Krishnaswami N.R., Higher-order functional reactive programming without spacetime leaks, Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming (ICFP '13), pp. 221-232, (2013)