Modeling Language Evolution for Model Family Support Sanaa Alwidian School of Electrical Engineering and Computer Science University of Ottawa Ottawa, Canada salwidia@uottawa.ca Abstract— In Model-Driven Engineering, models can evolve over time or vary along dimensions such as products. Such A. Problem Specification. evolution results in a set of related models called model family. A A model family assembles a set of related models that vary model family can be captured with a “150% model” that merges along some dimension such as time or product in the family members, while enabling the extraction of the product/software lines. In a negative variability model (an individual models. In this context however, a 150% model may approach that starts with a complete model of all variations and no longer conform to the original metamodel of the family selectively remove deselected artefacts [3]), a model that members. This paper presents my Ph.D. research agenda on captures the union of all members of a model family is often inferring the metamodel of a model family from the structure of called “150% model” [3],[4]. A 150% model not only captures the metamodel of its members. In particular, I aim to define a all the family members (for example, to enable analysis on all technique that minimally relaxes the original metamodel members at once), but also enables the extraction of individual constraints related to multiplicities of attributes and association members. In the context of a model family, we observed that ends. Although a simpler problem is to infer minimal constraint relaxations from the current family members, the more even if each of the family members conforms to the same interesting problem is to predict where such relaxations are metamodel, the 150% model that captures this family may not needed in the metamodel, so that existing tools and analysis conform to that metamodel. Another interesting observation is techniques can be adapted once and minimally for a given that the evolution/variation of models in a family does not modeling language. This work is applicable to the regulatory require additions, deletions, or modifications of concepts to the domain, for example, as regulations evolve and have variations original metamodel. Hence, in order to support model families that need to be captured and analyzed using slightly different (with large number of models), we only need to relax the goal models. Such work would also indirectly help the metamodel internal constraints that are related to multiplicities community gain a better understanding of the nature of of attributes and association ends and/or external well- metamodels. formedness constraints. The general problem illustrated in Fig. 2 can therefore be simplified and characterized in this context Keywords— Conformance; constraint relaxation; evolution; (see Fig. 3): If models M0..Mn (that conform to a metamodel metamodel; Model-Driven Engineering; model family; variability; MM) are aggregated, resulting in a new model M150 that is no 150% model. longer conforming to the original metamodel MM, how should we extend MM (ideally with the least amount of changes) into I. INTRODUCTION AND PROBLEM FORMULATION MM150, in order for M150 as well as M0..Mn to conform to In Model Driven Engineering (MDE), models and/or their MM150? metamodels evolve continuously and therefore need to be 2 1 managed to ensure conformance. The metamodel evolution and M Co-evolution M’ M Evolution M’ model co-evolution problem [1],[2] is a well-addressed aspect of evolution in MDE. In such approaches, a metamodel conforms conforms conforms conforms evolves from MM to MM’, and then a model co-evolution from M to M’ is carried out afterward (see Fig. 1). However, to the best of our knowledge, there is a lack of approaches that attempt to evolve metamodels in response to model evolution. We initially refer to this context as the model-triggered 1 2 metamodel evolution problem (Fig. 2), characterized as MM Evolution MM’ MM Co-evolution MM’ follows: If a model M (that conforms to a the original metamodel MM) evolves or varies, resulting in a new model Fig. 1. Metamodel (MM) Fig. 2. Model-triggered metamodel M’ that is no longer conform to MM, how should we extend evolution and model (M) co- (MM) evolution problem (general) MM (ideally with the least amount of changes) into MM’, in evolution problem order for M’ to be conform to MM’? Model Family • RQ1: How can we minimally relax a metamodel to Mn support a model family (through a 150% model) in a M1 … 1 way that enables the generation of all (and only) M0 Aggregation M150 individual members? • RQ2: How can we predict where relaxation is needed conforms conform (i.e., relaxation points) in the original metamodel, for all potential 150% models of a specific language? • RQ3: To what extent can the current tools and analysis 2 techniques be adapted to model families (with MM Relaxation MM150 minimum adaptation effort) to reason on all members of a 150% model? Fig. 3. Model family-specific metamodel evolution problem II. RELATED WORK B. Motivation This work is inspired by issues faced with regulation Several approaches manage evolution of MDE models and modeling, in collaboration with Transport Canada, where there metamodels in two directions: metamodel evolution and model are regulations for different types of parties (e.g., airports and co-evolution [1],[2],[8],[9],[10] (Fig. 1) and operation co- airlines of different sizes) requiring slightly different goal evolution [11]-[14]. In both directions, the goal is to update models [4]-[6]. If we try to capture all model variants with one models and/or operations so that they conform to their evolved goal model (e.g., using the Goal-oriented Requirement metamodel. In addition, metamodels can be extended with Language – GRL [7]) to minimize maintenance problems, we profiles such as in the UML.2x profile mechanism [15] to would face conformance issues because the language does not further restrict the metamodel’s constructs and enforce the permit to capture the family with one model. For example, well-formedness of models of the domain-specific language. GRL limits the number of links between a pair of goals to 1, Furthermore, approaches for (meta)model whereas the family model may need many. This is an issue decoration/annotation, such as the one from Kolovos et al. [16] along the product dimension, which is not limited to GRL but have been used in an extension context. Model versioning also common to most modeling languages. Similar problems approaches [17]-[20] have also been proposed to handle model occur along the time dimension when a model evolves. If a evolution and track it through versioning, where differences product has many versions over time, and if we want to between versions of the same model are detected. Run-time analyze all versions (e.g., before releasing a patch that would oriented approaches, such as EMF Facets [21], allow affect them all), a 150% model would allow reasoning about all metamodel extension by adding classes, attributes or members at once, instead of reasoning about each member containment references. Aprajita et al. [22], [23] explicitly individually. The concern here is not in constructing the 150% extended the metamodel of GRL to document explicit changes model itself. Rather, the challenge emerges when 150% models of model elements to specific versions of a metamodel. In [24], violate conformance with the original metamodel, MM. In this I have proposed the theoretical foundation of this work. The case, we need to relax MM into MM150 to ensure that this paper discussed the problem of metamodel relaxation to 150% model is representable. A minimal relaxation is desirable support evolution of models in the context of model families, in this context to minimize potential modifications to existing and proposed a solution of predicting the locations of tools and analysis approaches. relaxations in a metamodel through tracking versions of members in a model family. C. Scope of the Work. As the resulting artifact of this PhD thesis will be an This work focuses on inferring the metamodel of a model evolved (e.g., relaxed) meta-model to accommodate model family from the structure of the metamodel of its members families, the above approaches are considered as related work. through a minimal set of constraint relaxations. We are not However, there are three major conceptual differences between dealing with the more general problem of inferring a my proposed work and existing approaches. The first metamodel from a collection of models that conform to difference is the driving factor of evolution. While existing different metamodels; our member models all use the same approaches deal with models and/or operations co-evolution language. Also, we are not dealing with dynamic metamodel triggered by metamodel evolution, our work targets the co-evolution upon changes; generating a new metamodel each evolution/relaxation of metamodels triggered by model time there is a new member added to the family is not practical, evolution or variation, in the context of model families. The as this would imply developing new tools (for producing, second difference is that unlike the existing approaches that analyzing, and transforming 150% models) each time. We are conduct transformation/migration of models each time a also not looking at language-specific solutions, e.g., through metamodel changes, our approach aims to infer a single using metadata or user links in GRL. The ongoing challenge of relaxed metamodel that accommodates all potential 150% this research is hence to predict the locations where metamodel models of a language, so as to develop tools for this relaxed relaxations are needed, without relaxing too much. Our long- metamodel only once. Finally, some of the related approaches term goal is hence to develop tools for the relaxed language either add new concepts to the original metamodel [21], or only once. This research questions hence are: modify the language’s validity constraints by further constraining their restrictions [15], while our approach relaxes some constraints instead. The approach of [22], [23] is common metrics (e.g., precision and recall). These steps will currently specific to one language and supports limited kinds of be done for at least 3 languages (GRL, UML, and another one changes to versions. to be decided), so the results are not language dependent. I am then planning to conduct case studies from domains with III. PROPOSED SOLUTION highly evolving models, such as regulation modeling (section I propose a Metamodel Relaxation approach, MeRe, to 1) to examine the applicability of the proposed approach in support the representation of model families by means of practice. minimally relaxing particular constraints related to multiplicities and/or association ends. MeRe works in four V. EXPECTED CONTRIBUTIONS main phases to enable metamodel relaxation: first, the union of By addressing RQ1-RQ3, this research will provide these all model elements in all valid members of a model family is scientific contributions: captured by one single model, M150, as in [25]. Second, • Characterization of the requirements for minimally changes among the different versions of models are detected relaxing modeling languages to support all potential through the use of M150, whose elements can now be extended 150% models of a language (RQ1). with a delta (∆) annotation. The ∆ denotes a change of elements and/or links from M1 to M2 (for example, a GRL • Prediction heuristics for the locations where metamodel decomposition link in M1 becomes a contribution link in M2). relaxations are needed, so that existing tools and This delta could be inferred by calculating the difference analysis techniques be adapted once for families (RQ2). between M1 and M2, Diff (M1, M2), using, for example, the • Examples of tools and analysis techniques evolved to approach proposed by Rivera et al. [26]. The purpose of this support MM150, for two languages. This will enable phase is to detect and extract pairs of elements that have reasoning about all family members at once (RQ3). changed, denoted as Ei and Ei∆. Third, conformance between the original metamodel MM and the M150 model is verified. • Proof-of-concept tool support for MeRe. This is done by checking if the co-existence of change pairs (obtained in phase 2) in the same model could cause a violation VI. CURRENT STATUS of association/attribute multiplicities or other external (OCL) constraints of MM. For instance, two different links between As of July 2017, I did a literature review of the the same pair of GRL goals will cause a violation. If non- model/metamodel evolution problem over the last 10 years and conformance is detected, the fourth phase takes place, where derived a characterization of the model-triggered metamodel the modeler decides on the relaxation points. At this level, it is evolution problem in the context of model families. A paper still challenging to predict the exact locations of metamodel accepted in the ME’2017 workshop covers the theoretical multiplicities that need to be relaxed, independently of the foundations of this work. I am working towards formalizing models in a family. Note that we do not have to follow a naïve models and metamodels based on ontologies to infer patterns brute-force approach and relax all multiplicity constraints and of relaxation needed in the metamodel. A publication on this external constraints in the metamodel. Instead, we need to topic is the next step. The evaluation and validation of MeRe is identify a technique to predict automatically where relaxation currently in progress, with a paper planned for submission in is needed in the metamodel, based on its structure or, the fall 2017. I intend to carry out integration of MeRe with a empirically, on patterns of usages of the language. modeling tool as a prototype. I aim for a journal paper in 2018 that summarizes my findings and combines them with results IV. PLAN FOR EVALUATION AND VALIDATION of a case study. I aim for the publication of the PhD thesis by the end of 2018. I am planning to validate and evaluate my PhD work following some of the methods described in [27],[28]. In VII. CONCLUSION particular, I will demonstrate the applicability of MeRe empirically, based on a large collection of models. As a first This paper presents my research motivation, problem step, I will consider several models of products and several of statement, proposed solution, evaluation plan and the current their versions, and construct M150 for each family. In addition, progress on the MeRe approach. The ongoing challenge of this I will consider the use of one model repository [29] to generate research is to predict metamodel relaxations points such that a set of virtual model versions or families, and also construct existing tools and analysis techniques would be adapted once M150 for them. For each of these M150, if it violates MM, I for all potential model families. will relax MM to MM150, with the minimum amount of REFERENCES changes such that MM150 would be small enough to only [1] J. Sprinkle and G. Karsai, “A domain-specific visual language for accommodate the members of a particular M150. To predict domain model evolution,” Journal of Visual Languages and Computing, where relaxation is needed in MM (and to decide when to stop 15(3-4), pp. 291–307, 2004 relaxing MM) for all potential M150 (RQ2), I will capture all [2] A. Cicchetti, D. Ruscio, R. Eramo, and A. Pierantonio, “Automating co- M150 (from first step) in one single M150 called BigM150, evolution in model-driven engineering,” in 12th International Enterprise and infer a relaxed metamodel called BigMM150. Then I will Distributed Object Computing Conference (EDOC), pp. 222–231. IEEE conduct a comparison based on differences between Computer Society, 2008. BigMM150 and each of the MM150 that I got before. The [3] A. Polzer, D. Merschen, G. Botterweck, A. Pleuss, J. Thomas, B. purpose of this step is to identify and predict relaxation points Hedenetz, and S. Kowalewski, “Managing complexity and variability of a model-based embedded software product line,” Innovations in Systems in BigMM150. Prediction quality will be measured with and Software Engineering, 8(1), pp. 35–49, 2012. [4] A. Palmieri, P. Collet, and D. Amyot, “Handling regulatory goal model model decorations,” in ICMT 2010, LNCS, vol. 6142, pp. 138–152. families as software product lines,” in Advanced Information Systems Springer, 2010. Engineering-27th International Conference, LNCS, vol. 9097, pp. 181– [17] M. Alanen and I. Porres, “Version control of software models,” in 196. Springer, 2015. Advances in UML and XML-Based Software Evolution, Chapter III, pp. [5] A. Shamsaei, D. Amyot, A. Pourshahid, E. Yu, G. Mussbacher, R. 47–70. Idea Group Publishing, 2005. Tawhid, E. Braun, and N. Cartwright, “An approach to specify and [18] H. Oliveira, L. Murta, and C. Werner, “Odyssey-VCS: a flexible version analyze goal model families,” in 7th System Analysis and Modelling control system for UML model elements,” in Proc. 12th Int. Workshop (SAM) Workshop, LNCS, vol. 7744, pp. 347–52. Springer, 2012. on Software Configuration Management, pp. 1–16. ACM, 2005. [6] R. Tawhid, M. Alhaj, G. Mussbacher, E. Braun, N. Cartwright, A. [19] K. Altmanninger, G. Kappel, et al., “AMOR – towards adaptable model Shamsaei, D. Amyot, S.A. Behnam, and G. Richards, “Towards versioning,” in 1st International Workshop on Model Co-Evolution and Outcome-Based Regulatory Compliance in Aviation Security,” in 20th Consistency Management (MCCM'08), Workshop at MODELS'08, IEEE Int. Requirements Engineering Conference (RE’12), pp. 267–272. Toulouse, France, 2008. IEEE CS, 2012. [20] M. Koegel, J. Helming, and S. Seyboth, “Operation-based conflict [7] D. Amyot and G. Mussbacher, “User Requirements Notation: The first detection and resolution,” in CVSM'09: Proceedings of the 2009 ICSE ten years, the next ten years,” Journal of Software, 6(5), pp. 747–768, Workshop on Comparison and Versioning of Software Models, pp. 43– 2011. 48. IEEE Computer Society, 2009. [8] A. Cicchetti, D. Davide, R. Eramo, and A. Pierantonio, “Meta-model [21] EMF Facet, http://eclipse.org/facet [online; accessed: April 2017]. differences for supporting model co-evolution,” in Proceedings of the 2nd Workshop on Model-Driven Software Evolution (MODSE), pp. 1– [22] Aprajita and G. Mussbacher, “TimedGRL: Specifying goal models over time,” in 6th Int. Model-Driven Requirements Engineering Workshop 10. Université de Nantes, 2008. (MoDRE), pp. 125–134. IEEE CS, 2016. doi:10.1109/REW.2016.035. [9] S. Becker, B. Gruschko, T. Goldschmidt, and H. Koziolek, “A process [23] Aprajita, S. Luthra., and G. Mussbacher “Specifying Evolving model and classification scheme for semi-automatic meta-model Requirements evolution,” in 1st Workshop MDD, SOA und IT-Management (MSI), Models with TimedURN”. 9th Workshop on Modelling in Software GI, GiTO-Verlag, pp. 35–46, 2007. Engineering (MiSE 2017), Buenos Aires, Argentina, pp. 26-32, May [10] B. Gruschko, D. Kolovos, and R. F. Paige, “Towards synchronizing 2017. models with evolving metamodels,” in International Workshop on [24] S. Alwidian and D. Amyot “Relaxing Metamodels for Model Family Model-Driven Software Evolution, paper 3, 2007. Support”. 11th Workshop on Models and Evolution (ME 2017), Austin, [11] D. R. Davide, I. Ludovico, and A. Pierantonio, “A methodological USA, Sept. 2017. IEEE. approach for the coupled evolution of metamodels and ATL [25] K. Czarnecki and M. Antkiewicz, “Mapping features to models: a transformations,” in ICMT 2013: Theory and Practice of Model Transformations, LNCS, vol. 7909, pp. 60–75. Springer, Berlin, template approach based on superimposed variants,” in GPCE 2005, Heidelberg, 2013. LNCS, vol. 3676, pp. 422–437. Springer Berlin Heidelberg, 2005. [26] J.E. Rivera and A. Vallecillo, “Representing and operating with model [12] D. Méndez, A. Etien, A. Muller, and R. Casallas, “Transformation migration after metamodel evolution,” in Proc. Model and Evolution differences,” in International Conference on Objects, Components, Models and Patterns, LNBIP, vol. 11, pp. 141–160. Springer Berlin Workshop (ME’10), , 2010. Heidelberg, 2008. [13] B. Gruschko, “Towards structured revisions of metamodels and semi- automatic model migration,” Position Paper for the Eclipse Modeling [27] B. Kitchenham, S. Linkman, and D. Law, “Desmet: a methodology for evaluating software engineering methods and tools”. Computing & Symposium, 2006. Control Engineering Journal, 8(3):120–126, 1997. [14] J. M. Sprinkle, Metamodel driven model migration. Doctoral [28] P. Runeson, M. Höst, A. Rainer, and B. Regnell, Case Study Research in dissertation, Vanderbilt University, Nashville, USA, 2003. Software Engineering - Guidelines and Examples. Wiley, 2012. [15] OMG, Unified Modeling Language (UML), Version 2.5, formal/2015- [29] J. Di Rocco, D. Di Ruscio, L. Iovino, and A. Pierantonio, “Collaborative 03-01, 2015. Repositories in Model-Driven Engineering”, IEEE Software, 32(3), pp. [16] D. S. Kolovos, L. M. Rose, N. D. Matragkas, R. F. Paige, F. A. C. 28–34, May 2015. Polack, and K. J. Fernandes, “Constructing and navigating non-invasive