150 likes | 301 Views
Using Rules with Ontologies in the Semantic Web. Chimezie Ogbuji Thoracic and Cardiovascular Surgery Cleveland Clinic Foundation. July 25 th , 2006 Presented to W3C HCLSIG ACPP Group. Rule Languages. RuleML SWRL Notation 3 (N3). Semantic Web Reasoners. Closed World Machine (CWM) Euler
E N D
Using Rules with Ontologies in the Semantic Web Chimezie OgbujiThoracic and Cardiovascular SurgeryCleveland Clinic Foundation July 25th, 2006 Presented to W3C HCLSIG ACPP Group
Rule Languages • RuleML • SWRL • Notation 3 (N3)
Semantic Web Reasoners • Closed World Machine (CWM) • Euler • Pychinko • RDFEngine • Jena
Using Rules to Describe Rules • A Rule consists of a body (antecedent) and a head (consequent) • In N3: • {?X :has ?body. ?X :has ?head. :body log:implies :head } => {?X a :Rule } • In SWRL’s abstract syntax: • Implies(Antecedent(has(I-variable(X), I-variable(body) has(I-variable(X), I-variable(head)) log:Implies(I-variable(body), I-variable(head))) Consequent(Rule(I-variable(X)))
Origin / Background of Rules • Logic Programming • Production systems (RETE, etc.) • Prolog • SQL • Horn-clause Logic • Efficient theorem proving, and reasoning
Complexity and Abstraction • Kurt Cagle • “You can never eliminate complexity from a system, you can only move it from place to place” • Important point regarding how / why rules are used with ontology languages
DL Semantics as Analogy for Rules • Description Logics (DL) • Strict subset of FOL with decidability in mind • DL are more palatable and (therefore) more ubiquitous • Ontology language constructs correspond to DL constructs • Some DL (ontology) reasoning can be done via explicit rules
Some DL Semantics as N3 Rules • Transitive Roles • {?P a owl:TransitiveProperty. ?X ?P ?Y. ?Y ?P ?Z } => {?X ?P ?Z} • Class inclusion • {?B rdfs:subClassOf ?C. ?A rdfs:subClassOf ?B} => {?A rdfs:subClassOf ?C}. • Inverse Roles • {?P owl:inverseOf ?Q. ?S ?P ?O} => {?O ?Q ?S}. • Functional Restrictions • {?P a owl:FunctionalProperty. ?S ?P ?X. ?S ?P ?Y} => {?X owl:sameAs ?Y}.
Restriction on Expressivenes • Certain implications cannot be expressed in DL: • “Individuals who live and work at the same location are ‘Home Workers’” • In N3: • {?X :work ?Y. ?X :live ?Z. ?Z :located ?W. ?Y :located ?Y} => {?X a :HomeWorker}
Restriction on Expressiveness (Cont.) • Specific logical restrictions (Horn logic) make it difficult to express certain statements: • “Every person has a father (known or unknown)” • However, this is straight forward in OWL (and Description Logics): • :Person a owl:Class; rdfs:subClassOf [ a owl:Restriction; owl:onProperty :father; owl:cardinality “1”. ]
Rule Inference Methods • Given: • Set of rules • Set of facts • Backward chaining is goal-oriented: • Question: can a fact be inferred from the rules and existing facts? • Forward chaining exhaustively infers new facts from the rules • The resulting facts combined with the original facts are often referred to as the ‘closure’
Concerns with Reasoning • Logic Programming reasoners and algorithms are more mature • RETE algorithm for production (forward chaining) systems • Euler cycle detection for backward chaining inference • Logic Programming systems are at the mercy of the explicit rules
Complexity and Abstraction (Revisited) • Kurt Cagle • “You can never eliminate complexity from a system, you can only move it from place to place” • DL abstracts Knowledge Representation at the expense of the reasoning mechanism. • DL reasoners are implemented to support only a limited kind of inference: class subsumption and consistency detection.
Compromise • Use DL semantics where the domain falls nicely into Categories / Roles and decidability is an issue • Use rules everywhere else • The combination covers the full spectrum of expressiveness and decidability • Including both in the thought process improves Knowledge Engineering • Some DL semantics can be expressed as rules to take advantage of efficient pattern matching algorithms
References • Description Logic Programs: Combining Logic Programs with Description Logic • http://citeseer.ist.psu.edu/grosof03description.html • Description Logic Complexity Navigator • http://www.cs.man.ac.uk/~ezolin/logic/complexity.html • Web Ontology Reasoning with Logic Databases • http://www.ubka.uni-karlsruhe.de/vvv/2004/wiwi/2/2.pdf • Euler’s RDF Plus OWL N3 Rules • http://www.agfa.com/w3c/euler/rpo-rules.n3 • Description Logics as Ontology Languages for the Semantic Web • http://citeseer.ist.psu.edu/baader03description.html