On Model Transformation and Graph Transformation. Tom Mens. Service de Génie Logiciel Institut d Informatique Université de Mons-Hainaut

Documents pareils
Editing and managing Systems engineering processes at Snecma

Ingénierie des Modèles. Méta-modélisation

Ingénierie Dirigée par les Modèles. Editeurs de modèles. (Eclipse Modeling Tools) Jean-Philippe Babau

Forthcoming Database

DSL. Domain Specific Language. À l'aide des technologies Eclipse Modeling. Goulwen Le Fur Le 23 novembre 2012

REMOTE DATA ACQUISITION OF EMBEDDED SYSTEMS USING INTERNET TECHNOLOGIES: A ROLE-BASED GENERIC SYSTEM SPECIFICATION

openarchitectureware & transformation de modèle Yannick Lizzi Architecte Logiciel itemis France Mail: lizzi@itemis.de

WEB page builder and server for SCADA applications usable from a WEB navigator

1-Introduction 2. 2-Installation de JBPM 3. 2-JBPM en action.7

Contents Windows

Instructions Mozilla Thunderbird Page 1

Générer du code à partir d une description de haut niveau

Cedric Dumoulin (C) The Java EE 7 Tutorial

Extensions à la formation. Laurent Pérochon, avril 2008, RMT Modelia, modélisation conceptuelle, formation UML, INRA Castanet Tolosan

Environnement logiciel basé sur les modèles pour la conception collaborative de produit

Plan. Department of Informatics

iqtool - Outil e-learning innovateur pour enseigner la Gestion de Qualité au niveau BAC+2

SERVEUR DÉDIÉ DOCUMENTATION

VTP. LAN Switching and Wireless Chapitre 4

INSTITUT MARITIME DE PREVENTION. For improvement in health and security at work. Created in 1992 Under the aegis of State and the ENIM

Préconisations pour une gouvernance efficace de la Manche. Pathways for effective governance of the English Channel

RAPID Prenez le contrôle sur vos données

UML : Unified Modeling Language

Instructions pour mettre à jour un HFFv2 v1.x.yy v2.0.00

Les Lignes de Produits Logiciels (Software Product Lines) Tewfik Ziadi UPMC/LIP6

How to Login to Career Page

Présentation par François Keller Fondateur et président de l Institut suisse de brainworking et M. Enga Luye, CEO Belair Biotech

Utiliser une WebCam. Micro-ordinateurs, informations, idées, trucs et astuces

Quick Start Guide This guide is intended to get you started with Rational ClearCase or Rational ClearCase MultiSite.

RÉSUMÉ DE THÈSE. L implantation des systèmes d'information (SI) organisationnels demeure une tâche difficile

MANAGEMENT SOFTWARE FOR STEEL CONSTRUCTION

lundi 3 août 2009 Choose your language What is Document Connection for Mac? Communautés Numériques L informatique à la portée du Grand Public

en SCÈNE RATIONAL Rational Démonstration SDP : automatisation de la chaîne de développement Samira BATAOUCHE sbataouche@fr.ibm.com

Gestion des prestations Volontaire

Application Form/ Formulaire de demande

Contrôle d'accès Access control. Notice technique / Technical Manual

UML est-il soluble dans les méthodes agiles?

Notice Technique / Technical Manual

NOM ENTREPRISE. Document : Plan Qualité Spécifique du Projet / Project Specific Quality Plan

Exercices sur SQL server 2000

Paxton. ins Net2 desktop reader USB

An Ontology-Based Approach for Closed-Loop Product Lifecycle Management

PIB : Définition : mesure de l activité économique réalisée à l échelle d une nation sur une période donnée.

Règlement sur le télémarketing et les centres d'appel. Call Centres Telemarketing Sales Regulation

Les Portfolios et Moodle Petit inventaire

Un grand merci aux autres membres du jury d avoir accepter et pris le temps d évaluer ma thèse.

Gouvernance IT : par où commencer? Hubert Lalanne DE, Chief Architect for Industries IBM Software France

