Skip to content

A Type-and-Effect System for Temporal Dependency Analysis of Render-based Reactive Programs

Jul 2026 · arXiv.org · Vol abs/2607.27074 · 0 citations
Computer Science

TL;DR

Willow, a core calculus for reactive programming inspired by React, gives a time-aware operational semantics that models computation in terms of renders, the fundamental evaluation step in which components produce user interface descriptions, and pairs it with a novel type-and-effect system that statically tracks timing behavior as effects.

Abstract

Reactive programming frameworks such as React allow developers to build interactive applications by declaratively specifying how outputs depend on changing inputs. Although this model makes it easy to reason about what an application computes, the temporal behavior of reactive programs remains difficult to understand and verify. Applications implicitly rely on timing assumptions buried in framework runtimes, leading to subtle bugs such as stale reads, transient inconsistencies, order-dependent behavior, and unintended feedback cycles. To address these challenges, this paper presents Willow, a core calculus for reactive programming inspired by React. Willow gives a time-aware operational semantics that models computation in terms of renders, the fundamental evaluation step in which components produce user interface descriptions, and pairs it with a novel type-and-effect system that statically tracks timing behavior as effects. A"next"modality expresses delays measured not only in renders but in any unit the host environment exposes--renders, network requests, or milliseconds. A family of modalities tracks the lifecycle of event handlers: when they are registered, when they fire, when pending events are canceled and when handlers are removed. A key insight is that the resulting effects form a temporal dependency graph, letting standard graph algorithms statically detect render cascades and inter-render loops that cause non-termination or performance degradation. We formalize Willow and prove preservation of the effect system with respect to the time-aware semantics. We also implement a prototype checker with automatic effect inference and evaluate it on representative reactive patterns such as debouncing, form inputs, and API-driven updates. Our results demonstrate that time-aware typing provides a practical foundation for reasoning about the temporal correctness of reactive programs.

View source

Similar papers

#artificial intelligence Preprint Sep 2026

Dynamic Adaptation of the LLM Context for Generating Routines with Coupled Semantics

LLM-based code generation fails when correctness depends on execution-dependent coupling: the meaning of one routine is defined by the runtime behavior of another, a relationship that cannot be resolved from textual descriptions alone. This limitation, which we call static binding, is not confined to explicitly coupled...

Gnaneswar Villuri, Hashmath Shaik, Alex Doboli · 1 citation
Book Open access Sep 2026

Lion: Modular Verification of Async Runtime Liveness

This work introduces an append-only logical event log that abstracts implementation details and enables a Kamp-style translation of Linear Temporal Logic into First-Order Logic, which enables deductive program verifiers to reason about progress via monotonic timestamps without needing native temporal logic support.

Ti Zhou, Zi-Hao Zhang, Omar Chowdhury et al. · 1 citation
#artificial intelligence Preprint Sep 2026

CordisBench: Can Language Models Reason About Component Lifecycles in Dynamic Agent Harnesses?

CrisBench, a 1,200-question benchmark of lifecycle reasoning that combines a controlled formal setting with programs executed against Cordis, a runtime that manages component dependencies and cleanup, and asks models to identify affected components, predict state after a specified teardown order, and determine which co...

Damien Sileo, Dimitri Kachler · 1 citation
Book Open access Aug 2026

On Eliminating the Impossible with Dependent Types: Choreographic Libraries with Proof-Carrying Located Values

This work uses the dependently typed Lean programming language to implement a similar choreographic library, ChorLean, which ensures total EPP and safe value access via proof-carrying located values, passing Lean's totality checker without undefined cases, while supporting the same feature set as libraries like MultiCh...

Simon Daniel, Timon Böhler, D. Richter et al. · 0 citations
Open access Oct 2026

CAST: A Compiler-Based Framework for Systematically Testing LLM Compositional Safety

Large language models (LLMs) are increasingly used in software pipelines, raising concerns about harmful behaviors in security-critical domains. Existing safety evaluations predominantly probe models with single prompts or short interactions, and therefore do not capture how safety behaves under multi-step workflows wh...

Lu Yan, Zhuo Zhang, Xiang-Zhe Xu et al. · 0 citations
Preprint Aug 2026

A Programming Paradigm for Spatiotemporal Composability

Modern software -- from plugin systems to self-evolving agent harnesses -- increasingly requires dynamic composition, yet its formal foundations remain underdeveloped. We identify two orthogonal dimensions of the problem: temporal composability, the ability to completely revert a component's side effects upon removal,...

Yi-Han Shi, Wei Zhang, Tianyi Cui Peking University et al. · 13 citations · ⚡1

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.