当前位置: X-MOL 学术ACM Trans. Program. Lang. Syst. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Consistent Subtyping for All
ACM Transactions on Programming Languages and Systems ( IF 1.3 ) Pub Date : 2019-11-21 , DOI: 10.1145/3310339
Ningning Xie 1 , Xuan Bi 1 , Bruno C. D. S. Oliveira 2 , Tom Schrijvers 3
Affiliation  

Consistent subtyping is employed in some gradual type systems to validate type conversions. The original definition by Siek and Taha serves as a guideline for designing gradual type systems with subtyping. Polymorphic types à la System F also induce a subtyping relation that relates polymorphic types to their instantiations. However, Siek and Taha’s definition is not adequate for polymorphic subtyping. The first goal of this article is to propose a generalization of consistent subtyping that is adequate for polymorphic subtyping and subsumes the original definition by Siek and Taha. The new definition of consistent subtyping provides novel insights with respect to previous polymorphic gradual type systems, which did not employ consistent subtyping. The second goal of this article is to present a gradually typed calculus for implicit (higher-rank) polymorphism that uses our new notion of consistent subtyping. We develop both declarative and (bidirectional) algorithmic versions for the type system. The algorithmic version employs techniques developed by Dunfield and Krishnaswami for higher-rank polymorphism to deal with instantiation. We prove that the new calculus satisfies all static aspects of the refined criteria for gradual typing. We also study an extension of the type system with static and gradual type parameters, in an attempt to support a variant of the dynamic criterion for gradual typing. Assuming a coherence conjecture for the extended calculus, we show that the dynamic gradual guarantee of our source language can be reduced to that of λ B, which, at the time of writing, is still an open question. Most of the metatheory of this article, except some manual proofs for the algorithmic type system and extensions, has been mechanically formalized using the Coq proof assistant.

中文翻译:

一致的子类型

在一些渐进类型系统中使用一致的子类型来验证类型转换。Siek 和 Taha 的原始定义用作设计带有子类型的渐进类型系统的指南。系统 F 中的多态类型也引入了一种子类型关系,将多态类型与其实例化相关联。然而,Siek 和 Taha 的定义对于多态子类型来说是不够的。本文的第一个目标是提出一致子类型的泛化,该泛化适用于多态子类型,并包含 Siek 和 Taha 的原始定义。一致子类型的新定义为以前没有采用一致子类型的多态渐变类型系统提供了新的见解。本文的第二个目标是为隐式(高阶)多态性提供一个渐进类型演算,该演算使用我们新的一致子类型概念。我们为类型系统开发声明式和(双向)算法版本。算法版本采用了由 Dunfield 和 Krishnaswami 开发的技术,用于更高等级的多态性来处理实例化。我们证明了新的微积分满足渐进类型细化标准的所有静态方面。我们还研究了具有静态和渐进类型参数的类型系统的扩展,以尝试支持渐进类型的动态标准的变体。假设扩展演算的一致性猜想,我们表明我们的源语言的动态渐进保证可以简化为 λ B 的保证,在撰写本文时,仍然是一个悬而未决的问题。本文的大部分元理论,除了算法类型系统和扩展的一些手动证明外,已经使用 Coq 证明助手进行了机械形式化。
更新日期:2019-11-21
down
wechat
bug