Be the first to like this
For a variety of reasons, modern, non-trivial software systems must evolve to cope with change, including alterations in stakeholder requirements, environments in which the software is deployed, and dependent technologies, e.g., frameworks. Unfortunately, evolution and maintenance is an expensive, time-consuming, and error-prone task, especially when the system in question is large and complex. Typically, a change to a single program element requires changes to related, and often seemingly unrelated, elements scattered throughout the source code.
To address this problem, approaches have emerged to mechanically assist developers with a wide range of software evolution and maintenance tasks, including migrating code to a new framework version, translating existing code to a new platform, and restructuring code to mirror an improved design. This assistance is typically provided in the form of extensions (plug-ins) to integrated development environments (IDEs) that afford (semi-) automated aid in carrying out these tasks, thus easing the burden associated with evolution and maintenance. In some approaches, the corresponding plug-in keeps track of the elements relevant to the change being implemented, with the IDE displaying only those elements. Other approaches attempt to automatically restructure code to improve such features as type safety while preserving semantics.
Although existing approaches are useful in alleviating some of the burden associated with software evolution and maintenance, there are a number of situations where developers are still required to complete evolution and maintenance tasks manually. These include but are not limited to upgrading legacy Java software to take advantage of many other available features of the modern Java language, replacing certain usages of Java collections with custom type hierarchies, and updating software composition specifications to cope with change. Automated approaches to assist developers with such cumbersome and error-prone tasks would be extremely useful in evolving and maintaining large, complex systems.
In this thesis, I explore and develop a number of new techniques that can be of great value to software developers in evolving code to accommodate change. The first of these is an automated refactoring which upgrades legacy Java code to use proper language enumeration (enum) types, a feature of the modern Java language. I have developed an approach that preserves semantics and that allows us to migrate legacy applications by automatically replacing a predominantly used pattern with suitable use of enums.
For the second technique, I explore and develop an automated approach to assist developers in maintaining pointcuts in evolving Aspect-Oriented (AO) programs. AO languages enable developers to better encapsulate crosscutting concern (CCC) implementations by allowing them to create an expression (a pointcut) which specifies well-defined points (join points) in a program's execution where code corresponding to a CCC (an aspect) should apply. However, changes to the underlying program (base-code) may invalidate pointcuts, leaving developers to manually update pointcuts to capture the intended join points. I have developed an approach that mechanically aids developers in suitably updating pointcuts upon changes to the base-code by analyzing arbitrarily deep structural commonalities between program elements associated with pointcuts in a particular software version. The extracted patterns are then applied to later versions to suggest additional join points that may require inclusion.
The third technique I explore in this thesis pertains to reasoning about the behavior of AO programs. As previously noted, AOP facilitates localized implementations of CCCs by allowing developers to encapsulate code realizing a CCC that would otherwise be scattered throughout many system modules and/or intertwined with code realizing the primary functionality of a module. Theref