LTL types FRP: linear-time temporal logic propositions as types, proofs as functional reactive programs

  • Authors:
  • Alan Jeffrey

  • Affiliations:
  • Alcatel-Lucent, Chicago, IL, USA

  • Venue:
  • PLPV '12 Proceedings of the sixth workshop on Programming languages meets program verification
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Functional Reactive Programming (FRP) is a form of reactive programming whose model is pure functions over signals. FRP is often expressed in terms of arrows with loops, which is the type class for a Freyd category (that is a premonoidal category with a cartesian centre) equipped with a premonoidal trace. This type system suffices to define the dataflow structure of a reactive program, but does not express its temporal properties. In this paper, we show that Linear-time Temporal Logic (LTL) is a natural extension of the type system for FRP, which constrains the temporal behaviour of reactive programs. We show that a constructive LTL can be defined in a dependently typed functional language, and that reactive programs form proofs of constructive LTL properties. In particular, implication in LTL gives rise to stateless functions on streams, and the "constrains" modality gives rise to causal functions. We show that reactive programs form a partially traced monoidal category, and hence can be given as a form of arrows with loops, where the type system enforces that only decoupled functions can be looped.