Tool-supported Refactoring for JavaScript

Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

  • Asger Feldthaus, Denmark
  • Todd Millstein, University of California, Los Angeles, United States
  • Anders Møller
  • Max Schäfer, Oxford University Computing Laboratory, United Kingdom
  • Frank Tip, IBM Research, United States
  • Department of Computer Science
Refactoring is a popular technique for improving the structure of existing programs while maintaining their behavior. For statically typed programming languages such as Java, a wide variety of refactorings have been described, and tool support for performing refactorings and ensuring their correctness is widely available in modern IDEs. For the JavaScript programming language, however, existing refactoring tools are less mature and often unable to ensure that program behavior is preserved. Refactoring algorithms that have been developed for statically typed languages are not applicable to JavaScript because of its dynamic nature. We propose a framework for specifying and implementing JavaScript refactorings based on pointer analysis. We describe novel refactorings motivated by best practice recommendations for JavaScript programming, and demonstrate how they can be described concisely in terms of queries provided by our framework. Experiments performed with a prototype implementation on a suite of existing applications show that our approach is well-suited for developing practical refactoring tools for JavaScript.
Original languageEnglish
Title of host publicationProceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
Number of pages20
PublisherAssociation for Computing Machinery
Publication year2011
ISBN (print)978-1-4503-0940-0
Publication statusPublished - 2011
Event2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications. OOPSLA '11 - Portland, Oregon, United States
Duration: 22 Oct 201127 Oct 2011


Conference2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications. OOPSLA '11
LandUnited States
ByPortland, Oregon

See relations at Aarhus University Citationformats

ID: 38513248