SlideShare a Scribd company logo
1 of 47
Download to read offline
Logic and Reasoning in
     the Semantic Web
     (part II – OWL)

Fulvio Corno, Laura Farinetti
Politecnico di Torino
Dipartimento di Automatica e Informatica
e-Lite Research Group – http://elite.polito.it
Outline
    Reasoning in Semantic Web Knowledge Bases
    RDF/RDFS Semantics and Entailments
    OWL Semantics
    Pellet
                                                 Part II




F. Corno, L. Farinetti - Politecnico di Torino             2
Outline
    Reasoning in Semantic Web Knowledge Bases
    RDF/RDFS Semantics and Entailments
    OWL Semantics
    Pellet




F. Corno, L. Farinetti - Politecnico di Torino   3
OWL supports…
    Superset of RDF/RDFS
        Factstating facilities from RDF
        Class property structuring from RDF Schema
    New logical operators
        Boolean   operators
        Property hierarchies
        Properties can be defined transitive, functional,
         inverse...
        Individuals can be defined instances
        Equivalence and disjointness statements on classes
        Equivalence statements on properties
        Equality and inequality can be asserted between
         individuals
F. Corno, L. Farinetti - Politecnico di Torino                4
OWL keywords




F. Corno, L. Farinetti - Politecnico di Torino   5
RDFS vs OWL
    In RDFS you can:
        declare classes like Artist, Museum or Paintings
        state that Painter is a subclass of Artist
        state that rembrandt is an instances of class Painter
        state that hasPainted is a property, with domain Painter
         and range Painting.
        state that rembrand is an instance of Dutchman with
         deathdate value 1669.




F. Corno, L. Farinetti - Politecnico di Torino                  6
RDFS vs OWL
    In OWL you can also:
        state that Country and Person are disjoint classes
        state that the nl and england are distinct individuals of
         the class Country
        declare hasPainted as inverse property of paintedBy
        state that the class stateless is defined as those
         members of the class Person that have no values for
         the property nationality
        state that the class Canadian is defined as those
         members of the class Person that have canada as a
         value of the property nationality
        state that age is a functional property.

F. Corno, L. Farinetti - Politecnico di Torino                       7
And now?
    OWL comes with 2 formal reasoning systems
        OWL-Lite
                with 1st-order logic
        OWL-DL with Description Logic
    We can reason by combining
        Available ontologies
        Available facts




F. Corno, L. Farinetti - Politecnico di Torino   8
The ingredients
    Ontology (e.g., in OWL-DL)
    Facts (e.g., objects and instances)
    A reasoning algorithm (for DL)
    A reasoning engine
    A way to express queries
    A way to present results




F. Corno, L. Farinetti - Politecnico di Torino   9
Description logic




F. Corno, L. Farinetti - Politecnico di Torino   10
OWL-DL Semantics
    The semantics of OWL-DL constructs is derived by
     the corresponding Description Logic operators.
    The formal definition is extremely concise
        http://www.w3.org/TR/owl-semantics/semantics-
         all.html#3
        ...but not so straightforward to understand!




F. Corno, L. Farinetti - Politecnico di Torino           11
F. Corno, L. Farinetti - Politecnico di Torino   12
F. Corno, L. Farinetti - Politecnico di Torino   13
OWL Formal semantics
 http://www.w3.org/TR/owl-semantics/semantics-
  all.html#3
 Ingredients:
     Vocabularies Vxx
     Mapping functions (which provide „meaning‟) EC, ER
     Interpretation of syntax constructs
     Interpretation of axioms and facts
Interpretation of constructs
Abstract Syntax                                      Interpretation (value of EC)
complementOf(c)                                      O - EC(c)
unionOf(c1 … cn)                                     EC(c1) ∪ … ∪ EC(cn)
intersectionOf(c1 … cn)                              EC(c1) ∩ … ∩ EC(cn)
oneOf(i1 … in), for ij individual IDs                {S(i1), …, S(in)}
oneOf(v1 … vn), for vj literals                      {S(v1), …, S(vn)}
restriction(p x1 … xn), for n > 1                    EC(restriction(p x1)) ∩…∩EC(restriction(p xn))
restriction(p allValuesFrom(r))                      {x ∈ O | <x,y> ∈ ER(p) implies y ∈ EC(r)}
restriction(p someValuesFrom(e))                     {x ∈ O | ∃ <x,y> ∈ ER(p) ∧ y ∈ EC(e)}
restriction(p value(i)), for i an individual ID      {x ∈ O | <x,S(i)> ∈ ER(p)}
restriction(p value(v)), for v a literal             {x ∈ O | <x,S(v)> ∈ ER(p)}
restriction(p minCardinality(n))                     {x ∈ O | card({y ∈ O∪LV : <x,y> ∈ ER(p)}) ≥ n}
restriction(p maxCardinality(n))                     {x ∈ O | card({y ∈ O∪LV : <x,y> ∈ ER(p)}) ≤ n}
restriction(p cardinality(n))                        {x ∈ O | card({y ∈ O∪LV : <x,y> ∈ ER(p)}) = n}
Individual(annotation(p1 o1) … annotation(pk ok)     EC(annotation(p1 o1)) ∩ … EC(annotation(pk ok)) ∩
   type(c1) … type(cm) pv1 … pvn)                    EC(c1) ∩ … ∩ EC(cm) ∩ EC(pv1) ∩…∩ EC(pvn)
                                                     {S(i)} ∩ EC(annotation(p1 o1)) ∩ … EC(annotation(pk ok))
