Towards Automatic Model Synchronization from Model Transformation

Slides:



Advertisements
Similar presentations
Provenance-Aware Storage Systems Margo Seltzer April 29, 2005.
Advertisements

All Presentation Material Copyright Eurostep Limited ® exff u2e demo slideshow David Price.
June 9, 2006 Transforming models with ATL © 2006 ATLAS Nantes Transforming models with ATL The A TLAS Transformation Language Frédéric Jouault ATLAS.
Formal Techniques in Software Engineering Universiteit AntwerpenIntroduction 1.1 Formal Techniques in Software Engineering 3de BAC Informatica Chapter.
Merging Models Based on Given Correspondences Rachel A. Pottinger Philip A. Bernstein.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
A Formal Foundation Supporting MDD --- ZOOM Approach Hongming Liu Lizhang Qin 11/08/2003.
CS 290C: Formal Models for Web Software Lecture 6: Model Driven Development for Web Software with WebML Instructor: Tevfik Bultan.
Sheet 1© 2005 Lentedagen, 30 March-1 April 2005 IPA Lentedagen on Software Architecture Model Transformations in MDA Ivan Kurtev.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
1 Ivano Malavolta, University of L’aquila, Computer Science Department Ivano Malavolta DUALLy: an Eclipse platform for architectural languages interoperability.
An Approach and Tool for Synchronous Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Hafsteinn Þór Einarsson Helmut Neukirchen.
Avro Apache Course: Distributed class Student ID: AM Name: Azzaya Galbazar
Model Transformations
Conclusions What’s next? * Implementation of additional input formats * Additional vendor support: As vendors become more open with their APIs for accessing.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
UML2 Package Merge Usage scenarios and their effect on XMI and Java API interoperability Bran Selic, Jim Amsden, Kenn Hussey Oct, 2003.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
Supporting Automatic Model Inconsistency Fixing Yingfei Xiong University of Tokyo, Japan Zhenjiang HuNational Institute of Informatics, Japan Haiyan ZhaoPeking.
MDA and QVT  Tom Gullion, Director of Product Management, Together Products.
© 2010 HCMUNS. NII-Internship program proposal: Evolution of modeling languages and models Submitted by: BUI TAN LOC NII Supervisor: Professor ZHENJIANG.
Architecture-Based Runtime Software Evolution Peyman Oreizy, Nenad Medvidovic & Richard N. Taylor.
Graph Data Management Lab, School of Computer Science gdm.fudan.edu.cn XMLSnippet: A Coding Assistant for XML Configuration Snippet.
ATL The ATLAS Transformation Language. 2 ATL (ATLAS Transformation Language) ATL transformation pattern ATL metamodel Helpers – Operation helpers – Attribute.
MDE Model Driven Engineering Xavier Blanc Université Pierre et Marie Curie
Introduction to MDA (Model Driven Architecture) CYT.
A REFACTORING TOOL FOR DESIGN PATTERNS WITH MODEL TRANSFORMATIONS Zekai Demirezen Yasemin Topaloğlu Ege University Department of Computer Engineering
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Alignment of ATL and QVT © 2006 ATLAS Nantes Alignment of ATL and QVT Ivan Kurtev ATLAS group, INRIA & University of Nantes, France
1 Model Compiler Construction Based on Aspect-oriented Mechanisms Naoyasu Ubayashi (Kyushu Institute of Technology) Tetsuo Tamai (University of Tokyo)
Model Driven Development An introduction. Overview Using Models Using Models in Software Feasibility of MDA MDA Technologies The Unified Modeling Language.
Performance evaluation of component-based software systems Seminar of Component Engineering course Rofideh hadighi 7 Jan 2010.
Supporting Parallel Updates with Bidirectional Model Transformations Yingfei Xiong and Masato Takeichi University of Tokyo, Japan Song Hui Peking University,
Beanbag: Facilitating Model Inconsistency Fixing Yingfei Xiong Ph.D. Student Advisor: Zhenjiang Hu and Masato Takeichi University of Tokyo 1.
Sheet 1 DocEng’03, Grenoble, November 2003 Model Driven Architecture based XML Processing Ivan Kurtev, Klaas van den Berg University of Twente, the Netherlands.
Beanbag: Operation-based Synchronization with Intra-Relation Support Yingfei Xiong Ph.D. Student University of Tokyo.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
© 2010 DH KHTN. Stability UML!Class name = “book” description = “demo” Transform Java!Class name = “book” comment = “” UML!Class name = “book” description.
ModTransf A Simple Model to Model Transformation Engine Cédric Dumoulin.
Andrey Karaulov, Alexander Strabykin Institute for System Programming Russian Academy of Sciences SYRCoSE: Spring Young Researchers Colloquium on Software.
Yu, et al.’s “A Model-Driven Development Framework for Enterprise Web Services” In proceedings of the 10 th IEEE Intl Enterprise Distributed Object Computing.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Sheet 1 Forum on Specification and Design Languages (FDL), Frankfurt, September 2003 UML to XML-Schema Transformation: a Case Study in Managing Alternative.
ECE 750 Topic 8 Meta-programming languages, systems, and applications Automatic Program Specialization for J ava – U. P. Schultz, J. L. Lawall, C. Consel.
Sheet 1MDAFA2004 Linköping, June 2004 A Language for Model Transformations in the MOF Architecture Ivan Kurtev, Klaas van den Berg University of Twente,
Apache Avro CMSC 491 Hadoop-Based Distributed Computing Spring 2016 Adam Shook.
Operational QVT Incremental Update
More Sophisticated Behavior
MACS 2005 First International Workshop on the Modeling and Analysis of Concerns in Software Concern Management for Constructing Model Compilers -- Towards.
Incremental Synchronization of Organizational Models, Requirements Models and Object-Oriented Software Design Models Presenter: M.Sc. Marat Abilov
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Beanbag : Support Synchronization in Software Engineering Applications
Combining Generative and Graph Transformation Techniques for Model Transformation: An Effective Alliance? Shane Sendall Software Modeling & Verification.
Evaluating Compuware OptimalJ as an MDA tool
Synchronizing Software Engineering Artifacts
Introduction.
Compiler design.
Constructing MDA-based Application Using Rational XDE for .NET
Presented by: Jacky Ma Date: 11 Dec 2001
Ivan Kurtev, Klaas van den Berg Software Engineering Group
Metadata The metadata contains
Introduction to Data Structure
Review of Previous Lesson
CSE591: Data Mining by H. Liu
Software Development Process Using UML Recap
Software Architecture & Design
Presentation transcript:

