Lune

POPL2021Top-tier venue

Diamonds are not forever: liveness in reactive programming with guarded recursion

Patrick Bahr, Christian Uldal Graulund, Rasmus Ejlers Møgelberg

Abstract

When designing languages for functional reactive programming (FRP) the main challenge is to provide the user with a simple, flexible interface for writing programs on a high level of abstraction while ensuring that all programs can be implemented efficiently in a low-level language. To meet this challenge, a new family of modal FRP languages has been proposed, in which variants of Nakano's guarded fixed point operator are used for writing recursive programs guaranteeing properties such as causality and productivity. As an apparent extension to this it has also been suggested to use Linear Temporal Logic (LTL) as a language for reactive programming through the Curry-Howard isomorphism, allowing properties such as termination, liveness and fairness to be encoded in types. However, these two ideas are in conflict with each other, since the fixed point operator introduces non-termination into the inductive types that are supposed to provide termination guarantees.

In this paper we show that by regarding the modal time step operator of LTL a submodality of the one used for guarded recursion (rather than equating them), one can obtain a modal type system capable of expressing liveness properties while retaining the power of the guarded fixed point operator. We introduce the language Lively RaTT, a modal FRP language with a guarded fixed point operator and an 'until' type constructor as in LTL, and show how to program with events and fair streams. Using a step-indexed Kripke logical relation we prove operational properties of Lively RaTT including productivity and causality as well as the termination and liveness properties expected of types from LTL. Finally, we prove that the type system of Lively RaTT guarantees the absence of implicit space leaks.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Transfinite Iris: resolving an existential dilemma of step-indexed separation logicSimon Spies, Lennard Gäher, Daniel Gratzer, Joseph Tassarotti et al.PLDI 2021 · 32 citations
  2. Stream TypesJoseph W. Cutler, Christopher Watson, Emeka Nkurumeh, Phillip Hilliard et al.PLDI 2024 · 7 citations

Related papers

  1. HFL(Z) Validity Checking for Automated Program VerificationNaoki Kobayashi, Kento Tanahashi, Ryosuke Sato, Takeshi TsukadaPOPL 2023 · 8 citations
  2. Algebraic Temporal Effects: Temporal Verification of Recursively Typed Higher-Order ProgramsTaro Sekiyama, Hiroshi UnnoPOPL 2025 · 2 citations
  3. Counter Example Guided Reactive Synthesis for LTL Modulo Theories*Andoni Rodríguez, Felipe Gorostiaga, César SánchezCAV 2025 · 5 citations
  4. Realizing ømega-regular HyperpropertiesBernd Finkbeiner, Christopher Hahn, Jana Hofmann, Leander TentrupCAV 2020 · 9 citations
  5. Tableaux for Realizability of Safety SpecificationsMontserrat Hermo, Paqui Lucio, César SánchezFM 2023 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines