Model Transformation By Demonstration Yu Sun, Jules White, Jeff Gray This work funded in part by NSF CAREER award CCF-0643725. CIS Dept. – University of.

Slides:



Advertisements
Similar presentations
Verification of DSMLs Using Graph Transformation: A Case Study with Alloy Zekai Demirezen 1, Marjan Mernik 1,2, Jeff Gray 1, Barrett Bryant 1 1 Department.
Advertisements

© 2007 ATLAS Nantes 1 Atlas Model Weaver Use Case: Aspect Oriented Modeling Marcos Didonet Del Fabro Atlas Group (INRIA & LINA), Université de Nantes,
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development.
Eugene Syriani Jeff Gray University of Alabama Software Engineering Group Department of Computer Science College of Engineering.
This research is supported by NSF CAREER award CCF A Demonstration-based Approach to Support Live Transformations in a Model Editor Yu SunUniversity.
This research is supported by NSF CAREER award CCF MT-Scribe: A Flexible Tool to Support Model Evolution Yu SunUniversity of Alabama at Birmingham.
Chapter 12: Expert Systems Design Examples
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
PROMPT: Algorithm and Tool for Automated Ontology Merging and Alignment Natalya F. Noy and Mark A. Musen.
Recursion Chapter 7. Chapter 7: Recursion2 Chapter Objectives To understand how to think recursively To learn how to trace a recursive method To learn.
CSC 395 – Software Engineering Lecture 15: Object-Oriented Design –or– Ask For Whom The Data Tolls.
Object-Oriented Development Process Part I: Requirement Gathering Warsun Najib Department of Electrical Engineering Gadjah Mada University.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 2.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
McGill University Proposal Exam School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab Eugene Syriani.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Logic Programming Based Model Transformations An overview of related work.
An Approach and Tool for Synchronous Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Hafsteinn Þór Einarsson Helmut Neukirchen.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Yu SunUniversity of Alabama at Birmingham PAR Works Jeff Gray University of Alabama Montpellier, France July 3rd, 2013 This research is supported.
Yu Sun 1, Zekai Demirezen 1, Marjan Mernik 2, Jeff Gray 1, Barret Bryant 1 1 Department of Computer and Information Sciences, University of Alabama at.
Introduction to MDA (Model Driven Architecture) CYT.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Recursion Chapter 7. Chapter Objectives  To understand how to think recursively  To learn how to trace a recursive method  To learn how to write recursive.
Key Challenges for Modeling Language Creation by Demonstration Hyun Cho, Jeff Gray Department of Computer Science University of Alabama Jules White Bradley.
Se Over the past decade, there has been an increased interest in providing new environments for teaching children about computer programming. This has.
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
Reviewing Recent ICSE Proceedings For:.  Defining and Continuous Checking of Structural Program Dependencies  Automatic Inference of Structural Changes.
Generative Middleware Specializations for Distributed, Real-time and Embedded Systems Institute for Software Integrated Systems Dept of EECS, Vanderbilt.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
11 CORE Architecture Mauro Bruno, Monica Scannapieco, Carlo Vaccari, Giulia Vaste Antonino Virgillito, Diego Zardetto (Istat)
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Black-box Testing.
MD – Object Model Domain eSales Checker Presentation Régis Elling 26 th October 2005.
2007. Software Engineering Laboratory, School of Computer Science S E Web-Harvest Web-Harvest: Open Source Web Data Extraction tool 이재정 Software Engineering.
This research is supported by NSF CAREER award CCF A WYSISYG Approach forConfiguring Model Layout using Model Transformations Yu SunUniversity.
Contact Profile (1/2) Yu Sun, University of Alabama at Birmingham Hyun Cho, University of Alabama Jeff Gray, University of Alabama Jules White, Virginia.
Automated Transformation of Statements Within Evolving Domain Specific Languages Peter Bell CEO/CTO, SystemsForge 7th OOPSLA Workshop on Domain-Specific.
Weaving a Debugging Aspect into Domain-Specific Language Grammars SAC ’05 PSC Track Santa Fe, New Mexico USA March 17, 2005 Hui Wu, Jeff Gray, Marjan Mernik,
1 Model-based Aspect Weaver Construction Suman Roychoudhury Frédéric Jouault Jeff Gray {roychous, jouault, cis.uab.edu This project is supported.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Requirement Engineering Virtusa Training Group 2004 Trainer: Ojitha Kumanayaka Duration : 1 hour.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
Model Transformations Require Formal Semantics Yu Sun 1, Zekai Demirezen 1, Tomaz Lukman 2, Marjan Mernik 3, Jeff Gray 1 1 Department of Computer and Information.
Model Transformation for End-Users
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
Copyright (c) 2006 IBM Corporation; made available under the EPL v1.0 Update Policy ~ Where we are in 3.2.
DS(M)Ls for End-Users and Domain Experts? Panel on Creating DSLs Models in Software Engineering Workshop Zurich, Switzerland June 3, 2012 Jeff Gray University.
Refactoring Agile Development Project. Lecture roadmap Refactoring Some issues to address when coding.
A Model Transformation Approach to Automated Model Construction and Evolution Yuehua Lin Jeff Gray Department of.
Software Engineering – University of Tampere, CS DepartmentJyrki Nummenmaa OBJECT DESIGN Now we need to design in such detail that.
2000 Research Overview Dr. Kim Mens Programming Technology Lab Vrije Universiteit Brussel.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
AUTOMATIC GENERATION OF MODEL TRAVERSALS FROM METAMODEL DEFINITIONS Authors: Tomaž Lukman, Marjan Mernik, Zekai Demirezen, Barrett Bryant, Jeff Gray ACM.
CS223: Software Engineering Lecture 19: Unit Testing.
Software Engineering 2003 Jyrki Nummenmaa 1 OBJECT DESIGN Now we need to design in such detail that the design can be implemented. It will be.
ICS 3UI - Introduction to Computer Science
Algorithms and Problem Solving
Software Processes (a)
Lectures on Network Flows
Daniel Amyot and Jun Biao Yan
Introduction to Problem Solving
Towards Automatic Model Synchronization from Model Transformation
Algorithms and Problem Solving
Test-Driven Ontology Development in Protégé
OBJECT DESIGN Now we need to design in such detail that the design can be implemented. It will be important to know, which structures the programming language.
Presentation transcript:

Model Transformation By Demonstration Yu Sun, Jules White, Jeff Gray This work funded in part by NSF CAREER award CCF CIS Dept. – University of Alabama at Birmingham ISIS - Vanderbilt University MODELS 2009 October 9, 2009 Denver, Colorado, USA

Model Transformation (MT) A core technology in MDE & DSM

Model Transformation (MT) A core technology in MDE & DSM Model Evolution Code Generation Model Mapping Reverse Engineering

Model Transformation Languages (MTLs) MTLs help to automate model transformations QVT Query/View/Transformation C-SAW Constraint-Specification Aspect Weaver ATL ATLAS Transformation Language Popular Model Transformation Languages

Model Transformation Languages NOT Perfect Steep learning curve Deep understanding about Metamodel level definition Understand Metamodel First

Model Transformation Languages NOT Perfect Steep learning curve Deep understanding about Metamodel level definition This is OK for computer scientists, but challenging for general users (e.g., domain experts) who can also contribute to some of the model transformation tasks

Model Transformation By Example (MTBE) An innovative approach to simplify the implementation of model transformations Balogh, Varró. “Model transformation by example using inductive logic programming,” Software and Systems Modeling, Vol. 8, No.3 Wimmer, Strommer, Kargl, Kramler. “Towards model transformation generation by-example,” HICSS 2007 Balogh, Varró. “Model transformation by example using inductive logic programming,” Software and Systems Modeling, Vol. 8, No.3 Wimmer, Strommer, Kargl, Kramler. “Towards model transformation generation by-example,” HICSS 2007

Limitations of MTBE Semi-automatic rules generation Code refinements are needed. Therefore, users are not fully isolated from using the transformation languages. The quality depends on available source and target models Only concept mapping. Cannot handle complex attribute transformation (e.g., arithmetic, string operations) Perfect Source and Target Models Balogh, Varró. “Model transformation by example using inductive logic programming,” Software and Systems Modeling, Vol. 8, No.3 Wimmer, Strommer, Kargl, Kramler. “Towards model transformation generation by-example,” HICSS 2007 Balogh, Varró. “Model transformation by example using inductive logic programming,” Software and Systems Modeling, Vol. 8, No.3 Wimmer, Strommer, Kargl, Kramler. “Towards model transformation generation by-example,” HICSS 2007 Concepts Mapping

Proposed Approach – MTBD Model Transformation By Demonstration 1.Ask users to demonstrate how the model transformation should be done by editing a source model 2.An engine records user operations and infers the transformation pattern 3.Reuse the generated pattern to new model instances

Main Steps in MTBD 1. Demonstration1. Recording 3. Infer Pattern 5. Correctness Checking 4. Reuse Pattern 2. Optimization Initial sequence of recorded operations Pattern Matching Backtracking Algorithm Edit a model instance to demonstrate how the transformation should be done

MTBD Implementation: MT-Scribe GEMS Generic Eclipse Modeling System MT-Scribe is the implementation of the MTBD idea, as realized as a plug-in to GEMS in Eclipse Focus on Endogenous Model Transformation i.e. Transformations within the same domain (metamodel)

Case Study: MazeGame Refactoring TASK: Replace the monster in a room with a weapon, and set the powerValue attribute of the new weapon to be half of the monster.

Step 1. Demonstration & Recording StepOperation 1Select a Monster in a room 3Add a new Weapon 2Delete the Monster 4Set the powerValue of the new Weapon

Step 1. Demonstration & Recording StepOperation TypeDetail 1Delete ElementRoot.MazeFolder.Room2.Monster1 2Add ElementRoot.MazeFolder.Room2 (Weapon1) 3Update ElementRoot.MazeFolder.Room2.Weapon1.powerValue (Root.MazeFolder.Room2.Monster1.powerValue / 2) StepOperation 1Select a Monster in a room 3Add a new Weapon 2Delete the Monster 4Set the powerValue of the new Weapon Recorded as follows

Step. 2 Operation Optimization Eliminate meaningless operations StepOperation 1Add a Monster1 in Room2 2Delete the Gold1 in Room2 3Set the powerValue of Monster1 to be 100 4Connect Room2 and Room9 5Delete Monster1 in Room2 6Connect Room2 and Room10 StepOperation 1Delete the Gold1 in Room2 2Connect Room2 and Room9 3Connect Room2 and Room10

Step. 2 Operation Optimization for each op in the input operation list switch (op.type) case ADD: if the element is never used in the later operations, but is removed by a REMOVE operation later, eliminate both ADD and REMOVE operations. case MODIFY: if the element is used in the later operations, then keep it. traverse the final model instance and search the element being modified if not found then remove op from the list if found then compare the attribute value with the value stored in op if different then remove op from the list … Optimization Algorithm StepOperation 1Add a Monster1 in Room2 2Delete the Gold1 in Room2 3Set the powerValue of Monster1 to be 100 4Connect Room2 and Room9 5Delete Monster1 in Room2 6Connect Room2 and Room10 Alternative Optimization Algorithm Compare the Initial and Final models, and find out the graph differences

Step. 3 Infer Transformation Pattern A transformation pattern includes: Transformation precondition (When and Where) Transformation actions (How) No.Transformation Actions 1Remove elem4 2Add elem5 in elem3 3Set elem5.powerValue = elem4 / 2 Precondition (Elements needed) elem1.elem2.elem3.elem4 elem1.elem2.elem3 (elem5) elem1.elem2.elem3.elem5 Precondition (Elements Type) elem1 – Root elem2 – MazeFolder elem3 – Room elem4 – Monster elem5 – Weapon StepOperation TypeDetail 1Delete ElementRoot.MazeFolder.Room2.Monster1 2Add ElementRoot.MazeFolder.Room2 (Weapon1) 3Update ElementRoot.MazeFolder.Room2.Weapon1.powerValue (Root.MazeFolder.Room2.Monster1.powerValue / 2)

Step. 3 Infer Transformation Pattern The advantages of using a Transformation Pattern: Easy to implement Independent of MTLs Users are completely isolated from MTLs Can be used to generate code Transformation Pattern MTL Rules or Codes

Step. 4 Precondition Matching Traverse the whole model instance and list all elements Start to match the elements in the precondition one by one Backtracking algorithm is used All Elements in the Instance Root.MazeFolder.Room1 Root.MazeFolder.Room1.Gold1 Root.MazeFolder.Room2.Monster1 Root.MazeFolder.Room2.Gold1 Root.MazeFolder.Room3 Root.MazeFolder.Room4.Weapon2 Root.MazeFolder.Room5 Root.MazeFolder.Room6.Weapon3 … Precondition (Elements needed) elem1.elem2.elem3.elem4 elem1.elem2.elem3 (elem5) elem1.elem2.elem3.elem5 Precondition (Elements Type) elem1 – Root elem2 – MazeFolder elem3 – Room elem4 – Monster elem5 – Weapon

Step. 5 Executing Actions & Correctness Checking Once a matching location is found, actions can be executed powerValue of each weapon is also transformed

Step. 5 Executing Actions & Correctness Checking Violation of metamodel definition is possible Logging and undo have been implemented It can be used to support transformation debug

Current Status of MTBD Automatic inference without user refinement Independent of any MTLs Demonstration only relies on proper source models, not target models Handle attribute transformation in a user-friendly manner Support simplifying a number of endogenous MT tasks Model Refactoring Aspect-Oriented Modeling Model Scalability

Current Limitations of MT-Scribe Although fully automatic, the power is limited compared to MTLs Unable to specify rich precondition Precondition (Elements needed) elem1.elem2.elem3.elem4 elem1.elem2.elem3 (elem5) elem1.elem2.elem3.elem5 Precondition (Elements Type) elem1 – Root elem2 – MazeFolder elem3 – Room elem4 – Monster elem5 – Weapon What if we only want to replace the Monster (powerValue > 50)? What if the room must be connected to at least two other rooms?

Current Limitations of MT-Scribe Although fully automatic, the power is limited compared to MTLs Unable to specify rich precondition Unable to express more diverse actions e.g. max(), min() … Unable to express generic actions e.g. Delete all pieces of gold in a room StepOperation …… 3Delete Gold1 4Delete Gold2 …… ???

Potential Solutions To half the powerValue (100) Instead of typing 50, users should type 100 / 2 After the demonstration, let users specify more detailed preconditions (partially implemented) StepOperation TypeDetail 1Delete ElementRoot.MazeFolder.Room2.Monster1 2Add ElementRoot.MazeFolder.Room2 (Weapon1) 3Update ElementRoot.MazeFolder.Room2.Weapon1.powerValue (Root.MazeFolder.Room2.Monster1.powerValue / 2) Monster1.powerValue > 50

Potential Solutions Ask users to identify generic actions (partially implemented) e.g. Remove all pieces of gold in a room We want to enable everything currently not supported in a user-friendly manner, so that users do not have to know any MTLs or metamodel definitions. StepOperation …… 3Delete Gold1 4Delete Gold2 …… Identifying generic actions. Independent of the number of gold. Identifying generic actions. Independent of the number of gold.

Lessons Learned Fully automatic and complete inference is impossible Delete the two pieces of gold in a room = Delete all pieces of gold ? Set powerValue from 50 to 100 = Set powerValue * 2 ? User refinement and feedback are always needed To simplify the process, the refinement should be at the demonstration level (i.e., model instance level), not at the MTL level or metamodel level

Future Works Enable user-centric refinement interface Enable generation of transformation rules in MTLs (e.g., ATL) Implement exogenous model transformation

Questions & Comments ? More examples and video demos available at: Generic Eclipse Modeling System (GEMS) Additional questions: This work funded in part by NSF CAREER award CCF