Assisting Domain Modeling   with Formal Analysis                    Juan Cadavid                   Benoit Baudry          ...
Domain Models•   A conceptual    model of a    system which    describes the    various    entities    involved in that   ...
Typical Domain   Modeling            Domain Model          Raw Modeling Space      3
Typical Domain     Modeling                     Incorrect                     InstancesThere is an intention not expressed...
Precise Domain   Modeling          Limit the          number of          solutions to find          the precise          mo...
Precise Domain           Modeling            OCL                        • Write constraints                          along...
Example: Metamodeling   Feature Models                   A               B       B          7
Example: Metamodeling   Feature Models                               A                           B       B     Two feature...
Example: Metamodeling   Feature Models          8
Example: Metamodeling   Feature Models       There cannot be mutual     exclusivity between a parent       feature and its...
Example: Metamodeling   Feature Models                A                    B          9
Example: Metamodeling   Feature Models                           A                               B       The or operator  ...
Precise Domain           Modeling                         • A given set of            OCL                           constr...
Exploring the ModelingSpace: Generating Instances                                     Kermeta2Alloy                  Metam...
Pramana Architecture         12
Challenges with         Pramana• Robustness/Enough testing• Alloy limitations  • Small scope  • Integer numbers• Maximize ...
Understanding the use    of OCL (1)• Study of 519 invariants from three OMG  specifications: UML, OCL and CORBA  Component ...
Understanding the use    of OCL (1I)• 88% of invariants were written with 36%  of the OCL language.• Most invariants are d...
Automatic Invariant      Derivation (I)•   Prototype to match patterns from Catalog•   Input: Metamodel, correct instances...
Automatic Invariant  Derivation (II)            Pattern 1   Pattern 2 Pattern n            Ecore+OCL   Ecore+OCL    Ecore+...
Strategies for Mining       patterns• Strings -> bio-inspired computing,  bioinformatics• Graphs -> graph grammars, mining...
Algorithms•   We need:    •   Match existing patterns (from a predefined catalog)    •   Find new patterns (mining correct/...
ProtocolList<OclExpression> mineInvs(List<Object> goodInst,List<Object> badInst){    #Encode instances    #Match with exis...
Upcoming SlideShare
Loading in …5
×

Point GEODES

237 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
237
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Point GEODES

    1. 1. Assisting Domain Modeling with Formal Analysis Juan Cadavid Benoit Baudry Jean-Marc Jézéquel INRIA Bretagne - Atlantique, team Triskell 1
    2. 2. Domain Models• A conceptual model of a system which describes the various entities involved in that system and their relationships. Domain Model for Insurance 2
    3. 3. Typical Domain Modeling Domain Model Raw Modeling Space 3
    4. 4. Typical Domain Modeling Incorrect InstancesThere is an intention not expressed by the metamodel on its own. 4
    5. 5. Precise Domain Modeling Limit the number of solutions to find the precise modeling space 5
    6. 6. Precise Domain Modeling OCL • Write constraints along with the domain model.OCL OCL • The most popular language is OCL OCL (Object Constraint OCL Language) 6
    7. 7. Example: Metamodeling Feature Models A B B 7
    8. 8. Example: Metamodeling Feature Models A B B Two features cannot have the same name 7
    9. 9. Example: Metamodeling Feature Models 8
    10. 10. Example: Metamodeling Feature Models There cannot be mutual exclusivity between a parent feature and its children. 8
    11. 11. Example: Metamodeling Feature Models A B 9
    12. 12. Example: Metamodeling Feature Models A B The or operator must have at least two operands 9
    13. 13. Precise Domain Modeling • A given set of OCL constraints could include bad instances, and leaveOCL out good instances. OCL • How to find the good set of OCL OCL constraints that correctly describes the modeling space? 10
    14. 14. Exploring the ModelingSpace: Generating Instances Kermeta2Alloy Metamodel Metamodel in Ecore in AlloyPramana:Generates conforms to AlloySolutionMetamodelInstances using Solution2xmi Instances InstancesAlloy in XMI in Alloy XML 11
    15. 15. Pramana Architecture 12
    16. 16. Challenges with Pramana• Robustness/Enough testing• Alloy limitations • Small scope • Integer numbers• Maximize distance between metamodel instances• OCL2Alloy: A difficult transformation 13
    17. 17. Understanding the use of OCL (1)• Study of 519 invariants from three OMG specifications: UML, OCL and CORBA Component Model• Definition of Metrics • Size of Metamodel • Invariant complexity w.r.t. the metamodel • Invariant complexity w.r.t to OCL 14
    18. 18. Understanding the use of OCL (1I)• 88% of invariants were written with 36% of the OCL language.• Most invariants are defined over two or less domain elements (i.e. class attributes)• Result: Catalog of recurring patterns in OCL invariants. 15
    19. 19. Automatic Invariant Derivation (I)• Prototype to match patterns from Catalog• Input: Metamodel, correct instances and incorrect instances.• Matching instances marked as incorrect by the user • Incorrect motifs • Derive OCL invariant from template• Test derived instances marked as correct by the user 16
    20. 20. Automatic Invariant Derivation (II) Pattern 1 Pattern 2 Pattern n Ecore+OCL Ecore+OCL Ecore+OCLMetamodel Automatic Metamodel Correct Invariant + OCLInstances DerivationIncorrectInstances 17
    21. 21. Strategies for Mining patterns• Strings -> bio-inspired computing, bioinformatics• Graphs -> graph grammars, mining graph bases• Relational -> R, data mining algorithms
    22. 22. Algorithms• We need: • Match existing patterns (from a predefined catalog) • Find new patterns (mining correct/incorrect instances)• We could get them from: • Bio-inspired computing, bioinformatics • Graph grammars: structure learning, PEGG • Relational data-mining • Inductive-Logic programming
    23. 23. ProtocolList<OclExpression> mineInvs(List<Object> goodInst,List<Object> badInst){ #Encode instances #Match with existing patterns from catalog #Find new patterns}

    ×