2005
DOI: 10.1007/11531142_19
|View full text |Cite
|
Sign up to set email alerts
|

Towards Type Inference for JavaScript

Abstract: Abstract. Object-oriented scripting languages like JavaScript and Python are popular partly because of their dynamic features. These include the runtime modification of objects and classes through addition of fields or updating of methods. These features make static typing difficult and so usually dynamic typing is used. Consequently, errors such as access to non-existent members are not detected until runtime. We first develop a formalism for an object based language, JS0, with features from JavaScript, inclu… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
154
0

Year Published

2009
2009
2020
2020

Publication Types

Select...
4
4
2

Relationship

0
10

Authors

Journals

citations
Cited by 161 publications
(158 citation statements)
references
References 17 publications
0
154
0
Order By: Relevance
“…Various research efforts have explored sound approaches to this problem. Thiemann [17] proposed an early type system that uses singleton types and first-class record labels, and in the same year Anderson et al [2] proposed another type system with a focus on type inference. A number of others have proposed systems of increasing complexity to deal with the complicated programming patterns found in JavaScript; for example, Chugh et al [4] employed nested refinements and heap types in DJS, and Guha et al [9] proposed a combination of a type system and a flow analysis.…”
Section: Theorem 2 S T If and Only If S Tmentioning
confidence: 99%
“…Various research efforts have explored sound approaches to this problem. Thiemann [17] proposed an early type system that uses singleton types and first-class record labels, and in the same year Anderson et al [2] proposed another type system with a focus on type inference. A number of others have proposed systems of increasing complexity to deal with the complicated programming patterns found in JavaScript; for example, Chugh et al [4] employed nested refinements and heap types in DJS, and Guha et al [9] proposed a combination of a type system and a flow analysis.…”
Section: Theorem 2 S T If and Only If S Tmentioning
confidence: 99%
“…dynamic modifications of classes and methods) have been removed. JS 0 [37] is a statically-typed version of JavaScript with inference, where both dynamic addition of fields and method updating are supported. ActionScript is one of the first languages used in the industry to embrace gradual typing, and efforts have been made to optimize it using local type inference [7].…”
Section: Related Workmentioning
confidence: 99%
“…Their focus is not on objects, but instead on numerical analysis and domains with the aim of program optimization. Anderson et al give an operational semantics and static type system using structural types over an idealized version of JavaScript [14]. They consider subtyping for objects based on implementation (a subtype must contain all members of its supertype), whereas we formulated equivalence between types based on having the same interface.…”
Section: B Abstract Interpretation and Type Inference Of Javascriptmentioning
confidence: 99%