参观MetaCoq项目(特邀论文)
Touring the MetaCoq Project (Invited Paper)
摘要:
证明助手在研究和工业中得到越来越广泛的使用,以提供关于理论、设计、系统和实现的经认证的和可独立检查的保证。然而,证明助手实现本身很少被验证,尽管它们在任何此类认证工作中占据了受信任代码库的主要份额。在这一领域,基于高阶逻辑的证明助手享有更强的保证,因为自认证实现已经有几年了。这种差异的一个原因是依赖类型论的内在复杂性,以及它们与归纳类型、论域多态性和复杂排序系统的扩展,以及理论与高效程序设计语言的实际实现之间的差距。MetaCoq是一个合作项目,旨在解决这些困难,为Coq证明助手底层的完整演算提供第一个经过完全认证的类型检查器的真实实现。为了实现这一点,我们改进了有时模糊的,如果不是不正确的,系统的规范和实现。我们展示了这个社区的理论工具,如双向类型检查,Tait-Martin-Löf/Takahashi的汇合证明技术和monadic和依赖类型编程,可以帮助构建以下工件:Coq的语法和类型论的规范,(Co)-归纳构造的多态累积演算(PCUIC);用于操纵原始语法和与Coq系统交互的monad;对PCUIC的元理论的验证,其主要结果是归约、类型保持和类型原则的融合,PCUIC的一个真实、正确和完整的类型检查器,从PCUIC到无类型的类型演算的一个可靠的类型和证明擦除过程,即,辅酶Q提取机理的核心。
英文摘要:
Proof assistants are getting more widespread use in research and industry to provide certified and independently checkable guarantees about theories, designs, systems and implementations. However, proof assistant implementations themselves are seldom verified, although they take a major share of the trusted code base in any such certification effort. In this area, proof assistants based on Higher-Order Logic enjoy stronger guarantees, as self-certified implementations have been available for some years. One cause of this difference is the inherent complexity of dependent type theories together with their extensions with inductive types, universe polymorphism and complex sort systems, and the gap between theory on paper and practical implementations in efficient programming languages. MetaCoq is a collaborative project that aims to tackle these difficulties to provide the first fully-certified realistic implementation of a type checker for the full calculus underlying the Coq proof assistant. To achieve this, we refined the sometimes blurry, if not incorrect, specification and implementation of the system. We show how theoretical tools from this community such as bidirectional type-checking, Tait-Martin-Löf/Takahashi's confluence proof technique and monadic and dependently-typed programming can help construct the following artefacts: a specification of Coq's syntax and type theory, the Polymorphic Cumulative Calculus of (Co)-Inductive Constructions (PCUIC); a monad for the manipulation of raw syntax and interaction with the Coq system; a verification of PCUIC's metatheory, whose main results are the confluence of reduction, type preservation and principality of typing; a realistic, correct and complete type-checker for PCUIC; a sound type and proof erasure procedure from PCUIC to untyped lambda-calculus, i.e., the core of the extraction mechanism of Coq.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。