Abstract
Refactorings can be used to improve the structure of software artefacts while preserving the semantics of the encapsulated information. Various types of refactorings have been proposed and implemented for programming languages (e.g., Java or C#). With the advent of (MDSD), a wealth of modelling languages rises and the need for restructuring models similar to programs has emerged. Since parts of these modelling languages are often very similar, we consider it beneficial to reuse the core transformation steps of refactorings across languages. In this sense, reusing the abstract transformation steps and the abstract participating elements suggests itself. Previous work in this field indicates that refactorings can be specified generically to foster their reuse. However, existing approaches can handle certain types of modelling languages only and solely reuse refactorings once per language. In this paper, a novel approach based on role models to specify generic refactorings is presented. Role models are suitable for this problem since they support declaration of roles which have to be played in a certain context. Assigned to generic refactoring, contexts are different refactorings and roles are the participating elements. We discuss how this resolves the limitations of previous works, as well as how specific refactorings can be defined as extensions to generic ones. The approach was implemented in our tool Refactory based on the (EMF) and evaluated using multiple modelling languages and refactorings. In addition, this paper investigates on the recommendation of refactoring specifications. This is motivated by the fact that language designers have many possibilities to enable refactorings in their modelling languages with regard to the language structures. To overcome this problem and to support language designers in deciding which refactorings to enable, we propose a solution and a prototypical implementation.
Similar content being viewed by others
References
Lehman M.M.: On understanding laws, evolution, and conservation in the large-program life cycle. J. Syst. Softw. 1, 213–221 (1980)
Opdyke, W.F.: Refactoring object-oriented frameworks. PhD thesis, University of Illinois at Urbana-Champaign (1992)
Fowler M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Longman, Amsterdam (1999)
Kurtev, I., Bézivin, J., Aksit, M.: Technological Spaces: An initial appraisal. In: International Symposium on Distributed Objects and Applications, DOA Federated Conferences, Industrial track, Irvine, 2002 (2002)
Kleppe A.: Software Language Engineering. Pearson Education, India (2009)
Klein, G.: JFlex User’s Manual, Version 1.4.3. http://jflex.de/manual.html#SECTION00040000000000000000 (January 2009)
Kats, L.C.L., Visser, E.: The Spoofax Language Workbench: Rules for Declarative Specification of Languages and IDEs. In: Cook, W.R., Clarke, S., Rinard, M.C., (eds.) Proceedings of the 25th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010, Reno/Tahoe, Nevada, ACM (2010), pp. 444–463
Mens, T., Taentzer, G., Müller, D.: Challenges in model refactoring. In: Proceedings of 1st Workshop on Refactoring Tools, University of Berlin (2007)
Object Management Group: OMG Unified Modeling Language TM (OMG UML), Superstructure, Version 2.3. http://www.omg.org/spec/UML/2.3/Superstructure/PDF/ (2010)
Steinberg D., Budinsky F., Paternostro M., Merks E.: Eclipse Modeling Framework, 2nd edn. Pearson Education, (2008)
Reimann J., Seifert M., Aßmann U.: Role-based generic model refactoring. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds) MoDELS (2). Lecture Notes in Computer Science, vol. 6395, pp. 78–92. Springer, Berlin (2010)
The Object Management Group: Meta Object Facility (MOF) Core Specification. Technical report (January 2006)
Moha N., Mahé V., Barais O., Jézéquel J.M.: Generic model refactorings. In: Schürr, A., Selic, B. (eds) MODELS. Lecture Notes in Computer Science, vol. 5795, pp. 628–643. Springer, Berlin (2009)
Zhang J., Lin Y., Gray J.: Generic and domain-specific model refactoring using a model transformation engine. In: Beydeda, S., Book, M., Gruhn, V. (eds) Research and Practice in Software Eng, vol. II, pp. 199–218. Springer, Berlin (2005)
Lämmel, R.: Towards generic refactoring. In: Proceedings of Third ACM SIGPLAN Workshop on Rule-Based Programming RULE’02, Pittsburgh, USA, ACM Press, October 2002
Taentzer, G., Müller, D., Mens, T.: Specifying domain-specific refactorings for AndroMDA based on graph transformation. In: Applications of Graph Transformations with Industrial Relevance: Third International Symposium, AGTIVE 2007, Kassel, Germany, October 10–12, 2007, Revised Selected and Invited Papers. Springer, Berlin, pp. 104–119 (2008)
Biermann, E., Ehrig, K., Köhler, C., Kuhns, G., Taentzer, G., Weiss, E.: In: Graphical Definition of In-Place Transformations in the Eclipse Modeling Framework. Lecture Notes in Computer Science, vol. 4199/2006, pp. 425–439. Springer, Berlin (2006)
Brosch P., Seidl M., Wieland K., Wimmer M., Langer P.: The operation recorder: specifying model refactorings by-example. In: Arora, S., Leavens, G.T. (eds) OOPSLA companion, pp. 791–792. ACM, New York (2009)
Brosch, P., Langer, P., Seidl, M., Wieland, K., Wimmer, M., Kappel, G., Retschitzegger, W., Schwinger, W.: An example is worth a thousand words: composite operation modeling by-example. In: MODELS ’09: Proceedings of the 12th International Conf. on Model Driven Engineering Languages and Systems. Springer, Berlin, pp. 271–285 (2009)
Sun Y., White J., Gray J.: Model transformation by demonstration. In: Schürr, A., Selic, B. (eds) Model Driven Engineering Languages and Systems. Lecture Notes in Computer Science, vol. 5795, pp. 712–726. Springer, Berlin (2009)
Riehle, D., Gross, T.: Role Model Based Framework Design and Integration. In: Proceedings of OOPSLA’98, New York, NY, USA, ACM (1998) 117–133
Reenskaug, T., Wold, P., Lehne, O.A.: Working with objects—The OOram Software Engineering Method. http://heim.ifi.uio.no/~trygver/1996/book/WorkingWithObjects (1996)
The Object Management Group: Meta Object Facility (MOF) 2.0 Query/View/Transformation. Specification Version 1.0 (April 2008)
Czarnecki K., Helsen S.: Feature-based survey of model transformation approaches. IBM Syst. J. 45(3), 621–645 (2006)
Ekman T., Hedin G.: The JastAdd Extensible Java Compiler. SIGPLAN Not. 42(10), 1–18 (2007)
Bürger C., Karol S., Wende C., Aßmann U.: Reference attribute grammars for metamodel semantics. In: Malloy, B., Staab, S., Brand, M. (eds) Software Language Engineering. Lecture Notes in Computer Science, vol. 6563, pp. 22–41. Springer, Berlin (2011)
Åkesson J., Ekman T., Hedin G.: Development of a Modelica compiler using JastAdd. Electron. Notes Theor. Comput. Sci. 203(2), 117–131 (2008)
Samlaus, R., Hillmann, C., Demuth, B., Krebs, M.: Towards a model driven Modelica IDE. In: 8th International Modelica Conference, Dresden (2011)
Heidenreich, F., Johannes, J., Seifert, M., Thiele, M., Wende, C., Wilke, C.: Integrating OCL and Textual Modelling Languages. In: Proceedings of Workshop on OCL and Textual Modelling (OCL2010), October 2010
Heidenreich, F., Johannes, J., Karol, S., Seifert, M., Wende, C.: Derivation and Refinement of Textual Syntax for Models. In: Proceedings of the 5th Europ. Conf. on Model Driven Architecture—Foundations and Applications (ECMDA-FA 2009). LNCS, vol. 5562, pp. 114–129. Springer, Berlin (2009)
Gronback, R.C.: Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit. Pearson Education, India (2009)
W3C: OWL 2 Web Ontology Language: Structural Specification and Functional-Style Syntax. Technical report (2009)
Kolovos, D.S., Di Ruscio, D., Pierantonio, A., Paige, R.F.: Different Models for Model Matching: An analysis of approaches to support model differencing. In: International Workshop on Comparison and Versioning of Software Models, MCVS’09 at ICSE’09, IEEE Computer Society (2009)
Lin Y., Gray J., Jouault F.: DSMDiff: a differentiation tool for domain-specific models. Eur. J. Inf. Syst. 16, 349–361 (2007)
Euzenat J., Shvaiko P.: Ontology Matching. Springer, Heidelberg (2007)
Wachsmuth G.: Metamodel adaptation and model co-adaptation. In: Ernst, E. (eds) ECOOP. Lecture Notes in Computer Science, vol. 4609, pp. 600–624. Springer, Berlin (2007)
Vermolen, S.: Software Language Evolution. In: Hassan, A.E., Zaidman, A., Penta, M.D. (eds.) WCRE, IEEE, pp. 323–326 (2008)
Rose L.M., Herrmannsdörfer M., Williams J.R., Kolovos D.S., Garcés K., Paige R.F., Polack F.A.C.: A Comparison of Model Migration Tools. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds) MoDELS (1). Lecture Notes in Computer Science, vol. 6394, pp. 61–75. Springer, Berlin (2010)
Herrmannsdörfer M.: COPE—a workbench for the coupled evolution of metamodels and models. In: Malloy, B.A., Staab, S., van den Brand, M. (eds) SLE. Lecture Notes in Computer Science, vol. 6563, pp. 286–295. Springer, Berlin (2010)
Lee, E.A.: Cyber physical systems: design challenges. Technical Report UCB/EECS-2008-8, University of California at Berkeley, Electrical Engineering and Computer Sciences (January 2008)
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Prof. Dorina Petriu.
Rights and permissions
About this article
Cite this article
Reimann, J., Seifert, M. & Aßmann, U. On the reuse and recommendation of model refactoring specifications. Softw Syst Model 12, 579–596 (2013). https://doi.org/10.1007/s10270-012-0243-2
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-012-0243-2