Withdraw
Loading…
A toolkit for constructing refactoring engines
Overbey, Jeffrey
Loading…
Permalink
https://hdl.handle.net/2142/29774
Description
- Title
- A toolkit for constructing refactoring engines
- Author(s)
- Overbey, Jeffrey
- Issue Date
- 2012-02-06T20:15:37Z
- Director of Research (if dissertation) or Advisor (if thesis)
- Johnson, Ralph E.
- Committee Member(s)
- Bowdidge, Robert
- Marinov, Darko
- Adve, Vikram S.
- Padua, David A.
- Department of Study
- Computer Science
- Discipline
- Computer Science
- Degree Granting Institution
- University of Illinois at Urbana-Champaign
- Degree Name
- Ph.D.
- Degree Level
- Dissertation
- Keyword(s)
- refactoring
- restructuring
- program transformation
- abstract syntax trees (ASTs)
- differential precondition checking
- Ludwig
- Photran
- 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.
- Graduation Semester
- 2011-12
- Permalink
- http://hdl.handle.net/2142/29774
- Copyright and License Information
- Copyright 2011 Jeffrey Overbey
Owning Collections
Graduate Dissertations and Theses at Illinois PRIMARY
Graduate Theses and Dissertations at IllinoisDissertations and Theses - Computer Science
Dissertations and Theses from the Dept. of Computer ScienceManage Files
Loading…
Edit Collection Membership
Loading…
Edit Metadata
Loading…
Edit Properties
Loading…
Embargoes
Loading…