Towards Certified Meta-Programming With Typed Template-Coq

INTERACTIVE THEOREM PROVING, ITP 2018(2018)

引用 58|浏览27
暂无评分
摘要
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 lambda-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.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要