Translating essential OCL invariants to nested graph constraints for generating instances of meta-models

Abstract Domain-specific modeling languages (DSMLs) are usually defined by meta-modeling using the Object Constraint Language (OCL) for specifying invariants. This approach is purely declarative in the sense that instance construction is not supported. In contrast, grammar-based language definition incorporates the stepwise construction of instances by applying production rules. Since the underlying structure of models are generally graphs, graph grammars are well suited to define modeling languages. Establishing a formal relation between meta-modeling and graph grammars opens up the possibility to integrate techniques of both fields. This integration can be advantageously used for optimizing DSML definition. We follow an approach where a meta-model is translated to a type graph with a set of nested graph constraints. While previous meta-model translations neglected OCL constraints, we focus on the translation of Essential OCL invariants to nested graph constraints in this paper. We show that a model satisfies an Essential OCL invariant iff its corresponding instance graph satisfies the corresponding nested graph constraint. In addition, nested graph constraints can be translated to application conditions of graph transformation rules. Composing both translations, an instance-generating graph grammar can be equipped with application conditions such that it generates instances of the original meta-model only.

[1]  Gabriele Taentzer,et al.  Henshin: advanced concepts and tools for in-place EMF model transformations , 2010, MODELS'10.

[2]  H. Kreowski,et al.  Pushout-Properties: An analysis of gluing constructions for graphs , 1979 .

[3]  Udo Kelter,et al.  Automatically Deriving the Specification of Model Editing Operations from Meta-Models , 2016, ICMT.

[4]  Fernando Orejas,et al.  Tableau-Based Reasoning for Graph Properties , 2014, ICGT.

[5]  Laurent Pautet,et al.  Towards Testing Model Transformation Chains Using Precondition Construction in Algebraic Graph Transformation , 2014, AMT@MoDELS.

[6]  Martin Gogolla,et al.  From UML and OCL to relational logic and back , 2012, MODELS'12.

[7]  Uwe Aßmann,et al.  Tool supported OCL refactoring catalogue , 2012, OCL '12.

[8]  Mark Richters,et al.  A precise approach to validating UML models and OCL constraints , 2002 .

[9]  Annegret Habel,et al.  Nested Constraints and Application Conditions for High-Level Structures , 2005, Formal Methods in Software and Systems Modeling.

[10]  Arend Rensink,et al.  Representing First-Order Logic Using Graphs , 2004, ICGT.

[11]  Annegret Habel,et al.  Translating Essential OCL Invariants to Nested Graph Constraints Focusing on Set Operations , 2015, ICGT.

[12]  Annegret Habel,et al.  Correctness of high-level transformation systems relative to nested conditions† , 2009, Mathematical Structures in Computer Science.

[13]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[14]  Martin Gogolla,et al.  Object Constraint Language (OCL): A Definitive Guide , 2012, SFM.

[15]  Laurent Pautet,et al.  Translating ATL Model Transformations to Algebraic Graph Transformations , 2015, ICMT.

[16]  Hartmut Ehrig,et al.  Attributed graph transformation with node type inheritance , 2007, Theor. Comput. Sci..

[17]  M. Minas,et al.  Application of graph transformation to visual languages , 1999 .

[18]  Karl-Heinz Pennemann,et al.  Development of Correct Graph Transformation Systems , 2008, ICGT.

[19]  Guido Wachsmuth,et al.  Metamodel Adaptation and Model Co-adaptation , 2007, ECOOP.

[20]  Qing Li,et al.  Unified Modeling Language , 2009 .

[21]  Gabriele Taentzer,et al.  Generating Instance Models from Meta Models , 2006, FMOODS.

[22]  Andy Schürr,et al.  Adding Graph Transformation Concepts to UML's Constraint Language OCL , 2001, UNIGRA.

[23]  Wolfgang Reisig,et al.  Petri Nets with Individual Tokens , 1982, Theor. Comput. Sci..

[24]  Indrakshi Ray,et al.  On challenges of model transformation from UML to Alloy , 2008, Software & Systems Modeling.

[25]  Annegret Habel,et al.  From Core OCL Invariants to Nested Graph Constraints , 2014, ICGT.

[26]  U. Keller,et al.  Translating the Object Constraint Language into First-order Predicate Logic , 2001 .

[27]  Hendrik Radke,et al.  A Theory of HR* Graph Conditions and their Application to Meta-Modeling , 2016 .

[28]  Daniel Grund,et al.  GrGen: A Fast SPO-Based Graph Rewriting Tool , 2006, ICGT.

[29]  Kevin Lano Null Considered Harmful (for Transformation Verification) , 2014, VOLT@STAF.

[30]  Hartmut Ehrig,et al.  $\mathcal{M}$-adhesive transformation systems with nested application conditions. Part 1: parallelism, concurrency and amalgamation , 2014, Mathematical Structures in Computer Science.

[31]  Arend Rensink,et al.  Model Checking Dynamic States in GROOVE , 2006, SPIN.

[32]  Fernando Orejas,et al.  Symbolic graphs for attributed graph constraints , 2011, J. Symb. Comput..

[33]  Udo Kelter,et al.  Consistency-preserving edit scripts in model versioning , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[34]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[35]  Gábor Bergmann,et al.  Translating OCL to Graph Patterns , 2014, MoDELS.

[36]  Gabriele Taentzer,et al.  AGG: A Graph Transformation Environment for Modeling and Validation of Software , 2003, AGTIVE.

[37]  Jordi Cabot,et al.  UMLtoCSP: a tool for the formal verification of UML/OCL models using constraint programming , 2007, ASE.

[38]  Hartmut Ehrig,et al.  Fundamentals of Algebraic Graph Transformation , 2006, Monographs in Theoretical Computer Science. An EATCS Series.

[39]  Wei Tang,et al.  Meta Object Facility , 2009, Encyclopedia of Database Systems.

[40]  Benoît Combemale,et al.  An analysis of metamodeling practices for MOF and OCL , 2015, Comput. Lang. Syst. Struct..

[41]  Hartmut Ehrig,et al.  Fundamentals of Algebraic Specification 1: Equations and Initial Semantics , 1985 .

[42]  Martin Gogolla,et al.  Object Constraint Language , 2009, Encyclopedia of Database Systems.

[43]  Martin Gogolla,et al.  Validating UML and OCL models in USE by automatic snapshot generation , 2005, Software & Systems Modeling.