Automated migration of build scripts using dynamic analysis and search-based refactoring
Authors:
Open Access
- 15 October 2014
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 599-616
Abstract
The efficiency of a build system is an important factor for developer productivity. As a result, developer teams have been increasingly adopting new build systems that allow higher build parallelization. However, migrating the existing legacy build scripts to new build systems is a tedious and error-prone process. Unfortunately, there is insufficient support for automated migration of build scripts, making the migration more problematic. We propose the first dynamic approach for automated migration of build scripts to new build systems. Our approach works in two phases. First, from a set of execution traces, we synthesize build scripts that accurately capture the intent of the original build. The synthesized build scripts are typically long and hard to maintain. Second, we apply refactorings that raise the abstraction level of the synthesized scripts (e.g., introduce functions for similar fragments). As different refactoring sequences may lead to different build scripts, we use a search-based approach that explores various sequences to identify the best (e.g., shortest) build script. We optimize search-based refactoring with partial-order reduction to faster explore refactoring sequences. We implemented the proposed two phase migration approach in a tool called METAMORPHOSIS that has been recently used at Microsoft.Keywords
Funding Information
- Microsoft (internship)
This publication has 29 references indexed in Scilit:
- Formalizing and Verifying a Modern Build LanguageLecture Notes in Computer Science, 2014
- A field study of refactoring challenges and benefits2012
- SYMake: a build code analysis and refactoring tool for makefiles2012
- A survey on search-based software designComputer Science Review, 2010
- Design recovery and maintenance of build systems2007 IEEE International Conference on Software Maintenance, 2007
- Extending Symmetry Reduction Techniques to a Realistic Model of ComputationElectronic Notes in Theoretical Computer Science, 2007
- A novel approach to optimize clone refactoring activity2006
- Search-Based Amorphous Slicing2006
- Dynamic partial-order reduction for model checking software2005
- An approach for exploring code improving transformationsACM Transactions on Programming Languages and Systems, 1997