Return
Automatically propagating changes from reference implementations to code generation templates
DOI:10.1016/j.infsof.2015.06.009.png)
Abstract
En 中文
Context: Code generators can automatically perform some tedious and error-prone implementation tasks, increasing productivity and quality in the software development process. Most code generators are based on templates, which are fundamentally composed of text expansion statements. To build templates, the code of an existing, tested and validated implementation may serve as reference, in a process known as templatization. With the dynamics of software evolution/maintenance and the need for performing changes in the code generation templates, there is a loss of synchronism between the templates and this reference code. Additional effort is required to keep them synchronized. Objective: This paper proposes automation as a way to reduce the extra effort needed to keep templates and reference code synchronized. Method: A mechanism was developed to semi-automatically detect and propagate changes from reference code to templates, keeping them synchronized with less effort. The mechanism was also submitted to an empirical evaluation to analyze its effects in terms of effort reduction during maintenance/evolution templatization. Results: It was observed that the developed mechanism can lead to a 50% reduction in the effort needed to perform maintenance/evolution templatization, when compared to a manual approach. It was also observed that this effect depends on the nature of the evolution/maintenance task, since for one of the tasks there was no observable advantage in using the mechanism. However, further studies are needed to better characterize these tasks. Conclusion: Although there is still room for improvement, the results indicate that automation can be used to reduce effort and cost in the maintenance and evolution of a template-based code generation infrastructure. (C) 2015 Elsevier B.V. All rights reserved.
Keywords:
Template-based code generation
Reference implementation
Code migration
Templatization
Round-trip engineering
Journal
IF:
4.3
Papers:
3.8K
Citations:
9.5K

