SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
Rule-based reasoning in
     the Semantic Web

Fulvio Corno, Laura Farinetti
Politecnico di Torino
Dipartimento di Automatica e Informatica
e-Lite Research Group – http://elite.polito.it
Outline
 Motivation
 SWRL
 RIF




F. Corno, L. Farinetti - Politecnico di Torino   2
Motivation
    Classical reasoning operations in OWL only allow
     very limited use cases
        Consistency
        Class properties and relationships
        Instance classification
    How to to more complex reasoning tasks?
        E.g.,  inferring properties of instances depending on
           other instance properties?




F. Corno, L. Farinetti - Politecnico di Torino                   3
Types of rules
    Production Rules (or Inference Rules)
        IF condition THEN action
        Logical predicates
        Executed upon explicit request, starting from a
         stateless initial condition
    Event-Condition-Action rules
        “Reactive” execution to detect and react to incoming
         events and process event patterns
        Usually running in parallel to the application, reacting
         when events occur, usually in a stateful manner


F. Corno, L. Farinetti - Politecnico di Torino                      4
Rule-based reasoning
 Forward chaining
 Backward chaining
 RETE Algorithm
 Goal-directed reasoning




F. Corno, L. Farinetti - Politecnico di Torino   5
Forward chaining
 Forward chaining starts with the available data and
  uses inference rules to extract more data until
  a goal is reached.
 An inference engine using forward chaining searches
  the inference rules until it finds one where
  the antecedent (If clause) is known to be true.
 When found it can conclude, or infer,
  the consequent (Then clause), resulting in the
  addition of new information to its data




F. Corno, L. Farinetti - Politecnico di Torino          6
Backward chaining
 Backward chaining starts with a list of goals (or
  a hypothesis) and works backwards from
  the consequent to the antecedent to see if there
  is data available that will support any of these
  consequents.
 An inference engine using backward chaining would
  search the inference rules until it finds one which has
  a consequent (Then clause) that matches a desired
  goal.
 If the antecedent (If clause) of that rule is not known
  to be true, then it is added to the list of goals (in order
  for one's goal to be confirmed one must also provide
  data that confirms this new rule).
F. Corno, L. Farinetti - Politecnico di Torino                  7
Rule engines
    Drools (now Jboss Rules, own rule format)
        http://www.jboss.org/drools
    SweetRules (RuleML, SWRL, others)
        http://sweetrules.semwebcentral.org/
    Jena 2 (own rule format)
        http://jena.sourceforge.net/inference/
    Jess (own rule format)
        http://www.jessrules.com/
 Pellet
 Bossam
…
F. Corno, L. Farinetti - Politecnico di Torino    8
Outline
 Motivation
 SWRL
 RIF




