Jarrar © 2011 1
ORM in Description Logic
Lecture Notes on ORM in Description Logic
Birzeit University
2011
Dr. Mustafa Jar...
Jarrar © 2011 2
Outline
• Part I: Introduction (Why Description logics)
• Part II: Introduction to Description logics
• Pa...
Jarrar © 2011 3
Reading
• Mustafa Jarrar: Mapping ORM into the SHOIN/OWL Description Logic-
Towards a Methodological and E...
Jarrar © 2011 4
Remember: ORM has many Applications
Database
XML Schema Web (x)FormsBusiness Rules
Ontology
Originally
War...
Jarrar © 2011 5
An Information System
Conceptual
Schema
Data
Logical Schema
DBMS
Queryprocessor
Apps
Information System
 ...
Jarrar © 2011 6
Conceptual Schema
Data
DBMS
Logical Schema
Queryprocessor
Apps
IS1
Conceptual Schema
Data
DBMS
Logical Sch...
Jarrar © 2011 7
Semantic Mediator
(Web) Information Systems
Bookstore
Ontology
Jarrar © 2011 8
Semantic Mediator
(Web) Information Systems
….
<owl:Class rdf:ID="Product" />
<owl:Class rdf:ID="Book">
<r...
Jarrar © 2011 9
OWL
 The Web Ontology Language (W3C Standard)
 Based on Description logic
….
<owl:Class rdf:ID="Product"...
Jarrar © 2011 10
First Order Logic (FOL)
• FOL allows us to represent knowledge precisely (Syntax and
Semantics).
• Howeve...
Jarrar © 2011 11
x PhDStudent(x)  Student (x)
x Employee(x)  Person (x)
x Student(x)  Person (x)
x PhDStudent(x)  ...
Jarrar © 2011 12
Person
StudentEmployee
PhD Student
Find contradictions (satisfiability)
x Student(x)  Employee (x) = ...
Jarrar © 2011 13
First Order Logic (FOL)
Reasoning on FOL is far too complex (i.e. not decidable)
 Here comes description...
Jarrar © 2011 14
Introduction to
Description Logics
Jarrar © 2011 15
Description Logics
• Description logics are a family of logics concerned with knowledge
representation.
•...
Jarrar © 2011 16
Description Logics
Most known description logics are :
A more practical and expressive description logic....
Jarrar © 2011 17
Description logic AL
• Example constructs:
Jarrar © 2011 18
More AL Family Members
• Disjunction (U)
• Full existential quantification ()
• Number restrictions (N)
...
Jarrar © 2011 19
DL as fragments of Predicate Logic
Jarrar © 2011 20
DL Knowledge Base
• DL Knowledge Base (KB) normally separated
into 2 parts:
– TBox is a set of axioms des...
Jarrar © 2011 21
Terminologies or TBoxes
Jarrar © 2011 22
Inference Services
Jarrar © 2011 23
Inference services based on Satisfiability
Jarrar © 2011 24
Inference service: concept subsumption
Is a Mother always a Woman?
Yes, Mother Subsumes Woman
Description...
Jarrar © 2011 25
• They offer reasoning services for multiple TBoxes and ABoxes.
• They run as background reasoning engine...
Jarrar © 2011 26
The SHOIN Description Logic
• The logic underpinning OWL, the standard (W3C recommendation)
Ontology Web ...
Jarrar © 2011 27
Mapping ORM to SHOIN
Jarrar © 2011 28
….
<owl:Class rdf:ID="Product" />
<owl:Class rdf:ID="Book">
<rdfs:subClassOf rdf:resource="#Product" />
<...
Jarrar © 2011 29
Mapping ORM to Description Logic
Why do we need this mapping for?
• Use ORM as a graphical notation for O...
Jarrar © 2011 30
Examples of reasoning services:
- Satisfiability
SAT(C,T ) iff there is a model I of T with CI  
To kno...
Jarrar © 2011 31
Reasoning on ORM Schemes
 Schema satisfiability: A schema is satisfiable if and only if there is at
