Polymorphic type inference for scripting languages with object extensions

  • Authors:
  • Tian Zhao

  • Affiliations:
  • University of Wisconsin - Milwaukee, Milwaukee, WI, USA

  • Venue:
  • Proceedings of the 7th symposium on Dynamic languages
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

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 checked incrementally.