Refactorings in Language Development with Asymmetric Bidirectional Model Transformations

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7916)


Software language descriptions comprise several heterogeneous interdependent artifacts that cover different aspects of languages (abstract syntax, notation and semantics). The dependencies between those artifacts demand the simultaneous adaptation of all artifacts when the language is changed. Changes to a language that do not change semantics are referred to as refactorings. This class of changes can be handled automatically by applying predefined types of refactorings. Refactorings are therefore considered a valuable tool for evolving a language.

We present a model transformation based approach for the refactoring of software language descriptions. We use asymmetric bidirectional model transformations to synchronize the various artifacts of language descriptions with a refactoring model that contains all elements that are changed in a particular refactoring. This allows for automatic, type-safe refactorings that also includes the language tooling. We apply this approach to an Ecore, Xtext, Xtend based language description and describe the implementation of a non-trivial refactoring.


DSL evolution language description refactoring bidirectional model transformations 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Favre, J.-M.: Languages evolve too! changing the software time scale. In: Proceedings of the Eighth International Workshop on Principles of Software Evolution (IWPSE 2005), pp. 33–44. IEEE Computer Society (2005)Google Scholar
  2. 2.
    Fowler, M., Beck, K.: Refactoring – improving the design of existing code. Addison-Wesley Professional (1999)Google Scholar
  3. 3.
    Diskin, Z., Xiong, Y., Czarnecki, K.: From State- to Delta-Based Bidirectional Model Transformations – the Asymmetric Case. Journal of Object Technology 10, 6:1–6:25 (2011), Google Scholar
  4. 4.
    Wachsmuth, G.: Metamodel adaptation and model co-adaptation. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 600–624. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  5. 5.
    Herrmannsdoerfer, M., Ratiu, D., Wachsmuth, G.: Language evolution in practice –The history of GMF. In: van den Brand, M., Gašević, D., Gray, J. (eds.) SLE 2009. LNCS, vol. 5969, pp. 3–22. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  6. 6.
    Strein, D., Kratz, H., Lowe, W.: Cross-language program analysis and refactoring. In: Sixth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM 2006), pp. 207–216. IEEE Computer Society (2006)Google Scholar
  7. 7.
    Favre, J.: Meta-model and model co-evolution within the 3D software space. In: Proceedings of the Interantaional Workshop on Evolution of Large-scale Industrial Software Applications (ELISA), pp. 98–109 (2003),
  8. 8.
    Pizka, M., Jürgens, E.: Tool-supported multi-level language evolution. In: Software and Services Variability Management Workshop, vol. 3, pp. 48–67. Helsinki University of Technology (2007),
  9. 9.
    Jürgens, E., Pizka, M.: The Language Evolver Lever-Tool Demonstration. Electronic Notes in Theoretical Computer Science 164(2), 55–60 (2006), CrossRefGoogle Scholar
  10. 10.
    Wider, A., Schmidt, M., Kühnlenz, F., Fischer, J.: A Model-Driven Workbench for Simulation-Based Development of Optical Nanostructures. In: Proceedings of the 2nd International Conference on Computer Modelling and Simulation (CSSim 2011) (2011) IEEE CD with ISBN 978-80-214-4320-4Google Scholar
  11. 11.
    Barth, M., Kouba, J., Stingl, J., Löchel, B., Benson, O.: Modification of visible spontaneous emission with silicon nitride photonic crystal nanocavities. Optics Express 15(25), 17231–17240 (2007), CrossRefGoogle Scholar
  12. 12.
    Bäumer, D., Gamma, E., Kiezun, A.: Integrating Refactoring Support into a Java Development Tool. In: OOPSLA 2001 Companion. ACM (2001),
  13. 13.
    Foster, J.: Bidirectional Programming Languages. PhD thesis, University of Pennsylvania (2009),
  14. 14.
    Wider, A.: Towards Combinators for Bidirectional Model Transformations in Scala. In: Sloane, A., Aßmann, U. (eds.) SLE 2011. LNCS, vol. 6940, pp. 367–377. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  15. 15.
    Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for Bi-Directional Tree Transformations: A Linguistic Approach to the View Update Problem. In: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2005), pp. 233–246. ACM (2005)Google Scholar
  16. 16.
    George, L., Wider, A., Scheidgen, M.: Type-Safe Model Transformation Languages as Internal DSLs in Scala. In: Hu, Z., de Lara, J. (eds.) ICMT 2012. LNCS, vol. 7307, pp. 160–175. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  17. 17.
    Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL – A model transformation tool. Science of Computer Programming 72(1-2), 31–39 (2008)MathSciNetzbMATHCrossRefGoogle Scholar
  18. 18.
    Stevens, P.: Bidirectional model transformations in QVT – Semantic issues and open questions. Software and Systems Modeling 9(1), 7–20 (2010)CrossRefGoogle Scholar
  19. 19.
    Sasano, I., Hu, Z., Hidaka, S., Inaba, K., Kato, H., Nakano, K.: Toward Bidirectionalization of ATL with GRoundTram. In: Cabot, J., Visser, E. (eds.) ICMT 2011. LNCS, vol. 6707, pp. 138–151. Springer, Heidelberg (2011)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  1. 1.Beuth Hochschule für Technik BerlinUniversity of Applied SciencesBerlinGermany
  2. 2.Department of Computer ScienceHumboldt-Universität zu BerlinBerlinGermany

Personalised recommendations