leas...
Jarrar © 2011 32
Mapping ORM to DLR and SHOIN
n-ary relations:
-- No Support --
SHOIN
Jarrar © 2011 33
Mapping ORM to DLR and SHOIN
Binary relations:
SHOIN
Jarrar © 2011 34
Mapping ORM to DLR and SHOIN
Unary roles:
SHOIN
Jarrar © 2011 35
Mapping ORM to DLR and SHOIN
Role Mandatory:
SHOIN
Jarrar © 2011 36
Mapping ORM to DLR and SHOIN
Disjunctive Mandatory:
SHOIN
Jarrar © 2011 37
Mapping ORM to DLR and SHOIN
Role Uniqueness:
SHOIN
Jarrar © 2011 38
Mapping ORM to DLR and SHOIN
Predicate Mandatory:
-- No Support --
SHOIN
Jarrar © 2011 39
Mapping ORM to DLR and SHOIN
External Mandatory:
-- No Support --
SHOIN
Jarrar © 2011 40
Mapping ORM to DLR and SHOIN
Role Frequency:
SHOIN
Jarrar © 2011 41
Mapping ORM to DLR and SHOIN
Multiple-Role Frequency:
-- No Support --
SHOIN
Jarrar © 2011 42
Mapping ORM to DLR and SHOIN
Subtypes:
SHOIN
Jarrar © 2011 43
Mapping ORM to DLR and SHOIN
Total Subtypes:
SHOIN
Jarrar © 2011 44
Mapping ORM to DLR and SHOIN
Exclusive Subtypes:
SHOIN
Jarrar © 2011 45
Mapping ORM to DLR and SHOIN
Value Constraint:
STRING:
Number:
SHOIN
SHOIN
Jarrar © 2011 46
Mapping ORM to DLR and SHOIN
Role Subset Constraint:
SHOIN
Jarrar © 2011 47
Mapping ORM to DLR and SHOIN
Predicate Subset Constraint:
SHOIN
Jarrar © 2011 48
Mapping ORM to DLR and SHOIN
Role-sequence Subset Constraint:
-- No Support --
SHOIN
Jarrar © 2011 49
Mapping ORM to DLR and SHOIN
Role Equality Constraint:
SHOIN
Jarrar © 2011 50
Mapping ORM to DLR and SHOIN
Predicate Equality Constraint:
SHOIN
Jarrar © 2011 51
Mapping ORM to DLR and SHOIN
Role-sequence Equality Constraint:
-- No Support --
SHOIN
Jarrar © 2011 52
Mapping ORM to DLR and SHOIN
Role exclusion Constraint:
SHOIN
Jarrar © 2011 53
Mapping ORM to DLR and SHOIN
Predicate Exclusion Constraint:
SHOIN
Jarrar © 2011 54
Mapping ORM to DLR and SHOIN
Role- sequence Exclusion Constraint:
-- No Support --
SHOIN
Jarrar © 2011 55
Mapping ORM to DLR and SHOIN
Objectification:
SHOIN
-- No Support --
Jarrar © 2011 56
DogmaModeler
 DogmaModeler is an ontology engineering tool
 It uses ORM as a graphical notation
 It us...
