Toward efficient gradual typing for structural types via coercions
Toward efficient gradual typing for structural types via coercions
复制标题
通过强制实现结构类型的高效逐步类型化
DOI:
10.1145/3314221.3314627
复制
发表时间:
2019
期刊:
影响因子:
--
通讯作者:
Siek, Jeremy G.
中科院分区:
文献类型:
--
作者:
Kuhlenschmidt, Andre;Almahallawi, Deyaaeldeen;Siek, Jeremy G.
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
影响因子:
--
作者:
G. Richards;Francesco Zappa Nardelli;J. Vitek
通讯作者:
J. Vitek
DOI:
--
发表时间:
2012
期刊:
ACM SIGPLAN International Conference on Functional Programming
影响因子:
--
作者:
O. Chitil
通讯作者:
O. Chitil
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