An OCL extension for checking and transforming UML models Thierry MILLAN 1 , Laurent SABATIER 2 , Thanh-Thanh LE THI 1 , Pierre BAZEX 1 , Christian PERCEBOIS 1 (1) Institut de Recherche en Informatique de Toulouse - Université Paul Sabatier 118, route de Narbonne 31062 Toulouse Cedex 9 - FRANCE (2) Sodifrance 15, Chemin de la Crabe 31300 Toulouse - FRANCE millan@irit.fr, LSabatier@sodifrance.fr, lethi@irit.fr, bazex@irit.fr, percebois@irit.fr http://neptune.irit.fr Abstract: The increasing use of models in specification and design phases makes them first class citizens. Models which had, till now, been used to gain a better grasp of the software to be designed, have been attributed a productive role that has become central to development. This new status of models and meta-models poses the problem of how they are established and especially, how they are validated. So, each activity in a process can be supported by MDE (Model-Driven Engineering) components realizing transformations and verifications. These operations require redefining the OCL type system for taking into account multi-model handling and side-effects. Checking the transformation consists of ensuring that the source models and the targets respect a set of properties that can be verified through transformation contracts. The NEPTUNE platform was designed having this logic as a driving force – allowing the verification of models and of their transformation. Key-Words: OCL, process development, multi-model access, type synthesizer, validation, transformation 1 OCL and the NEPTUNE platform The checking and transformation of models are justified in numerous applications. For instance, they help in the thought processes during the specification and design phases, they help to adapt the model to its projection onto different target platforms under the supervision of the designers/developers and even facilitate studies performed under collaboration. During a fusion operation, for instance, it is necessary to be able to handle at least two models at the input and two at the output. With reference to the “View” component in the QVT standard [1] (Query / View / Transformation), the creation of views is also covered by our study. The NEPTUNE platform fits into this logic involving the checking and transformation of models. It uses an extension of OCL language [2] (Object Constraint Language), which enables the OMG (Object Management Group) standard to be strictly respected during verifications but less so for transformations. We first present some related works and the OCL extensions to illustrate how they are used to transform models. Then, we show how the extension requires the coherence of navigation expression typing to be checked by means of several meta-models and how it allows transformation contracts to be expressed. We finish with an overview of the first experiments and the resulting future of the platform. 2 Related works on OCL Several OCL tools exist which are compared in [3]. Some of them are integrated with other modelling tools, while others are stand alone tools. In the following we discuss about ATL, USE and KerMeta. At the end of the section we analyse imperativeOCL proposed by QVT with respect to OCL. The ATL language [4] is developed by the ATLAS Group (INRIA & LINA). It is a declarative language of transformation. An ATL transformation is based on rules “rules”. A rule defines a transformation from a source model to a target model. It is possible to define specific methods called “helper” to make easier the treatment of the transformation rules. The USE platform [5] is developed in the Bremen University. It is an environment dedicated to OCL expressions evaluation. The end-user can dynamically generate object diagrams from UML class diagrams containing OCL invariants and operations written using an action language specified using OCL pre- and post- conditions. At any time, the user can verify properties and executes the defined operations insuring that pre- and post- conditions are verified. Such a runtime environment is used, in particular, for metamodelling programming languages. However, the KerMeta platform [6], more Proceedings of the 8th WSEAS Int. Conference on SOFTWARE ENGINEERING, PARALLEL and DISTRIBUTED SYSTEMS ISSN: 1790-5117 144 ISBN: 978-960-474-052-9