Refinement of web software motivated by real-world patterns

Gregor K Richards, Purdue University

Abstract

Although the dynamicity of languages such as JavaScript threatens our ability to understand them, by studying how these languages are used by real programmers, it is possible to create tools which address real, demonstrable needs without sacrificing the dynamic behavior which is essential to practical applications. With the rise of the browser as an application platform, JavaScript has transformed from a niche language used to add small scripts to web pages to one of the world's most popular programming languages. It is a highly dynamic language, difficult to analyze and difficult to understand statically, and its meteoric rise to popularity has outstripped the pace of the software community to analyze its code and create language tools. With such a dynamic language, many analysis techniques fail. In this work, the behavior of real JavaScript code is studied, so as to distinguish the potential dynamic behavior from the real dynamic behavior. Given this knowledge, this work presents tools and techniques which address the demonstrable needs of real JavaScript programmers while making JavaScript more amenable to analysis. To address the problem of performance analysis, JSBench is presented, which eliminates nondeterminism to create useful benchmarks from any source. To address the problem of code with eval, Evalorizer is presented, which gives suggestions on how to replace eval by studying how it is used. To address the problem of third-party code mixing, a technique for providing flexible access control is presented, and shown to be usable for real programs. Finally, to allow more maintainable JavaScript, an extension to the language, LikeScript, is presented, which allows the expression of types without sacrificing necessary dynamic behaviors. In concert, these tools allow for JavaScript code to be made more maintainable and analyzable, all while maintaining the behaviors which are used by real, popular web applications.

Degree

Ph.D.

Advisors

Vitek, Purdue University.

Subject Area

Computer science

Off-Campus Purdue Users:
To access this dissertation, please log in to our
proxy server
.

Share

COinS