1 / 85

Automatic Effective Model Discovery

Automatic Effective Model Discovery. Sagar Sen Thesis Director: Jean-Marc Jézéquel Thesis Supervisor: Benoit Baudry Co-supervisor : Hans Vangheluwe. DOMINO. There are many mansions in the mind of a scientist. Nikola Tesla (Inventor). Experiments. Laws of Science . Instruments.

krysta
Télécharger la présentation

Automatic Effective Model Discovery

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Automatic Effective Model Discovery Sagar Sen Thesis Director: Jean-Marc Jézéquel Thesis Supervisor: Benoit Baudry Co-supervisor : Hans Vangheluwe DOMINO

  2. There are many mansions in the mind of a scientist Nikola Tesla (Inventor)

  3. Experiments Laws of Science Instruments design Model of the Electric Motor

  4. The notion of effectiveness Models : Are simplified abstract views of complex reality Effective Models: Models that serve a purpose or satisfy an objective. It is created based on knowledge from heterogeneous sources.

  5. Tesla Electric Motor An effective model to predict and invent DNA Molecule An effective model discovered in nature

  6. Effective Models in Software Effective Model of Phone Behavior used by millions

  7. An effective model is a product of mental tacit and manual work Can we automate discovery of effective models? In the context of Software Systems

  8. Outline • Context and Problem • The Solution • Model Discovery • Product Discovery • Conclusion • Future Work

  9. Model-driven Engineering (MDE) of Software Systems “ • Modelling Domain Specification • (A “Blueprint” : Concepts with Properties allowed in a set of models) • Modelling Domain Phone Behavior Model • Models are first-class artifacts in MDE

  10. Example Modelling Domain • Metamodel (a blueprint) of Finite State Machines Set of all Finite State Machines

  11. Automatic Effective Model DiscoveryThe Problem

  12. Modelling Domain specification

  13. Source 1 Source 2 … Source N Heterogeneous sources of knowledge may guide discovery

  14. ? ? ReliableSources? Source 1 Source 2 … Source N Effective Modelling Domain Effective Models Discovery Mechanism?

  15. Outline • Context and Problem • The Solution • Model Discovery • Product Discovery • Conclusion • Future Work

  16. Conceptual Solution Modelling Domain specification Source 1 Source 2 … Source N defines Effective Modelling Domain specification Transform Constraint Satisfaction Problem (CSP)

  17. Conceptual Solution Source 1 Source 2 … Source N Modelling Domain specification Effective Modelling Domain Constraint Satisfaction Problem Solve

  18. Main Challenges Heterogeneous sources of knowledge are expressed in different languages. How can we transform them to a single constraint satisfaction problem? Knowledge is expressed on sets of objects in a model called meta-constraints. Eg. There must be at least one Final State in the set of all States in a Finite State Machine. How can we resolve such meta-constraints? 3. Models can be of infinite size! How do we control the generation of finite sized models?

  19. Technical Solution UML OCL Language Lx conforms to Class Diagram Modelling Domain specification Model Mx Invariants … Transformation CSP as Alloy Model

  20. Why Alloy ? CSP as Alloy Model Sets of concepts/classes with properties can be modeled as Alloy signatures with fields in an Alloy model A. Meta-constraints on the concepts in A can be modeled as Alloy facts and predicates (based on first-order relational logic with quantifiers) Alloy model A can be solved in a finite scope to give solution instances.

  21. Concrete Realization of Solution Modelling Domain Specification Feature Diagram Metamodel Effective Model Discovery in any Modelling Language Effective Product Discovery in the Variability Domain of a Software Product

  22. Outline • Context and Problem • The Solution • Model Discovery • Product Discovery • Conclusion • Future Work

  23. Model Discovery in the domain of a Modelling Language • Metamodel MM How to discovereffective models for a given objective? Set of Valid Models in a Modelling Language

  24. Effective Model Discovery Objectives in this Thesis Objective 1: Test model discovery for detect bugs in model transformations Objective 2: Partial Model Completion in Model Editors

  25. Motivating Example • Output metamodel • MM_out • Input metamodel MM_in Model Transformation (MT) Examples Input Models Output Models UML2RDBMS (For Object Persistence) Adding a friend on FB (Change in Social Graph)

  26. Motivating Example Model Transformation (MT) There may be BUGS in the transformation MT! Input Models Output Models

  27. Motivating Example Model Transformation (MT) Input Models Can we discover the Effective Modelling Domain and Effective TEST Models that detect these bugs? Output Models

  28. What is the effective modelling domain for testing a transformation?

  29. Heterogeneous Sources of Knowledge define the Effective Modelling Domain MM_in Input Models

  30. Heterogeneous Sources of Knowledge define the Effective Modelling Domain Required Types and Properties MM_in Input Models

  31. Heterogeneous Sources of Knowledge define the Effective Modelling Domain Invariants Ion MM (OCL) Required Types and Properties MM_in Input Models

  32. Heterogeneous Sources of Knowledge define the Effective Modelling Domain MT Pre Input Domain Invariants Ion MM (OCL) Required Types and Properties Pre-condition pre MM_in Input Models

  33. Heterogeneous Sources of Knowledge define the Effective Modelling Domain MT Pre Input Domain Invariants Ion MM (OCL) Required Types and Properties Test Knowledge Model fragments F Pre-condition pre MM_in Test Models Input Models

  34. Automatic test model discovery : The Approach

  35. Running Example :UML2RDBMS Transformation UML2RDBMS Pre Post UML Class Diagram Models RDBMS Models Bezivin, J., Rumpe, B., Schurr, A., Tratt, L.: Model transformations in practice workshop, october 3rd 2005, part of models 2005. In: Proceedings of MoDELS. (2005)

  36. Test Model Discovery : The Approach MT Pre Required Types and Properties T_req, P_req Invariants I on MM_in (OCL) Test Knowledge as set of model fragments F Input meta-model MM_in Pre-condition pre 1.Metamodel Pruning 3. OCL2Alloy (Manual/Automatic) 4. MF2Alloy Effective metamodel eMM_in 2. MM2Alloy Alloy Model

  37. Metamodel Pruning : The Process Class Diagrams Input meta-model MM_in All UML Models 1.Metamodel Pruning Effective metamodel eMM_in static analysis MT (UML2RDBMS)

  38. Metamodel Pruning : The Results Required types and properties and their obligatory dependencies are preserved. All instances of effective MM are instances of input MM Effective MM is a super type and a subset of of MM_in. This implies that all operations on eMM_in are valid for MM_in subsetOf superTypeOf UML Class Diagram Subset

  39. Test Model Discovery : The Approach MT Pre Required Types and Properties T_req, P_req Invariants I on MM_in (OCL) Test Knowledge as set of model fragments F Input meta-model MM_in Pre-condition pre 1.Metamodel Pruning 3. OCL2Alloy (Manual/Automatic) 4. MF2Alloy Effective metamodel eMM_in 2. MM2Alloy Alloy Model

  40. Why MM2Alloy ? StructuralSimilarity Alloy signatures specify “sets of atoms” and Alloy fields, facts, and predicate specify allowed “relations between atoms” meta-level similarity Metamodelclasses specify a “Set of Objects with Properties” instance-level similarity Object and Properties Atoms and Relations

  41. What aspects to transform by MM2Alloy? Meta-metamodel (Eg. Ecore is an industrial standard) specified by Meta-metamodelling language expressed in Metamodel MM

  42. MM2Alloy : Bridging the Semantic Gap Bird’s Eye view of the meta-metamodel Ecore that specifies the set of all metamodels

  43. MM2Alloy : Bridging the Semantic Gap (abstract-)Class and Properties to Alloy Signatures and Fields We zoom into the concept of Classes and Properties (Attributes and References)

  44. MM2Alloy : Bridging the Semantic Gap Flattening Multiple Inheritance to Single Inheritance in Alloy We zoom into the concept of multiple inheritance

  45. MM2Alloy : Bridging the Semantic Gap Opposite, Multiplicity of , Composite Properties to Alloy Facts Zoom into characteristics of properties

  46. Example Transformations to Alloy

  47. Transformation to Alloy (1) Transformed to an Alloy Signature abstract sig Classifier { name : String } Transformed to an Alloy Signature sig Class extends Classifier { is_persistent: one Bool, parent : lone Class, attrs : some Attribute } Lets take the Classifier concept from the UML Class Diagram meta-model Lets take the Class concept concept that inherits from Classifier UML Class Diagram Subset

  48. Transformation to Alloy (2) • Implicit Constraints to Facts Containment is transformed to an Alloy fact fact Association_containers { (all o : Association |o in ClassModel.association) }

  49. MM2Alloy : Bridging the Semantic Gap Multiple Containers to Alloy Facts Containment is transformed to an Alloy fact factTypeVariableBinding_containers { (all o1,o2,o3 :TypeVariableBinding| (o1 inParameterizedType.typeParamBinding and o2 in ParameterizedType.virtualTypeBinding and o3 in VirtualType.typeParameterBinding ) and disj[o1,o2,o3] } Example fromKermeta Type System MM to illustrate multiple containers

  50. Test Model Discovery : The Approach MT Pre Required Types and Properties T_req, P_req Invariants I on MM_in (OCL) Test Knowledge as set of model fragments F Input meta-model MM_in Pre-condition pre 1.Metamodel Pruning 3. OCL2Alloy (Manual/Automatic) 4. MF2Alloy Effective metamodel eMM_in 2. MM2Alloy Alloy Model

More Related