论文标题

合理渐进的类型理论

A Reasonably Gradual Type Theory

论文作者

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

论文摘要

逐步化归纳构建体的计算(CIC)涉及处理相对于CIC的归一化,渐进性和保守性之间的微妙张力。最近,GCIC被认为是一种参数化的渐进类型理论,该理论接受了三种变体,每种都牺牲了其中一种。对于基于CIC的逐步证明助手,相对于CIC的归一化和保守性是关键,但需要解决逐渐的张力。此外,仍然存在一些挑战:(1)在任何类型的情况下存在两个通配符术语 - 任何定理的错误和未知项的琐事证明,危害在证明助手中使用渐进类型的理论; (2)支持一般索引的归纳家族,最突出的平等是一个开放的问题; (3)到目前为止,逐渐键入和逐步逐步逐步分类和逐渐尚不支持在减少过程中检测到的不匹配的理论说明; (4)精度和渐进性是不适合逐渐类型理论推理的外部概念。所有这些问题主要在castcic中表现出来,用于定义GCIC的铸造微积分。在这项工作中,我们提出了Castcic的延伸,称为Grip。 Grip是一种合理的渐进类型理论,可以解决上述问题,具有内部精度和一般例外处理。 Grip具有一种不纯净的(渐进)类型的类型,这些类型是错误和未知术语,以及纯粹(非毕业)的严格命题,以始终如一地推理逐渐的术语。内部精度支持有关握把内部渐进性的推理,例如表征渐进的异常处理术语,并支持逐渐的子集类型。我们使用COQ中正式的模型开发了Grip的元看,并提供了AGDA中Grip的原型实现。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源