首页> 外文会议>Interactive theorem proving >Towards Certified Meta-Programming with Typed Template-Coq
【24h】

Towards Certified Meta-Programming with Typed Template-Coq

机译:使用类型化的模板-Coq实现认证的元编程

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

摘要

Template-Coq (https://template-coq.github.io/template-coq) is a plugin for Coq, originally implemented by Malecha [18], which provides a reifier for Coq terms and global declarations, as represented in the Coq kernel, as well as a denotation command. Initially, it was developed for the purpose of writing functions on Coq's AST in Gal-lina. Recently, it was used in the CertiCoq certified compiler project [4], as its front-end language, to derive parametricity properties [3], and to extract Coq terms to a CBV λ-calculus [13]. However, the syntax lacked semantics, be it typing semantics or operational semantics, which should reflect, as formal specifications in Coq, the semantics of Coq's type theory itself. The tool was also rather bare bones, providing only rudimentary quoting and unquoting commands. We generalize it to handle the entire Calculus of Inductive Constructions (CIC), as implemented by Coq, including the kernel's declaration structures for definitions and inductives, and implement a monad for general manipulation of Coq's logical environment. We demonstrate how this setup allows Coq users to define many kinds of general purpose plugins, whose correctness can be readily proved in the system itself, and that can be run efficiently after extraction. We give a few examples of implemented plugins, including a parametricity translation. We also advocate the use of Template-Coq as a foundation for higher-level tools.
机译:Template-Coq(https://template-coq.github.io/template-coq)是Coq的一个插件,最初由Malecha [18]实现,它为Coq术语和全局声明提供了整流器,如Coq所示。内核以及符号命令。最初,它是为在Gal-lina的Coq AST上编写函数而开发的。最近,它已在CertiCoq认证的编译器项目[4]中用作前端语言,以导出参数属性[3],并将Coq项提取到CBVλ-微积分[13]。但是,该语法缺少语义,无论是键入语义还是操作语义,都应将Coq类型理论本身的语义作为Coq中的形式规范反映出来。该工具也相当简单,仅提供基本的引用和取消引用命令。我们将其推广为处理Coq实施的整个归纳演算(CIC),包括用于定义和归纳的内核声明结构,并实现用于对Coq逻辑环境进行一般操作的monad。我们演示了此设置如何允许Coq用户定义多种通用插件,这些插件的正确性可以在系统本身中轻松证明,并且可以在提取后高效运行。我们提供一些已实现的插件的示例,包括参数转换。我们还提倡使用Template-Coq作为高级工具的基础。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号