Polymorphic type inference for scripting languages with object extensions

Tian Zhao
2011 Proceedings of the 7th symposium on Dynamic languages - DLS '11  
This paper presents a polymorphic type inference algorithm for a small subset of JavaScript. The goal is to prevent accessing undefined members of objects. We define a type system that allows explicit extension of objects through add operation and implicit extension through method calls. The type system also permits strong updates and unrestricted extensions to new objects. The type inference algorithm is modular so that each function definition is only analyzed once and larger programs can be
more » ... er programs can be checked incrementally.
doi:10.1145/2047849.2047855 dblp:conf/dls/Zhao11 fatcat:ramecdm4kjcwjhkh4ugnfb5wty