无最小类型的类型检查:$F_{<:}^{\ op}$ 的有限基与反向检查
Typechecking without Minimum Types: Finite Bases and Backward Checking for $F_{<:}^{\top}$
AI总结:
针对缺乏最小类型的 $F_{<:}^{\ op}$,提出有限基与反向检查方法,证明其类型检查可判定,且两种检查过程为等价的完整 Rocq 函数,符号实现具四次方最坏复杂度。
摘要:
系统 $F_{<:}^{\ op}$ 的子类型关系可判定,但缺乏最小类型。我们证明,对带有无限制包含关系的任意显式标注项,其类型检查是可判定的。难点在于类型抽象会使用变量的声明边界来对其体进行类型检查,而量化子类型会遗忘该边界。我们构造有限覆盖,以在这种上下文变化中保留所有所需的子类型比较。这些覆盖可生成组合式有限类型基和判定过程。随后,我们推导一种反向检查器,其无需构建完整类型基即可传播可接受目标。类型族的矩形性提供了统一的消除域,同时保留所有结果类型,即使规范类型并非最小。有限逆族通过类型替换传递目标。相同的逆规范可恢复边界遗忘并生成有限避类型族。两种类型检查过程都是完整的 Rocq 函数,已被证明与原始类型判断等价。对于单独的符号字 RAM 实现,我们证明其最坏情况工作复杂度为四次方。我们在合成检查判断上的独立 OCaml 原型中测量了族表示大小和比较存储。
英文摘要:
System $F_{<:}^{\top}$ has decidable subtyping but lacks minimum types. We prove that typechecking is decidable for arbitrary explicitly annotated terms with unrestricted subsumption. The difficulty is that type abstraction uses a variable's declared bound to type its body, while quantified subtyping forgets that bound. We construct finite covers that preserve all required subtype comparisons across this change of context. These covers yield a compositional finite typing basis and a decision procedure. We then derive a backward checker that propagates acceptable targets without constructing the complete typing basis. Rectangularity of typing families gives a uniform elimination domain while retaining every result type, even when the canonical type is not least. Finite inverse families transport targets through type substitution. The same inverse specification recovers bound forgetting and yields finite type-avoidance families. Both typechecking procedures are total Rocq functions proved equivalent to the original typing judgment. For a separate symbolic word-RAM realization, we prove a quartic worst-case work bound. We measure family representation sizes and comparison storage in independent OCaml prototypes on synthetic checking judgments.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。