1 / 50

Efficient Reasoning on Finite Satisfiability in UML Class Diagrams

Efficient Reasoning on Finite Satisfiability in UML Class Diagrams. Azzam Maraee Victor Makarenkov Mira Balaban. Agenda. Example Reasoning Problems Previous works Research Contribution. Conclusions and Future Work. Motivation. [Protein]  [Chemical].

akina
Download Presentation

Efficient Reasoning on Finite Satisfiability 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 Reasoning on Finite Satisfiability in UML Class Diagrams Azzam Maraee Victor Makarenkov Mira Balaban

  2. Agenda • Example • Reasoning Problems • Previous works • Research Contribution • Conclusions and Future Work

  3. Motivation [Protein]  [Chemical] [Enzyme]=2* [catalyzedReaction] [Enzyme]  [Protein]  ½*[Protein]  ½* [Chemical] [Chemical] [Reaction]  [catalyzedReaction] =1/2*[Enzyme] 2*[Chemical] [Chemical] What’s wrong with this ontology* ?

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

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

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

  7. Infinity Problem (2)

  8. Definitions • A legal instance of a class diagram is an instance that satisfies all constraints. • A class is consistent if it has a non empty extension in some legal instance. • A class is finitely satisfiable if it has a non empty extension in some legal instance.

  9. 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.

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

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

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

  13. 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

  14. Example 1 depend Reaction 2

  15. Example 1 depend Reaction 2

  16. 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:

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

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

  19. 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.

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

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

  22. FiniteSat Algorithm • The FiniteSat Algorithm • Input: A class diagram CD with binary multiplicity constraints, class hierarchy constraints, and GS constraints. • Output: A linear inequality system ψCD • Method: • For every class, association, or multiplicity constraint: create variables and inequalities according to the Lenzerini and Nobili method. • For every class hierarchy constraint, B being the subclass with variable b and A being the super class with variable a, extend the inequality system with the inequalities a ≥ b. • For every GS constraint GS(C, C1,...Cn; Const), C being the super-class, Cis being the subclasses, and Const being the GS constraint, extend the inequality system, as follows: • Const = disjoint: • Const = complete: • Const = incomplete: • Cons t= overlapping: Without inequality • Const = disjoint, incomplete: • Const = disjoint, complete: • Const = overlapping, complete: • Const = overlapping, incomplete:

  23. The FiniteSat Algorithm • Class hierarchy constrain AB

  24. GS Constraints -1 • For every GS constraint GS(C, C1,...Cn; Const):

  25. GS Constraints -2 • For every GS constraint GS(C, C1,...Cn; Const):

  26. Example 1

  27. Example 1 • Variable: • Chemical: ch ,Reaction: r, CatalyzedReaction:c, DNA: d, Potien:p, DNASegment, dn. Genome, ge, Gene:g, Enzyme:e • Catalyzed: ca , substrate: s, include: in • Inequalities: • Class hierarchy constraints inequalities: • ch>=d, c>=p, dn>=g, dn>=ge, p>=e, c>=r • Gs constraints inequalities: • dn>g+ge • Multiplicity constraint inequalities: • s>=ch, s=r, c<=r, ca=e, ca=2c, in>ge, in=dn • ch,r,c,d,p,dn,ge,e,ca,s,i>0

  28. Performance Claim: A Class diagram CD is finitely satisfiabile iff the inequality system ψCD is solvable. Table 1 summarizes our results.

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

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

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

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

  33. FiniteSat Extension to Qualifier • Qualifier • Imposes a partitioning on the set of related instances. • Tightens the multiplicity constraint of its association. • Can cause finite satisfiability problems. B A q1 :Tq1[tq1] … qn:Tqn[tqn] R min1..max1 min2..max2

  34. FiniteSat Extension to Qualifier - Example TV-Network 1 WeekdaySchedule 1 Broadcast Schedule Day : Weekday • In every legal instance • Number of broadcast schedules, b, is 7*t, where t is the number of TV-Networks. At the same time t=b. The only solution for: • b=7t • b=t Is empty or infinite! 1 1 NetworkSchedule Enum WeekDay = {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}

  35. FiniteSat Extension to Qualifier – General case • If a combined domain value is non-finite, ignore the qualifier constraint, and handle like regular association. • Else, extend the inequality system with the following inequalities: • min1 x b <= r <= max1 x b • min2 x a x tq1 x … x tqn <= r <= max2 x a x tq1 x … x tqn

  36. Exploring the Limits • Infinity

  37. The Inequalities System There is a solution

  38. Future Work • Extensions: • Graph structure with disjoint, complete. • N-ary. • Aggregation. • Identification and Fixing (Sven Hartman, 2001) • integrate the implementation as add-in in existing case tool,

  39. Thank You

  40. Backup Slides

  41. 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

  42. 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).

  43. 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.

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

  45. 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

  46. 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.

  47. 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

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

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

More Related