Gradual Typing for Generics

Gradual Typing for Generics
复制标题

泛型的逐步打字

DOI:
10.1145/2048066.2048114
复制
发表时间:
2011
期刊:
Proceedings of the 2011 ACM International Conference on Object-Oriented Programming, Systems, Languages, and Applications
影响因子:
--
通讯作者:
Atsushi Igarashi
Atsushi Igarashi
中科院分区:
--
文献类型:
--
作者:
Lintaro Ina;Atsushi Igarashi

文献摘要

相似文献

渐进式类型是在单一编程语言中组合静态和动态类型的框架。在这篇文章中,我们用泛型为基于类的面向对象语言开发了一个渐进型系统。我们引入了一种特殊的类型来表示程序的动态类型部分;然而,与C#4.0中引入的动态类型不同,我们的类型系统允许更无缝地集成动态和静态类型的代码。我们用插入显式运行时检查的翻译给出的语义形式化了Featherweight GJ的渐进式类型系统。类型系统保证程序的静态类型部分不会出错,即使它包括动态类型的部分。我们还描述了Java的基本实现方案,并报告了初步的性能评估。
Gradual typing is a framework to combine static and dynamic typing in a single programming language. In this paper, we develop a gradual type system for class-based object-oriented languages with generics. We introduce a special type to denote dynamically typed parts of a program; unlike dynamic types introduced to C# 4.0, however, our type system allows for more seamless integration of dynamically and statically typed code.We formalize a gradual type system for Featherweight GJ with a semantics given by a translation that inserts explicit run-time checks. The type system guarantees that statically typed parts of a program do not go wrong, even if it includes dynamically typed parts. We also describe a basic implementation scheme for Java and report preliminary performance evaluation.