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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Kerievsky, J.: Refactoring to Patterns. Pearson Higher Education, London (2004)
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)
Robbes, R., Lanza, M.: A change-based approach to software evolution. Electronic Notes in Theoretical Computer Science (ENTCS) 166, 93–109 (2007)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Opdyke, W.F.: Refactoring Object-Oriented Frameworks. Ph.D. thesis, University of Illinois (1992)
Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Reading (1999)
Roberts, D., Brant, J., Johnson, R.E., Opdyke, B.: An automated refactoring tool. In: Proceedings of ICAST 1996, Chicago, IL (1996)
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)
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)
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)
Jouault, F., Kurtev, I.: Transforming models with atl. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 128–138. Springer, Heidelberg (2006)
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)
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)
Lieberman, H.: Your Wish Is My Command – Programming by Example. Morgan Kaufmann, San Francisco (2001)
Author information
Authors and Affiliations
Editor information
Rights 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)