首页> 外文会议>Interactive theorem proving >Reification by Parametricity Fast Setup for Proof by Reflection, in Two Lines of Ltac
【24h】

Reification by Parametricity Fast Setup for Proof by Reflection, in Two Lines of Ltac

机译:在两行Ltac中通过参数化进行快速验证以进行反射验证

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

摘要

We present a new strategy for performing reification in Coq. That is, we show how to generate first-class abstract syntax trees from "native" terms of Coq's logic, suitable as inputs to verified compilers or procedures in the proof-by-reflection style. Our new strategy, based on simple generalization of subterms as variables, is straightforward, short, and fast. In its pure form, it is only complete for constants and function applications, but "let" binders, eliminators, lambdas, and quantifiers can be accommodated through lightweight coding conventions or preprocessing. We survey the existing methods of reification across multiple Coq metaprogramming facilities, describing various design choices and tricks that can be used to speed them up, as well as various limitations. We report benchmarking results for 18 variants, in addition to our own, finding that our own reification outperforms 16 of these methods in all cases, and one additional method in some cases; writing an OCaml plugin is the only method tested to be faster. Our method is the most concise of the strategies we considered, reifying terms using only two to four lines of Ltac-beyond lists of the identifiers to reify and their reified variants. Additionally, our strategy automatically provides error messages that are no less helpful than Coq's own error messages.
机译:我们提出了在Coq中执行修正的新策略。也就是说,我们展示了如何从Coq逻辑的“本机”术语生成一流的抽象语法树,适合作为经过反射证明样式的经过验证的编译器或过程的输入。我们基于子项作为变量的简单概括的新策略是简单,简短和快速的。纯形式仅适用于常量和函数应用程序,但是可以通过轻量编码约定或预处理来容纳\“ let \”活页夹,消除符,lambda和量词。我们调查了跨多个Coq元编程设施的现有的标准化方法,描述了可用于加快设计速度的各种设计选择和技巧,以及各种限制。我们报告了除我们自己之外的18种变体的基准测试结果,发现我们自己的版本化在所有情况下均优于其中16种方法,在某些情况下优于另一种方法。编写OCaml插件是唯一经过测试可以更快的方法。我们的方法是我们考虑过的策略中最简洁的一种,仅使用两到四行Ltac以外的标识符列表和它们的变体来对术语进行词义化。此外,我们的策略会自动提供与Coq自己的错误消息同样有用的错误消息。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号