F. Corno, L. Farinetti - Politecnico di Torino   9
Semantic Web Rule Language
(SWRL)
 Not an official W3C Recommedation
 Application to OWL of the RuleML (http://ruleml.org/)
  languages
 Extends OWL language by providing Horn clauses
 Defines an extension of the OWL model-theoretic
  semantics




F. Corno, L. Farinetti - Politecnico di Torino            10
SWRL structure
 The rules are of the form of an implication between an
  antecedent (body) and consequent (head).
 The intended meaning can be read as:
        whenever                   the conditions specified in the antecedent
         hold,
        then the conditions specified in the consequent must
         also hold.




F. Corno, L. Farinetti - Politecnico di Torino                                   11
General structure
    Both the antecedent (body) and consequent (head)
     consist of zero or more atoms.
        An  empty antecedent is treated as trivially true (i.e.
         satisfied by every interpretation), so the consequent
         must also be satisfied by every interpretation;
        an empty consequent is treated as trivially false (i.e.,
         not satisfied by any interpretation), so the antecedent
         must also not be satisfied by any interpretation.
    Multiple atoms are treated as a conjunction




F. Corno, L. Farinetti - Politecnico di Torino                      12
Atoms
    Atoms in these rules can be of the form
        C(x), where C is an OWL description
        P(x,y), where P is an OWL property
        sameAs(x,y)
        differentFrom(x,y)
        where x, y are either variables, OWL individuals or
         OWL data values




F. Corno, L. Farinetti - Politecnico di Torino                 13
Syntax issues
    SWRL rules are defined according to different syntax
     forms
        Abstract
                syntax (in functional form)
        XML concrete syntax
        RDF concrete syntax
        Human-readable form (using logic predicates)




F. Corno, L. Farinetti - Politecnico di Torino              14
Example: uncle
    Human-readable syntax
        hasParent(?x1,?x2)                      ∧ hasBrother(?x2,?x3) ⇒
           hasUncle(?x1,?x3)
    Abstract syntax
        Implies(Antecedent(
            hasParent(I-variable(x1) I-variable(x2))
            hasBrother(I-variable(x2) I-variable(x3)))
           Consequent(
            hasUncle(I-variable(x1) I-variable(x3))))
    Example: if John has Mary as a parent and Mary has
     Bill as a brother then John has Bill as an uncle

F. Corno, L. Farinetti - Politecnico di Torino                             15
Example: inheritance
    Human-readable syntax
        Student(?x1)                            ⇒ Person(?x1)
    Abstract syntax
        Implies(Antecedent(Student(I-variable(x1)))
           Consequent(Person(I-variable(x1))))

    This is an improper usage of rules: it should be
     expressed directly in OWL, to make the information
     also available to an OWL reasoner
        SubClassOf(Student                           Person)


F. Corno, L. Farinetti - Politecnico di Torino                   16
Example: propagating properties
   Human-readable syntax
     Artist(?x) & artistStyle(?x,?y)
      & Style(?y) & creator(?z,?x) ⇒
      style/period(?z,?y)
   Abstract syntax
     Implies(Antecedent(
       Artist(I-variable(x))
       artistStyle(I-variable(x) I-variable(y))
       Style(I-variable(y))
       creator(I-variable(z) I-variable(x)))
      Consequent(style/period(I-variable(z) I-
      variable(y))))
    Meaning: the style of an art object is the same as the
     style of the creator
F. Corno, L. Farinetti - Politecnico di Torino              17
SWRL versus OWL
 The last example may not be described in OWL
 In OWL, you declare relationships between Classes
 Such relationships are intended to apply on instances
        You   may add properties to instances to materialize
           such relationships
 OWL Inference only supports “forall” or “exists” in
  propagating properties
 In OWL you may not express “that specific instance
  that has such properties”!



F. Corno, L. Farinetti - Politecnico di Torino                  18
OWL versus SWRL
    OWL has a declarative nature, while SWRL is more
     operational
        Even   if the semantics extends that of OWL, practical
           reasoners just “apply the rules”
 The consistency of the rules application relies on the
  rule designer’s infinite wisdom
 Example: If a property is declared as symmetric, then
  we must be careful to create all property instances to
  satisfy that



F. Corno, L. Farinetti - Politecnico di Torino                    19
Concrete syntaxes: XML
<ruleml:imp>
  <ruleml:_rlab ruleml:href="#example1"/>
  <ruleml:_body>
      <swrlx:individualPropertyAtom swrlx:property="hasParent">
         <ruleml:var>x1</ruleml:var>
         <ruleml:var>x2</ruleml:var>
      </swrlx:individualPropertyAtom>
      <swrlx:individualPropertyAtom swrlx:property="hasBrother">
         <ruleml:var>x2</ruleml:var>
         <ruleml:var>x3</ruleml:var>
      </swrlx:individualPropertyAtom>
  </ruleml:_body>
  <ruleml:_head>
      <swrlx:individualPropertyAtom swrlx:property="hasUncle">
         <ruleml:var>x1</ruleml:var>
         <ruleml:var>x3</ruleml:var>
      </swrlx:individualPropertyAtom>
  </ruleml:_head>
</ruleml:imp> Politecnico di Torino
  F. Corno, L. Farinetti -                                         20
Concrete syntaxes: RDF (I)
<swrl:Variable rdf:ID="x1"/>
<swrl:Variable rdf:ID="x2"/>
<swrl:Variable rdf:ID="x3"/>
<ruleml:Imp>

  <ruleml:body rdf:parseType="Collection">

     <swrl:IndividualPropertyAtom>
       <swrl:propertyPredicate rdf:resource="&eg;hasParent"/>
       <swrl:argument1 rdf:resource="#x1" />
       <swrl:argument2 rdf:resource="#x2" />
     </swrl:IndividualPropertyAtom>

     <swrl:IndividualPropertyAtom>
       <swrl:propertyPredicate rdf:resource="&eg;hasSibling"/>
       <swrl:argument1 rdf:resource="#x2" />
       <swrl:argument2 rdf:resource="#x3" />
     </swrl:IndividualPropertyAtom>
  F. Corno, L. Farinetti - Politecnico di Torino                 21
Concrete syntaxes: RDF (II)
     <swrl:IndividualPropertyAtom>
       <swrl:propertyPredicate rdf:resource="&eg;hasSex"/>
       <swrl:argument1 rdf:resource="#x3" />
       <swrl:argument2 rdf:resource="#male" />
     </swrl:IndividualPropertyAtom>

  </ruleml:body>

  <ruleml:head rdf:parseType="Collection">

     <swrl:IndividualPropertyAtom>
       <swrl:propertyPredicate rdf:resource="&eg;hasUncle"/>
       <swrl:argument1 rdf:resource="#x1" />
       <swrl:argument2 rdf:resource="#x3" />
     </swrl:IndividualPropertyAtom>

  </ruleml:head>
</ruleml:Imp>
  F. Corno, L. Farinetti - Politecnico di Torino               22
Outline
 Motivation
 SWRL
 RIF




F. Corno, L. Farinetti - Politecnico di Torino   23
Source: Chris Welty (W3C), RIF
                                                 Presentation to NY Semweb Meetup,
F. Corno, L. Farinetti - Politecnico di Torino
                                                 http://www.w3.org/2005/rules/wiki/images
                                                                                    24
                                                 /b/b0/W3C_RIF-CW-9-09.pdf
F. Corno, L. Farinetti - Politecnico di Torino   25
F. Corno, L. Farinetti - Politecnico di Torino   26
F. Corno, L. Farinetti - Politecnico di Torino   27
References
    SWRL: A Semantic Web Rule Language
     Combining OWL and RuleML, W3C Member
     Submission 21 May 2004
          http://www.w3.org/Submission/SWRL/
    RIF Use Cases and Requirements, W3C Working
     Draft 18 December 2008
          http://www.w3.org/TR/rif-ucr/




F. Corno, L. Farinetti - Politecnico di Torino     28
References
    http://en.wikipedia.org/wiki/Business_rules_engine
    http://en.wikipedia.org/wiki/Forward_chaining
    http://en.wikipedia.org/wiki/Backward_chaining
    RIF Working Group
          http://www.w3.org/2005/rules/wiki/RIF_Working_Group




F. Corno, L. Farinetti - Politecnico di Torino               29
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              30

Contenu connexe

Tendances

Contexts 4 quantification (CommonSense2013)
Contexts 4 quantification (CommonSense2013)Contexts 4 quantification (CommonSense2013)
Contexts 4 quantification (CommonSense2013)Valeria de Paiva
 
Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...
Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...
Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...Grammarly
 
The Awesome Python Class Part-4
The Awesome Python Class Part-4The Awesome Python Class Part-4
The Awesome Python Class Part-4Binay Kumar Ray
 
Teaching the Group Theory of Permutation Ciphers
Teaching the Group Theory of Permutation CiphersTeaching the Group Theory of Permutation Ciphers
Teaching the Group Theory of Permutation CiphersJoshua Holden
 

Tendances (8)

Finding motif
Finding motifFinding motif
Finding motif
 
Contexts 4 quantification (CommonSense2013)
Contexts 4 quantification (CommonSense2013)Contexts 4 quantification (CommonSense2013)
Contexts 4 quantification (CommonSense2013)
 
Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...
Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...
Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...
 
Inteligencia artificial
Inteligencia artificialInteligencia artificial
Inteligencia artificial
 
Ch04 motifs
Ch04 motifsCh04 motifs
Ch04 motifs
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
 
The Awesome Python Class Part-4
The Awesome Python Class Part-4The Awesome Python Class Part-4
The Awesome Python Class Part-4
 
Teaching the Group Theory of Permutation Ciphers
Teaching the Group Theory of Permutation CiphersTeaching the Group Theory of Permutation Ciphers
Teaching the Group Theory of Permutation Ciphers
 

Similaire à Rule-based reasoning in the Semantic Web

SPARQL and Linked Data
SPARQL and Linked DataSPARQL and Linked Data
SPARQL and Linked DataFulvio Corno
 
RDF - Resource Description Framework and RDF Schema
RDF - Resource Description Framework and RDF SchemaRDF - Resource Description Framework and RDF Schema
RDF - Resource Description Framework and RDF SchemaFulvio Corno
 
SPARQL and the Open Linked Data initiative
SPARQL and the Open Linked Data initiativeSPARQL and the Open Linked Data initiative
SPARQL and the Open Linked Data initiativeFulvio Corno
 
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and DatabasesESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databaseseswcsummerschool
 
Knowledge Representation & Reasoning AI UNIT 3
Knowledge Representation & Reasoning AI UNIT 3Knowledge Representation & Reasoning AI UNIT 3
Knowledge Representation & Reasoning AI UNIT 3SURBHI SAROHA
 
Knowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataKnowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataFranck Michel
 
Choices, modelling and Frankenstein Ontologies
Choices, modelling and Frankenstein OntologiesChoices, modelling and Frankenstein Ontologies
Choices, modelling and Frankenstein Ontologiesbenosteen
 
A Formal Model Of Legal Argumentation
A Formal Model Of Legal ArgumentationA Formal Model Of Legal Argumentation
A Formal Model Of Legal ArgumentationDustin Pytko
 
Large-scale Reasoning with a Complex Cultural Heritage Ontology (CIDOC CRM) ...
 Large-scale Reasoning with a Complex Cultural Heritage Ontology (CIDOC CRM) ... Large-scale Reasoning with a Complex Cultural Heritage Ontology (CIDOC CRM) ...
Large-scale Reasoning with a Complex Cultural Heritage Ontology (CIDOC CRM) ...Vladimir Alexiev, PhD, PMP
 
Franz et. al. 2012. Reconciling Succeeding Classifications, ESA 2012
Franz et. al. 2012. Reconciling Succeeding Classifications, ESA 2012Franz et. al. 2012. Reconciling Succeeding Classifications, ESA 2012
Franz et. al. 2012. Reconciling Succeeding Classifications, ESA 2012taxonbytes
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAsst.prof M.Gokilavani
 
Delving (Smalltalk) Source Code
Delving (Smalltalk) Source CodeDelving (Smalltalk) Source Code
Delving (Smalltalk) Source CodeESUG
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)vikas dhakane
 
