Tool-supported Refactoring for JavaScript

Asger Feldthaus, Todd Millstein, Anders Møller, Max Schäfer, Frank Tip

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

    29 Citations (Scopus)

    Abstract

    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 date2011
    Pages119-138
    ISBN (Print)978-1-4503-0940-0
    DOIs
    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

    Conference

    Conference2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications. OOPSLA '11
    Country/TerritoryUnited States
    CityPortland, Oregon
    Period22/10/201127/10/2011

    Fingerprint

    Dive into the research topics of 'Tool-supported Refactoring for JavaScript'. Together they form a unique fingerprint.

    Cite this