2.1 Static Type Inference.................................... 5
2013
Abstract
• We conducted a survey of real-world JavaScript programs, focusing on idioms that employ JavaScript's quirks. • We developed a type system for JavaScript that handles these quirks, allowing developers to use modern technology to reason about their programs. In this document, I present JSTrace. I first discuss the general idea behind my tool and choices made when developing it. I then expose the technical details of the tool's functionality. In the evaluation chapter, I demonstrate that the tool is effective at reducing the burden of typing programs. I then conclude, discuss future work, and review related work.
References (24)
- Alexander Aiken and Brian R. Murphy. Static type inference in a dynamically typed language. In Eighteenth Annual ACM Symposium on Principles of Programming Languages, 1991.
- C. Anderson, P. Giannini, and S. Drossopoulou. Towards type inference for JavaScript. In European Conference on Object-Oriented Programming, 2005.
- 'Most websites' failing disabled, 2006. http://news.bbc.co.uk/2/hi/technology/6210068.stm [ac- cessed 03-May-2010].
- Google searches web's dark side, 2007. http://news.bbc.co.uk/2/hi/technology/6645895.stm [accessed 03-May-2010].
- Brett Cannon. Localized type inference of atomic types in Python. Master's thesis, California Polytechnic State University, 2005.
- Robert Cartwright and Mike Fagan. Soft typing. In ACM SIGPLAN 1991 conference on Programming language design and implementation, 1991.
- Symantec Corporation. Symantec Internet Security Threat Report: Trends for July-December 2007 (Executive Summary), 2008. [Online; accessed 03-May-2010].
- Symantec Corporation. Symantec Internet Security Threat Report: Trends for 2009, 2010. [Online; accessed 03-May-2010].
- ECMAScript language specification, 3rd edition, 1999.
- Robert Bruce Findler and Matthias Felleisen. Contracts for higher-order functions. In ACM SIGPLAN Notices Volume 37, Issue 9 (September 2002), 2002.
- Michael Furr, Jong hoon An, Jeffrey S. Foster, and Michael Hicks. Static type inference for Ruby. In 2009 ACM Symposium on Applied Computing, 2009.
- Arjun Guha, Shriram Krishnamurthi, and Trevor Jim. Using static analysis for ajax intrusion detection. In International World Wide Web Conference, 2009.
- Arjun Guha, Claudiu Saftoiu, and Shriram Krishnamurthi. The essence of JavaScript. In European Conference on Object-Oriented Programming, 2010.
- Arjun Guha, Claudiu Saftoiu, and Shriram Krishnamurthi. A practical type system for JavaScript. In In Submission, 2010.
- Dave Herman. Classicjavascript. http://www.ccs.neu.edu/home/dherman/javascript/ [accessed 06-May-2010].
- Javascript lint. http://www.javascriptlint.com/ [accessed 05-May-2010].
- Simon Holm Jensen, Anders Moller, and Peter Thiemann. Type analysis for javascript. In The 16th International Static Analysis Symposium, 2009.
- Jslint: The javascript code quality tool, 2010. http://www.jslint.com [accessed 05-May-2010].
- Jsure: The javascript checker, 2008. http://www.jsure.org/about [accessed 05-May-2010].
- Sergio Maffeis, John C. Mitchell, and Ankur Taly. An operational semantics for JavaScript. In Asian Symposium on Programming Languages and Systems, 2008.
- Robin Milner. A theory of type polymorphism in programming. In Journal of Computer and System Sciences, 1978.
- Jens Palsberg. Type inference for objects. In Computing Surveys, 1996.
- Jeremy G. Siek and Walid Taha. Gradual typing for functional languages. In IN SCHEME AND FUNCTIONAL PROGRAMMING WORKSHOP, pages 81-92, 2006.
- D. Yu, A. Chander, N. Islam, and I. Serikov. Javascript instrumentation for browser security. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2007.