Files in this item



application/pdfOverbey_Jeffrey.pdf (2MB)
(no description provided)PDF


Title:A toolkit for constructing refactoring engines
Author(s):Overbey, Jeffrey
Director of Research:Johnson, Ralph E.
Doctoral Committee Member(s):Bowdidge, Robert; Marinov, Darko; Adve, Vikram S.; Padua, David A.
Department / Program:Computer Science
Discipline:Computer Science
Degree Granting Institution:University of Illinois at Urbana-Champaign
program transformation
abstract syntax trees (ASTs)
differential precondition checking
Abstract:Building an automated refactoring tool for a new programming language is an expensive and time-consuming process. Usually, only a small fraction of the tool's code is devoted to refactoring transformations; most of the code is devoted to supporting components. This dissertation shows that much of this support code can be placed in a language-independent library or code generator, significantly reducing the amount of code a tool developer must write to build a refactoring tool for a new language. Part I focuses on the syntactic components: the lexer/parser, abstract syntax tree (AST), and source code manipulation infrastructure. Compiler writers have been generating lexers and parsers from grammars for years. However, this dissertation shows that it is possible to generate all of these components, including an AST that can be used to manipulate source code and is designed specifically for use in a refactoring tool. This is accomplished by annotating the grammar so that it describes both the abstract and concrete syntax of the programming language. Part II focuses primarily on precondition checking, the procedure which determines whether or not a refactoring can be performed. It identifies preconditions as checking three properties: input validity, compilability, and preservation. Then, it shows how a language-independent component, called a differential precondition checker, can be used to eliminate explicit checks for compilability and preservation from many common refactorings. Since this component is language-independent, it can be implemented in a library and reused in refactoring tools for many different languages. These techniques were used to implement automated refactoring support in Photran (a widely used, open source development environment for Fortran), as well as prototype, Eclipse-based refactoring tools for PHP and BC. In all three tools, about 90% of the code was either generated or contained in a language-independent library. The hand-written code comprised just a few thousand lines, most of which were devoted to the implementation of refactoring transformations.
Issue Date:2012-02-06
Genre:Dissertation / Thesis
Rights Information:Copyright 2011 Jeffrey Overbey
Date Available in IDEALS:2012-02-06
Date Deposited:2011-12

This item appears in the following Collection(s)

Item Statistics