DocumentCode
1952918
Title
Determining dynamic coupling in JavaScript using object type inference
Author
Nicolay, Jens ; Noguera, Carlos ; De Roover, Coen ; De Meuter, Wolfgang
Author_Institution
Software Languages Lab., Vrije Univ. Brussel, Brussels, Belgium
fYear
2013
fDate
22-23 Sept. 2013
Firstpage
126
Lastpage
135
Abstract
Coupling in an object-oriented context is often defined in terms of access to instance variables and methods of other classes. JavaScript, however, lacks static type information and classes, and instead features a flexible object system with prototypal inheritance. In order to determine coupling in JavaScript, we infer object types based on abstract interpretation of a program. Type inference depends on both structure and behavior of objects, and common patterns for expressing classes and modules are supported. We approximate a set of accessed types per function, and classify every access as either local or foreign. Examples demonstrate that our object type inference, together with some additional heuristics concerning property access, enable determining coupling in JavaScript in a meaningful way.
Keywords
Java; inference mechanisms; object-oriented programming; program diagnostics; JavaScript; abstract interpretation; dynamic coupling; flexible object system; object type inference; object-oriented context; prototypal inheritance; type inference; Abstracts; Conferences; Context; Couplings; Prototypes; Reactive power; Syntactics;
fLanguage
English
Publisher
ieee
Conference_Titel
Source Code Analysis and Manipulation (SCAM), 2013 IEEE 13th International Working Conference on
Conference_Location
Eindhoven
Type
conf
DOI
10.1109/SCAM.2013.6648193
Filename
6648193
Link To Document