that the child(ren) was/were in need of protection under Part III of the Child and Family Services Act, and the court made an order on

Tex: The book of which I'm the author is an historical novel.

Tutoriel de formation SurveyMonkey

Le Cloud Computing est-il l ennemi de la Sécurité?

LADIES IN MOBILITY. LIVE TWEET Innovative City

Valorisez vos actifs logiciels avec Rational Asset Manager. Jean-Michel Athané, Certified IT Specialist IBM Rational Software

Integrated Music Education: Challenges for Teaching and Teacher Training Presentation of a Book Project

LE FORMAT DES RAPPORTS DU PERSONNEL DES COMMISSIONS DE DISTRICT D AMENAGEMENT FORMAT OF DISTRICT PLANNING COMMISSION STAFF REPORTS

Réinvestir les scénarios de test de la plate-forme d'apprentissage Moodle pour stimuler les échanges sur ces fonctionnalités

SMALL CITY COMMERCE (EL PEQUEÑO COMERCIO DE LAS PEQUEÑAS CIUDADES)

Deadline(s): Assignment: in week 8 of block C Exam: in week 7 (oral exam) and in the exam week (written exam) of block D

Revision of hen1317-5: Technical improvements

Logiciel Libre & qualité. Présentation

DOCUMENTATION - FRANCAIS... 2

RISK-BASED TRANSPORTATION PLANNING PRACTICE: OVERALL METIIODOLOGY AND A CASE EXAMPLE"' RESUME

PRODUCTS LIST (updated 11th January 2010)

Qualité de la conception de tests logiciels : plate-forme de conception et processus de test

Object Oriented Parallel Discrete Event Simulation: The PROSIT Approach

Our recommendation engine has come up with some personalized suggestions for you.

GIGABIT PCI DESKTOP ADAPTER DGE-530T. Quick Installation Guide+ Guide d installation+

Face Recognition Performance: Man vs. Machine

APPENDIX 6 BONUS RING FORMAT

Macroscope et l'analyse d'affaires. Dave Couture Architecte principal Solutions Macroscope

Stratégie DataCenters Société Générale Enjeux, objectifs et rôle d un partenaire comme Data4

1.The pronouns me, te, nous, and vous are object pronouns.

La solution idéale de personnalisation interactive sur internet

Atelier Progress Rollbase

DOCUMENTATION - FRANCAIS... 2

Cheque Holding Policy Disclosure (Banks) Regulations. Règlement sur la communication de la politique de retenue de chèques (banques) CONSOLIDATION

Sustainability Monitoring and Reporting: Tracking Your Community s Sustainability Performance

MELTING POTES, LA SECTION INTERNATIONALE DU BELLASSO (Association étudiante de lʼensaparis-belleville) PRESENTE :

Fiche produit ifinance v4

Votre premier projet Android

BNP Paribas Personal Finance

Agile&:&de&quoi&s agit0il&?&

Mon Service Public - Case study and Mapping to SAML/Liberty specifications. Gaël Gourmelen - France Telecom 23/04/2007

Module Title: French 4

Architecture client riche Evolution ou révolution? Thomas Coustenoble IBM Lotus Market Manager

ADHEFILM : tronçonnage. ADHEFILM : cutting off. ADHECAL : fabrication. ADHECAL : manufacturing.

Statement of the European Council of Medical Orders on telemedicine

The space to start! Managed by

DOCUMENTATION - FRANCAIS... 2

Formula Negator, Outil de négation de formule.

Principe de TrueCrypt. Créer un volume pour TrueCrypt

AGROBASE : un système de gestion de données expérimentales

