学位论文详细信息
A toolkit for constructing refactoring engines
refactoring;restructuring;program transformation;abstract syntax trees (ASTs);differential precondition checking;Ludwig;Photran
Overbey, Jeffrey
关键词: refactoring;    restructuring;    program transformation;    abstract syntax trees (ASTs);    differential precondition checking;    Ludwig;    Photran;   
Others  :  https://www.ideals.illinois.edu/bitstream/handle/2142/29774/Overbey_Jeffrey.pdf?sequence=1&isAllowed=y
美国|英语
来源: The Illinois Digital Environment for Access to Learning and Scholarship
PDF
【 摘 要 】

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.

【 预 览 】
附件列表
Files Size Format View
A toolkit for constructing refactoring engines 1679KB PDF download
  文献评价指标  
  下载次数:11次 浏览次数:35次