可连接红黑树的验证成本分析
A Verified Cost Analysis of Joinable Red-Black Trees
AI总结:
本文在依赖类型理论 calf 中验证实现可连接红黑树,利用红黑树不变量证明操作成本界限,并基于连接签名界定序列算法成本,所有证明在 Agda 中形式化完成。
摘要:
以连接操作组合序列而定义的有序数据序列,是实现并行函数式算法的基础。这种抽象数据类型可以通过平衡二叉树优雅且高效地实现,其中提供连接操作来合并两棵树并在必要时重新平衡。在这项工作中,我们在用于成本分析的依赖类型理论 $\ extbf{calf}$ 中提出了可连接红黑树的验证实现与成本分析。我们以所有正确性不变量被内在维持的方式实现红黑树及辅助中间数据结构。然后,我们利用红黑树不变量描述并验证操作上的精确成本界限。最后,我们使用基于连接的简单签名实现序列上的标准算法,并在使用红黑树作为底层实现的情况下界定其成本。所有证明均通过 $\ extbf{calf}$ 在 Agda 定理证明器中的嵌入进行形式化机器验证。
英文摘要:
Ordered sequences of data, specified with a join operation to combine sequences, serve as a foundation for the implementation of parallel functional algorithms. This abstract data type can be elegantly and efficiently implemented using balanced binary trees, where a join operation is provided to combine two trees and rebalance as necessary. In this work, we present a verified implementation and cost analysis of joinable red-black trees in $\textbf{calf}$, a dependent type theory for cost analysis. We implement red-black trees and auxiliary intermediate data structures in such a way that all correctness invariants are intrinsically maintained. Then, we describe and verify precise cost bounds on the operations, making use of the red-black tree invariants. Finally, we implement standard algorithms on sequences using the simple join-based signature and bound their cost in the case that red-black trees are used as the underlying implementation. All proofs are formally mechanized using the embedding of $\textbf{calf}$ in the Agda theorem prover.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。