Lowering: a static optimization technique for transparent functional reactivity

  • Authors:
  • Kimberley Burchett;Gregory H. Cooper;Shriram Krishnamurthi

  • Affiliations:
  • Brown University;Brown University;Brown University

  • Venue:
  • Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Functional Reactive Programming (FRP) extends traditional functional programming with dataflow evaluation, making it possible to write interactive programs in a declarative style. An FRP language creates a dynamic graph of data dependencies and reacts to changes by propagating updates through the graph. In a transparent FRP language, the primitive operators are implicitly lifted, so they construct graph nodes when they are applied to time-varying values. This model has some attractive properties, but it tends to produce a large graph that is costly to maintain. In this paper, we develop a transformation we call lowering, which improves performance by reducing the size of the graph. We present a static analysis that guides the sound application of this optimization, and we present benchmark results that demonstrate dramatic improvements in both speed and memory usage for real programs.