TypeDevil: Dynamic Type Inconsistency Analysis for JavaScript

Dynamic languages, such as JavaScript, give programmers the freedom to ignore types, enabling them to write concise code in short time. Despite this freedom, many programs follow implicit type rules, for example, that a function has a particular signature or that a field has a particular type. Violations of such implicit type rules often correlate with problems in the program. This talk presents TypeDevil, a mostly dynamic analysis that warns developers about inconsistent types. The key idea is to assign a set of observed types to each variable, property, and function, to merge types based in their structural properties, and to warn developers about variables, properties, and functions that have inconsistent types. To deal with the pervasiveness of polymorphic behavior in many JavaScript programs, we present a set of techniques to remove spurious warnings and to merge related warnings. Applying TypeDevil to widely used benchmark suites and real-world web applications reveals 15 type problematic type inconsistencies, including correctness problems, performance problems, and dangerous coding practices.

Start time:
Location: SFO Commons
Duration: 47 minutes
Channel: Main

Tags: javascript

Views since archived: 703

Small (640x380) Big (896x504)

WebM (HD) , Mpeg4 (HD)
To download, right-click and select "Save Link As..."


Loading comments. Please wait…

You must be signed in to post comments.