Dependent Types for Java']JavaScript

被引:26
作者
Chugh, Ravi [1 ]
Herman, David [2 ]
Jhala, Ranjit [1 ]
机构
[1] Univ Calif San Diego, San Diego, CA 92103 USA
[2] Mozilla Res, Mountain View, CA USA
关键词
Refinement Types; !text type='Java']Java[!/text]Script; Strong Updates; Prototype Inheritance; Arrays;
D O I
10.1145/2398857.2384659
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present Dependent JavaScript (DJS), a statically typed dialect of the imperative, object-oriented, dynamic language. DJS supports the particularly challenging features such as run-time type-tests, higher-order functions, extensible objects, prototype inheritance, and arrays through a combination of nested refinement types, strong updates to the heap, and heap unrolling to precisely track prototype hierarchies. With our implementation of DJS, we demonstrate that the type system is expressive enough to reason about a variety of tricky idioms found in small examples drawn from several sources, including the popular book JavaScript: The Good Parts and the SunSpider benchmark suite.
引用
收藏
页码:587 / 606
页数:20
相关论文
共 37 条
  • [1] Ahmed A., 2007, FUNDAMENTA INFORM, V77
  • [2] AIKEN A, 2003, PLDI
  • [3] [Anonymous], 2008, TACAS
  • [4] [Anonymous], CLOS LIB
  • [5] [Anonymous], 1996, A Theory of Objects
  • [6] [Anonymous], V8 BENCHM
  • [7] Bierman Gavin M., 2010, ICFP
  • [8] Bono V., 1998, ECOOP
  • [9] Chugh R., 2009, PLDI
  • [10] Chugh R., DEPENDENT TYPES JAVA