Existential import today new metatheorems historical philosophical and pedago...
Existential import today new metatheorems historical philosophical and pedago...Existential import today new metatheorems historical philosophical and pedago...
Existential import today new metatheorems historical philosophical and pedago...Carlos Alberto Monteiro
 
IKL presentation for Ontolog
IKL presentation for OntologIKL presentation for Ontolog
IKL presentation for OntologPat Hayes
 
2015 07-30-sysetm t.short.no.animation
2015 07-30-sysetm t.short.no.animation2015 07-30-sysetm t.short.no.animation
2015 07-30-sysetm t.short.no.animationdiannepatricia
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD VivaAidan Hogan
 
Introduction to Ontology Engineering with Fluent Editor 2014
Introduction to Ontology Engineering with Fluent Editor 2014Introduction to Ontology Engineering with Fluent Editor 2014
Introduction to Ontology Engineering with Fluent Editor 2014Cognitum
 

Similaire à Rule-based reasoning in the Semantic Web (20)

SPARQL and Linked Data
SPARQL and Linked DataSPARQL and Linked Data
SPARQL and Linked Data
 
RDF - Resource Description Framework and RDF Schema
RDF - Resource Description Framework and RDF SchemaRDF - Resource Description Framework and RDF Schema
RDF - Resource Description Framework and RDF Schema
 
