OWL2+SWRL to EMF+IQPL

815 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
815
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
7
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

OWL2+SWRL to EMF+IQPL

  1. 1. Ontology Driven Design of EMF Metamodels and Well-formedness Constraints Benedek Izsó, Zoltán Szatmári, Gábor Bergmann, Ákos Horváth, István Ráth, and Dániel VarróBudapest University of Technology and Economics MODELS Conference – OCL Workshop 2012Fault Tolerant Systems Research Group Innsbruck, Austria, 2012. 09. 30.
  2. 2. Overview Motivation Ontology based language engineering process Ontology to DSL mapping Results and future work
  3. 3. Motivation Textual Requirements ? DSM Editor «instance of» • early prototyping• Every Switch is supervisedBy • satisfy requirementsat least two Sensors. • (re)validation
  4. 4. Motivation Formalized Prototype Requirements Auto-derive DSM Editor «instance of» satisfy Automatically build a DSM editor to design instance modelssatisfying all requirements
  5. 5. Modeling techniques Requirements Ontology DSL spec.• Textual • Mathematically • Great tool support• Can be ambiguous, precise semantics • Wide industry usage inconsistent • Efficient meta level • Efficient instance• Expectations of consistency checking model validation stakeholders • Easy schema merg- ing and refactoring
  6. 6. Modeling techniques Requirements Consistent translation? Ontology DSL spec.• Textual • Mathematically • Great tool support• Can be ambiguous, precise semantics • Wide industry usage inconsistent • Efficient meta level • Efficient instance• Expectations of consistency checking model validation stakeholders • Easy schema merg- ing and refactoring
  7. 7. Ontology-based modeling techniques Modeling techniques Controlled English Tools Automatic transformation Protégé Requirements Ontology DSL spec.• Textual • Mathematically • Great tool support• Can be ambiguous, precise semantics • Wide industry usage inconsistent • Efficient meta level • Efficient instance• Expectations of consistency checking model validation stakeholders • Easy schema merg- ing and refactoring
  8. 8. Overview of the approach MappingOntology DSL spec. OWL2 Ecore SWRL IQPL
  9. 9. Mapping OWL2 to Ecore (example) Mapping Ontology DSL spec.OWL2 EcoreSWRL IQPL
  10. 10. Mapping OWL2 to Ecore (example) Mapping Ontology DSL spec. Every Switch is a TrackElement. Every TrackElement is supervisedBy a Sensor.OWL2 EcoreSWRL IQPL
  11. 11. Mapping OWL2 to Ecore (example) Mapping Ontology DSL spec. Every Switch is a TrackElement. Every TrackElement is supervisedBy a Sensor.Switch ⊑ TrackElementSwitch ⊑ OWL2 (Web Ontology Language):∃ supervisedBy.Sensor • W3C Standard for describing semantic web • Axiomatic language: decidable description logic • Here used for metamodel constraint description OWL2 Ecore SWRL IQPL
  12. 12. Mapping OWL2 to Ecore (example) Mapping Ontology DSL spec. Every Switch is a TrackElement. Every TrackElement is supervisedBy a Sensor.Switch ⊑ TrackElementSwitch ⊑∃ supervisedBy.Sensor OWL2 Ecore SWRL IQPL
  13. 13. Mapping OWL2 to IQPL (example) Mapping Ontology DSL spec.OWL2 EcoreSWRL IQPL
  14. 14. Mapping OWL2 to IQPL (example) Mapping Ontology DSL spec. Every Switch is supervisedBy at least two Sensors.OWL2 EcoreSWRL IQPL
  15. 15. Mapping OWL2 to IQPL (example) Mapping Ontology DSL spec. Every Switch is supervisedBy at least two Sensors.Switch ⊑≥2 supervisedBy.Sensor OWL2 Ecore SWRL IQPL
  16. 16. Mapping OWL2 to IQPL (example) Mapping Ontology DSL spec. Every Switch is supervisedBy at least two Sensors. IQPL (IncQuery Pattern Language): • Graph pattern based model query language • EMF-IncQuery evaluates incrementallySwitch ⊑ NEG supervisedBy≥2 supervisedBy.Sensor s1:Sensor OWL2 Ecore s2:Sensor supervisedBy sw:Switch SWRL IQPL
  17. 17. Mapping OWL2 to IQPL (example) Mapping Ontology DSL spec. Every Switch is supervisedBy at least two Sensors.Consequent is negated to match violating elementsSwitch ⊑ NEG supervisedBy≥2 supervisedBy.Sensor s1:Sensor OWL2 Ecore s2:Sensor supervisedBy sw:Switch SWRL IQPL
  18. 18. Mapping SWRL to IQPL (example) Mapping Ontology DSL spec.OWL2 EcoreSWRL IQPL
  19. 19. Mapping SWRL to IQPL (example) Mapping Ontology DSL spec. Two track elements with same signal must be connected.OWL2 EcoreSWRL IQPL
  20. 20. Mapping SWRL to IQPL (example) Mapping Ontology DSL spec. Two track elements with same signal must be connected.TrackElement(?te1),TrackElement(?te2),Signal(?sig),hasSignal(?te1, ?sig),hasSignal(?te2, ?sig), SWRL (Semantic Web Rule Language):DifferentFrom (?te1, ?te2) • Extension of OWL2->connectedTo(?te1, ?te2) • Variables and property expressions can be used OWL2 Ecore • DL-Safe rules maintain decidability SWRL IQPL
  21. 21. Mapping SWRL to IQPL (example) Mapping Ontology DSL spec. Two track elements with same signal must be connected.TrackElement(?te1),TrackElement(?te2),Signal(?sig),hasSignal(?te1, ?sig),hasSignal(?te2, ?sig),DifferentFrom (?te1, ?te2) ?te1:TrackElement hasSignal-> NEGconnectedTo(?te1, ?te2) ?sig:Signal connectedTo hasSignal OWL2 Ecore ?te2:TrackElement SWRL IQPL
  22. 22. Mapping SWRL to IQPL (example) Mapping Ontology DSL spec. Two track elements with same signal must be connected. pattern invalidWiring(te1, te2, sig) {TrackElement(?te1), TrackElement(te1);TrackElement(?te2), TrackElement(te2);Signal(?sig), Signal(sig);hasSignal(?te1, ?sig), TrackElement.hasSignal(te1, sig);hasSignal(?te2, ?sig), TrackElement.hasSignal(te2, sig);DifferentFrom (?te1, ?te2) te1 != te2;-> neg find connected(te1, te2);connectedTo(?te1, ?te2) } pattern connected(te1, te2) { OWL2 Ecore TrackElement.connectedTo(te1, te2); } SWRL IQPL
  23. 23. Language Differences OWL2+SWRL Ecore + IQPL SolutionMultityped instances Object has exactly one Multiple inheritance direct type can be usedRelation inheritance No relation Mapped to GP,allowed inheritance relation instances must be insertedMultiple syntax can Transformed to Ecorehave one semantics or GP depending on the syntaxOpen world Closed world OWA → toleratesassumption assumption incomplete models CWA → complete knowledge assumed
  24. 24. Language Differences (OWA → CWA) Ontology DSL spec. Every Switch is supervisedBy at least two Sensors. s2:Sensor supervisedBy sw:Switch
  25. 25. Language Differences (OWA → CWA) Ontology DSL spec. Every Switch is supervisedBy at least two Sensors.Open World Assumption:Tolerates incomplete knowledge ✓ Valid s2:Sensor supervisedBy sw:Switch
  26. 26. Language Differences (OWA → CWA) Ontology DSL spec. Every Switch is supervisedBy at least two Sensors.Open World Assumption: Closed World Assumption:Tolerates incomplete knowledge Complete knowledge assumed ✓ Valid ✘Invalid s2:Sensor supervisedBy sw:Switch
  27. 27. Language Differences (OWA → CWA) Ontology DSL spec. Every Switch is supervisedBy at least two Sensors.Open World Assumption: Closed World Assumption:Tolerates incomplete knowledge Complete knowledge assumed ✓ Valid ✘Invalid s2:Sensor supervisedBy sw:Switch Mapped graph patterns return invalid elements following the close world assumption
  28. 28. Implementation Transform Ontology DSL spec. Large part of the language was mapped (~50 axioms and 45 expressions) Transformation is implemented in the VIATRA2 framework with the required ontology importer, Ecore and IQPL exporter Traceability between source and target model An Eclipse plug-in automates the process o Converts ontology with 50 axiom in 30 sec. (code generation dominates)
  29. 29. Results Consistent Automatic transformation formalizationRequirements Ontology DSM Editor (textual) (formal) (prototype) «instance of» Efficiently checkconsistent requirements of large, continuously evolving models
  30. 30. Results Consistent Automatic transformation formalizationRequirements Ontology DSM Editor (textual) (formal) (prototype) «instance of» Efficiently checkconsistent requirements of large, continuously evolving models
  31. 31. Future workRequirements Ontology DSL spec. (textual) (OWL2+SWRL) (Ecore+IQPL) «instance of»
  32. 32. Future workRequirements Ontology DSL spec. (textual) (OWL2+SWRL) (Ecore+IQPL) «instance of» «instance of» Ontology instance Instance model mapping
  33. 33. Future work Reverse mapping (expressivity!)Requirements Ontology DSL spec. (textual) (OWL2+SWRL) (Ecore+IQPL) «instance of» «instance of» Ontology instance Instance model mapping
  34. 34. Future work Reverse mapping (expressivity!)Requirements Ontology DSL spec. (textual) (OWL2+SWRL) (Ecore+IQPL) OCL «instance of» «instance of» Ontology instance Instance model mapping
  35. 35. Summary Consistent Automatic transformation formalization MappingRequirements Ontology DSM Editor «instance of» Efficiently checklarge models on-the-fly

×