Mixed Messages: Measuring Conformance and Non-Interference in TypeScript

Mixed Messages: Measuring Conformance and Non-Interference in TypeScript
复制标题

混合消息:衡量 TypeScript 中的一致性和不干扰性

DOI:
--
复制
发表时间:
2017
期刊:
European Conference on Object-Oriented Programming
影响因子:
--
通讯作者:
Jakub Zalewski
Jakub Zalewski
中科院分区:
--
文献类型:
--
作者:
Jack Williams;J. Garrett Morris;P. Wadler;Jakub Zalewski

文献摘要

参考文献

被引文献

相似文献

TypeScrip参与了编程中的最新趋势 支持渐进打字的语言。DefinitelyType存储库 为2000多个流行的类型定义提供类型定义 JavaScript库。然而,不能保证 实现符合其相应的声明。 我们提出了一种实用的打字渐进式打字方法。 我们已经开发了一个用于打印脚本的工具,该工具基于 多态的怪罪演算,用于监控JavaScript库和 针对打字脚本定义的打字脚本客户端。我们应用我们的 工具、类型脚本TPD到DefinitelyTyped中的那些库 具有足够的测试代码以供使用的存储库。在122家图书馆中 我们查过了,62个案例要么是图书馆,要么是它的测试 未能遵守声明。 渐进打字应满足互不干扰的要求。监控程序 不应更改其行为,除非引发类型错误 如果值不符合其声明的类型。然而,我们的 经验还表明,在使用 用于强制执行合同的JavaScript代理机制。在122个人中 我们检查的库中,有22个库或其测试 违反了不干涉原则。
TypeScript participates in the recent trend among programming languages to support gradual typing. The DefinitelyTyped Repository for TypeScript supplies type definitions for over 2000 popular JavaScript libraries. However, there is no guarantee that implementations conform to their corresponding declarations. We present a practical evaluation of gradual typing for TypeScript. We have developed a tool for use with TypeScript, based on the polymorphic blame calculus, for monitoring JavaScript libraries and TypeScript clients against the TypeScript definition. We apply our tool, TypeScript TPD, to those libraries in the DefinitelyTyped Repository which had adequate test code to use. Of the 122 libraries we checked, 62 had cases where either the library or its tests failed to conform to the declaration. Gradual typing should satisfy non-interference. Monitoring a program should never change its behaviour, except to raise a type error should a value not conform to its declared type. However, our experience also suggests serious technical concerns with the use of the JavaScript proxy mechanism for enforcing contracts. Of the 122 libraries we checked, 22 had cases where the library or its tests violated non-interference.
免费定理:参数化,有类型和没有类型
DOI: 10.1145/3110283
发表时间: 2017
影响因子: --
作者:
Ahmed A
通讯作者: Ahmed A