SPARQL and the Open Linked Data initiative
SPARQL and the Open Linked Data initiativeSPARQL and the Open Linked Data initiative
SPARQL and the Open Linked Data initiative
 
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and DatabasesESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
 
Knowledge Representation & Reasoning AI UNIT 3
Knowledge Representation & Reasoning AI UNIT 3Knowledge Representation & Reasoning AI UNIT 3
Knowledge Representation & Reasoning AI UNIT 3
 
Knowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked dataKnowledge Engineering: Semantic web, web of data, linked data
Knowledge Engineering: Semantic web, web of data, linked data
 
Choices, modelling and Frankenstein Ontologies
Choices, modelling and Frankenstein OntologiesChoices, modelling and Frankenstein Ontologies
Choices, modelling and Frankenstein Ontologies
 
A Formal Model Of Legal Argumentation
A Formal Model Of Legal ArgumentationA Formal Model Of Legal Argumentation
A Formal Model Of Legal Argumentation
 
Large-scale Reasoning with a Complex Cultural Heritage Ontology (CIDOC CRM) ...
 Large-scale Reasoning with a Complex Cultural Heritage Ontology (CIDOC CRM) ... Large-scale Reasoning with a Complex Cultural Heritage Ontology (CIDOC CRM) ...
Large-scale Reasoning with a Complex Cultural Heritage Ontology (CIDOC CRM) ...
 
