Tachis:用于期望成本的高阶分离逻辑与信用机制
Tachis: Higher-Order Separation Logic with Credits for Expected Costs
AI总结:
本文提出高阶分离逻辑Tachis,通过引入概率成本信用资源来推理概率程序的期望成本,支持摊还分析与多种成本模型,并经Coq等工具机械化验证了多种算法的期望成本上限。
摘要:
我们提出了Tachis,一种用于推理概率程序期望成本的高阶分离逻辑。受时间信用(time credits)在推理确定性程序运行时间中应用的启发,我们引入了一种新颖的概率成本信用(probabilistic cost credit)概念。概率成本信用是一种分离逻辑资源,可用于支付程序中操作的成本,并且可以根据权重在采样指令的所有可能分支中进行分配,从而使我们能够推理期望成本。将成本信用表示为分离逻辑资源赋予了Tachis极大的灵活性和表达能力。特别是,它允许通过将多余的信用作为势能存储到数据结构中来支付未来操作的成本,从而推理摊还期望成本。Tachis进一步支持多种成本模型,包括运行时间和熵使用。我们通过应用我们的技术来证明各种概率算法和数据结构(包括随机快速排序、哈希表和可合并堆)的期望成本上限,展示了这种方法的通用性。我们所有的结果均已使用Coq、Iris和Coquelicot实分析库进行了机械化验证。
英文摘要:
We present Tachis, a higher-order separation logic to reason about the expected cost of probabilistic programs. Inspired by the uses of time credits for reasoning about the running time of deterministic programs, we introduce a novel notion of probabilistic cost credit. Probabilistic cost credits are a separation logic resource that can be used to pay for the cost of operations in programs, and that can be distributed across all possible branches of sampling instructions according to their weight, thus enabling us to reason about expected cost. The representation of cost credits as separation logic resources gives Tachis a great deal of flexibility and expressivity. In particular, it permits reasoning about amortized expected cost by storing excess credits as potential into data structures to pay for future operations. Tachis further supports a range of cost models, including running time and entropy usage. We showcase the versatility of this approach by applying our techniques to prove upper bounds on the expected cost of a variety of probabilistic algorithms and data structures, including randomized quicksort, hash tables, and meldable heaps. All of our results have been mechanized using Coq, Iris, and the Coquelicot real analysis library.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。