Towards Automatic Model Synchronization from Model Transformation Yingfei Xiong, 2007

ASE Work

The Problem of Data Interchange Suppose we have a software modeling system We want to write a code generating system that generates code from the models in the modeling system ------------ Modeling System Code Generator Models Code

Difficulties The format how the models are stored is unknown Even if the format is known, there are many trivial details to deal with Byte encoding: high bit first? Low bit first? Char encoding: GB2312? UTF-8? …

Solution Standards Standards for data interchange that W3C XML OMG MOF Provide a generic data structure to describe data XML: tree MOF: graph Provide means to define the format of data XML: DTD, Schema MOF: meta model Define how the data are stored into and loaded from files XML: part of the basic XML standard MOF: XMI Provide a set of general APIs to operate data

The resulting system The modeling system produces data in MOF models for data interchange. ------------ Modeling System MOF Models Code Generator Code

A More General Situation The code generating system wants to support more modeling system The system proposes a meta model and supports input of models in the meta model Modeling System A Models in Metamodel A Models in Metamodel C Code Generator Modeling System B Models in Metamodel B

Solution Provide specific languages for converting model formats between meta models Modeling System A Models in Metamodel A Models in Metamodel C Transform A2C Transform B2C Modeling System B Models in Metamodel B Code Generator

Walk a little further Software development yields artifacts in different formats Requirement documents Design models Code … If we can provide transformations between these artifacts, we can automate software development

Model-Driven Development MDD An model-based approach to software development Developing software by transforming models MDA The set of standards by OMG for realizing MDD Model Transformation Languages ATL [F. Jouault and I. Kurtev. 2005] QVT [OMG, 2006] This paper is about model synchronization from model transformation.

