首页> 外文会议>Interactive theorem proving >Proof Pearl: Constructive Extraction of Cycle Finding Algorithms
【24h】

Proof Pearl: Constructive Extraction of Cycle Finding Algorithms

机译:Proof Pearl:周期发现算法的构造性提取

获取原文
获取原文并翻译 | 示例

摘要

We present a short implementation of the well-known Tortoise and Hare cycle finding algorithm in the constructive setting of Coq. This algorithm is interesting from a constructive perspective because it is both very simple and potentially non-terminating (depending on the input). To overcome potential non-termination, we encode the given termination argument (there exists a cycle) into a bar inductive predicate that we use as termination certificate. Prom this development, we extract the standard OCaml implementation of this algorithm. We generalize the method to the full Floyd's algorithm that computes the entry point and the period of the cycle in the iterated sequence, and to the more efficient Brent's algorithm for computing the period only, again with accurate extractions of their respective standard OCaml implementations.
机译:我们在Coq的建设性环境中介绍了著名的Tortoise和Hare循环发现算法的简短实现。从构造的角度来看,此算法很有趣,因为它既非常简单,又可能是无终止的(取决于输入)。为了克服潜在的非终止,我们将给定的终止参数(存在一个循环)编码为一个棒形归纳谓词,用作终止证书。为促进这一发展,我们提取了该算法的标准OCaml实现。我们将该方法推广到完整的Floyd算法(计算迭代序列中的入口点和周期的周期),再推广到更有效的Brent算法(仅计算周期),再精确提取其各自的标准OCaml实现。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号