Individual(i annotation(p1 o1) … annotation(pk ok)
                                                     ∩
  type(c1) … type(cm) pv1 … pvn)
                                                     EC(c1) ∩ … ∩ EC(cm) ∩ EC(pv1) ∩…∩ EC(pvn)
value(p Individual(…))                               {x ∈ O | ∃ y∈EC(Individual(…)) : <x,y> ∈ ER(p)}
value(p id) for id an individual ID                  {x ∈ O | <x,S(id)> ∈ ER(p) }
value(p v) for v a literal                           {x ∈ O | <x,S(v)> ∈ ER(p) }
annotation(p o) for o a URI reference                {x ∈ R | <x,S(o)> ∈ ER(p) }
annotation(p Individual(…))                          {x ∈ R | ∃ y ∈ EC(Individual(…)) : <x,y> ∈ ER(p) }
Interpretation of axioms and facts I
Directive                                      Conditions on interpretations
Class(c complete                               S(c) ∈ EC(annotation(p1 o1)) … S(c) ∈
  annotation(p1 o1) … annotation(pk ok)        EC(annotation(pk ok))
  descr1 … descrn)                             EC(c) = EC(descr1) ∩…∩ EC(descrn)
Class(c partial                                S(c) ∈ EC(annotation(p1 o1)) … S(c) ∈
  annotation(p1 o1) … annotation(pk ok)        EC(annotation(pk ok))
  descr1 … descrn)                             EC(c) ⊆ EC(descr1) ∩…∩ EC(descrn)
EnumeratedClass(c                              S(c) ∈ EC(annotation(p1 o1)) … S(c) ∈
  annotation(p1 o1) … annotation(pk ok)        EC(annotation(pk ok))
  i1 … in)                                     EC(c) = { S(i1), …, S(in) }
Datatype(c                                     S(c) ∈ EC(annotation(p1 o1)) … S(c) ∈
annotation(p1 o1) … annotation(pk ok) )        EC(annotation(pk ok))
                                               EC(c) ⊆ LV
DisjointClasses(d1 … dn)                       EC(di) ∩ EC(dj) = { } for 1 ≤ i < j ≤ n
EquivalentClasses(d1 … dn)                     EC(di) = EC(dj) for 1 ≤ i < j ≤ n
SubClassOf(d1 d2)                              EC(d1) ⊆ EC(d2)
DatatypeProperty(p                             S(p) ∈ EC(annotation(p1 o1)) … S(p) ∈
    annotation(p1 o1) … annotation(pk ok)      EC(annotation(pk ok))
    super(s1) … super(sn)                      ER(p) ⊆ O×LV ∩ ER(s1) ∩…∩ ER(sn) ∩
    domain(d1) … domain(dn) range(r1) … range(     EC(d1)×LV ∩…∩ EC(dn)×LV ∩ O×EC(r1)
rn)                                            ∩…∩ O×EC(rn)
    [Functional])                              [ER(p) is functional]
                        …                                               …
Interpretation of axioms and facts II
Directive                                          Conditions on interpretations
ObjectProperty(p                                   S(p) ∈ EC(annotation(p1 o1)) … S(p) ∈
    annotation(p1 o1) … annotation(pk ok)          EC(annotation(pk ok))
    super(s1) … super(sn)                          ER(p) ⊆ O×O ∩ ER(s1) ∩…∩ ER(sn) ∩
    domain(d1) … domain(dn) range(r1) … range(            EC(d1)×O ∩…∩ EC(dn)×O ∩ O×EC(r1)
rn)                                                ∩…∩ O×EC(rn)
    [inverse(i)] [Symmetric]                       [ER(p) is the inverse of ER(i)] [ER(p) is
    [Functional] [ InverseFunctional]              symmetric]
    [Transitive])                                  [ER(p) is functional] [ER(p) is inverse
                                                   functional]
                                                   [ER(p) is transitive]
