Skip to main content

Example-Based Program Transformation

  • Conference paper
Model Driven Engineering Languages and Systems (MODELS 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5301))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 149.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Kerievsky, J.: Refactoring to Patterns. Pearson Higher Education, London (2004)

    Google Scholar 

  2. Robbes, R., Lanza, M.: Spyware: A change-aware development toolset. In: Proceedings of ICSE (30th International Conference in Software Engineering), pp. 847–850. ACM Press, New York (2008)

    Google Scholar 

  3. Robbes, R., Lanza, M.: A change-based approach to software evolution. Electronic Notes in Theoretical Computer Science (ENTCS) 166, 93–109 (2007)

    Article  Google Scholar 

  4. Robbes, R., Lanza, M.: Characterizing and understanding development sessions. In: Proceedings of ICPC (15th International Conference on Program Comprehension), pp. 155–164. IEEE Computer Soceity Press, Los Alamitos (2007)

    Google Scholar 

  5. Robbes, R., Lanza, M., Lungu, M.: An approach to software evolution based on semantic change. In: Dwyer, M.B., Lopes, A. (eds.) FASE 2007. LNCS, vol. 4422, pp. 27–41. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  6. Lippe, E., van Oosterom, N.: Operation-based merging. In: SDE 5: Proceedings of the fifth ACM SIGSOFT symposium on Software development environments, pp. 78–87. ACM Press, New York (1992)

    Chapter  Google Scholar 

  7. Blanc, X., Mounier, I., Mougenot, A., Mens, T.: Detecting model inconsistency through operation-based model construction. In: Robby (ed.) ICSE, pp. 511–520. ACM, New York (2008)

    Google Scholar 

  8. Kögel, M.: Towards software configuration management for unified models. In: CVSM 2008: Proceedings of the 2008 international workshop on Comparison and versioning of software models, pp. 19–24. ACM, New York (2008)

    Chapter  Google Scholar 

  9. Baxter, I.D., Pidgeon, C., Mehlich, M.: Dms: Program transformations for practical scalable software evolution. In: ICSE, pp. 625–634. IEEE Computer Society, Los Alamitos (2004)

    Google Scholar 

  10. Akers, R.L., Baxter, I.D., Mehlich, M., Ellis, B.J., Luecke, K.R.: Reengineering c++ component models via automatic program transformation. In: WCRE, pp. 13–22. IEEE Computer Society, Los Alamitos (2005)

    Google Scholar 

  11. Visser, E.: Program transformation with Stratego/XT: Rules, strategies, tools, and systems in StrategoXT-0. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 216–238. Springer, Heidelberg (2004)

    Google Scholar 

  12. Visser, E.: Meta-programming with concrete object syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 299–315. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  13. Roover, C.D., D’Hondt, T., Brichau, J., Noguera, C., Duchien, L.: Behavioral similarity matching using concrete source code templates in logic queries. In: Ramalingam, G., Visser, E. (eds.) PEPM, pp. 92–101. ACM, New York (2007)

    Google Scholar 

  14. Boshernitsan, M., Graham, S.L., Hearst, M.A.: Aligning development tools with the way programmers think about code changes. In: Rosson, M.B., Gilmore, D.J. (eds.) CHI, pp. 567–576. ACM, New York (2007)

    Google Scholar 

  15. Opdyke, W.F.: Refactoring Object-Oriented Frameworks. Ph.D. thesis, University of Illinois (1992)

    Google Scholar 

  16. Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Reading (1999)

    Google Scholar 

  17. Roberts, D., Brant, J., Johnson, R.E., Opdyke, B.: An automated refactoring tool. In: Proceedings of ICAST 1996, Chicago, IL (1996)

    Google Scholar 

  18. Roberts, D., Brant, J.: Tools for making impossible changes - experiences with a tool for transforming large smalltalk programs. IEE Proceedings - Software 152(2), 49–56 (2004)

    Article  Google Scholar 

  19. Verbaere, M., Ettinger, R., de Moor, O.: Jungl: a scripting language for refactoring. In: Osterweil, L.J., Rombach, H.D., Soffa, M.L. (eds.) ICSE, pp. 172–181. ACM, New York (2006)

    Chapter  Google Scholar 

  20. Muller, P.A., Fleurey, F., Vojtisek, D., Drey, Z., Pollet, D., Fondement, F., Studer, P., Jézéquel, J.M.: On executable meta-languages applied to model transformations. In: Model Transformations In Practice Workshop (2005)

    Google Scholar 

  21. Jouault, F., Kurtev, I.: Transforming models with atl. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 128–138. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  22. Varró, D.: Model transformation by example. In: Nierstrasz, O., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 410–424. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  23. Wimmer, M., Strommer, M., Kargl, H., Kramler, G.: Towards model transformation generation by-example. System Sciences. In: 40th Annual Hawaii International Conference on HICSS 2007, p. 285 (January 2007)

    Google Scholar 

  24. Lieberman, H.: Your Wish Is My Command – Programming by Example. Morgan Kaufmann, San Francisco (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Krzysztof Czarnecki Ileana Ober Jean-Michel Bruel Axel Uhl Markus Völter

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Robbes, R., Lanza, M. (2008). Example-Based Program Transformation. In: Czarnecki, K., Ober, I., Bruel, JM., Uhl, A., Völter, M. (eds) Model Driven Engineering Languages and Systems. MODELS 2008. Lecture Notes in Computer Science, vol 5301. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-87875-9_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-87875-9_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-87874-2

  • Online ISBN: 978-3-540-87875-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics