UA cloudflare authentication

 

Code refactoring under constraints

dc.contributorRaja, Uzma
dc.contributorCarver, Jeffrey C.
dc.contributorParrish, Allen Scott
dc.contributor.advisorKraft, Nicholas A.
dc.contributor.advisorSmith, Randy K.
dc.contributor.authorLiang, Yan
dc.contributor.otherUniversity of Alabama Tuscaloosa
dc.date.accessioned2017-03-01T14:49:34Z
dc.date.available2017-03-01T14:49:34Z
dc.date.issued2011
dc.descriptionElectronic Thesis or Dissertationen_US
dc.description.abstractCode refactoring is the process of changing the internal structure of the program without changing its external behaviors. Most refactoring tools ensure behavior preservation by enforcing preconditions that must hold for the refactoring to be valid. However, their approaches have three drawbacks that make the refactoring results far from satisfactory and reduce the utilization of refactoring tools in practice. Firstly, programmers are not sure how code will be changed by those tools due to the invisible refactoring rules hidden behind the interfaces of tools. Secondly, current refactoring tools have limited extensibility to accommodate new refactorings. Lastly, most refactoring tools lack mechanisms to allow programmer to specify their own preconditions to indicate as to which properties of a program are of interest. We consider refactoring a code change activity that, as with other constraints imposed on code during software development and maintenance such as naming rules, should be visible, easily extensible, and adaptable. It should also combine the developers' opinions, implementation styles of existing code and other good coding practice. We propose a model-based approach to precondition specification and checking in which preconditions can be declared explicitly and dynamically against the designated program metamodel, and verified against concrete program models. This dissertation applies the approach of model-based refactoring precondition specification and checking on C++ source code refactoring. Based on the analysis of primitive refactorings, we design a C++ language metamodel to support constraint specification and code inspection for refactoring purposes. We then specify preconditions of 18 primitive refactorings against the metamodel, with primary concerns on syntax error prevention and semantic preservation. The impact of a programmer's perspective on these specifications is discussed. As another example to demonstrate the importance and necessities of supporting visible, extensible and adaptable precondition specification and checking, we use template method and singleton patterns to discuss how design patterns can affect refactoring decisions. We set up an experimental environment in which we build the language metamodel, develop a program model extraction tool and simulate the process of precondition specification and verification following the proposed approach.en_US
dc.format.extent130 p.
dc.format.mediumelectronic
dc.format.mimetypeapplication/pdf
dc.identifier.otheru0015_0000001_0000745
dc.identifier.otherLiang_alatus_0004D_10942
dc.identifier.urihttps://ir.ua.edu/handle/123456789/1250
dc.languageEnglish
dc.language.isoen_US
dc.publisherUniversity of Alabama Libraries
dc.relation.hasversionborn digital
dc.relation.ispartofThe University of Alabama Electronic Theses and Dissertations
dc.relation.ispartofThe University of Alabama Libraries Digital Collections
dc.rightsAll rights reserved by the author unless otherwise indicated.en_US
dc.subjectComputer science
dc.titleCode refactoring under constraintsen_US
dc.typethesis
dc.typetext
etdms.degree.departmentUniversity of Alabama. Department of Computer Science
etdms.degree.disciplineComputer Science
etdms.degree.grantorThe University of Alabama
etdms.degree.leveldoctoral
etdms.degree.namePh.D.

Files

Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
file_1.pdf
Size:
1.04 MB
Format:
Adobe Portable Document Format