SlideShare a Scribd company logo
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

More Related Content

PDF
Logic and Reasoning in the Semantic Web (part I –RDF/RDFS)
PDF
Logic and Reasoning in the Semantic Web
PDF
Ontology languages and OWL
PPT
Syntax and semantics of propositional logic
PPTX
First order predicate logic (fopl)
PPT
Introduction to logic and prolog - Part 1
PDF
Object? You Keep Using that Word
PPTX
First order predicate logic(fopl)
Logic and Reasoning in the Semantic Web (part I –RDF/RDFS)
Logic and Reasoning in the Semantic Web
Ontology languages and OWL
Syntax and semantics of propositional logic
First order predicate logic (fopl)
Introduction to logic and prolog - Part 1
Object? You Keep Using that Word
First order predicate logic(fopl)

What's hot (8)

PDF
Finding motif
PDF
Contexts 4 quantification (CommonSense2013)
PDF
Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...
PPT
Inteligencia artificial
PDF
PDF
NFA to DFA
PPTX
The Awesome Python Class Part-4
PDF
Teaching the Group Theory of Permutation Ciphers
Finding motif
Contexts 4 quantification (CommonSense2013)
Grammarly AI-NLP Club #6 - Sequence Tagging using Neural Networks - Artem Che...
Inteligencia artificial
NFA to DFA
The Awesome Python Class Part-4
Teaching the Group Theory of Permutation Ciphers
Ad

Similar to Rule-based reasoning in the Semantic Web (20)

PPTX
SWT Lecture Session 8 - Rules
PPT
OWL briefing
PPT
PDF
Ijarcet vol-2-issue-2-676-678
PPT
Chapter 12 knowledge representation nd description
PDF
Chapter 5 semantic web
PDF
Mit press a semantic web primer - 2004 !! - (by laxxuss)
PPT
Ontology Engineering: Ontology Use
PDF
Semantic web-primer
PDF
Sw 5semantic web-primer
PDF
Really usefulebooks 0262012421_the mit press a semantic web primer 2nd editio...
PDF
SPARQL and Linked Data
PDF
Sw owl rules-proposal
PPT
Ontological on Engineering Presentation1
PPT
Artificial Intelligence data related to ai
PDF
RDF - Resource Description Framework and RDF Schema
PDF
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
PPT
Where Does It Break?
PPT
Knowledge_Representbhhggghhhhhhhtrrghjuuuuation.ppt
KEY
Linking Open, Big Data Using Semantic Web Technologies - An Introduction
SWT Lecture Session 8 - Rules
OWL briefing
Ijarcet vol-2-issue-2-676-678
Chapter 12 knowledge representation nd description
Chapter 5 semantic web
Mit press a semantic web primer - 2004 !! - (by laxxuss)
Ontology Engineering: Ontology Use
Semantic web-primer
Sw 5semantic web-primer
Really usefulebooks 0262012421_the mit press a semantic web primer 2nd editio...
SPARQL and Linked Data
Sw owl rules-proposal
Ontological on Engineering Presentation1
Artificial Intelligence data related to ai
RDF - Resource Description Framework and RDF Schema
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Where Does It Break?
Knowledge_Representbhhggghhhhhhhtrrghjuuuuation.ppt
Linking Open, Big Data Using Semantic Web Technologies - An Introduction
Ad

Recently uploaded (20)

PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Classroom Observation Tools for Teachers
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
master seminar digital applications in india
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Computing-Curriculum for Schools in Ghana
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
human mycosis Human fungal infections are called human mycosis..pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Microbial diseases, their pathogenesis and prophylaxis
STATICS OF THE RIGID BODIES Hibbelers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
VCE English Exam - Section C Student Revision Booklet
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Chinmaya Tiranga quiz Grand Finale.pdf
O7-L3 Supply Chain Operations - ICLT Program
Classroom Observation Tools for Teachers
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Final Presentation General Medicine 03-08-2024.pptx
master seminar digital applications in india
Abdominal Access Techniques with Prof. Dr. R K Mishra
Module 4: Burden of Disease Tutorial Slides S2 2025
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Computing-Curriculum for Schools in Ghana
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

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