Jarrar © 2011 57
Home Work
• Map your ORM model (project 3) into description logic.
• Reason about your ORM model using Ra...
Jarrar © 2011 58
Conclusions and Discussion
Jarrar © 2011 59
n-ary Relations
Binary Relations
Predicate Uniqueness
Role Equality
Predicate Equality
Seq-Role Equality ...
Jarrar © 2011 60
Predicate Uniqueness
Seq-Role Equality
Seq-Role Subset
Seq-Role Exclusion
Acyclic
Multi Role Frequency
n-...
Jarrar © 2011 61
Predicate Uniqueness
Seq-Role Equality
Seq-Role Subset
Seq-Role Exclusion
Acyclic
Multi Role Frequency
n-...
Jarrar © 2011 62
Description Logic Reasoners
a short tutorial on DIG
Jarrar © 2011 63
• They offer reasoning services for multiple TBoxes and ABoxes.
• They run as background reasoning engine...
Jarrar © 2011 64
DIG Interface (http://dig.sourceforge.net/ )
S. Bechhofer: The DIG Description Logic Interface: DIG/1.1
h...
Jarrar © 2011 65
DIG Interface (http://dig.sourceforge.net/ )
S. Bechhofer: The DIG Description Logic Interface: DIG/1.1
h...
Jarrar © 2011 66
DIG Protocol
• DIG is only an XML schema for a description logic along with ask/tell
functionality
• You ...
Jarrar © 2011 67
Create e a new Knowledge Base
<?xml version="1.0" encoding="UTF-8"?>
<newKB
xmlns="http://dl.kr.org/dig/2...
Jarrar © 2011 68
Tell Syntax
<?xml version="1.0" encoding="ISO-8859-1"?>
<tells
xmlns="http://dl.kr.org/dig/2003/02/lang"
...
Jarrar © 2011 69
Tell Syntax
Tell Language
Primitive
Concept
Introduction
<defconcept name="CN"/>
<defrole name="CN"/>
<de...
Jarrar © 2011 70
Ask Syntax
• An ASK request must contain in its body an asks element.
• Multiple queries in one request i...
Jarrar © 2011 71
Ask Syntax
Ask Language
Primitive Concept
Retrieval
<allConceptNames/>
<allRoleNames/>
<allIndividuals/>
...
Upcoming SlideShare
Loading in …5
×

Jarrar: ORM in Description Logic

875 views

Published on

Lecture slides by Mustafa Jarrar at Birzeit University, Palestine.
See the course webpage at: http://jarrar-courses.blogspot.com/2011/09/knowledgeengineering-fall2011.html
and http://www.jarrar.info

and on Youtube:
http://www.youtube.com/watch?v=3_-HGnI6AZ0&list=PLDEA50C29F3D28257

Published in: Technology, Education
  • Be the first to comment

Jarrar: ORM in Description Logic

  1. 1. Jarrar © 2011 1 ORM in Description Logic Lecture Notes on ORM in Description Logic Birzeit University 2011 Dr. Mustafa Jarrar University of Birzeit mjarrar@birzeit.edu www.jarrar.info Knowledge Engineering
  2. 2. Jarrar © 2011 2 Outline • Part I: Introduction (Why Description logics) • Part II: Introduction to Description logics • Part III: Mapping ORM into Description logic • Something to think about 
  3. 3. Jarrar © 2011 3 Reading • Mustafa Jarrar: Mapping ORM into the SHOIN/OWL Description Logic- Towards a Methodological and Expressive Graphical Notation for Ontology Engineering. In OTM workshops, proceeding of the International Workshop on Object-Role Modeling (ORM'07). Volume 4805, LNCS, Pages (729-741), Springer. ISBN: 9783540768890. Portogal. November, 2007. • D. Nardi, R. J. Brachman. An Introduction to Description Logics. In the Description Logic Handbook, edited by F. Baader, D. Calvanese, D.L. McGuinness, D. Nardi, P.F. Patel-Schneider, Cambridge University Press, 2002, pages 5-44. http://www.inf.unibz.it/~franconi/dl/course/dlhb/dlhb-01.pdf • Sean Bechhofer, “The DIG Description Logic Interface: DIG/1.1 ” http://racer-systems.com/dl.php?file=NativeLibraries%252FDIGinterface11.pdf&typ=file&name=DIGinterface11.pdf
  4. 4. Jarrar © 2011 4 Remember: ORM has many Applications Database XML Schema Web (x)FormsBusiness Rules Ontology Originally Warehouse Later Requirements Engineering Record my recipes !
  5. 5. Jarrar © 2011 5 An Information System Conceptual Schema Data Logical Schema DBMS Queryprocessor Apps Information System  Why do we need conceptual schemes? for designing Information systems at the conceptual level.  Each Information System is made for one organization.
  6. 6. Jarrar © 2011 6 Conceptual Schema Data DBMS Logical Schema Queryprocessor Apps IS1 Conceptual Schema Data DBMS Logical Schema Queryprocessor Apps ISn New needs: Open data exchange, inter-organizational transactions, global queries… Agreed data schemes (XML, RDF) Ontologies/ Semantics (OWL) (Web) Information Systems
  7. 7. Jarrar © 2011 7 Semantic Mediator (Web) Information Systems Bookstore Ontology
  8. 8. Jarrar © 2011 8 Semantic Mediator (Web) Information Systems …. <owl:Class rdf:ID="Product" /> <owl:Class rdf:ID="Book"> <rdfs:subClassOf rdf:resource="#Product" /> </owl:Class> <owl:Class rdf:ID="Price" /> <owl:Class rdf:ID="Value" /> <owl:Class rdf:ID="Currency" /> <owl:Class rdf:ID="Title" /> <owl:Class rdf:ID="ISBN" /> <owl:Class rdf:ID="Author" /> <owl:ObjectProperty rdf:ID="Valuated-By"> <rdfs:domain rdf:resource="#Product" /> <rdfs:range rdf:resource="#Price" /> </owl:ObjectProperty> <owl:DataProperty rdf:ID=" Amounted-To .Value"> <rdfs:domain rdf:resource="#Price" /> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </owl:ObjectProperty> <owl:DataProperty rdf:ID="Measured-In.Currency"> <rdfs:domain rdf:resource="#Price" /> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> … Bookstore Ontology Written in OWL
  9. 9. Jarrar © 2011 9 OWL  The Web Ontology Language (W3C Standard)  Based on Description logic …. <owl:Class rdf:ID="Product" /> <owl:Class rdf:ID="Book"> <rdfs:subClassOf rdf:resource="#Product" /> </owl:Class> <owl:Class rdf:ID="Price" /> <owl:Class rdf:ID="Value" /> <owl:Class rdf:ID="Currency" /> <owl:Class rdf:ID="Title" /> <owl:Class rdf:ID="ISBN" /> <owl:Class rdf:ID="Author" /> <owl:ObjectProperty rdf:ID="Valuated-By"> <rdfs:domain rdf:resource="#Product" /> <rdfs:range rdf:resource="#Price" /> </owl:ObjectProperty> <owl:DataProperty rdf:ID=" Amounted-To .Value"> <rdfs:domain rdf:resource="#Price" /> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </owl:ObjectProperty> …  Can we use ORM to Model OWL ontologies?
  10. 10. Jarrar © 2011 10 First Order Logic (FOL) • FOL allows us to represent knowledge precisely (Syntax and Semantics). • However, representation alone is not enough. x PhDStudent(x)  Student (x) x Employee(x)  Person (x) x Student(x)  Person (x) x PhDStudent(x)  Employee (x) Person StudentEmployee PhD Student • We also need to process this knowledge and make use of it, i.e. Logical inference = (Reasoning).
  11. 11. Jarrar © 2011 11 x PhDStudent(x)  Student (x) x Employee(x)  Person (x) x Student(x)  Person (x) x PhDStudent(x)  Employee (x) Person StudentEmployee PhD Student x PhDStudent(x)  Person (x) How to process the above axioms to know that an axiom can be derived from (=implied by) another axiom. First Order Logic (FOL) Reasoning:
  12. 12. Jarrar © 2011 12 Person StudentEmployee PhD Student Find contradictions (satisfiability) x Student(x)  Employee (x) =  …etc. x PhDStudent(x)  Student (x) x Employee(x)  Person (x) x Student(x)  Person (x) x PhDStudent(x)  Employee (x) First Order Logic (FOL) Reasoning: How to process the above axioms to know that an axiom can be derived from (=implied by) another axiom.
  13. 13. Jarrar © 2011 13 First Order Logic (FOL) Reasoning on FOL is far too complex (i.e. not decidable)  Here comes description logics.
  14. 14. Jarrar © 2011 14 Introduction to Description Logics
  15. 15. Jarrar © 2011 15 Description Logics • Description logics are a family of logics concerned with knowledge representation. • A description logic is a decidable fragment of first-order logic, associated with a set of automatic reasoning procedures. • The basic constructs for a description logic are the notion of a concept and the notion of a relationship. • Complex concept and relationship expressions can be constructed from atomic concepts and relationships with suitable constructs between them. • Example: Mother ⊑ Female ⊓ HasChild HumanMother ⊑ Female ⊓ HasChild.Person
  16. 16. Jarrar © 2011 16 Description Logics Most known description logics are : A more practical and expressive description logic. C, D  A | ⊤ | ⊥|¬A | C ⊓ D | R.C | R.⊤ AL Very expressive description logic, Capable of representing most database constructs.DLRidf Very popular description logic. The logic underlying OWL. SROIQ The simplest and less expressive description logic. C, D  A | C ⊓ D | R.C | R FL¯
  17. 17. Jarrar © 2011 17 Description logic AL • Example constructs:
  18. 18. Jarrar © 2011 18 More AL Family Members • Disjunction (U) • Full existential quantification () • Number restrictions (N) • Full negation (C) • Example:
  19. 19. Jarrar © 2011 19 DL as fragments of Predicate Logic
  20. 20. Jarrar © 2011 20 DL Knowledge Base • DL Knowledge Base (KB) normally separated into 2 parts: – TBox is a set of axioms describing structure of domain (i.e., a conceptual schema), e.g.: • HappyFather  Man ⊓ hasChild.Female ⊓ … • Elephant ⊑ Animal ⊓ Large ⊓ Grey • transitive(ancestor) – ABox is a set of axioms describing a concrete situation (data), e.g.: • John:HappyFather • <John,Mary>:hasChild
  21. 21. Jarrar © 2011 21 Terminologies or TBoxes
  22. 22. Jarrar © 2011 22 Inference Services
  23. 23. Jarrar © 2011 23 Inference services based on Satisfiability
  24. 24. Jarrar © 2011 24 Inference service: concept subsumption Is a Mother always a Woman? Yes, Mother Subsumes Woman Description logic reasoners offer the computation of a Subsumption (taxonomy) of all named concepts
  25. 25. Jarrar © 2011 25 • They offer reasoning services for multiple TBoxes and ABoxes. • They run as background reasoning engines. • They understand DIG, which is a simple protocol (based on HTTP) along with an XML Schema. Description Logic Reasoners <impliesc> <catom name=“Student"/> <catom name=“Person"/> </impliesc> Student ⊑ Person• Example: • For example:
  26. 26. Jarrar © 2011 26 The SHOIN Description Logic • The logic underpinning OWL, the standard (W3C recommendation) Ontology Web Language. • A compromise between expressive power and computational complexity. • Does not support: n-ary relations, identification, functional dependencies.
  27. 27. Jarrar © 2011 27 Mapping ORM to SHOIN
  28. 28. Jarrar © 2011 28 …. <owl:Class rdf:ID="Product" /> <owl:Class rdf:ID="Book"> <rdfs:subClassOf rdf:resource="#Product" /> </owl:Class> <owl:Class rdf:ID="Price" /> <owl:Class rdf:ID="Value" /> <owl:Class rdf:ID="Currency" /> <owl:Class rdf:ID="Title" /> <owl:Class rdf:ID="ISBN" /> <owl:Class rdf:ID="Author" /> <owl:ObjectProperty rdf:ID="Valuated-By"> <rdfs:domain rdf:resource="#Product" /> <rdfs:range rdf:resource="#Price" /> </owl:ObjectProperty> <owl:DataProperty rdf:ID=" Amounted-To .Value"> <rdfs:domain rdf:resource="#Price" /> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </owl:ObjectProperty> <owl:DataProperty rdf:ID="Measured-In.Currency"> <rdfs:domain rdf:resource="#Price" /> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> … (Web) Information Systems Semantic Mediator Bookstore Ontology
  29. 29. Jarrar © 2011 29 Mapping ORM to Description Logic Why do we need this mapping for? • Use ORM as a graphical notation for Ontology/description logic languages. (The DL benefit from ORM) • Reasoning on ORM schemes automatically. (The ORM benefit from DL)
  30. 30. Jarrar © 2011 30 Examples of reasoning services: - Satisfiability SAT(C,T ) iff there is a model I of T with CI   To know whether a concept can be populated or not (e.g. because of some axioms contradicting each other) - Subsumption SUBS(C, D,T ) iff CI ⊆ DI for all model I of T To know whether a concept is subsuming another concept (e.g. to find unwanted or missing subsumptions) - Redundancies EQUIV(C, D,T ) iff CI = DI for all model I of T To know whether two concepts are equal (e.g. to find out redundancies) Reasoning Services
  31. 31. Jarrar © 2011 31 Reasoning on ORM Schemes  Schema satisfiability: A schema is satisfiable if and only if there is at least one concept in the schema that can be populated.  Concept satisfiability: A schema is satisfiable if and only if all concepts in the schema can be populated.  Role satisfiability: A schema is satisfiable if and only if all roles in the schema can be populated.  Concept satisfiability implies schema satiability.  Role satisfiability implies concept satiability.  Weak satisfiability  Strong satisfiability Person Course Teaches Studies {Math1, Prog1} 3-5
  32. 32. Jarrar © 2011 32 Mapping ORM to DLR and SHOIN n-ary relations: -- No Support -- SHOIN
  33. 33. Jarrar © 2011 33 Mapping ORM to DLR and SHOIN Binary relations: SHOIN
  34. 34. Jarrar © 2011 34 Mapping ORM to DLR and SHOIN Unary roles: SHOIN
  35. 35. Jarrar © 2011 35 Mapping ORM to DLR and SHOIN Role Mandatory: SHOIN
  36. 36. Jarrar © 2011 36 Mapping ORM to DLR and SHOIN Disjunctive Mandatory: SHOIN
  37. 37. Jarrar © 2011 37 Mapping ORM to DLR and SHOIN Role Uniqueness: SHOIN
  38. 38. Jarrar © 2011 38 Mapping ORM to DLR and SHOIN Predicate Mandatory: -- No Support -- SHOIN
  39. 39. Jarrar © 2011 39 Mapping ORM to DLR and SHOIN External Mandatory: -- No Support -- SHOIN
  40. 40. Jarrar © 2011 40 Mapping ORM to DLR and SHOIN Role Frequency: SHOIN
  41. 41. Jarrar © 2011 41 Mapping ORM to DLR and SHOIN Multiple-Role Frequency: -- No Support -- SHOIN
  42. 42. Jarrar © 2011 42 Mapping ORM to DLR and SHOIN Subtypes: SHOIN
  43. 43. Jarrar © 2011 43 Mapping ORM to DLR and SHOIN Total Subtypes: SHOIN
  44. 44. Jarrar © 2011 44 Mapping ORM to DLR and SHOIN Exclusive Subtypes: SHOIN
  45. 45. Jarrar © 2011 45 Mapping ORM to DLR and SHOIN Value Constraint: STRING: Number: SHOIN SHOIN
  46. 46. Jarrar © 2011 46 Mapping ORM to DLR and SHOIN Role Subset Constraint: SHOIN
  47. 47. Jarrar © 2011 47 Mapping ORM to DLR and SHOIN Predicate Subset Constraint: SHOIN
  48. 48. Jarrar © 2011 48 Mapping ORM to DLR and SHOIN Role-sequence Subset Constraint: -- No Support -- SHOIN
  49. 49. Jarrar © 2011 49 Mapping ORM to DLR and SHOIN Role Equality Constraint: SHOIN
  50. 50. Jarrar © 2011 50 Mapping ORM to DLR and SHOIN Predicate Equality Constraint: SHOIN
  51. 51. Jarrar © 2011 51 Mapping ORM to DLR and SHOIN Role-sequence Equality Constraint: -- No Support -- SHOIN
  52. 52. Jarrar © 2011 52 Mapping ORM to DLR and SHOIN Role exclusion Constraint: SHOIN
  53. 53. Jarrar © 2011 53 Mapping ORM to DLR and SHOIN Predicate Exclusion Constraint: SHOIN
  54. 54. Jarrar © 2011 54 Mapping ORM to DLR and SHOIN Role- sequence Exclusion Constraint: -- No Support -- SHOIN
  55. 55. Jarrar © 2011 55 Mapping ORM to DLR and SHOIN Objectification: SHOIN -- No Support --
  56. 56. Jarrar © 2011 56 DogmaModeler  DogmaModeler is an ontology engineering tool  It uses ORM as a graphical notation  It uses Racer as a background reasoning engine Other functionalities of DogmaModeler:  Verbalization of ORM into 11 human languages.  Modularization of auto composition of ORM schemes  ….
  57. 57. Jarrar © 2011 57 Home Work • Map your ORM model (project 3) into description logic. • Reason about your ORM model using Racer. • MS Word file containing: 1. You ORM model 2. Map ORM into DL 3. Map ORM into DIG and load it to Racer 4. Screen shorts of Racer results, that (a)your model is satisfiable, (b) your model is unsatisfiable (make something wrong) The next Lecture assumes that you know XML, if not please read about it.
  58. 58. Jarrar © 2011 58 Conclusions and Discussion
  59. 59. Jarrar © 2011 59 n-ary Relations Binary Relations Predicate Uniqueness Role Equality Predicate Equality Seq-Role Equality Irreflexive Role MandatorySybtype NUMBER Value Symmetric Unary Relations Disjunctive Mandatory Exclusive STRING Value Asymmetric Role Frequency Multi Role Frequency Total Objectification Anti Symmetric Role Uniqueness Role subset Predicate Subset Seq-Role Subset Intransitive External Uniqueness Role Exclusion Predicate Exclusion Seq-Role Exclusion Acyclic ORM Constructs and constraints MappedtoDLRMappedtoSHONOWLCannotmap
  60. 60. Jarrar © 2011 60 Predicate Uniqueness Seq-Role Equality Seq-Role Subset Seq-Role Exclusion Acyclic Multi Role Frequency n-ary Relations Objectification External Uniqueness Binary Relations Role Equality Predicate Equality Irreflexive Role Mandatory NUMBER Value Symmetric Unary Relations Disjunctive Mandatory Exclusive STRING Value Asymmetric Total Anti Symmetric Role Uniqueness Role subset Predicate Subset Intransitive Role Exclusion Predicate Exclusion Role Frequency Sybtype Lesson 1: what is mapped to what
  61. 61. Jarrar © 2011 61 Predicate Uniqueness Seq-Role Equality Seq-Role Subset Seq-Role Exclusion Acyclic Multi Role Frequency n-ary Relations Objectification External Uniqueness Binary Relations Role Equality Predicate Equality Irreflexive Role Mandatory NUMBER Value Symmetric Unary Relations Disjunctive Mandatory Exclusive STRING Value Asymmetric Total Anti Symmetric Role Uniqueness Role subset Predicate Subset Intransitive Role Exclusion Predicate Exclusion Role Frequency Sybtype Lesson 2: Decidable fragments Decidable
  62. 62. Jarrar © 2011 62 Description Logic Reasoners a short tutorial on DIG
  63. 63. Jarrar © 2011 63 • They offer reasoning services for multiple TBoxes and ABoxes. • They run as background reasoning engines. • They understand DIG, which is a simple protocol (based on HTTP) along with an XML Schema. Description Logic Reasoners <impliesc> <catom name="Student"/> <catom name="Person"/> </impliesc> Student ⊑ Person• Example: • For example:
  64. 64. Jarrar © 2011 64 DIG Interface (http://dig.sourceforge.net/ ) S. Bechhofer: The DIG Description Logic Interface: DIG/1.1 http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.104.3837&rep=rep1&type=pdf
  65. 65. Jarrar © 2011 65 DIG Interface (http://dig.sourceforge.net/ ) S. Bechhofer: The DIG Description Logic Interface: DIG/1.1 http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.104.3837&rep=rep1&type=pdf
  66. 66. Jarrar © 2011 66 DIG Protocol • DIG is only an XML schema for a description logic along with ask/tell functionality • You write a new Knowledge base (using the DIG XML syntax), and send it to Racer using the TELL functionality. • You can then write you Query/Question (using the DIG, XML syntax), and send it to Racer using the ASK functionality. • You may communicate with the Racer through HTTP or SOAP.
  67. 67. Jarrar © 2011 67 Create e a new Knowledge Base <?xml version="1.0" encoding="UTF-8"?> <newKB xmlns="http://dl.kr.org/dig/2003/02/lang" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dl.kr.org/dig/2003/02/lang http://dl-web.man.ac.uk/dig/2003/02/dig.xsd"/> <?xml version="1.0" encoding="UTF-8"?> <response xmlns="http://dl.kr.org/dig/2003/02/lang" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dl.kr.org/dig/2003/02/lang http://dl-web.man.ac.uk/dig/2003/02/dig.xsd"> <kb uri="urn:uuid:abcdefgh-1234-1234-12345689ab"/> The Response Message The newKB Message This URI should then be used during TELL and ASK requests made against the knowledge base
  68. 68. Jarrar © 2011 68 Tell Syntax <?xml version="1.0" encoding="ISO-8859-1"?> <tells xmlns="http://dl.kr.org/dig/2003/02/lang" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dl.kr.org/dig/2003/02/lang http://dl-web.man.ac.uk/dig/2003/02/dig.xsd" uri="urn:uuid:abcdefgh-1234-1234-12345689ab"> <defconcept name="driver"/> <equalc> <catom name="driver"/> <and> <catom name="person"/> <some> <ratom name="drives"/> <catom name="vehicle"/> </some> </and> </equalc> <defconcept name="person"/> <defconcept name="vehicle"/> <defrole name="drives"/> </tells> A TELL request must contain in its body a tells element, which itself consists of a number of tell statements. Example: Driver ⊑ Person ⊓ Drives.Vehicle
  69. 69. Jarrar © 2011 69 Tell Syntax Tell Language Primitive Concept Introduction <defconcept name="CN"/> <defrole name="CN"/> <deffeature name="CN"/> <defattribute name="CN"/> <defindividual name="CN"/> Concept Axioms <impliesc>C1 C2</impliesc> <equalc>C1 C2</equalc> <disjoint>C1... Cn</disjoint> Role Axioms <impliesr>R1 R2</impliesc> <equalr>R1 R2</equalr> <domain>R E</domain> <range>R E</range> <rangeint>R</rangeint> <rangestring>R</rangestring> <transitive>R</transitive> <functional>R</functional> Individual Axioms <instanceof>I C</instanceof> <related>I1 R I2</related> <value>I A V</value> Concept Language Primitive Concepts <top/> <bottom/> <catom name="CN"/> Boolean Operators <and>E1... En</and> <or>E1... En</or> <not>E</not> Property Restrictions <some>R E</some> <all>R E</all> <atmost num="n">R E</atmost> <atleast num="n">R E</atleast> <iset>I1... In</iset> Concrete Domain Expressions <defined>A</defined> <stringmin val="s">A</stringmin> <stringmax val="s">A</stringmax> <stringequals val="s">A</stringequals> <stringrange min="s" max="t">A</stringrange> <intmin val="i">A</intmin> <intmax val="i">A</intmax> <intequals val="i">A</intequals> <intrange min="i" max="j">A</intrange> Role Expressions <ratom name="CN"/> <feature name="CN"/> <inverse>R</inverse> <attribute name="CN"/> <chain>F1... FN A</chain> Individuals <individual name="CN"/>
  70. 70. Jarrar © 2011 70 Ask Syntax • An ASK request must contain in its body an asks element. • Multiple queries in one request is possible. <?xml version="1.0"?> <asks xmlns="http://dl.kr.org/dig/2003/02/lang"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dl.kr.org/dig/2003/02/lang" http://dl-web.man.ac.uk/dig/2003/02/dig.xsd" uri="urn:uuid:abcdefgh-1234-1234-12345689ab"> <satisfiable id="q1"> <catom name="Vehicle"/> </satisfiable> <descendants id="q2"> <and> <catom name="person"/> <some> <ratom name="drives"/> <catom name="vehicle"/> </some> </and> </descendants> <types id="q3"> <individual name="JohnSmith"></individual> </types> </asks> KB |= Vehicle asks about satisfiability of the Vehicle concept asks for all those concepts subsumed by the description given, i.e. all the drivers a |  |= Peron(a) ⊓Drives.Vehicle asks for the known types of the given individual C |  |= C(JohnSmith)
  71. 71. Jarrar © 2011 71 Ask Syntax Ask Language Primitive Concept Retrieval <allConceptNames/> <allRoleNames/> <allIndividuals/> Satisfiability <satisfiable>C</satisfiable> <subsumes>C1 C2</subsumes> <disjoint>C1 C2</disjoint> Concept Hierarchy <parents>C</parents> <children>C</children> <ancestors>C</ancestors> <descendants>C<descendants/> <equivalents>C</equivalents> Role Hierarchy <rparents>R</rparents> <rchildren>R</rchildren> <rancestors>R</rancestors> <rdescendants>R<rdescendants/> Individual Queries <instances>C</instances> <types>I</types> <instance>I C</instance> <roleFillers>I R</roleFillers> <relatedIndividuals>R</relatedIndividuals>

×