1 / 60

Efficient Methods for Solving Finite Satisfiability Problems in UML Class Diagrams

Efficient Methods for Solving Finite Satisfiability Problems in UML Class Diagrams. Mira Balaban and Azzam Maraee. Motivation. What’s wrong with this ontology * ?. [Enzyme]  [Protein] . [Protein]  [Chemical].  [ Chemical]  [Reaction] . [Reaction] < [Enzyme].

meryl
Download Presentation

Efficient Methods for Solving Finite Satisfiability Problems in UML Class Diagrams

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. Efficient Methods for Solving Finite Satisfiability Problems in UML Class Diagrams Mira Balaban and Azzam Maraee

  2. Motivation What’s wrong with this ontology* ? [Enzyme]  [Protein]  [Protein]  [Chemical]  [Chemical] [Reaction]  [Reaction] < [Enzyme] [Enzyme] < [Enzyme] *Consistency Checking of Semantic Web OntologiesKenneth Baclawski, Mieczyslaw M. Kokar, Richard Waldinger, Paul A. Kogut

  3. Agenda • Background • Reasoning Problems • Previous works • Research Contribution • Conclusions and Future Work

  4. UML • UML is now widely accepted as the standard modeling language for software construction. • UML 2.0 updates came from 54 companies. • Class diagrams are widely used • software and language. • specification, database. • ontology engineering

  5. Class Diagram: Cardinality Constraint and Class Hierarchy • Class: Advisor and University • Association: Employment • Cardinality Constraint • Class Hierarchy 1..* 1 Legal Instance:

  6. Class Diagram: Generalization Set Concept 1..* 1 {overlapping,incomplete} {disjoint, complete} {overlapping, complete} {disjoint, incomplete}

  7. Agenda • Background • Reasoning Problems • Previous works • Research Contribution • Finite Satisfiability Method: • Class Hierarchy and Generalization Set Constraints • Conclusions and Future Work

  8. Reasoning Problems (1):Inconsistency • Emptiness disjoint

  9. Reasoning Problems (2):Infinity Problem (1) • Consider the pervious example:

  10. Infinity Problem (2)

  11. Relevance of Reasoning • It is important to guarantee that models provide a reliable support for the designed systems. • Implementability : A class diagram is implemented into a running system. • Project cost: Early detection of problems. • Used with MDA: Precise and consistent enough to be used within MDA.

  12. Reasoning Needs (2) • Current case tools do not support reasoning tasks. • Need for powerful CASE tools • with reasoning capabilities.

  13. rest of the diagram Consistency notions (1) • Berardi et al (2005), distinguish two cases: • Consistency of class diagram – has an instantiation with at-leastone non-empty class extension. • Class consistency – there is an instantiation in which the class extension is non-empty. Consistent The whole class diagram is consistent

  14. Consistency notions (2) • All class consistency of a class diagram – every class is consistent. • Full consistency of a class diagram – has an instance in which all class extensions are non-empty.

  15. Finite satisfiability notions • All class finite satisfiability of a class diagram – every class there is a finite instance in which the class extension is non-empty (strong satisfiability, Lenzerini and Nobili, 1990). • Finite satisfiability of a class diagram – it has a finite instance in which all class extensions are non-empty. Lenzerini & Nobili 92 Research Contribution UML Class Diagram

  16. Agenda • Background • Reasoning Problems • Previous works • Research Contribution • Finite Satisfiability Method. • Class Hierarchy and Generalization Set Constraints • Conclusions and Future Work

  17. Testing Finite Satisfiability • Lenzerini and Nobili (92): • ER diagrams without class hierarchy. • Calvanese and Lenzerini (94): • Extend with class hierarchy.

  18. min2, max2 min1, max1 Lenzerini and Nobily (92). Method: • Transform cardinality constraints into an inequalities system. • Solve the system. Result: The diagram is finitely satisfiable iff the inequalities system has a solution. r≥min1∙a , r≤max1∙a ,r≥min2∙b , r≤max2∙b, a, b, r>0

  19. Example 1 depend Reaction 2

  20. Example 1 depend Reaction 2

  21. Calvanese and Lenzerini (94) – Extension with class hierarchies (1) • Calvanese and Lenzerini extend the method of Lenzerini and Nobily (92) to apply to schemata with class hierarchy. • The expansion is based on the assumption that class extensions may overlap. • Compound Class. • Compound relationship:

  22. Calvanese and Lenzerini (94) – Extension with class hierarchies (2) Advisor,Master_Student Advisor,PhD_Student Advisor,Master_Student, PhD Advisor

  23. Calvanese and Lenzerini (94) – Extension with class hierarchies (3) Advisor, Master, Ph.D Advisor, PhD Advisor Advisor, Master Advisor,Master , Ph.D Advisor: Master

  24. Calvanese and Lenzerini (94) – Extension with class hierarchies (2) • For a class diagram with three classes and one association: 12 variables and 26 inequalities • An exponential number of variables.

  25. Hardness of Finite Satisfiability • Berardi et al (2005) showed : • Lutz et al (2005) showed: ?

  26. Agenda • Background • Reasoning Problems • Previous works • Research Contribution • Finite Satisfiability Method • Conclusions and Future Work

  27. Splitting the Problem • Presents of Constraints: • Without • With • Hierarchy Structure: • Tree Structure. • Acyclic Structure. • Graph Structure.

  28. Splitting the Problem : Hierarchy Structure • Tree Structure.

  29. Splitting the Problem: Hierarchy Structure • Tree Structure. • Acyclic Structure.

  30. Splitting the Problem: Hierarchy Structure • Tree Structure • Acyclic Structure • Graph Structure.

  31. Splitting the Problem Hierarchy Structure GS Constraint Tree Acyclic Graph Without With

  32. Splitting the Problem Hierarchy Structure GS Constraint Tree Acyclic Graph Without With Limited

  33. Finite Satisfiabilty over Unconstrained Tree Hierarchy • Input: • Tree class hierarchy. • Unconstrained generalization sets. • Binary associations. • Method: • A reduction to the algorithm of Lenzerini Nobili:

  34. 1 1 super super ISA1 ISA2 0..1 0..1 sub sub Finite Satisfiabilty over Unconstrained Tree Hierarchy A class diagram that includes binary associations and unconstrained tree hierarchy Create the Lenzerini & Nobili inequalities system and Solve. Class Diagram without hierarchy constraint

  35. Finite Satisfiabilty over Unconstrained Tree Hierarchy The Inequalities Systems d≥m d≥2d m=2d

  36. Finite Satisfiabilty over Unconstrained Tree Hierarchy Claims • Claim [correctness]: A class diagram with unconstrained tree hierarchy is finitely satisfiable iff there exists a solution to the inequalities system. • Claim [Complexity]: Unconstrained Tree Hierarchy finite satisfiabilty method adds to the Lenzerini and Nobili method an O(n) time complexity, where n is the size of the class diagram (including associations, classes and class hierarchy constraints).

  37. Finite Satisfiabilty over Unconstrained Tree Hierarchy Proof [Correctness Claim] CD: finitely satisfiable CD’: finitely satisfiable CD CD’ A class diagram that includes binary associations and unconstrained tree hierarchy Class Diagram without hierarchy constraint Create the Lenzerini & Nobili inequalities system and Solve. It is sufficient to show a reduction of the finite satisfiability problem for CD to finite satisfiability problem for CD’ without generalization sets.

  38. Finite Satisfiabilty over Unconstrained Tree Hierarchy CD CD’ Lenzerini & Nobili inequalities Reduction Proof CD’: finitely satisfiable CD: finitely satisfiable I’ I

  39. Extensions of Finite Satisfiabilty Method • Applies properly also to the rest of the unconstrained structured: • Acyclic Structure. • Graph Structure.

  40. Splitting the Problem Hierarchy Structure GS Constraint Tree Acyclic Graph Without With Limited

  41. Master_Student Finite Satisfiabilty Method: Constrained Tree Hierarchy ma Constrained Tree Hierarchy {disjoint, complete} advisor Empty

  42. Const Const 1 1 …………….. …... 0..1 0..1 Finite Satisfiabilty Method: Constrained Tree Hierarchy A class diagram that includes binary associations and constrained tree structure Class Diagram without hierarchy constraint. 1) Create the Lenzerini and Nobili inequalities system. 2) Expand the inequalities and Solve. OCL constraint: Const

  43. Finite Satisfiabilty Method : Constrained Tree Hierarchy 1) Create the Lenzerini and Nobili inequalities system. 2) Expand the inequalities and Solve. A class diagram that includes binary associations and constrained tree structure Class Diagram without hierarchy constraint OCL constraint: Const Single Constraints

  44. Finite Satisfiabilty Method: Constrained Tree Hierarchy • Claim [Correctness]: A class diagram with constrained tree structure is finitely satisfiable iff there exists a solution for the expanded inequalities system • Claim [Complexity]: adds to the Lenzerini and Nobili method an O(n) time complexity, where n is the size of the class diagram (including associations, classes and class hierarchy constraints

  45. Correctness Claim (Intuition) CD: finitely satisfiable CD’: finitely satisfiable A class diagram that includes binary associations and constrained tree structure Class Diagram without hierarchy constraint. Expanded inequality system OCL constraint: Const I I’

  46. Correctness Claim (Intuition) CD’: finitely satisfiable CD’: finitely satisfiable A class diagram that includes binary associations and constrained tree structure Class Diagram without hierarchy constraint. Expanded inequality system OCL constraint: Const I’ Solution

  47. Finite Satisfiabilty Method: Constrained Tree Hierarchy 1) Create the Lenzerini and Nobili inequalities system. 2) Expand the inequalities and Solve. A class diagram that includes binary associations and [T-C]-GS Class Diagram without hierarchy constraint OCL constraint: Const

  48. No Exclusive Inequalities 1) Create the Lenzerini and Nobili inequalities system. 2) Expand the inequalities and Solve. Class Diagram without hierarchy constraint. A class diagram that includes binary associations and constrained tree structure OCL constraint: Const

  49. The Inequalities System

  50. Finite Satisfiabilty MethodStructure Extension Hierarchy Structure GS Constraint Tree Acyclic Graph Without With Limited ?

More Related