AnnotationProperty(p annotation(p1 o1) … annot S(p) ∈ EC(annotation(p1 o1)) … S(p) ∈
ation(pk ok))                                      EC(annotation(pk ok))
OntologyProperty(p annotation(p1 o1) … annotat S(p) ∈ EC(annotation(p1 o1)) … S(p) ∈
ion(pk ok))                                        EC(annotation(pk ok))
EquivalentProperties(p1 … pn)                      ER(pi) = ER(pj) for 1 ≤ i < j ≤ n
SubPropertyOf(p1 p2)                               ER(p1) ⊆ ER(p2)
SameIndividual(i1 … in)                            S(ij) = S(ik) for 1 ≤ j < k ≤ n
DifferentIndividuals(i1 … in)                      S(ij) ≠ S(ik) for 1 ≤ j < k ≤ n
Individual([i] annotation(p1 o1) … annotation(pk o EC(Individual([i] annotation(p1 o1) … annotation(
k)                                                 pk ok )
   type(c1) … type(cm) pv1 … pvn)                    type(c1) … type(cm) pv1 … pvn)) is nonempty
Definitions (I)
• Let D be a datatype map. An Abstract OWL interpretation,
  I, with respect to D with vocabulary consisting of VL, VC,
  VD, VI, VDP, VIP, VAP, VO, satisfies an OWL ontology, O, iff
   • each URI reference in O used as a class ID (datatype ID,
     individual ID, data-valued property ID, individual-valued
     property ID, annotation property ID, annotation ID, ontology
     ID) belongs to VC (VD, VI, VDP, VIP, VAP, VO, respectively);
   • each literal in O belongs to VL;
   • I satisfies each directive in O, except for Ontology
     Annotations;
   • there is some o ∈ R with <o,S(owl:Ontology)> ∈
     ER(rdf:type) such that for each Ontology Annotation of the
     form Annotation(p v), <o,S(v)> ∈ ER(p) and that if O has
     name n, then S(n) = o;
   • I satisfies each ontology mentioned in
     an owl:imports annotation directive of O.
Definitions (II)
A collection of abstract OWL ontologies and axioms
 and facts is consistent with respect to datatype map
 D iff there is some interpretation I with respect to
 D such that I satisfies each ontology and axiom and
 fact in the collection.
A collection O of abstract OWL ontologies and axioms
 and facts entails an abstract OWL ontology or axiom
 or fact O' with respect to a datatype map D if each
 interpretation with respect to map D that satisfies
 each ontology and axiom and fact in O also
 satisfies O'.
Reasoning
 With the definition of the semantics, we may now
  define some reasoning metods
   Reasoning on the structure of the ontology
   Reasoning on relationships among classes
   Reasoning on instances
F. Corno, L. Farinetti - Politecnico di Torino   21
F. Corno, L. Farinetti - Politecnico di Torino   22
F. Corno, L. Farinetti - Politecnico di Torino   23
Is this applicable?
    Logic = Perfect reasoning under perfect conditions
    therefore…
        unlimited time
        homogeneous knowledge
        correct and consistent knowledge




F. Corno, L. Farinetti - Politecnico di Torino            24
Is Logic good?
    Pro                                            Con
        Strong theoretical basis                     Strict (no “good
        Well known properties                         enough” answers)
        Well known                                   Abrupt (no intermediate
         implementation                                answers)
         techniques                                   Inefficient (no
                                                       time/quality trade-off)




F. Corno, L. Farinetti - Politecnico di Torino                               25
Practical limitations
    Terminologies will be sloppy
        Made  by non-experts
        Made by machines
        Inference rules break!
    No standard vocabulary
        Communication problems
        Need approximate equivalence
    Computational explosion




F. Corno, L. Farinetti - Politecnico di Torino   26
Outline
    Reasoning in Semantic Web Knowledge Bases
    RDF/RDFS Semantics and Entailments
    OWL Semantics
    Pellet




F. Corno, L. Farinetti - Politecnico di Torino   27
Pellet: an OWL-DL Reasoner
    Pellet is a complete and feature-rich reasoner for
     OWL-DL
    Available open-source at http://clarkparsia.com/pellet
    Available standalone, or integrated with the major
     ontology development environments (including
     Protégé)




