RuleMerger: Automatic Construction of Variability-Based Model Transformation Rules

  • Daniel Strüber
  • Julia Rubin
  • Thorsten Arendt
  • Marsha Chechik
  • Gabriele Taentzer
  • Jennifer Plöger
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9633)


Unifying similar model transformation rules into variability-based ones can improve both the maintainability and the performance of a model transformation system. Yet, manual identification and unification of such similar rules is a tedious and error-prone task. In this paper, we propose a novel merge-refactoring approach for automating this task. The approach employs clone detection for identifying overlapping rule portions and clustering for selecting groups of rules to be unified. Our instantiation of the approach harnesses state-of-the-art clone detection and clustering techniques and includes a specialized merge construction algorithm. We formally prove correctness of the approach and demonstrate its ability to produce high-quality outcomes in two real-life case-studies.


Execution Time Model Transformation Variation Point Variability Model Cluster Partition 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.



We thank Felix Rieger and the anonymous reviewers for their valuable comments on the present and earlier drafts of this manuscript.


  1. 1.
    Sendall, S., Kozaczynski, W.: Model transformation: the heart and soul of model-driven software development. IEEE Softw. 20(5), 42–45 (2003)CrossRefGoogle Scholar
  2. 2.
    Czarnecki, K., Helsen, S.: Feature-based survey of model transformation approaches. IBM Syst. J. 45(3), 621–646 (2006)CrossRefGoogle Scholar
  3. 3.
    Hermann, F., Gottmann, S., Nachtigall, N., Braatz, B., Morelli, G., Pierre, A., Engel, T.: On an automated translation of satellite procedures using triple graph grammars. In: Duddy, K., Kappel, G. (eds.) ICMB 2013. LNCS, vol. 7909, pp. 50–51. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  4. 4.
    Mann, M., Ekker, H., Flamm, C.: The graph grammar library - a generic framework for chemical graph rewrite systems. In: Duddy, K., Kappel, G. (eds.) ICMB 2013. LNCS, vol. 7909, pp. 52–53. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  5. 5.
    Famelis, M., et al.: Migrating automotive product lines: a case study. In: Kolovos, D., Wimmer, M. (eds.) ICMT 2015. LNCS, vol. 9152, pp. 82–97. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  6. 6.
    Richa, E., Borde, E., Pautet, L.: Translating ATL model transformations to algebraic graph transformations. In: Kolovos, D., Wimmer, M. (eds.) ICMT 2015. LNCS, vol. 9152, pp. 183–198. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  7. 7.
    Kusel, A., Schonbock, J., Kappel, G., Wimmer, M., Retschitzegger, W., Schwinger, W.: Reuse in model-to-model transformation languages: are we there yet? Softw. Syst. Model. 14, 537–572 (2013)CrossRefGoogle Scholar
  8. 8.
    Blouin, D., Plantec, A., Dissaux, P., Singhoff, F., Diguet, J.-P.: Synchronization of models of rich languages with triple graph grammars: an experience report. In: Di Ruscio, D., Varró, D. (eds.) ICMT 2014. LNCS, vol. 8568, pp. 106–121. Springer, Heidelberg (2014)Google Scholar
  9. 9.
    Strüber, D., Rubin, J., Chechik, M., Taentzer, G.: A variability-based approach to reusable and efficient model transformations. In: Egyed, A., Schaefer, I. (eds.) FASE 2015. LNCS, vol. 9033, pp. 283–298. Springer, Heidelberg (2015)Google Scholar
  10. 10.
    Clements, P., Northrop, L.: Software Product Lines: Practices and Patterns. Series in Software Engineering. Addison-Wesley, Boston (2001)Google Scholar
  11. 11.
    Czarnecki, K., Antkiewicz, M.: Mapping features to models: a template approach based on superimposed variants. In: Glück, R., Lowry, M. (eds.) GPCE 2005. LNCS, vol. 3676, pp. 422–437. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  12. 12.
    Roy, C.K., Cordy, J.R., Koschke, R.: Comparison and evaluation of code clone detection techniques and tools: a qualitative approach. Sci. Comput. Program. 74(7), 470–495 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Xu, R., Wunsch, D., et al.: Survey of clustering algorithms. IEEE Trans. Neural Netw. 16(3), 645–678 (2005)CrossRefGoogle Scholar
  14. 14.
    Rubin, J., Chechik, M.: Combining related products into product lines. In: de Lara, J., Zisman, A. (eds.) Fundamental Approaches to Software Engineering. LNCS, vol. 7212, pp. 285–300. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  15. 15.
    Ziadi, T., Henard, C., Papadakis, M., Ziane, M., Le Traon, Y.: Towards a language-independent approach for reverse-engineering of software product lines. In: SAC 2014, pp. 1064–1071. ACM (2014)Google Scholar
  16. 16.
    Ryssel, U., Ploennigs, J., Kabitzsch, K.: Automatic variation-point identification in function-block-based models. In: GPCE 2010, pp. 23–32. ACM (2010)Google Scholar
  17. 17.
    Fowler, M.: Refactoring: Improving the Design of Existing Code. Pearson Education India, New Delhi (2002)CrossRefzbMATHGoogle Scholar
  18. 18.
    Tichy, M., Krause, C., Liebel, G.: Detecting performance bad smells for Henshin model transformations. In: AMT 2013, vol. 1077 (2013)Google Scholar
  19. 19.
    Strüber, D.: Model-driven engineering in the large: refactoring techniques for models and model transformation systems. Ph.D. thesis, Philipps University Marburg pending publication (2016)Google Scholar
  20. 20.
    Yan, X., Han, J.: gspan: graph-based substructure pattern mining. In: ICDM 2003, pp. 721–724. IEEE (2002)Google Scholar
  21. 21.
    Pham, N.H., Nguyen, H.A., Nguyen, T.T., Al-Kofahi, J.M., Nguyen, T.N.: Complete and accurate clone detection in graph-based models. In: ICSE 2009, pp. 276–286. IEEE (2009)Google Scholar
  22. 22.
    Deissenboeck, F., Hummel, B., Juergens, E., Pfaehler, M., Schaetz, B.: Model clone detection in practice. In: the 4th International Workshop on Software Clones, pp. 57–64. ACM (2010)Google Scholar
  23. 23.
    Varró, G., Schürr, A., Varró, D.: Benchmarking for graph transformation. In: ISVLHCC 2005, pp. 79–88. IEEE (2005)Google Scholar
  24. 24.
    Bürdek, J., Kehrer, T., Lochau, M., Reuling, D., Kelter, U., Schürr, A.: Reasoning about product-line evolution using complex feature model differences. Autom. Softw. Eng. 1–47 (2015). SpringerGoogle Scholar
  25. 25.
    Rudolf, M.: Utilizing constraint satisfaction techniques for efficient graph pattern matching. In: Workshop on Theory and Application of Graph Transformations, p. 238. Springer Science & Business Media (1998)Google Scholar
  26. 26.
    Störrle, H.: On the impact of layout quality to understanding UML diagrams: size matters. In: Dingel, J., Schulte, W., Ramos, I., Abrahão, S., Insfran, E. (eds.) MODELS 2014. LNCS, vol. 8767, pp. 518–534. Springer, Heidelberg (2014)Google Scholar
  27. 27.
    Kästner, C.: Virtual separation of concerns. Ph.D. thesis, University of Magdeburg (2010)Google Scholar
  28. 28.
    Walkingshaw, E., Ostermann, K.: Projectional editing of variational software. In: GPCE 2014, pp. 29–38. ACM (2014)Google Scholar
  29. 29.
    Nejati, S., Sabetzadeh, M., Chechik, M., Easterbrook, S., Zave, P.: Matching and merging of variant feature specifications. IEEE TSE 38(6), 1355–1375 (2012)Google Scholar
  30. 30.
    Rubin, J., Chechik, M.: Quality of merge-refactorings for product lines. In: Cortellessa, V., Varró, D. (eds.) FASE 2013 (ETAPS 2013). LNCS, vol. 7793, pp. 83–98. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  31. 31.
    Wille, D.: Managing lots of models: the famine approach. In: FSE 2014, pp. 817–819. ACM (2014)Google Scholar
  32. 32.
    Holthusen, S., Wille, D., Legat, C., Beddig, S., Schaefer, I., Vogel-Heuser, B.: Family model mining for function block diagrams in automation software. In: SPLC 2014: Workshops, Demonstrations and Tools Companion, pp. 36–43. ACM (2014)Google Scholar
  33. 33.
    Atallah, M.: Algorithms and Theory of Computation Handbook. CRC, Boca Raton (2002)zbMATHGoogle Scholar
  34. 34.
    Varró, G., Friedl, K., Varró, D.: Adaptive graph pattern matching for model transformations using model-sensitive search plans. ENTCS 152, 191–205 (2006)Google Scholar
  35. 35.
    Horváth, Á., Varró, G., Varró, D.: Generic search plans for matching advanced graph patterns. Elec. Comm. of the EASST 6, 58 (2007)Google Scholar
  36. 36.
    Krause, C., Tichy, M., Giese, H.: Implementing graph transformations in the bulk synchronous parallel model. In: Gnesi, S., Rensink, A. (eds.) FASE 2014 (ETAPS). LNCS, vol. 8411, pp. 325–339. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  37. 37.
    Acretoaie, V., Störrle, H.: Efficient model querying with VMQL. In: CMSEBA 2014, pp. 7–16. (2015)Google Scholar
  38. 38.
    Mészáros, T., Mezei, G., Levendovszky, T., Asztalos, M.: Manual and automated performance optimization of model transformation systems. Int. J. Softw. Tools Technol. Transfer 12(3–4), 231–243 (2010)CrossRefGoogle Scholar
  39. 39.
    Varró, G., Deckwerth, F.: A rete network construction algorithm for incremental pattern matching. In: ICMT 2013, pp. 125–140 (2013)Google Scholar
  40. 40.
    Sellis, T.K.: Multiple-query optimization. ACM Trans. Database Syst. (TODS) 13(1), 23–52 (1988)CrossRefGoogle Scholar
  41. 41.
    Zhao, P., Han, J.: On graph query optimization in large networks. VLDB Endowment 3(1–2), 340–351 (2010)CrossRefGoogle Scholar
  42. 42.
    Kapser, C., Godfrey, M.W.: “cloning considered harmful” considered harmful. In: Working Conference on Reverse Engineering, pp. 19–28. IEEE (2006)Google Scholar
  43. 43.
    Kim, M., Sazawal, V., Notkin, D., Murphy, G.: An empirical study of code clone genealogies. In: ACM SIGSOFT Software Engineering Notes, vol. 30, pp. 187–196. ACM (2005)Google Scholar
  44. 44.
    Nguyen, H.A., Nguyen, T.T., Pham, N.H., Al-Kofahi, J., Nguyen, T.N.: Clone management for evolving software. IEEE Trans. Softw. Eng. 38(5), 1008–1026 (2012)CrossRefGoogle Scholar
  45. 45.
    Syriani, E., Gray, J.: Challenges for addressing quality factors in model transformation. In: ICST 2012, pp. 929–937. IEEE (2012)Google Scholar
  46. 46.
    Rentschler, A.: Model transformation languages with modular information hiding. Ph.D. thesis, Karlsruher Institut für Technologie (2015)Google Scholar
  47. 47.
    Sánchez Cuadrado, J., Guerra, E., de Lara, J.: Reverse engineering of model transformations for reusability. In: Di Ruscio, D., Varró, D. (eds.) ICMT 2014. LNCS, vol. 8568, pp. 186–201. Springer, Heidelberg (2014)Google Scholar
  48. 48.
    Balasubramanian, D., Narayanan, A., van Buskirk, C., Karsai, G.: The graph rewriting and transformation language: GReAT. ECEASST 1 (2007)Google Scholar
  49. 49.
    Geiß, R., Batz, G.V., Grund, D., Hack, S., Szalkowski, A.: GrGen: a fast SPO-based graph rewriting tool. In: Corradini, A., Ehrig, H., Montanari, U., Ribeiro, L., Rozenberg, G. (eds.) ICGT 2006. LNCS, vol. 4178, pp. 383–397. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  50. 50.
    Acretoaie, V., Störrle, H., Strüber, D.: Transparent model transformation: turning your favourite model editor into a transformation tool. In: Kolovos, D., Wimmer, M. (eds.) ICMT 2015. LNCS, vol. 9152, pp. 121–130. Springer, Heidelberg (2015)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  • Daniel Strüber
    • 1
  • Julia Rubin
    • 2
  • Thorsten Arendt
    • 1
  • Marsha Chechik
    • 3
  • Gabriele Taentzer
    • 1
  • Jennifer Plöger
    • 1
  1. 1.Philipps-Universität MarburgMarburgGermany
  2. 2.Massachusetts Institute of TechnologyCambridgeUSA
  3. 3.University of TorontoTorontoCanada

Personalised recommendations