Franz et. al. 2012. Reconciling Succeeding Classifications, ESA 2012
Franz et. al. 2012. Reconciling Succeeding Classifications, ESA 2012Franz et. al. 2012. Reconciling Succeeding Classifications, ESA 2012
Franz et. al. 2012. Reconciling Succeeding Classifications, ESA 2012
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
 
Delving (Smalltalk) Source Code
Delving (Smalltalk) Source CodeDelving (Smalltalk) Source Code
Delving (Smalltalk) Source Code
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
 
Existential import today new metatheorems historical philosophical and pedago...
Existential import today new metatheorems historical philosophical and pedago...Existential import today new metatheorems historical philosophical and pedago...
Existential import today new metatheorems historical philosophical and pedago...
 
IKL presentation for Ontolog
IKL presentation for OntologIKL presentation for Ontolog
IKL presentation for Ontolog
 
AI_Session 20 Horn clause.pptx
AI_Session 20 Horn clause.pptxAI_Session 20 Horn clause.pptx
AI_Session 20 Horn clause.pptx
 
2015 07-30-sysetm t.short.no.animation
2015 07-30-sysetm t.short.no.animation2015 07-30-sysetm t.short.no.animation
2015 07-30-sysetm t.short.no.animation
 
Build intuit
Build intuitBuild intuit
Build intuit
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD Viva
 
Introduction to Ontology Engineering with Fluent Editor 2014
Introduction to Ontology Engineering with Fluent Editor 2014Introduction to Ontology Engineering with Fluent Editor 2014
Introduction to Ontology Engineering with Fluent Editor 2014
 

Dernier

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...christianmathematics
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
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.pdfQucHHunhnh
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 

Dernier (20)

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...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
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
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

