Interaction Trees: Representing Recursive and Impure Programs in Coq
Not on the map. Why?
Abstract (arXiv)
"Interaction trees" (ITrees) are a general-purpose data structure for representing the behaviors of recursive programs that interact with their environments. A coinductive variant of "free monads," ITrees are built out of uninterpreted events and their continuations. They support compositional construction of interpreters from "event handlers", which give meaning to events by defining their semantics as monadic actions. ITrees are expressive enough to represent impure and potentially nonterminating, mutually recursive computations, while admitting a rich equational theory of equivalence up to weak bisimulation. In contrast to other approaches such as relationally specified operational semantics, ITrees are executable via code extraction, making them suitable for debugging, testing, and implementing software artifacts that are amenable to formal verification. We have implemented ITrees and their associated theory as a Coq library, mechanizing classic domain- and category-theoretic results about program semantics, iteration, monadic structures, and equational reasoning. Although the internals of the library rely heavily on coinductive proofs, the interface hides these details so that clients can use and reason about ITrees without explicit use of Coq's coinduction tactics. To showcase the utility of our theory, we prove the termination-sensitive correctness of a compiler from a simple imperative source language to an assembly-like target whose meanings are given in an ITree-based denotational semantics. Unlike previous results using operational techniques, our bisimulation proof follows straightforwardly by structural induction and elementary rewriting via an equational theory of combinators for control-flow graphs.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). First posted on arXiv 31 May 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1; 2026: 6.
7 papers.
- 2026Shepherd: Enabling Programmable Meta-Agents via Reversible Agentic Execution Tracescited by 8
- 2026Mechanized Foundations of Structural Governance: Machine-Checked Proofs for Governed Intelligencecited by 5
- 2025A Case Study on the Effectiveness of LLMs in Verification with Proof Assistantscited by 3
- 2026Effect-Transparent Governance for AI Workflow Architectures: Semantic Preservation, Expressive Minimality, and Decidability Boundariescited by 1
- 2026Algebraic Semantics of Governed Execution: Monoidal Categories, Effect Algebras, and Coterminous Boundariescited by 1
- 2026Governed Metaprogramming for Intelligent Systems: Reclassifying Eval as a Governed Effectcited by 0
- 2026Volition Elicitation: Operational Semantics for People and Their Machinescited by 0
- 2026Volition Elicitation: Operational Semantics for People and Their Machines10 Jul 2026
- 2026Shepherd: Enabling Programmable Meta-Agents via Reversible Agentic Execution Traces11 May 2026
- 2026Governed Metaprogramming for Intelligent Systems: Reclassifying Eval as a Governed Effect5 May 2026
- 2026Algebraic Semantics of Governed Execution: Monoidal Categories, Effect Algebras, and Coterminous Boundaries1 May 2026
- 2026Effect-Transparent Governance for AI Workflow Architectures: Semantic Preservation, Expressive Minimality, and Decidability Boundaries1 May 2026
- 2026Mechanized Foundations of Structural Governance: Machine-Checked Proofs for Governed Intelligence30 Apr 2026
- 2025A Case Study on the Effectiveness of LLMs in Verification with Proof Assistants26 Aug 2025