arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.00975cs.PL
收藏

一个合理的渐进类型论

A Reasonably Gradual Type Theory

Kenji Maillard, Meven Lennon-Bertrand, Nicolas Tabareau, Éric Tanter

摘要:

归纳构式演算(CIC)的毕业涉及处理与CIC有关的规范化、渐进性和保守性之间的微妙紧张关系。最近,GCIC已被提出作为一个参数化的渐进类型论,承认三个变量,每个牺牲这些属性之一。设计基于CIC的渐进式证明助手,CIC的规范性和保守性是关键,但与渐进性的张力需要解决。此外,还存在一些挑战:(1)在任何类型上存在两个非线性项--错误项和未知项--使得任何定理的证明都变得微不足道,从而危及在证明助手中逐步类型论的使用;(2)支持一般索引归纳族,最突出的是相等,是一个公开的问题;(3)到目前为止,对渐进类型和渐进性的理论解释不支持处理在归约过程中发现的类型不匹配;(4)精确性和渐进性是外部概念,不适合在渐进类型论中进行推理。所有这些问题主要体现在CastCIC中,CastCIC是用于定义GCIC的铸造演算。在这项工作中,我们提出了一个扩展的CastCIC称为GRIP。GRIP是一个合理的渐进类型论,它解决了上述问题,具有内部精度和一般异常处理。GRIP的特点是一种不纯的(渐进的)类型,其中居住着错误和未知项,以及一种纯的(非渐进的)严格命题,用于渐进项的一致推理。内部精度支持GRIP本身的渐进性推理,例如描述渐进异常处理术语,并支持渐进子集类型。我们开发的元理论的GRIP使用的模型形式化Coq,并提供了一个原型实现的GRIP在Agda。

英文摘要:

Gradualizing the Calculus of Inductive Constructions (CIC) involves dealing with subtle tensions between normalization, graduality, and conservativity with respect to CIC. Recently, GCIC has been proposed as a parametrized gradual type theory that admits three variants, each sacrificing one of these properties. For devising a gradual proof assistant based on CIC, normalization and conservativity with respect to CIC are key, but the tension with graduality needs to be addressed. Additionally, several challenges remain: (1) The presence of two wildcard terms at any type-the error and unknown terms-enables trivial proofs of any theorem, jeopardizing the use of a gradual type theory in a proof assistant; (2) Supporting general indexed inductive families, most prominently equality, is an open problem; (3) Theoretical accounts of gradual typing and graduality so far do not support handling type mismatches detected during reduction; (4) Precision and graduality are external notions not amenable to reasoning within a gradual type theory. All these issues manifest primally in CastCIC, the cast calculus used to define GCIC. In this work, we present an extension of CastCIC called GRIP. GRIP is a reasonably gradual type theory that addresses the issues above, featuring internal precision and general exception handling. GRIP features an impure (gradual) sort of types inhabited by errors and unknown terms, and a pure (non-gradual) sort of strict propositions for consistent reasoning about gradual terms. Internal precision supports reasoning about graduality within GRIP itself, for instance to characterize gradual exception-handling terms, and supports gradual subset types. We develop the metatheory of GRIP using a model formalized in Coq, and provide a prototype implementation of GRIP in Agda.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