Compositional Temporal Specifications for Interaction Trees
Linyu Yang, Jianwei Yin, Mingshuai Chen
Abstract
The correctness of modern effectful programs depends not only on their final results but also on the temporal evolution of observable interactions with their environments. Interaction Trees (ITrees) provide a reusable denotational semantics for such programs by representing effectful computations as potentially infinite trees of observable interactions. However, reusable temporal reasoning over ITrees remains largely unexplored. This paper presents a compositional temporal specification framework for ITrees. We introduce iBuchi, a shallowly embedded temporal specification language based on Choice Trees, which represents finite and infinite interaction traces and supports expressive temporal operators, including sequencing, branching, conjunction, repetition, and Linear Temporal Logic modalities. We define trace- and tree-level satisfaction relations between iBuchi specifications and ITrees, together with compositional reasoning principles for modular verification of effectful programs. We integrate iBuchi into the Dijkstra Monads Forever framework, thereby enabling temporal specifications to compose with conventional Hoare-style specifications and supporting a generator-based encoding of future conditions. We have formally developed and verified our framework in Rocq and demonstrated its expressiveness and compositionality through several non-trivial case studies.
Create a lesson
Related papers
SAFE: Formal Specification and Implementation of a Scalable Analysis Framework for ECMAScript
Shared title terminology · Hongki Lee, Sooncheol Won, Joonho Jin et al.
Compiling Imperative Hardware Protocol Specifications to Hardware
Shared title terminology · Nikil V. Shyamsunder, Ernest Ng, Adrian Sampson et al.
Preserving Separation Logic Specifications through Compilation
Shared title terminology · Carmine Abate, Kleio Liotati, František Farka et al.
Recursive Formation and First-Class Reuse of Compositional Capabilities
Shared title terminology · Hang Lin
Compositional Information Geometry of Probabilistic Programs
Shared title terminology · Jacek Karwowski, Frank Nielsen, Sam Staton