Rule-based reasoning in the Semantic Web

  • 1. Rule-based reasoning in the Semantic Web Fulvio Corno, Laura Farinetti Politecnico di Torino Dipartimento di Automatica e Informatica e-Lite Research Group – http://elite.polito.it
  • 2. Outline  Motivation  SWRL  RIF F. Corno, L. Farinetti - Politecnico di Torino 2
  • 3. Motivation  Classical reasoning operations in OWL only allow very limited use cases  Consistency  Class properties and relationships  Instance classification  How to to more complex reasoning tasks?  E.g., inferring properties of instances depending on other instance properties? F. Corno, L. Farinetti - Politecnico di Torino 3
  • 4. Types of rules  Production Rules (or Inference Rules)  IF condition THEN action  Logical predicates  Executed upon explicit request, starting from a stateless initial condition  Event-Condition-Action rules  “Reactive” execution to detect and react to incoming events and process event patterns  Usually running in parallel to the application, reacting when events occur, usually in a stateful manner F. Corno, L. Farinetti - Politecnico di Torino 4
  • 5. Rule-based reasoning  Forward chaining  Backward chaining  RETE Algorithm  Goal-directed reasoning F. Corno, L. Farinetti - Politecnico di Torino 5
  • 6. Forward chaining  Forward chaining starts with the available data and uses inference rules to extract more data until a goal is reached.  An inference engine using forward chaining searches the inference rules until it finds one where the antecedent (If clause) is known to be true.  When found it can conclude, or infer, the consequent (Then clause), resulting in the addition of new information to its data F. Corno, L. Farinetti - Politecnico di Torino 6
  • 7. Backward chaining  Backward chaining starts with a list of goals (or a hypothesis) and works backwards from the consequent to the antecedent to see if there is data available that will support any of these consequents.  An inference engine using backward chaining would search the inference rules until it finds one which has a consequent (Then clause) that matches a desired goal.  If the antecedent (If clause) of that rule is not known to be true, then it is added to the list of goals (in order for one's goal to be confirmed one must also provide data that confirms this new rule). F. Corno, L. Farinetti - Politecnico di Torino 7
  • 8. Rule engines  Drools (now Jboss Rules, own rule format)  http://www.jboss.org/drools  SweetRules (RuleML, SWRL, others)  http://sweetrules.semwebcentral.org/  Jena 2 (own rule format)  http://jena.sourceforge.net/inference/  Jess (own rule format)  http://www.jessrules.com/  Pellet  Bossam … F. Corno, L. Farinetti - Politecnico di Torino 8
  • 9. Outline  Motivation  SWRL  RIF F. Corno, L. Farinetti - Politecnico di Torino 9
  • 10. Semantic Web Rule Language (SWRL)  Not an official W3C Recommedation  Application to OWL of the RuleML (http://ruleml.org/) languages  Extends OWL language by providing Horn clauses  Defines an extension of the OWL model-theoretic semantics F. Corno, L. Farinetti - Politecnico di Torino 10
  • 11. SWRL structure  The rules are of the form of an implication between an antecedent (body) and consequent (head).  The intended meaning can be read as:  whenever the conditions specified in the antecedent hold,  then the conditions specified in the consequent must also hold. F. Corno, L. Farinetti - Politecnico di Torino 11
  • 12. General structure  Both the antecedent (body) and consequent (head) consist of zero or more atoms.  An empty antecedent is treated as trivially true (i.e. satisfied by every interpretation), so the consequent must also be satisfied by every interpretation;  an empty consequent is treated as trivially false (i.e., not satisfied by any interpretation), so the antecedent must also not be satisfied by any interpretation.  Multiple atoms are treated as a conjunction F. Corno, L. Farinetti - Politecnico di Torino 12
  • 13. Atoms  Atoms in these rules can be of the form  C(x), where C is an OWL description  P(x,y), where P is an OWL property  sameAs(x,y)  differentFrom(x,y)  where x, y are either variables, OWL individuals or OWL data values F. Corno, L. Farinetti - Politecnico di Torino 13
  • 14. Syntax issues  SWRL rules are defined according to different syntax forms  Abstract syntax (in functional form)  XML concrete syntax  RDF concrete syntax  Human-readable form (using logic predicates) F. Corno, L. Farinetti - Politecnico di Torino 14
  • 15. Example: uncle  Human-readable syntax  hasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒ hasUncle(?x1,?x3)  Abstract syntax  Implies(Antecedent( hasParent(I-variable(x1) I-variable(x2)) hasBrother(I-variable(x2) I-variable(x3))) Consequent( hasUncle(I-variable(x1) I-variable(x3))))  Example: if John has Mary as a parent and Mary has Bill as a brother then John has Bill as an uncle F. Corno, L. Farinetti - Politecnico di Torino 15
  • 16. Example: inheritance  Human-readable syntax  Student(?x1) ⇒ Person(?x1)  Abstract syntax  Implies(Antecedent(Student(I-variable(x1))) Consequent(Person(I-variable(x1))))  This is an improper usage of rules: it should be expressed directly in OWL, to make the information also available to an OWL reasoner  SubClassOf(Student Person) F. Corno, L. Farinetti - Politecnico di Torino 16
  • 17. Example: propagating properties  Human-readable syntax  Artist(?x) & artistStyle(?x,?y) & Style(?y) & creator(?z,?x) ⇒ style/period(?z,?y)  Abstract syntax  Implies(Antecedent( Artist(I-variable(x)) artistStyle(I-variable(x) I-variable(y)) Style(I-variable(y)) creator(I-variable(z) I-variable(x))) Consequent(style/period(I-variable(z) I- variable(y))))  Meaning: the style of an art object is the same as the style of the creator F. Corno, L. Farinetti - Politecnico di Torino 17
  • 18. SWRL versus OWL  The last example may not be described in OWL  In OWL, you declare relationships between Classes  Such relationships are intended to apply on instances  You may add properties to instances to materialize such relationships  OWL Inference only supports “forall” or “exists” in propagating properties  In OWL you may not express “that specific instance that has such properties”! F. Corno, L. Farinetti - Politecnico di Torino 18
  • 19. OWL versus SWRL  OWL has a declarative nature, while SWRL is more operational  Even if the semantics extends that of OWL, practical reasoners just “apply the rules”  The consistency of the rules application relies on the rule designer’s infinite wisdom  Example: If a property is declared as symmetric, then we must be careful to create all property instances to satisfy that F. Corno, L. Farinetti - Politecnico di Torino 19
  • 20. Concrete syntaxes: XML <ruleml:imp> <ruleml:_rlab ruleml:href="#example1"/> <ruleml:_body> <swrlx:individualPropertyAtom swrlx:property="hasParent"> <ruleml:var>x1</ruleml:var> <ruleml:var>x2</ruleml:var> </swrlx:individualPropertyAtom> <swrlx:individualPropertyAtom swrlx:property="hasBrother"> <ruleml:var>x2</ruleml:var> <ruleml:var>x3</ruleml:var> </swrlx:individualPropertyAtom> </ruleml:_body> <ruleml:_head> <swrlx:individualPropertyAtom swrlx:property="hasUncle"> <ruleml:var>x1</ruleml:var> <ruleml:var>x3</ruleml:var> </swrlx:individualPropertyAtom> </ruleml:_head> </ruleml:imp> Politecnico di Torino F. Corno, L. Farinetti - 20
  • 21. Concrete syntaxes: RDF (I) <swrl:Variable rdf:ID="x1"/> <swrl:Variable rdf:ID="x2"/> <swrl:Variable rdf:ID="x3"/> <ruleml:Imp> <ruleml:body rdf:parseType="Collection"> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="&eg;hasParent"/> <swrl:argument1 rdf:resource="#x1" /> <swrl:argument2 rdf:resource="#x2" /> </swrl:IndividualPropertyAtom> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="&eg;hasSibling"/> <swrl:argument1 rdf:resource="#x2" /> <swrl:argument2 rdf:resource="#x3" /> </swrl:IndividualPropertyAtom> F. Corno, L. Farinetti - Politecnico di Torino 21
  • 22. Concrete syntaxes: RDF (II) <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="&eg;hasSex"/> <swrl:argument1 rdf:resource="#x3" /> <swrl:argument2 rdf:resource="#male" /> </swrl:IndividualPropertyAtom> </ruleml:body> <ruleml:head rdf:parseType="Collection"> <swrl:IndividualPropertyAtom> <swrl:propertyPredicate rdf:resource="&eg;hasUncle"/> <swrl:argument1 rdf:resource="#x1" /> <swrl:argument2 rdf:resource="#x3" /> </swrl:IndividualPropertyAtom> </ruleml:head> </ruleml:Imp> F. Corno, L. Farinetti - Politecnico di Torino 22
  • 23. Outline  Motivation  SWRL  RIF F. Corno, L. Farinetti - Politecnico di Torino 23
  • 24. Source: Chris Welty (W3C), RIF Presentation to NY Semweb Meetup, F. Corno, L. Farinetti - Politecnico di Torino http://www.w3.org/2005/rules/wiki/images 24 /b/b0/W3C_RIF-CW-9-09.pdf
  • 25. F. Corno, L. Farinetti - Politecnico di Torino 25
  • 26. F. Corno, L. Farinetti - Politecnico di Torino 26
  • 27. F. Corno, L. Farinetti - Politecnico di Torino 27
  • 28. References  SWRL: A Semantic Web Rule Language Combining OWL and RuleML, W3C Member Submission 21 May 2004  http://www.w3.org/Submission/SWRL/  RIF Use Cases and Requirements, W3C Working Draft 18 December 2008  http://www.w3.org/TR/rif-ucr/ F. Corno, L. Farinetti - Politecnico di Torino 28
  • 29. References  http://en.wikipedia.org/wiki/Business_rules_engine  http://en.wikipedia.org/wiki/Forward_chaining  http://en.wikipedia.org/wiki/Backward_chaining  RIF Working Group  http://www.w3.org/2005/rules/wiki/RIF_Working_Group F. Corno, L. Farinetti - Politecnico di Torino 29
  • 30. 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 30