Example-Based Program Transformation

  • Authors:
  • Romain Robbes;Michele Lanza

  • Affiliations:
  • REVEAL @ Faculty of Informatics, University of Lugano, Switzerland;REVEAL @ Faculty of Informatics, University of Lugano, Switzerland

  • Venue:
  • MoDELS '08 Proceedings of the 11th international conference on Model Driven Engineering Languages and Systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.01

Visualization

Abstract

Software changes. During their life cycle, software systems experience a wide spectrum of changes, from minor modifications to major architectural shifts. Small-scale changes are usually performed with text editing and refactorings, while large-scale transformations require dedicated program transformation languages. For medium-scale transformations, both approaches have disadvantages. Manual modifications may require a myriad of similar yet not identical edits, leading to errors and omissions, while program transformation languages have a steep learning curve, and thus only pay off for large-scale transformations.We present a system supporting example-based program transformation. To define a transformation, a programmer performs an example change manually, feeds it into our system, and generalizes it to other application contexts. With time, a developer can build a palette of reusable medium-sized code transformations. We provide a detailed description of our approach and illustrate it with examples.