A UML2Java Transformation in ATL module UML2Java ; create OUT : Java from IN : UML ; rule Class2Class { from u : UML ! Class to j : Java ! Class ( name <- u.name , fields <- u.attrs ) } rule Attribute2Field { from a : UML ! Attribute to f : Java ! Field ( name <- ’_’ + a.name , type <- a. type

An Example of Executing UML2Java UML!Class name = “Book” description = “a demo class” UML!Attribute name = “title” type = “String” UML!Attribute name = “price” type = “Double”

The Transformation Result UML!Class name = “Book” description = “a demo class” Java!Class name = “Book” comment = “” UML!Attribute name = “title” type = “String” Java!Field name = “_title” type = “String” UML!Attribute name = “price” type = “Double” Java!Field name = “_price” type = “Double”

Modifications Java!Class UML!Class name = “Book” comment = “_bookTitle cannot be null” UML!Class name = “Book” description = “a demo class” UML!Attribute name = “title” type = “String” Java!Field name = “_title” type = “String” _bookTitle UML!Attribute name = “authors” type = “String” UML!Attribute name = “price” type = “Double” Java!Field name = “_price” type = “Double”

Model Synchronization Model synchronization is a process that propagates modifications across different models, making the models consistent with each other.

Model Synchronization Src0 Tar0 Transform Modify Modify Src1 Tar1 Synchronize Src2 Tar2

Existing Approaches General Frameworks Specific Languages Multi-view synchronization [J. Grundy et al. 1998] Rely on users to write code to handle each type of modifications in each side It is users who should ensure the consistency of the code Specific Languages FSML [M. Antkiewicz and et al. 2006] Feature model to code synchronization

Our Contributions A clear semantics of model synchronization Four properties An automatic model synchronization approach Using the existing unidirectional ATL byte code program Requiring no extra code Satisfying the four properties A prototype tool for synchronizing EMF models

Our Contributions A clear semantics of model synchronization Four properties An automatic model synchronization approach Using the existing unidirectional ATL byte code program Requiring no extra code Satisfying the four properties A prototype tool for synchronizing EMF models

Our Contributions A clear semantics of model synchronization Four properties An automatic model synchronization approach Using the existing unidirectional ATL byte code program Requiring no extra code Satisfying the four properties A prototype tool for synchronizing EMF models

The ATL Transformation System ATL Program QVT Program Compile ATL Byte-code

Our Contributions A clear semantics of model synchronization Four properties An automatic model synchronization approach Using the existing unidirectional ATL byte code program Requiring no extra code Satisfying the four properties A prototype tool for synchronizing EMF models

The ATL Transformation System ATL Virtual Machine Original Source Models Original Target Models Modified Source Models Modified Target Models ATL Byte-code MetaModels

Our System Original Source Models Modified Source Models Modified Target Models Our System ATL Byte-code MetaModels Synchronized Source Models Synchronized Target Models

Our Contributions A clear semantics of model synchronization Four properties An automatic model synchronization approach Using the existing unidirectional ATL byte code program Requiring no extra code Satisfying the four properties A prototype tool for synchronizing EMF models

Review the example Java!Class UML!Class name = “Book” comment = “_bookTitle cannot be null” UML!Class name = “Book” description = “a demo class” UML!Attribute name = “title” type = “String” Java!Field name = “_title” type = “String” _bookTitle UML!Attribute name = “authors” type = “String” UML!Attribute name = “price” type = “Double” Java!Field name = “_price” type = “Double”

The Synchronized Result Java!Class name = “Book” comment = “_bookTitle cannot be null” UML!Class name = “Book” description = “a demo class” UML!Attribute name = “title” type = “String” bookTitle Java!Field name = “_title” type = “String” _bookTitle UML!Attribute name = “authors” type = “String” UML!Attribute name = “price” type = “Double” Java!Field name = “_price” type = “Double” Java!Field name = “_authors” type = “String”

Our Contributions A clear semantics of model synchronization Four properties An automatic model synchronization approach Using the existing unidirectional ATL byte code program Requiring no extra code Satisfying the four properties A prototype tool for synchronizing EMF models

Content Background and Motivation Outline of our work Details of our work A clear semantics An automated approach A prototype tool

Properties of Synchronization To ensure the synchronization process exhibits reasonable behavior, we need to define clear semantics to model synchronization Our semantics includes four important properties: Stability Preservation Propagation Composibility

Stability If no model is modified, the synchronized models are not modified. UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” Transform UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” Synchronize UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “”

Preservation Modifications on both sides should be kept. UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” Transform UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “persistent” Synchronize UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “persistent”

Propagation The modifications should be propagated to the other side if necessary. UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” Transform UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” publication Synchronize UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” publication publication

Composibility – Step 1 A series of modifications have the same effect regardless of whether is applied once or is applied incrementally UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” Transform UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” publication Synchronize UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” publication publication

Composibility – Step 2 A series of modifications have the same effect regardless of whether is applied once or is applied incrementally UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” publication publication UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “persistent” publication Synchronize UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “persistent” publication publication

Composibility - Composed A series of modifications have the same effect regardless of whether is applied once or is applied incrementally UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “” Transform UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “persistent” publication Synchronize UML!Class name = “book” description = “demo” Java!Class name = “book” comment = “persistent” publication publication

Content Background and Motivation Outline of our work Details of our work A clear semantics An automated approach A prototype tool Conclusion

Backward Modification Propagation To put back modifications from target to source, we need to know which source items are related to a target item Bidirectional ATL Virtual Machine Record trace information when performing the transformation Trace the sources of items Trace how items are transformed

Examples of Tracing to f : Java ! Field ( name <- ’_’ + a.name , type <- a. type ) The f.name is created from a.name by prefixing an underscore When f.name is modified, we modify a.name by removing the prefixed underscore

Propagate Modifications Java!Class name = “Book” comment = “” UML!Class name = “Book” description = “a demo class” I am from here! When I am deleted, delete the source class and all its attributes I am from here! UML!Attribute name = “title” type = “String” When I am changed, find corresponding attribute and set that attribute back Java!Field name = “_title” type = “String” UML!Attribute name = “price” type = “Double” Java!Field name = “_price” type = “Double” I am from here! When I am changed, remove the leading ‘-’ and copy me back!

Synchronization Algorithm Src. Modifications Transform Src0 Tar0 Tar. Modifications Shared Modifications Difference Src1 Tar1 Difference Tagged Src Tagged Tar Backward Propagate Color Inter. Src Inter. Tar Source Merging Supplementray Merging Transform Src2 Tar2

Content Background and Motivation Outline of our work Details of our work A clear semantics An automated approach A prototype tool Conclusion

Implementation A prototype tool Available at: Synchronizing EMF models Using an ATL byte-code program Requiring no extra code Examples LOC Available at: http://www.ipl.t.u-tokyo.ac.jp/~xiong/modelSynchronization.html

Content Background and Motivation Outline of our work Details of our work A clear semantics An automated approach A prototype tool

Ongoing Work

Problem in the ASE work Cannot deal with insertions Lack of well-defined semantics for references My recent study shows that in our ASE work, properties may be violated when there are complex reference operations Synchronization is slow Some applications require instant updating of models EclipseUML Synchronization of document and view in MVC applications Cannot apply to data that is not XMI files Other data includes: XML files, in-memory structures

My Current Work: Objectives Provide a general framework for implementing synchronization applications To support all kinds of modifications To support incremental synchronization Finding out what modification operations should be taken to make models consistent from some initial modification operations To allow users to define new data structures Can easily correspond to a unidirectional imperative program

My Current Work: Approach Provide a framework to allow users to construct execution graphs Execution graphs can be analyzed from imperative programs Execution graphs can be invoked when there are modifications on values

An Execution Graph source int a, b; target int x, y; x = a + 1; y = a + b; a b +1 a+b x y

Forward Transformation b = 2 Mod a = 1 Mod b = 2 +1 a+b x y

Forward Transformation b = 2 Mod a = 1 Mod b = 2 +1 a+b Mod x = 2 Mod y = 2

Incremental Synchronization Mod a = 5 b = 2 +1 a+b x = 2 Mod y = 10

Incremental Synchronization Mod a = 5 Mod b = 5 +1 a+b Mod x = 6 Mod y = 10

The Next Step in My Plan Automatically derive execution graphs from ATL programs