JavaScript: Don't Believe the Type!

Status:
Accepted

Inferring types and their signatures from arbitrary JavaScript files is tough on a good day and in many cases verges on the impossible. Beyond the loosely-typed nature of the language, the flexibility to create type-like structures in many different ways makes the problem very challenging. While recent automatic tools based on static and dynamic analysis have had some success in inferring types, much work remains to be done. Even as our analysis techniques improve, developer tools continue to suffer at the hands of an impossible choice between either poor latency or poor accuracy.

Ah but there is hope. Analyzing JavaScript with help from the author in the form of doc annotation, optional typing, or pre-computed code indexes divides and dramatically simplifies the problem. In this talk we'll look at JavaScript code assist in Orion and show how you can make use of existing library type definitions and indexes. Although JSDoc annotation is not yet standardized, Orion provides support, and we'll show how to use our tooling to create high quality code assist for your own JavaScript programs. The Orion team genuinely wants to see doc annotation standardization, and we'll briefly cover our efforts to create consensus. Additionally, we will discuss how analysis tools for inferring types (e.g., the Jalangi framework [1]) continue to advance and how they can be fruitfully combined with doc annotations to infer better types, discover other interesting program properties, and conquer the world!

[1] https://github.com/SRA-SiliconValley/jalangi

Session details
Schedule info
Session Time Slot(s):
Bayside - Tuesday, March 18, 2014 - 16:15 to 16:50