Toni Lazazzera Tmanco is expert partner from Anatole ( and distributes the solution AnatoleTEM

THE OUAGADOUGOU RECOMMENDATIONS INTERNET INFRASTRUCTURE FOR AN AFRICAN DIGITAL ECONOMY 5-7 MARCH 2012

COPYRIGHT Danish Standards. NOT FOR COMMERCIAL USE OR REPRODUCTION. DS/EN 61303:1997

TABLE DES MATIERES A OBJET PROCEDURE DE CONNEXION

ANGULAR JS AVEC GDE GOOGLE

Eléments de statistique

SparkInData. Place de Marché des applications Spatiales

Cours en ligne Développement Java pour le web

Transcription:

On Model Transformation and Graph Transformation Tom Mens Service de Génie Logiciel Institut d Informatique Université de Mons-Hainaut

Contexte Ingénierie Dirigée par les Modèles An approach to software development where the principal artefacts are models scope of (as opposed to programs) this talk level of abstraction code only code driven Round-trip Engineering model driven model only Model Model Model Model visualise synchronise generate Program Program Program Program level of automation 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 2

Questions Les formalismes et outils actuels sont-ils adaptés à la transformation de modèles? Transformation de graphes? Transformation de termes? Programmation logique? Expression graphique des transformations? Expression déclarative des transformations? Comment contrôler les transformations? Formalismes pour le flux de contrôle? Comment valider les transformations? Comment réutiliser les transformations? 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 3

Réponses selon le point de vue de la Transformation de Graphes (TG) Le formalisme de TG est-il adapté à la transformation de modèles? Oui, mais besoin de meilleur support outillé Besoin d une expression graphique des transformations? Oui, pour la syntaxe concrète ET abstraite Expression déclarative des transformations? Oui, par définition de la transformation de graphes Comment contrôler les TG? Programmed/controlled graph rewriting, story-driven modelling Comment valider les TG? Termination analysis, critical pair analysis, Comment réutiliser les TG? Peu supporté par les outils actuels (travaux en cours) 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 4

Tool Support Combining technical spaces La technologie des transformations de graphes (basée principalement sur les grammaires de graphes) AGG + Tiger Eclipse plug-ins Fujaba, Moflon ATOM3, VIATRA2, GrGen.Net, MoTMoT, GReAT, GROOVE La technologie de l ingénierie dirigée par les modèles (IDM) (basée principalement sur les techniques de métamodélisation) OMG: MOF, UML, BPMN, Eclipse: Ecore, EMF, GEF, W3C: XML, XMI, XSLT, Défi: combiner les forces de ces technologies P.e. Support EMF et XML pour la transformation de graphes 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 5

Grammaires ou métamodèles? GrammarWare versus ModelWare GrammarWare relies on grammar technology (including tree rewriting, graph rewriting, parser and compiler technology) ModelWare relies on metamodelling technology e.g. UML, MOF, EMF, Both approaches are complementary and can be combined E.g. Generating test models: Use GT to generate instance models from metamodels [Ehrig&al, SoSyM 2008] E.g. Use GT to generate visual editors for domain-specific languages Expressiveness versus usability Interesting experience (Mark Minas): A graph transformation tool for specifying domain-specific graph-like languages (and editors) DiaPlan: based on graph grammars DiaMeta: based on metamodeling DiaMeta is less expressive, but easier to use by non-experts 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 6

Support de la transformation de modèles par transformation de graphes Études de cas

Etudes de cas Tiger project Concrete visual syntax for modeling and model transformation Tiger EMF Transformation Eclipse-based support for graph transformation Fujaba UML-based round-trip engineering based on graph transformation Story diagrams: Sophisticated control mechanism AGG critical pair analysis Formal analysis and support for incremental model inconsistency resolution 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 8

Etude de cas 1 Tiger project http://tfs.cs.tu-berlin.de/tigerprj/ K. Ehrig, C. Ermel, S. Hansgen, G. Taentzer. Generation of Visual Editors as Eclipse Plug-Ins. Proc. Int l Conf. Automated Software Engineering (ASE).

Défi: Représentation concrète et abstraite des modèles représentation concrète représentation abstraite contraintes de lay-out Le méta-modèle niveau M2 niveau M1 respecte Le diagramme visualise est conforme à Le modèle 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 10

Défi: Représentation concrète et abstraite des modèles représentation concrète représentation abstraite Le numéro se trouve à l intérieur de la place Le nom de la place se trouve en dessous Le nom de la transition se trouve à l intérieur niveau M2 niveau M1 respecte est conforme à Le diagramme visualise :Place token=1 name="p1" :Place token=2 name="p3" beginarcpt endarcpt :ArcPT inscr="a1" :Transition token=0 name="t" endarcpt :ArcPT inscr="a3" beginarctp :Place token=0 name="p2" endarctp :ArcTP inscr="a2" 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations beginarcpt de modèles 11

Etude de cas 1 : Tiger Project Tool setup Tiger Eclipse plug-in Metamodel specification Visual syntax specification Specification of manipulation rules Generated Eclipse plug-in A domain-specific modeling environment uses AGG graph transformation engine 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 12

Etude de cas 1 : Tiger Project Exemple : Petri Nets What the end-user sees : A tool for creating, manipulating, transforming Petri Nets Using concrete visual syntax 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 13

Etude de cas 1 : Tiger Project Exemple : Petri Nets What the developer sees : A tool for specifying the metamodel / type graph A tool for specifying the visual notation 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 14

Etude de cas 1 : Tiger Project Exemple : Petri Nets What the developer sees : A tool for specifying instance models / graphs Using the visual syntax notation 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 15

Etude de cas 1 : Tiger Project Exemple : Petri Nets What the developer sees A tool for specifying model transformation through graph transformation Using visual notation 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 16

Etude de cas 1 : Tiger Project Autre exemple: diagrammes d activités 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 17

Etude de cas 2 Tiger EMF transformation project http://tfs.cs.tu-berlin.de/emftrans/ E. Biermann, K. Ehrig, C. Kohler, G. Kuhns, G.Taentzer, E. Weiss. Graphical Definition of In-Place Transformations in the Eclipse Modeling Framework. Proc. Int l Conf. MODELS 2006.

Case study 2 Tiger EMF transformation project Tiger EMF transformation project http://tfs.cs.tu-berlin.de/emftrans/ Combines the virtues of Eclipse EMF with model transformation based on underlying graph transformation engine (AGG) Allows formal reasoning over the transformation rules 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 19

Case study 2 Tiger EMF transformation project Refactoring Example : Pull Up Attribute Step 1: Check if all subclasses contain the attribute to be pulled up 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 20

Case study 2 Tiger EMF transformation project Refactoring Example : Pull Up Attribute Step 2: If all subclasses have the attribute, then pull it up 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 21

Case study 2 Tiger EMF transformation project Refactoring Example : Pull Up Attribute Step 3: After pulling up, delete the attribute in all subclasses. 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 22

Case study 2 Tiger EMF transformation project Refactoring Example : Pull Up Attribute Step 4: If there are still annotations, delete them. 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 23

Etude de cas 3 Fujaba http://www.fujaba.de/ S. Burmester, H. Giese, M. Hirsch, D. Schilling, M. Tichy. The Fujaba Real-Time Tool Suite: Model-Driven Development of Safety-Critical, Real-Time Systems. Proc. Int l Conf. Software Engineering (ICSE) 2005.

Etude de cas 3 : Fujaba Fujaba is a round-trip engineering tool for UML and Java Behaviour can be specified as «story diagrams» Combination of UML activity diagrams and object diagrams Java code generation Experiment in Fujaba Specify refactorings as graph transformations using story diagrams Generate refactoring code from these transformations Advantages easier to specify and understand refactorings (visual notation) easier to implement refactorings (automatic code generation) 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 25

Etude de cas 3 : Fujaba Generating refactoring code from GT specifications refactoring execution Java programs round-trip engineering UML models Fujaba tool graph transformations specified as story diagrams refactoring specification 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 26

Etude de cas 3 : Fujaba Generating refactoring code Métamodèle de Fujaba 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 27

Etude de cas 3 : Fujaba Generating refactoring code Refactoring framework in Fujaba 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 28

Etude de cas 3 : Fujaba Generating refactoring code Pull Up Method model refactoring as Graph Transformation 1. Match method > (Hidden) Cast target 2. Match container > Link Navigation 3. Match stub > Link Navigation 4. Match superclass > Link Navigation 5. Remove method from container 6. Add method to superclass 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 29

Etude de cas 3 : Fujaba Generating refactoring code [p1.getindex()] [ failure] 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 30

Etude de cas 3 : Fujaba Generating refactoring code 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 31

Case Study 3 : Fujaba Generating refactoring code Fujaba Plugin 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 32

Etude de cas 3 : Fujaba Generating refactoring code Running Prototype 3 Execute Refactoring Import Java Sources (by directory) 2 Rearrange diagrams 1 parse Old Sources 4 regenerate New Sources 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 33

Etude de cas 4 AGG Critical Pair Analysis http://tfs.cs.tu-berlin.de/agg/ T. Mens, R. Van Der Straeten, M. D hondt. Detecting and resolving model inconsistencies using transformation dependency analysis. Proc. Int l Conf. MODELS 2006.

Goal : Formal Support for Incremental Model Improvement Goal Formally specify model defects and their resolution strategies as graph transformation rules Formally analyse to support the model improvement process Automate the detection of problems Interactively support the resolution of these problems Detect cycles in the resolution process Feasibility study Implementation in the AGG general-purpose graph transformation tool 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 35

Goal: Formal Support for Incremental Model Improvement Iterative process defect detection rules? defect resolution rules? model detect model defects select defects to be resolved choose resolution strategy apply resolution rules annotate model with detected problems modify model by selected resolution rules (may give rise to new defects) 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 36

Example of a model inconsistency Dangling Operation Reference selectreverse is used in the statemachine but is not defined in class AutomaticGear or any of its ancestors statemachine diagram behaviour AutomaticGear boolean driveselected selectdrive() reach2ndspeed() reach3rdspeed() dropbelow2ndspeed() dropbelow3rdspeed() Gear int noofgears = 3 selectneutral selectfirst selectsecond 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 37

Tool support SIRP tool Simple Iterative Resolution Process An interactive tool for detecting and resolving model problems 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 38

Step 1: Specify the metamodel AGG type graph 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 39

Step 2: Represent the model as a graph Automatic generation of the graph representation for the model This graph conforms to the type graph specified before 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 40

Example of a model defect Dangling operation reference Graph representation contains Operation name= selectdrive Class name= AutomaticGear isabstract=false gen Class name= Gear isabstract=false Operation behaviour name= selectneutral contains Operation name= selectreverse StateMachine Region contains referredoperation contains Conflict State name= Neutral Transition State source target name= Reverse description= dangling operation reference 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 41

Step 3: Specify defect detection rules Dangling operation reference Graph transformation rule for detection negative application condition (NAC) left-hand side (LHS) right-hand side (RHS) 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 42

Step 4: Specify resolution rules Dangling operation reference Graph transformation rule for resolution 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 44

Tool support revisited open graph and apply all detection rules list all found defects (Conflict nodes in the graph) list all resolution rules for selected defect apply selected resolution rule to the graph display resolution history 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 45

Step 5: Detect mutually conflicting resolutions Some resolution rules cannot be jointly applied (parallel conflict!) Conflict graph can be generated by means of critical pair analysis 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 46

Step 5: Detect mutually conflicting resolutions Example of a critical pair detecting a parallel conflict between resolution rules the resolution rules are not jointly applicable 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 48

Step 6: Detect sequential dependencies Some resolution rules may induce new defects (part of the) generated graph of sequential dependencies 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 49

Step 6: Detect sequential dependencies Example of a sequential dependency representing an induced defect 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 51

Step 6: Detect sequential dependencies We can use the dependency graph to detect potential cycles in the resolution process Cycles should be avoided, since this implies that the resolution process may continue forever 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 52

Conclusions

Lessons Learned Graph transformation tool support for model transformation is starting to become available Still in a research prototype phase Formal analysis of transformations Available in AGG and some other tools, with some limitations Expressiveness of transformations Very good in Fujaba, less in AGG Performance Heavily depends on the tool Reusability of transformations Better tool support (and formal support) needed 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 54

GT performance comparison 18 janvier 2008, LIP6, Paris, France GPL - Journée sur les transformations de modèles 55