Meta-model Pruning Sagar Sen, Naouel Moha, Benoit Baudry, Jean-Marc Jézéquel Equipe TRISKELL, INRIA Rennes Bretagne-Atlantique October 3-9, MODELS 2009.

Slides:



Advertisements
Similar presentations
1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 11 Brief introduction to the UML Specification (Based on UML Superstructure.
Advertisements

Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel.
Automated Test Design ™ © 2011 Conformiq, Inc. CONFORMIQ DESIGNER On ES v1.2.1 Stephan Schulz MBT Working Meeting/MTS#56, Göttingen.
Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
CS 340 UML Class Diagrams. A model is an abstraction of a system, specifying the modeled system from a certain viewpoint and at a certain level of abstraction.
Formalizing Material Flow Diagrams Robert-Jan Bijl.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
1 SWE Introduction to Software Engineering Lecture 5.
Normalization I.
Comparing M2T & M2M Complementary Approaches © 2008 INRIA, University of York & SINTEF Comparing M2T & M2M Complementary Approaches Hugo Bruneliere,
1 Ivano Malavolta, University of L’aquila, Computer Science Department Ivano Malavolta DUALLy: an Eclipse platform for architectural languages interoperability.
® Eurostep.ESUKPC v0.1©Copyright Eurostep Limited An Introduction to ISO STEP Part 25 David Price.
An Information Theory based Modeling of DSMLs Zekai Demirezen 1, Barrett Bryant 1, Murat M. Tanik 2 1 Department of Computer and Information Sciences,
A Survey of Software Refactoring Tom Mens, Tom Tourwé
UML2 Package Merge Usage scenarios and their effect on XMI and Java API interoperability Bran Selic, Jim Amsden, Kenn Hussey Oct, 2003.
An Introduction to Software Architecture
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
METACASE. WHAT THIS PRESENTATION IS ABOUT  What’s META MODELING?  What’s METACASE?  METAEDIT+ 5.1 EVALUTION PROGRAM  Diagram and its kinds.
Copyright © 2009 AtlanMod. All Rights Reserved Frédéric Jouault & Hugo Bruneliere AtlanMod team (INRIA & Mines de Nantes) Possible Benefits of Bridging.
Object Management Group (OMG) Specifies open standards for every aspect of distributed computing Multiplatform Model Driven Architecture (MDA)
Class Diagrams with Constraints Philippe Nguyen McGill University COMP-762 Winter 2005.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Verification and Validation in the Context of Domain-Specific Modelling Janne Merilinna.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Class Diagrams Identifying and representing Classes Object Web, Bapayya Choudhary Maganti.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
1 Structuring Systems Requirements Use Case Description and Diagrams.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
Week III  Recap from Last Week Review Classes Review Domain Model for EU-Bid & EU-Lease Aggregation Example (Reservation) Attribute Properties.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Murielle Florins 1, Francisco Montero Simarro 2, Jean Vanderdonckt 1, Benjamin Michotte 1 1 Université catholique de Louvain 2 Universidad de Castilla-la-Mancha.
Modeling the ODP Computational Viewpoint with UML 2.0: The Templeman Library Example José Raúl Romero, Antonio Vallecillo Universidad de Málaga, Spain.
All Presentation Material Copyright Eurostep Group AB ® A Meta-model of EXPRESS in UML for MOF and UML to EXPRESS David Price April 2002.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
UML Profile BY RAEF MOUSHEIMISH. Background Model is a description of system or part of a system using well- defined language. Model is a description.
Overview of meta-modeling works for multi-clocked environments Christian Brunette IRISA/INRIA Rennes – ESPRESSO Synchron 2005.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
® IBM Software Group A Metamodeling Approach to Pattern Specification Maged Elaasar 1,2, Dr. Lionel Briand 1, Dr. Yvan Labiche 1 1 Carleton University,
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
GME-MOF: The MOF-Based GME Metamodeling Environment Matt Emerson 10/24/2004 Advisor: Dr. Janos Sztipanovits OOPSLA 2004 Domain-Specific Modeling Workshop.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
A UML-Based Pattern Specification Technique Presented by Chin-Yi Tsai IEEE TRANSACTION ON SOFTWARE ENGINEERING, VOL. 30, NO. 3, MARCH 2004 Robert B. France,
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
On Combining Multi-formalism Knowledge to Select Models for Model Transformation Testing Sagar Sen (1 st year PhD student), Benoit Baudry, Jean-Marie Mottu.
© 2016 Zeligsoft Improving embedded software development productivity Papyrus for RealTime - Executable modeling on Eclipse Charles Rivet Senior Product.
 Construction and Validation of Effective Modelling Domains A Thesis Outline Sagar Sen November 6, 2009.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
M&CML: A Monitoring & Control Specification Modeling Language
Logical Database Design and the Rational Model
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Copyright © 2014 Hassan Gomaa and Robert Pettit
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Variability-based model transformation
Introduction to Unified Modeling Language (UML)
Week 4 Object-Oriented Programming (1): Inheritance
Daniel Amyot and Jun Biao Yan
Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel
Domain Class Diagram Chapter 4 Part 2 pp
MSIS 670 Object-Oriented Software Engineering
Software Construction Lecture 2
An Introduction to Software Architecture
Rational Rose 2000 Instructor Notes Use Case Realization Structure
Tools for ODP – an MDA approach
Software Architecture & Design
Presentation transcript:

Meta-model Pruning Sagar Sen, Naouel Moha, Benoit Baudry, Jean-Marc Jézéquel Equipe TRISKELL, INRIA Rennes Bretagne-Atlantique October 3-9, MODELS 2009 Denver Colorado 1

Outline Where do large meta-models come from? Why a need to extract subsets of large meta-models ? How to prune a meta-model to obtain subsets called effective meta-models ? What are the type properties of effective meta-models ? Illustrative Case Study : French Space Agency Transformation Input Meta-model Conclusion 2

Where do large meta-models come from? A widely used large meta-model is that of a General Purpose Modelling Language such as the UML 3

Why is the UML meta-model large? (1) About 389 official participating stakeholders… Member Space Contribute to / use… 4

Why is the UML meta-model large? (2) Tool Space Editors: Topcased, StarUML, ArgoUML… Code generators: Acceleo, BOUML, Eclipse.. Transformation Tech: Kermeta EMF ATL … Conform to & Use 5

UML is growing to address domain-specific needs… Domain specific needs have led to the extension of UML to UML Profiles… UML Testing Profile Real-time Embedded Systems Service Modelling Distributed Objects 6

Complexity of UML Very large meta-model spec. : 246 Classes, 583 properties Too large and complex to learn and adopt… Source: Wikipedia on UML Not conducive to application of formal methods… Infact, many tools need and use only a small subset of UML ! 7

Outline Where do large meta-models come from? Why a need to extract subsets of large meta-models ? How to prune a meta-model to obtain subsets called effective meta-models ? What are the type properties of effective meta-models ? Illustrative Case Study : French Space Agency Transformation Input Meta-model Conclusion 8

Scenario 1: Why need subsets? UML in Software Process Rational Unified Process Analysis Model Design Model Design Model Use Case Model Use Case Model Depl. Model Depl. Model Impl. Model Impl. Model Test Model Test Model 9

Scenario 1: RUP models via UML UML Diagrams Analysis Model Design Model Design Model Class Diagram Component Diagram Use Case Diagram Sequence Diagram Collaboration Diagram Statechart Diagram Use Case Model Use Case Model Depl. Model Depl. Model Impl. Model Impl. Model Test Model Test Model Activity Diagram 10

Scenario 1: RUP models via UML UML Diagrams Analysis Model Design Model Design Model Class Diagram Component Diagram Use Case Diagram Sequence Diagram Collaboration Diagram Statechart Diagram Use Case Model Use Case Model Depl. Model Depl. Model Impl. Model Impl. Model Test Model Test Model Activity Diagram 11

Scenario 2: Why need subsets? Chain of Model Transformations MT1 MT2 output domain conforms to input domain conforms to Large Meta-model Eg: UML Are outputs of MT1 valid inputs for MT2? Do the models use the same concepts? We need to compare subsets first. 12

Scenario 3 Existence of hand-made subsets of UML Executable UML Google search : “UML subset“ You will find at least 1,450 hits (done on Sept. 17,2009) screaming out the use of UML subsets… UML subset for FPGA UML subset for Model-based Testing Model checking for executable UML subset ICONIX Process: A Core UML subset and many more… 13

Outline Where do large meta-models come from? Why extract subsets of large meta-models ? How to prune a meta-model to obtain subsets called effective meta-models ? What are the type properties of effective meta-models ? Illustrative Case Study : French Space Agency Transformation Input Meta-model Conclusion 14

Prune based on required concepts Effective Meta-model 1. Large Meta-model INPUT OUTPUT MM MM e Meta-model Pruner 2. Initial Required Types (Classes, Enumerations, Primitives) T initial 3. Initial Required Properties P initial 15 Where does this come from? Static Analysis of a Model Transformation or Manually Specified

Pruning controlled by options Effective Meta-model 1. Large Meta-model INPUT OUTPUT MM MM e Meta-model Pruner 2. Initial Required Types (Classes, Enumerations, Primitives) T initial 3. Initial Required Properties P initial OPTIONS 16

Meta-model Pruning Internals Meta-model Pruner So, what is pruned? 17

Meta-model Pruning 1.Rules to find set of required types (classes, enumerations, primitives) 2. Rules to find set of required properties 3. Optional rules to add additional types/properties 4. Repeat 1,2,3 until rules cannot be applied anymore Lets look at some of these rules… 18

Meta-model Pruning Couple of rules to conserve types… 19

Finding Required Types Rule: Conserve Initial Required Class Class i Conserve in T initial  T req Class i T req +, ifClass i 20

Finding Required Types Rule: Conserve All Super Classes of Required Class Conserve  T req SuperClass i T req + Class i SuperClass a SuperClass d SuperClass b SuperClass c, ifClass i SuperClass i is derived from 21

Meta-model Pruning Couple of rules to conserve properties… 22

Finding Required Properties Rule: Conserve Property of Required Type Class i if property.type = Class j in Conserve Class j property[0, b] opposite P req  property + P req  opposite + T req 23

Finding Required Properties Rule: Conserve Multiplicity Property Class i attribute: PrimitiveType[>0, a ] if property.lower > 0 and Class i in T req, Conserve Class j reference [>0, b] opposite P req  property + P req  opposite + 24  T req Class j T req +

Meta-model Pruning A rule to illustrate options… 25

Optional Rule: Conserve Zero Multiplicity Property Class i if property.lower == 0 and property.type.isInstanceOf(Class), Conserve Class j property[0, b] opposite P req  property + P req  opposite + Need not be Required Class 26

Meta-model Pruning Apply rules (about 16) until no rule can be applied anymore… 27

Meta-model Pruning Remove types and properties not conserved… 28

Meta-model Pruning Implementation Meta-model Pruner  Implemented in Kermeta (  Conforms to the EMF Ecore file format for input  Download at: 29

Outline Where do large meta-models come from? Why extract subsets of large meta-models ? How to prune a meta-model to obtain subsets called effective meta-models ? What are the type properties of an effective meta- model ? Illustrative Case Study : French Space Agency Transformation Input Meta-model Conclusion 30

Model Typing Meta-model MM e Meta-model MM Does the effective meta-model MM e match the large meta-model MM ?  Meta-model MM e matches another meta-model MM iff for each class C in MM, there is one and only one corresponding class C’ in MM e  Set of rules guarantees a subtype relationship btw the two MMs [Steel 07, SoSyM]  If transformation T works for MM, and if MM e is a model subtype of MM, then T works with MM e 0..1 aCTwo 0..1 aC2 matches ?

What are properties of an effective meta-model? We verify that an effective meta-model is super-type of the large meta-model using model typing. This implies all transformations written for the effective meta-model are also valid for the large meta-model All instances (models) of the effective meta-model are also instances of the large meta-model. The instances are compatible with the large meta-model because we preserve concept names. The effective meta-model can live its own life much like a DSML! 32

Outline Where do large meta-models come from? Why extract subsets of large meta-models ? How to prune a meta-model to obtain subsets called effective meta-models ? What are the type properties of an effective meta-model ? Illustrative Case Study : French Space Agency Transformation Input Meta-model Conclusion 33

French Space Agency Transformation Case Study Transformation for generation embedded system code from a subset of UML Activity Diagrams Transformation analysis : Gives a set of required classes and properties in the UML Meta-model pruning: Gives an output effective meta-model which is a super type and subset of UML. 34

Set of Required Classes in UML (Total = 10) ActivityEdge ActivityNode ControlFlow OpaqueExpression DecisionNode InitialNode ReadStructuralFeatureAction AcceptEventAction ActivityFinalNode CallOperationAction 35

Effective UML for Case Study Bird’s Eye View CallOperationAction Operation 1..1 operation Using Conserve Property Multiplicity Rule 36

Effective UML for Case Study Bird’s Eye View Using Conserve All Super Classes of Required Class 37

Observations 1. A significant reduction in size of the input meta-model for the transformation: 31 Classes and 15 Properties Vs. 246 Classes and 583 Properties 2. We obtain the subset of UML that is truly transformed. This minimizes errors in model construction. 3. The Effective UML meta-model is a super type of UML. (We verify this in the impl.) 4. All instances of operations of the effective UML meta-model are compatible with UML itself. 38

Outline Where do large meta-models come from? Why extract subsets of large meta-models ? How to prune a meta-model to obtain subsets called effective meta-models ? What are the type properties of effective meta-models ? Illustrative Case Study : French Space Agency Transformation Input Meta-model Conclusion 39

Conclusion We present an important problem associated with using large meta- models such as the UML We show how to work around the problem by extracting a smaller effective meta-model via meta-model pruning. We show that that the effective meta-model is a super type of the original large meta-model. All instances and operations of the effective meta-model are backward compatible with the large meta-model. We demonstrate our approach to obtain the effective meta-model on an industrial case study. Often, there is a significant difference in sizes of the effective and the original large meta-model! 40

Future Work Atomic pruning operators that generate super-types of input meta- model Any sequence of these operators lead to a super-type by construction. Thanks to transitivity. For now, we verify that the result is a super-type using model typing. Meta-model pruning demonstrates the possibility for a whole family of algorithms. Ours is just an example. A new pruning operator could possibly deal with flattening the meta- model inheritance hierarchy 41

Thank You! 42

Annexe : Model Typing 43

Model Typing : Type properties of MM e matches ? context Class def: localMatchFor ( c : Class ) : Boolean = not c.isAbstract implies not self.isAbstract and c.ownedProperty -> forAll ( p | self.ownedProperty -> exists ( p2 | p2.localMatchFor (p) ) ) and c.ownedOperation -> forAll ( o | self.ownedOperation -> exists ( o2 | o2.localMatchFor (o) ) ) 0..1 aC aCTwo Does the effective meta-model MM e match the large meta-model MM ? These matching rules for model types are defined in [Steel 05, MODELS] 44

context Property def: localMatchFor ( p : Property ) : Boolean = self.name = p.name and self.multiplicityMatchFor(p) and not p.isReadOnly implies not self.isReadOnly and self.isComposite = p.isComposite and not p.opposite -> isOclUndefined implies not self.opposite -> isOclUndefined and ( self.opposite.name = p.opposite.name ) Model Typing matches ? 0..1 aC2 aCTwo Does the effective meta-model MM e match the large meta-model MM ? 45

context MultiplicityElement def : multiplicityMatchFor ( m : MultiplicityElement ) : Boolean = (m.upper = 1) implies (self.upper = 1) and self.upper <= m.upper and self.lower >= m.lower and m.isOrdered implies self.isOrdered and self.isUnique = m.isUnique Model Typing matches ? Does the effective meta-model MM e match the large meta-model MM ? 46