arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.06863cs.PL
收藏

选择树:在Coq中表示不确定、递归和不纯程序

Choice Trees: Representing Nondeterministic, Recursive, and Impure Programs in Coq

Nicolas Chappe, Paul He, Ludovic Henrio, Yannick Zakowski, Steve Zdancewic

摘要:

本文介绍了选择树(ctrees),一个单子建模不确定性,递归,和不纯的程序在Coq。受Xia et al.启发这种新的数据结构将计算嵌入到具有三种节点的共归纳树中:外部事件和两种非确定性分支。这种明显的冗余使我们能够提供浅嵌入的指称模型与内部选择的风格的CCS,同时恢复一个归纳的LTS视图的计算。CTree继承了大量的互模拟和精化工具,我们建立了丰富的方程理论。我们连接ctrees的itrees基础设施,显示如何一个单子态射嵌入前者到后者允许使用ctrees实现不确定性的影响。我们通过两个案例研究:ccs和协作多线程,展示了ctree的实用性。

英文摘要:

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 two case studies: ccs and cooperative multithreading.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