Matching ThisType to subtyping

Matching ThisType to subtyping
复制标题

DOI:
10.1145/1529282.1529699
复制
发表时间:
2009-03
期刊:
--
影响因子:
--
通讯作者:
C. Saito;Atsushi Igarashi
C. Saito;Atsushi Igarashi
中科院分区:
其他
文献类型:
--
作者:
C. Saito;Atsushi Igarashi

文献摘要

被引文献

相似文献

ThisType的概念是为了促进二进制方法的类型安全重用而提出的,最近扩展到相互递归的定义。然而,众所周知,ThisType与子类型并不匹配。在当前的类型系统中,类型安全是通过牺牲子类型来保证的,因此是动态调度。在本文中,我们提出了两种机制,即不可遗传的方法和局部精确化,以弥补之间的不匹配ThisType和子类型。我们严格证明了他们的安全性,他们在一个小微积分建模。
The notion of ThisType has been proposed to promote typesafe reuse of binary methods and recently extended to mutually recursive definitions. It is well-known, however, that ThisType does not match with subtyping well. In the current type systems, type safety is guaranteed by the sacrifice of subtyping, hence dynamic dispatch. In this paper, we propose two mechanisms, namely, nonheritable methods and local exactization to remedy the mismatch between ThisType and subtyping. We rigorously prove their safety by modeling them in a small calculus.