We use a semantic interpretation to investigate the problem of defining an expressive but decidable type system with bounded quantification. Typechecking in the widely studied System \fsub is undecidable thanks to an undecidable subtyping relation, for which the culprit is the rule for subtyping bounded quantification. Weaker versions of this rule, allowing decidable subtyping, have been proposed. One of the resulting type systems (Kernel Fsub) lacks expressiveness, another (System Fsubtop) lacks the minimal typing property and thus has no evident typechecking algorithm. We consider these rules as defining distinct forms of bounded quantification, one for interpreting type variable abstraction, and the other for type instantiation. By giving a semantic interpretation for both in terms of unbounded quantification, using the dinaturality of type instantiation with respect to subsumption, we show that they can coexist within a single type system. This does have the minimal typing property and thus a simple typechecking procedure. We consider the fragments of this unified type system over types which contain only one form of bounded quantifier. One of these is equivalent to Kernel Fsub, while the other can type strictly more terms than System Fsubtop but the same set of beta-normal terms. We show decidability of typechecking for this fragment, and thus for System Fsubtop typechecking of beta-normal terms.
翻译:我们用一种语义解释来调查定义一个有约束量化的表达式但可分解的类型系统的问题。 在广泛研究的系统\fsub 中进行字型检查由于不可分解的亚型关系是不可分解的, 罪魁祸首是分解约束量化规则的规则。 已经提出了这一规则的较弱版本, 允许分解子型, 允许分解分解。 由此产生的类型系统之一( Kernel Fsub) 缺乏直观的表达性, 另一个( System Fsubtop) 缺乏最小的打字属性, 因而没有明显的打字算法。 我们认为这些规则定义了不同形式的受约束的量化, 一种用于解释型式变量抽象, 而另一种则用于类型即直线。 我们只能对非常规定义的直径直径系统进行分解, 并严格地检查系统下型号的直径直径直定义。