Toward efficient gradual typing for structural types via coercions

Toward efficient gradual typing for structural types via coercions
复制标题

通过强制实现结构类型的高效逐步类型化

DOI:
10.1145/3314221.3314627
复制
发表时间:
2019
期刊:
Proceedings of the 40th {ACM} {SIGPLAN} Conference on Programming Language Design and Implementation
影响因子:
--
通讯作者:
Siek, Jeremy G.
Siek, Jeremy G.
中科院分区:
--
文献类型:
--
作者:
Kuhlenschmidt, Andre;Almahallawi, Deyaaeldeen;Siek, Jeremy G.

文献摘要

参考文献

被引文献

相似文献

渐进式打字在同一个程序中结合了静态和动态打字。西克等人。 (2015)描述了渐进类型语言的五个标准,包括类型健全性和渐进保证。学术界和工业界已经开发出大量支持其中一些标准的语言(TypeScript、Typed Racket、Safe TypeScript、Transient Reticulated Python、Thorn 等),但支持所有标准的语言相对较少(Nom、Gradualtalk、Guarded Reticulated Python)。在那些这样做的人中,只有 Nom 做得如此有效。 Nom 实验表明,在仅具有名义类型的语言中可以实现高效的渐进类型,但许多语言都具有结构类型:函数类型、元组、记录和对象类型、泛型等。在本文中,我们提出了一种名为 Grift 的编译器,它解决了结构类型的高效渐进类型的难题。输入语言包括一系列困难的功能:一流的函数、可变数组和递归类型。我们证明,受 Henglein 强制转换启发的运行时强制转换的接近金属实现消除了所有灾难性的减速,而不会引入显着的平均情况开销。因此,Grift 的开销比 Typed Racket 低。
Gradual typing combines static and dynamic typing in the same program. Siek et al. (2015) describe five criteria for gradually typed languages, including type soundness and the gradual guarantee. A significant number of languages have been developed in academia and industry that support some of these criteria (TypeScript, Typed Racket, Safe TypeScript, Transient Reticulated Python, Thorn, etc.) but relatively few support all the criteria (Nom, Gradualtalk, Guarded Reticulated Python). Of those that do, only Nom does so efficiently. The Nom experiment shows that one can achieve efficient gradual typing in languages with only nominal types, but many languages have structural types: function types, tuples, record and object types, generics, etc.In this paper we present a compiler, named Grift, that addresses the difficult challenge of efficient gradual typing for structural types. The input language includes a selection of difficult features: first-class functions, mutable arrays, and recursive types. We show that a close-to-the-metal implementation of run-time casts inspired by Henglein's coercions eliminates all of the catastrophic slowdowns without introducing significant average-case overhead. As a result, Grift exhibits lower overheads than those of Typed Racket.
DOI: --
发表时间: 2007
期刊: Dynamic Languages Symposium
影响因子: --
作者:
Arjun Guha;Jacob Matthews;R. Findler;S. Krishnamurthi
通讯作者: S. Krishnamurthi
TypeScript 的具体类型
DOI: 10.4230/lipics.ecoop.2015.76
发表时间: 2015
影响因子: --
作者:
G. Richards;Francesco Zappa Nardelli;J. Vitek
通讯作者: J. Vitek
实用的类型化惰性合约
DOI: --
发表时间: 2012
期刊: ACM SIGPLAN International Conference on Functional Programming
影响因子: --
作者:
O. Chitil
通讯作者: O. Chitil
在 O(0) 时间内优化闭包
DOI: --
发表时间: 2012
期刊: Scheme and Functional Programming
影响因子: --
作者:
Andrew W. Keep;Alex Hearn;R. Dybvig
通讯作者: R. Dybvig
DOI: 10.1007/978-3-540-73589-2_2
发表时间: 2007-07
期刊: --
影响因子: --
作者:
Jeremy G. Siek;Walid Taha
通讯作者: Jeremy G. Siek;Walid Taha