F. Corno, L. Farinetti - Politecnico di Torino                28
What is an OWL-DL reasoner
    The official normative definition:
        An   OWL consistency checker takes a document as
           input, and returns one word being Consistent,
           Inconsistent, or Unknown. [J. J. Carroll, J. D. Roo, OWL Web Ontology
           Language Test Cases, W3C Recommendation http://www.w3.org/TR/owl-test/ (2004).]

        Rather   restrictive... and not very useful for ontology
           development, debug and querying




F. Corno, L. Farinetti - Politecnico di Torino                                               29
Practical Description Logics
    Most theoretical works on Description Logics are
     concerned with the “upper” part of the ontology
     (classes, relationships)
    Object Instances are equally important, if not more, in
     the Semantic Web
    Reasoning over instances is “easier”, but their
     number may be far larger that the number of classes




F. Corno, L. Farinetti - Politecnico di Torino             30
DL Jargon
Abbr.                Stands for      Meaning
ABox                 Assertional Box Component that contains assertions
                                     about individuals,
                                     i.e. OWL facts such as type, property-
                                     value, equality or
                                     inequality assertions.
TBox                 Terminological Component that contains axioms
                     Box             about classes, i.e. OWL
                                     axioms such as subclass, equivalent
                                     class or disjointness
                                     axioms.
KB                   Knowledge       A combination of an ABox and a
                     Base            TBox, i.e. a complete
                                     OWL ontology.
F. Corno, L. Farinetti - Politecnico di Torino                           31
Classical Types of Logic Inference
    Consistency checking, which ensures that an
     ontology does not contain any contradictory facts.
        The OWL Abstract Syntax & Semantics document
         [S&AS] provides a formal definition of ontology
         consistency that Pellet uses.
        In DL terminology, this is the operation to check the
         consistency of an ABox with respect to a Tbox.
        Equivalent to OWL Consistency Checking




F. Corno, L. Farinetti - Politecnico di Torino                   32
Classical Types of Logic Inference
    Concept satisfiability, which checks if it is possible
     for a class to have any instances. If class is
     unsatisfiable, then defining an instance of the class
     will cause the whole ontology to be inconsistent.




F. Corno, L. Farinetti - Politecnico di Torino                33
Classical Types of Logic Inference
    Classification, which computes the subclass
     relations between every named class to create the
     complete class hierarchy. The class hierarchy can be
     used to answer queries such as getting all or only the
     direct subclasses of a class.




F. Corno, L. Farinetti - Politecnico di Torino            34
Classical Types of Logic Inference
    Realization, which finds the most specific classes
     that an individual belongs to; or in other words,
     computes the direct types for each of the individuals.
     Realization can only be performed after classification
     since direct types are defined with




F. Corno, L. Farinetti - Politecnico di Torino                35
Pellet architecture




F. Corno, L. Farinetti - Politecnico di Torino   36
Launching Pellet




F. Corno, L. Farinetti - Politecnico di Torino   37
Using Pellet in Protégé




F. Corno, L. Farinetti - Politecnico di Torino   38
Using Pellet in Protégé




F. Corno, L. Farinetti - Politecnico di Torino   39
Activating Inference steps




F. Corno, L. Farinetti - Politecnico di Torino   40
Consistency checking




F. Corno, L. Farinetti - Politecnico di Torino   41
Consistency checking – usually




F. Corno, L. Farinetti - Politecnico di Torino   42
Consistency checking – usually




F. Corno, L. Farinetti - Politecnico di Torino   43
References
    Course material for “Practical Reasoning for the
     Semantic Web” course at the 17th European Summer
     School in Logic, Language and Information (ESSLLI)
        http://www.few.vu.nl/~schlobac/
    E. Sirin, B. Parsia, B. C. Grau, A. Kalyanpur, and Y.
     Katz, "Pellet: A practical owl-dl reasoner," Web
     Semantics: Science, Services and Agents on the
     World Wide Web, vol. 5, no. 2, pp. 51-53, June 2007.
     [Online]. Available:
     http://dx.doi.org/10.1016/j.websem.2007.03.004



F. Corno, L. Farinetti - Politecnico di Torino               44
References
    OWL Web Ontology Language: Semantics and
     Abstract Syntax – W3C Recommendation 10
     February 2004 [S&AS]
        http://www.w3.org/TR/owl-semantics/




F. Corno, L. Farinetti - Politecnico di Torino   45
References
    http://www.aaai.org/AITopics/html/reason.html
    http://media.cwi.nl/survey/
    http://dose.sourceforge.net/
    http://www.mkbergman.com




F. Corno, L. Farinetti - Politecnico di Torino       46
License
    This work is licensed under the Creative Commons
     Attribution-Noncommercial-Share Alike 3.0
     Unported License.
    To view a copy of this license, visit
     http://creativecommons.org/licenses/by-nc-sa/3.0/ or
     send a letter to Creative Commons, 171 Second
     Street, Suite 300, San Francisco, California, 94105,
     USA.




F. Corno, L. Farinetti - Politecnico di Torino              47

More Related Content

Similar to Logic and Reasoning in the Semantic Web (part II –OWL)

Lecture 4 - Growth of Functions (1).ppt
Lecture 4 - Growth of Functions (1).pptLecture 4 - Growth of Functions (1).ppt
Lecture 4 - Growth of Functions (1).ppt
ZohairMughal1
 
Laplace1 8merged
Laplace1 8mergedLaplace1 8merged
Laplace1 8merged
cohtran
 
6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf
shruti533256
 
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionJarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
PalGov
 

Similar to Logic and Reasoning in the Semantic Web (part II –OWL) (20)

Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Linear prediction
Linear predictionLinear prediction
Linear prediction
 
LL Parsing
LL ParsingLL Parsing
LL Parsing
 
Alastair Butler - 2015 - Round trips with meaning stopovers
Alastair Butler - 2015 - Round trips with meaning stopoversAlastair Butler - 2015 - Round trips with meaning stopovers
Alastair Butler - 2015 - Round trips with meaning stopovers
 
Petrifying Operating Guidelines for Web Services
Petrifying Operating Guidelines for Web ServicesPetrifying Operating Guidelines for Web Services
Petrifying Operating Guidelines for Web Services
 
Lecture 4 - Growth of Functions (1).ppt
Lecture 4 - Growth of Functions (1).pptLecture 4 - Growth of Functions (1).ppt
Lecture 4 - Growth of Functions (1).ppt
 
Lecture 4 - Growth of Functions.ppt
Lecture 4 - Growth of Functions.pptLecture 4 - Growth of Functions.ppt
Lecture 4 - Growth of Functions.ppt
 
Laplace1 8merged
Laplace1 8mergedLaplace1 8merged
Laplace1 8merged
 
6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf
 
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingCompiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
 
Odepowerpointpresentation1
Odepowerpointpresentation1 Odepowerpointpresentation1
Odepowerpointpresentation1
 
09 - 27 Jan - Recursion Part 1
09 - 27 Jan - Recursion Part 109 - 27 Jan - Recursion Part 1
09 - 27 Jan - Recursion Part 1
 
AlgoComplexcity.pdf
AlgoComplexcity.pdfAlgoComplexcity.pdf
AlgoComplexcity.pdf
 
CONTINUITY ON N-ARY SPACES
CONTINUITY ON N-ARY SPACESCONTINUITY ON N-ARY SPACES
CONTINUITY ON N-ARY SPACES
 
Fuzzy Bitopological Ideals Spaces
Fuzzy Bitopological Ideals SpacesFuzzy Bitopological Ideals Spaces
Fuzzy Bitopological Ideals Spaces
 
Slides: Total Jensen divergences: Definition, Properties and k-Means++ Cluste...
Slides: Total Jensen divergences: Definition, Properties and k-Means++ Cluste...Slides: Total Jensen divergences: Definition, Properties and k-Means++ Cluste...
Slides: Total Jensen divergences: Definition, Properties and k-Means++ Cluste...
 
The Persistent Homology of Distance Functions under Random Projection
The Persistent Homology of Distance Functions under Random ProjectionThe Persistent Homology of Distance Functions under Random Projection
The Persistent Homology of Distance Functions under Random Projection
 
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionJarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
 
Some properties of m sequences over finite field fp
Some properties of m sequences over finite field fpSome properties of m sequences over finite field fp
Some properties of m sequences over finite field fp
 
Going bananas with recursion schemes for fixed point data types
Going bananas with recursion schemes for fixed point data typesGoing bananas with recursion schemes for fixed point data types
Going bananas with recursion schemes for fixed point data types
 

Recently uploaded

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 

Recently uploaded (20)

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 

Logic and Reasoning in the Semantic Web (part II –OWL)

  • 1. Logic and Reasoning in the Semantic Web (part II – OWL) Fulvio Corno, Laura Farinetti Politecnico di Torino Dipartimento di Automatica e Informatica e-Lite Research Group – http://elite.polito.it
  • 2. Outline  Reasoning in Semantic Web Knowledge Bases  RDF/RDFS Semantics and Entailments  OWL Semantics  Pellet Part II F. Corno, L. Farinetti - Politecnico di Torino 2
  • 3. Outline  Reasoning in Semantic Web Knowledge Bases  RDF/RDFS Semantics and Entailments  OWL Semantics  Pellet F. Corno, L. Farinetti - Politecnico di Torino 3
  • 4. OWL supports…  Superset of RDF/RDFS  Factstating facilities from RDF  Class property structuring from RDF Schema  New logical operators  Boolean operators  Property hierarchies  Properties can be defined transitive, functional, inverse...  Individuals can be defined instances  Equivalence and disjointness statements on classes  Equivalence statements on properties  Equality and inequality can be asserted between individuals F. Corno, L. Farinetti - Politecnico di Torino 4
  • 5. OWL keywords F. Corno, L. Farinetti - Politecnico di Torino 5
  • 6. RDFS vs OWL  In RDFS you can:  declare classes like Artist, Museum or Paintings  state that Painter is a subclass of Artist  state that rembrandt is an instances of class Painter  state that hasPainted is a property, with domain Painter and range Painting.  state that rembrand is an instance of Dutchman with deathdate value 1669. F. Corno, L. Farinetti - Politecnico di Torino 6
  • 7. RDFS vs OWL  In OWL you can also:  state that Country and Person are disjoint classes  state that the nl and england are distinct individuals of the class Country  declare hasPainted as inverse property of paintedBy  state that the class stateless is defined as those members of the class Person that have no values for the property nationality  state that the class Canadian is defined as those members of the class Person that have canada as a value of the property nationality  state that age is a functional property. F. Corno, L. Farinetti - Politecnico di Torino 7
  • 8. And now?  OWL comes with 2 formal reasoning systems  OWL-Lite with 1st-order logic  OWL-DL with Description Logic  We can reason by combining  Available ontologies  Available facts F. Corno, L. Farinetti - Politecnico di Torino 8
  • 9. The ingredients  Ontology (e.g., in OWL-DL)  Facts (e.g., objects and instances)  A reasoning algorithm (for DL)  A reasoning engine  A way to express queries  A way to present results F. Corno, L. Farinetti - Politecnico di Torino 9
  • 10. Description logic F. Corno, L. Farinetti - Politecnico di Torino 10
  • 11. OWL-DL Semantics  The semantics of OWL-DL constructs is derived by the corresponding Description Logic operators.  The formal definition is extremely concise  http://www.w3.org/TR/owl-semantics/semantics- all.html#3  ...but not so straightforward to understand! F. Corno, L. Farinetti - Politecnico di Torino 11
  • 12. F. Corno, L. Farinetti - Politecnico di Torino 12
  • 13. F. Corno, L. Farinetti - Politecnico di Torino 13
  • 14. OWL Formal semantics  http://www.w3.org/TR/owl-semantics/semantics- all.html#3  Ingredients:  Vocabularies Vxx  Mapping functions (which provide „meaning‟) EC, ER  Interpretation of syntax constructs  Interpretation of axioms and facts
  • 15. Interpretation of constructs Abstract Syntax Interpretation (value of EC) complementOf(c) O - EC(c) unionOf(c1 … cn) EC(c1) ∪ … ∪ EC(cn) intersectionOf(c1 … cn) EC(c1) ∩ … ∩ EC(cn) oneOf(i1 … in), for ij individual IDs {S(i1), …, S(in)} oneOf(v1 … vn), for vj literals {S(v1), …, S(vn)} restriction(p x1 … xn), for n > 1 EC(restriction(p x1)) ∩…∩EC(restriction(p xn)) restriction(p allValuesFrom(r)) {x ∈ O | <x,y> ∈ ER(p) implies y ∈ EC(r)} restriction(p someValuesFrom(e)) {x ∈ O | ∃ <x,y> ∈ ER(p) ∧ y ∈ EC(e)} restriction(p value(i)), for i an individual ID {x ∈ O | <x,S(i)> ∈ ER(p)} restriction(p value(v)), for v a literal {x ∈ O | <x,S(v)> ∈ ER(p)} restriction(p minCardinality(n)) {x ∈ O | card({y ∈ O∪LV : <x,y> ∈ ER(p)}) ≥ n} restriction(p maxCardinality(n)) {x ∈ O | card({y ∈ O∪LV : <x,y> ∈ ER(p)}) ≤ n} restriction(p cardinality(n)) {x ∈ O | card({y ∈ O∪LV : <x,y> ∈ ER(p)}) = n} Individual(annotation(p1 o1) … annotation(pk ok) EC(annotation(p1 o1)) ∩ … EC(annotation(pk ok)) ∩ type(c1) … type(cm) pv1 … pvn) EC(c1) ∩ … ∩ EC(cm) ∩ EC(pv1) ∩…∩ EC(pvn) {S(i)} ∩ EC(annotation(p1 o1)) ∩ … EC(annotation(pk ok)) Individual(i annotation(p1 o1) … annotation(pk ok) ∩ type(c1) … type(cm) pv1 … pvn) EC(c1) ∩ … ∩ EC(cm) ∩ EC(pv1) ∩…∩ EC(pvn) value(p Individual(…)) {x ∈ O | ∃ y∈EC(Individual(…)) : <x,y> ∈ ER(p)} value(p id) for id an individual ID {x ∈ O | <x,S(id)> ∈ ER(p) } value(p v) for v a literal {x ∈ O | <x,S(v)> ∈ ER(p) } annotation(p o) for o a URI reference {x ∈ R | <x,S(o)> ∈ ER(p) } annotation(p Individual(…)) {x ∈ R | ∃ y ∈ EC(Individual(…)) : <x,y> ∈ ER(p) }
  • 16. Interpretation of axioms and facts I Directive Conditions on interpretations Class(c complete S(c) ∈ EC(annotation(p1 o1)) … S(c) ∈ annotation(p1 o1) … annotation(pk ok) EC(annotation(pk ok)) descr1 … descrn) EC(c) = EC(descr1) ∩…∩ EC(descrn) Class(c partial S(c) ∈ EC(annotation(p1 o1)) … S(c) ∈ annotation(p1 o1) … annotation(pk ok) EC(annotation(pk ok)) descr1 … descrn) EC(c) ⊆ EC(descr1) ∩…∩ EC(descrn) EnumeratedClass(c S(c) ∈ EC(annotation(p1 o1)) … S(c) ∈ annotation(p1 o1) … annotation(pk ok) EC(annotation(pk ok)) i1 … in) EC(c) = { S(i1), …, S(in) } Datatype(c S(c) ∈ EC(annotation(p1 o1)) … S(c) ∈ annotation(p1 o1) … annotation(pk ok) ) EC(annotation(pk ok)) EC(c) ⊆ LV DisjointClasses(d1 … dn) EC(di) ∩ EC(dj) = { } for 1 ≤ i < j ≤ n EquivalentClasses(d1 … dn) EC(di) = EC(dj) for 1 ≤ i < j ≤ n SubClassOf(d1 d2) EC(d1) ⊆ EC(d2) DatatypeProperty(p S(p) ∈ EC(annotation(p1 o1)) … S(p) ∈ annotation(p1 o1) … annotation(pk ok) EC(annotation(pk ok)) super(s1) … super(sn) ER(p) ⊆ O×LV ∩ ER(s1) ∩…∩ ER(sn) ∩ domain(d1) … domain(dn) range(r1) … range( EC(d1)×LV ∩…∩ EC(dn)×LV ∩ O×EC(r1) rn) ∩…∩ O×EC(rn) [Functional]) [ER(p) is functional] … …
  • 17. Interpretation of axioms and facts II Directive Conditions on interpretations ObjectProperty(p S(p) ∈ EC(annotation(p1 o1)) … S(p) ∈ annotation(p1 o1) … annotation(pk ok) EC(annotation(pk ok)) super(s1) … super(sn) ER(p) ⊆ O×O ∩ ER(s1) ∩…∩ ER(sn) ∩ domain(d1) … domain(dn) range(r1) … range( EC(d1)×O ∩…∩ EC(dn)×O ∩ O×EC(r1) rn) ∩…∩ O×EC(rn) [inverse(i)] [Symmetric] [ER(p) is the inverse of ER(i)] [ER(p) is [Functional] [ InverseFunctional] symmetric] [Transitive]) [ER(p) is functional] [ER(p) is inverse functional] [ER(p) is transitive] AnnotationProperty(p annotation(p1 o1) … annot S(p) ∈ EC(annotation(p1 o1)) … S(p) ∈ ation(pk ok)) EC(annotation(pk ok)) OntologyProperty(p annotation(p1 o1) … annotat S(p) ∈ EC(annotation(p1 o1)) … S(p) ∈ ion(pk ok)) EC(annotation(pk ok)) EquivalentProperties(p1 … pn) ER(pi) = ER(pj) for 1 ≤ i < j ≤ n SubPropertyOf(p1 p2) ER(p1) ⊆ ER(p2) SameIndividual(i1 … in) S(ij) = S(ik) for 1 ≤ j < k ≤ n DifferentIndividuals(i1 … in) S(ij) ≠ S(ik) for 1 ≤ j < k ≤ n Individual([i] annotation(p1 o1) … annotation(pk o EC(Individual([i] annotation(p1 o1) … annotation( k) pk ok ) type(c1) … type(cm) pv1 … pvn) type(c1) … type(cm) pv1 … pvn)) is nonempty
  • 18. Definitions (I) • Let D be a datatype map. An Abstract OWL interpretation, I, with respect to D with vocabulary consisting of VL, VC, VD, VI, VDP, VIP, VAP, VO, satisfies an OWL ontology, O, iff • each URI reference in O used as a class ID (datatype ID, individual ID, data-valued property ID, individual-valued property ID, annotation property ID, annotation ID, ontology ID) belongs to VC (VD, VI, VDP, VIP, VAP, VO, respectively); • each literal in O belongs to VL; • I satisfies each directive in O, except for Ontology Annotations; • there is some o ∈ R with <o,S(owl:Ontology)> ∈ ER(rdf:type) such that for each Ontology Annotation of the form Annotation(p v), <o,S(v)> ∈ ER(p) and that if O has name n, then S(n) = o; • I satisfies each ontology mentioned in an owl:imports annotation directive of O.
  • 19. Definitions (II) A collection of abstract OWL ontologies and axioms and facts is consistent with respect to datatype map D iff there is some interpretation I with respect to D such that I satisfies each ontology and axiom and fact in the collection. A collection O of abstract OWL ontologies and axioms and facts entails an abstract OWL ontology or axiom or fact O' with respect to a datatype map D if each interpretation with respect to map D that satisfies each ontology and axiom and fact in O also satisfies O'.
  • 20. Reasoning  With the definition of the semantics, we may now define some reasoning metods  Reasoning on the structure of the ontology  Reasoning on relationships among classes  Reasoning on instances
  • 21. F. Corno, L. Farinetti - Politecnico di Torino 21
  • 22. F. Corno, L. Farinetti - Politecnico di Torino 22
  • 23. F. Corno, L. Farinetti - Politecnico di Torino 23
  • 24. Is this applicable?  Logic = Perfect reasoning under perfect conditions  therefore…  unlimited time  homogeneous knowledge  correct and consistent knowledge F. Corno, L. Farinetti - Politecnico di Torino 24
  • 25. Is Logic good?  Pro  Con  Strong theoretical basis  Strict (no “good  Well known properties enough” answers)  Well known  Abrupt (no intermediate implementation answers) techniques  Inefficient (no time/quality trade-off) F. Corno, L. Farinetti - Politecnico di Torino 25
  • 26. Practical limitations  Terminologies will be sloppy  Made by non-experts  Made by machines  Inference rules break!  No standard vocabulary  Communication problems  Need approximate equivalence  Computational explosion F. Corno, L. Farinetti - Politecnico di Torino 26
  • 27. Outline  Reasoning in Semantic Web Knowledge Bases  RDF/RDFS Semantics and Entailments  OWL Semantics  Pellet F. Corno, L. Farinetti - Politecnico di Torino 27
  • 28. Pellet: an OWL-DL Reasoner  Pellet is a complete and feature-rich reasoner for OWL-DL  Available open-source at http://clarkparsia.com/pellet  Available standalone, or integrated with the major ontology development environments (including Protégé) F. Corno, L. Farinetti - Politecnico di Torino 28
  • 29. What is an OWL-DL reasoner  The official normative definition:  An OWL consistency checker takes a document as input, and returns one word being Consistent, Inconsistent, or Unknown. [J. J. Carroll, J. D. Roo, OWL Web Ontology Language Test Cases, W3C Recommendation http://www.w3.org/TR/owl-test/ (2004).]  Rather restrictive... and not very useful for ontology development, debug and querying F. Corno, L. Farinetti - Politecnico di Torino 29
  • 30. Practical Description Logics  Most theoretical works on Description Logics are concerned with the “upper” part of the ontology (classes, relationships)  Object Instances are equally important, if not more, in the Semantic Web  Reasoning over instances is “easier”, but their number may be far larger that the number of classes F. Corno, L. Farinetti - Politecnico di Torino 30
  • 31. DL Jargon Abbr. Stands for Meaning ABox Assertional Box Component that contains assertions about individuals, i.e. OWL facts such as type, property- value, equality or inequality assertions. TBox Terminological Component that contains axioms Box about classes, i.e. OWL axioms such as subclass, equivalent class or disjointness axioms. KB Knowledge A combination of an ABox and a Base TBox, i.e. a complete OWL ontology. F. Corno, L. Farinetti - Politecnico di Torino 31
  • 32. Classical Types of Logic Inference  Consistency checking, which ensures that an ontology does not contain any contradictory facts.  The OWL Abstract Syntax & Semantics document [S&AS] provides a formal definition of ontology consistency that Pellet uses.  In DL terminology, this is the operation to check the consistency of an ABox with respect to a Tbox.  Equivalent to OWL Consistency Checking F. Corno, L. Farinetti - Politecnico di Torino 32
  • 33. Classical Types of Logic Inference  Concept satisfiability, which checks if it is possible for a class to have any instances. If class is unsatisfiable, then defining an instance of the class will cause the whole ontology to be inconsistent. F. Corno, L. Farinetti - Politecnico di Torino 33
  • 34. Classical Types of Logic Inference  Classification, which computes the subclass relations between every named class to create the complete class hierarchy. The class hierarchy can be used to answer queries such as getting all or only the direct subclasses of a class. F. Corno, L. Farinetti - Politecnico di Torino 34
  • 35. Classical Types of Logic Inference  Realization, which finds the most specific classes that an individual belongs to; or in other words, computes the direct types for each of the individuals. Realization can only be performed after classification since direct types are defined with F. Corno, L. Farinetti - Politecnico di Torino 35
  • 36. Pellet architecture F. Corno, L. Farinetti - Politecnico di Torino 36
  • 37. Launching Pellet F. Corno, L. Farinetti - Politecnico di Torino 37
  • 38. Using Pellet in Protégé F. Corno, L. Farinetti - Politecnico di Torino 38
  • 39. Using Pellet in Protégé F. Corno, L. Farinetti - Politecnico di Torino 39
  • 40. Activating Inference steps F. Corno, L. Farinetti - Politecnico di Torino 40
  • 41. Consistency checking F. Corno, L. Farinetti - Politecnico di Torino 41
  • 42. Consistency checking – usually F. Corno, L. Farinetti - Politecnico di Torino 42
  • 43. Consistency checking – usually F. Corno, L. Farinetti - Politecnico di Torino 43
  • 44. References  Course material for “Practical Reasoning for the Semantic Web” course at the 17th European Summer School in Logic, Language and Information (ESSLLI)  http://www.few.vu.nl/~schlobac/  E. Sirin, B. Parsia, B. C. Grau, A. Kalyanpur, and Y. Katz, "Pellet: A practical owl-dl reasoner," Web Semantics: Science, Services and Agents on the World Wide Web, vol. 5, no. 2, pp. 51-53, June 2007. [Online]. Available: http://dx.doi.org/10.1016/j.websem.2007.03.004 F. Corno, L. Farinetti - Politecnico di Torino 44
  • 45. References  OWL Web Ontology Language: Semantics and Abstract Syntax – W3C Recommendation 10 February 2004 [S&AS]  http://www.w3.org/TR/owl-semantics/ F. Corno, L. Farinetti - Politecnico di Torino 45
  • 46. References  http://www.aaai.org/AITopics/html/reason.html  http://media.cwi.nl/survey/  http://dose.sourceforge.net/  http://www.mkbergman.com F. Corno, L. Farinetti - Politecnico di Torino 46
  • 47. License  This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.  To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. F. Corno, L. Farinetti - Politecnico di Torino 47