Choice Trees: Representing Nondeterministic, Recursive, and Impure Programs in Coq
Nicolas Chappe, Paul He, Ludovic Henrio, Yannick Zakowski, Steve, Zdancewic

TL;DR
Choice Trees (ctrees) are a new coinductive data structure in Coq that model nondeterministic, recursive, and impure programs, enabling richer semantics and tools for concurrency and nondeterminism.
Contribution
The paper introduces ctrees, a novel monad for modeling complex program behaviors in Coq, with a connection to itrees and applications to concurrency semantics.
Findings
Embedded in Coq with bisimulation and refinement tools
Connected to itrees via monad morphism for nondeterministic effects
Applied to model concurrency semantics in case studies
Abstract
This paper introduces Choice Trees (ctrees), a monad for modeling nondeterministic, recursive, and impure programs in Coq. Inspired by Xia et al.'s itrees, this novel data structure embeds computations into coinductive trees with three kind of nodes: external events, and two variants of nondeterministic branching. This apparent redundancy allows us to provide shallow embedding of denotational models with internal choice in the style of ccs, while recovering an inductive LTS view of the computation. CTrees inherit a vast collection of bisimulation and refinement tools, with respect to which we establish a rich equational theory. We connect ctrees to the itrees infrastructure by showing how a monad morphism embedding the former into the latter permits to use ctrees to implement nondeterministic effects. We demonstrate the utility of ctrees by using them to model concurrency semantics in…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
