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.
翻译:渐进式建筑(CIC) 渐进式建筑(CIC) 渐进式建筑(CIC) 的计算过程涉及处理任何类型错误、渐进式建筑(CIC) 和保守式建筑(CIC) 之间微妙的紧张关系。 最近, GCIC 被提议为一种接受三种变体、 牺牲其中一种特性的平衡渐进式渐进式渐进型理论。 对于设计一个基于 CIC 的渐进式证据助理来说, CIC 的正常化和保守式建筑(CIC ) 的渐进式建筑(CIC ), 任何类型错误的两种通配值术语的例外性, 以及任何理论的不确定性术语的模糊性。 最近, GCIC 的渐进式理论使用渐进式理论, 最明显的平等性, 是一个开放的问题; (3) 渐进式的打字和渐进式建筑模型的理论, 无法支持在递减过程中发现的类型 ; (4) 精度和渐进式的外部概念不易在渐进式理论中推理。 所有这些问题都支持CIC 、 用于确定渐进式公司(CRIC) 渐进式的精确式的计算(CRIRC) 的计算过程的递化) 的递化的递进式公司(我们使用一种渐进式的递进式的推介的不断进的推) 。