MIW 2009: OWL_Rules

Zrealizował: Wojciech Franczak

How decision rules can be represented, encoded in OWL rules in description logic, description logic programs, swrl?

Spotkania

20090513

proszę wskazać w których publ. które poodejścia są proponowane, jakie są ich zalety i wady, jak się maja do formalizacji w DL.

20090409

20090319

20090305

  • skupiamy się na swrl, szkic biblio w tex , przyklad

20090219

Projekt

Sprawozdanie

Introduction

The Web Ontology Language OWL extends RDF and RDFS. It is primary aim to bring the expressive and reasoning power of description logic to the semantic web. Unfortunately, not everything from RDF can be expressed in DL. For example, the classes of classes are not permitted in the (chosen) DL. That is why OWL can be only syntactic extension of RDF/RDFS. To partially overcome this problem, and also to allow layering within OWL, three species of OWL are defined:

  1. OWL Lite can be used to express taxonomy and simple constraints, such as 0 and 1 cardinality. It is the simplest OWL language and corresponds to description logic SHIF.
  2. OWL DL supports maximum expressiveness while retaining computational completeness and decidability. The DL in the name shows that it is intended to support description logic capabilities. OWL DL corresponds to description logic SHOIN.
  3. OWL Full has no expressiveness constraints, but also does not guarantee any computational properties. It is formed by the full OWL vocabulary, but does not no impose any syntactic constrains, so that the full syntactic freedom of RDF can be used.

These three languages are layered in a sense that every legal OWL Lite ontology is a legal OWL DL ontology, every legal OWL DL ontology is a legal OWL Full ontology, every valid OWL Lite conclusion is a valid OWL DL conclusion, and every valid OWL DL conclusion a valid OWL Full conclusion. The inverses of these relations generally do not hold. Also, every OWL ontology is a valid RDF document, but not all RDF documents are valid OWL Lite or OWL DL documents.

Basic information

According to the page: http://www.cs.man.ac.uk/~horrocks/DAML/Rules/#2.1, we will be able to say more about OWL construction, rules, ontologies. The proposed rules are 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. 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. An OWL ontology in the abstract syntax contains a sequence of axioms and facts. Axioms may be of various kinds, e.g., subClass axioms and equivalentClass axioms. It is proposed to extend this with rule axioms.

axiom ::= rule 

A rule axiom consists of an antecedent (body) and a consequent (head), each of which consists of a (posibly empty) set of atoms.

rule ::= 'Implies(' { annotation } antecedent consequent ')'
antecedent ::= 'Antecedent(' { atom } ')'
consequent ::= 'Consequent(' { atom } ')'

Atoms can be of the form C(x), P(x,y), sameAs(x,y) or differentFrom(x,y), where C is an OWL description, P is an OWL property, and x,y are either variables, OWL individuals or OWL data values. In the context of OWL Lite, descriptions in atoms of the form C(x) may be restricted to class names.

atom ::= description '(' i-object ')'
 | individualvaluedPropertyID '(' i-object i-object ')'
 | datavaluedPropertyID '(' i-object d-object ')'
 | sameAs '(' i-object i-object ')'
 | differentFrom '(' i-object i-object ')'

Idea for Direct Model Theoretic Semantics is that we need to define bindings, extensions of OWL interpretations that also map variables to elements of the domain. The rule come true by an interpretation if every binding that satisfies the antecedent also satisfies the consequent. The semantic conditions relating to axioms and ontologies are unchanged, e.g., an interpretation satisfies an ontology iff it satisfies every axiom (including rules) and fact in the ontology.

Given an abstract OWL interpretation I, a binding B(I) is an abstract OWL interpretation that extends I such that function S maps i-variables to elements of R and d-variables to elements of LVT respectively. We recall that an Abstract OWL interpretation is a tuple of the form: I = <R, V, EC, ER, S>.

Atom Condition on Interpretation
description(x) S(x) ∈ EC(description)
property(x,y) <S(x),S(y)> ∈ ER(property)
sameAs(x,y) S(x) = S(y))
differentFrom(x,y) S(x) ≠ S(y)

binding B(I) satisfies an antecedent A iff A is empty or B(I) satisfies every atom in A. A binding B(I) satisfies a consequent C iff C is not empty and B(I) satisfies every atom in C. A rule is satisfied by an interpretation I iff for every binding B such that B(I) satisfies the antecedent, B(I) also satisfies the consequent.

The semantic conditions relating to axioms and ontologies are unchanged. In particular, an interpretation satisfies an ontology iff it satisfies every axiom (including rules) and fact in the ontology; an ontology is consistent iff it is satisfied by at least one interpretation; an ontology O2 is entailed by an ontology O1 iff every interpretation that satisfies O1 also satisfies O2.

Lot of XML encodings could be imagined, but the most obvious solution is to extend the existing OWL Web Ontology Language XML Presentation Syntax [OWL XML], which can be straightforwardly modified to deal with OWL Rules. This has several advantages:

  • arbitrary OWL classes can be used as predicates in rules;
  • rules and ontology axioms can be freely mixed;
  • the existing XSLT stylesheet can easily be extended to provide a mapping to RDF graphs that extends the OWL RDF/XML exchange syntax.

Below are more details:

In the first place, the ontology root element is extended to include „Rule” and „Variable” axioms.

<Ontology
name = xsd:anyURI 
>
Content: (VersionInfo | PriorVersion | BackwardCompatibleWith | 
          IncompatibleWith | Imports | Annotation | 
          Class[axiom] | EnumeratedClass(D,F) | 
          SubClassOf(D,F) | EquivalentClasses | DisjointClasses(D,F) | 
          DatatypeProperty | ObjectProperty | 
          SubPropertyOf | EquivalentProperties | 
          Individual[axiom] | SameIndividual | DifferentIndividuals |
          Rule[axiom] | Variable[axiom])* 
</Ontology>

where name - refers to a name of this ontology, which is the base URI of this element.

After it we need to add the relevant syntax for variables and rules.

Variable axioms are statements about variables, indicating that the given URI is to be used as a variable, and adding any annotations.

<Variable
name = xsd:anyURI
>
Content: ( Annotation* ) 
</Variable>

where name - a reference to a name of this variable and

<Rule>
Content: ( Annotation*, antecedent, consequent )
</Rule>

where

<antecedent>
Content: ( atom* )
</antecedent>
<consequent>
Content: ( atom* )
</consequent>

Atoms can be formed from unary predicates (classes), binary predicates (properties), equalities or inequalities.

Content: (classAtom | individualPropertyAtom | datavaluedPropertyAtom | 
          sameIndividualAtom | differentIndividualsAtom)

Examples

Abstract OWL:

Combination of the 'hasParent' and 'hasBrother' properties implies the 'hasUncle property: Generic rule syntax:

hasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒ hasUncle(?x1,?x3)

Abstract OWL 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))))

Assert that art objects inherit the style/period of the artist that created them: Generic rule syntax:

Artist(?x) & artistStyle(?x,?y) & Style(?y) & creator(?z,?x) ⇒ style/period(?z,?y)

Abstract OWL 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))))

XML Concrete Syntax:

The following example is due to Guus Schreiber, and is based on ontologies used in an image annotation demo.

The rule expresses the fact that, given knowledge about the AAT style of certain ULAN artists (e.g., van Gogh is an Impressionist painter), we can derive the style of an art object (represented with the VRA element „style/period”) from the value of the creator of the art object (represented by the VRA element „creator”, a subproperty of dc:creator):

<owlx:Rule> 
<owlx:antecedent> 
  <owlx:classAtom> 
    <owlx:class="&ulan;Artist" />
    <owlx:Variable owlx:name="_x" />
  </owlx:classAtom> 
  <owlx:classAtom> 
    <owlx:class="&aat;Style" />
    <owlx:Variable owlx:name="_y" />
  </owlx:classAtom> 
  <owlx:individualPropertyAtom  owlx:property="&aatulan;artistStyle"> 
    <owlx:Variable owlx:name="_x" />
    <owlx:Variable owlx:name="_y" />
  </owlx:individualPropertyAtom> 
  <owlx:individualPropertyAtom  owlx:property="&vra;creator"> 
    <owlx:Variable owlx:name="_x" />
    <owlx:Variable owlx:name="_z" />
  </owlx:individualPropertyAtom> 
</owlx:antecedent> 
<owlx:consequent> 
  <owlx:individualPropertyAtom  owlx:property="&vra;style/period"> 
    <owlx:Variable owlx:name="_z" />
    <owlx:Variable owlx:name="_y" />
  </owlx:individualPropertyAtom> 
</owlx:consequent> 
</owlx:Rule>

Mapping to RDF Graphs:

Rules have variables, so treating them as a semantic extension of RDF is very difficult. It is, however, still possible to provide an RDF syntax for rules it is just that the semantics of the resultant RDF graphs will not be an extension of the RDF Semantics. A mapping to RDF/XML is most easily created as an extension to the XSLT transformation for the OWL XML Presentation syntax.

<owlr:Variable rdf:ID="_airport"/>
<owlr:Variable rdf:ID="_loc"/>
<owlr:Variable rdf:ID="_name"/>
<owlr:Variable rdf:ID="_lat"/>
<owlr:Variable rdf:ID="_lon"/>
<owlr:Rule> 
<owlr:antecedent rdf:parseType="Collection">
  <owlr:classAtom> 
    <owlr:classPredicate rdf:about="&airport-ont;Airport"/> 
    <owlr:argument1 rdf:about="#_airport" />
  </owlr:classAtom>
  <owlr:individualPropertyAtom> 
    <owlr:propertyPredicate rdf:resource="#location"/> 
    <owlr:argument1 rdf:about="#_airport" />
    <owlr:argument2 rdf:about="#_loc" />
  </owlr:individualPropertyAtom>
  <owlr:datavaluedPropertyAtom> 
    <owlr:propertyPredicate rdf:resource="#latitude"/> 
    <owlr:argument1 rdf:about="#_loc" />
    <owlr:argument2 rdf:about="#_lat" />
  </owlr:datavaluedPropertyAtom>
  <owlr:datavaluedPropertyAtom> 
    <owlr:propertyPredicate rdf:resource="#longitude"/> 
    <owlr:argument1 rdf:about="#_loc" />
    <owlr:argument2 rdf:about="#_lon" />
  </owlr:datavaluedPropertyAtom>
</owlr:antecedent>
<owlr:consequent rdf:parseType="Collection"> 
  <owlr:classAtom> 
    <owlr:classPredicate>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#sameLocation"/>
        <owl:someValuesFrom>
          <owl:intersectionOf rdf:parseType="Collection">
            <owl:Class rdf:about="&map;Location"/>
            <owl:Restriction>
              <owl:onProperty rdf:resource="&map;isLocationOf"/>
              <owl:someValuesFrom>
                <owl:intersectionOf rdf:parseType="Collection">
                  <owl:Class rdf:about="&map;Point"/>
                  <owl:Restriction>
                    <owl:onProperty rdf:resource="&map;isObjectOf"/>
                    <owl:someValuesFrom>
                      <owl:oneOf rdf:parseType="Collection">
                        <owl:Item rdf:resource="#layer"/>
                      </owl:oneOf>
                    </owl:someValuesFrom>
                  </owl:Restriction>
                </owl:intersectionOf rdf:parseType="Collection">
              </owl:someValuesFrom>
            </owl:Restriction>
          </owl:intersectionOf rdf:parseType="Collection">
        </owl:someValuesFrom>
      </owl:Restriction>
    </owlr:classPredicate> 
    <owlr:argument1 rdf:about="_airport" />
  </owlr:classAtom>
</owlr:consequent> 
</owlr:Rule> 

Summary

Abstract Syntax:

Based on http://www.cs.man.ac.uk/~horrocks/DAML/Rules/#2.1:

The abstract syntax is specified by means of a version of Extended BNF, very similar to the EBNF notation used for XML. Terminals are quoted; non-terminals are bold and not quoted. Alternatives are either separated by vertical bars (|) or are given in different productions. Components that can occur at most once are enclosed in square brackets ([…]); components that can occur any number of times (including zero) are enclosed in braces ({…}). Whitespace is ignored in the productions here.

XML Concrete Syntax:

Based on http://ect.bell-labs.com/who/pfps/publications/owl-rules-proposal.pdf:

Many possible XML encodings could be imagined (e.g., a RuleML based syntax), but the most obvious solution is to extend the existing OWL Web Ontology Language XML Presentation Syntax , which can be straightforwardly modified to deal with ORL. This has several advantages:

  • arbitrary OWL classes (e.g., descriptions) can be used as predicates in rules;
  • rules and ontology axioms can be freely mixed;
  • the existing XSLT stylesheet can easily be extended to provide a mapping to RDF graphs that extends the OWL RDF/XML exchange syntax.

Mapping to RDF Graphs:

Based on http://www.daml.org/2003/10/pi-meeting/OWL-Rules/all.htm

  • Rules have variables, so treating them as a semantic extension of RDF is very difficult
  • Possible to provide an RDF syntax for rules but the semantics of the resultant RDF graphs will not be an extension of the RDF Semantics
  • Mapping to RDF/XML is most easily created as an extension to the XSLT transformation for the OWL XML Presentation syntax

Usage Suggestions:

Users may want to restrict the form or expressiveness of the rules they employ, in order to increase interoperability, reusability, extensibility, computational scaleability, or ease of implementation.

A useful restriction in the form of the rules is to limit antecedent and consequent classAtoms to be named classes, where the classes are defined purely in OWL (in the same document or in external OWL documents). Adhering to this format makes it easier to translate rules to or from existing (or future) rule systems, including:

1.Prolog; 2.production rules (descended from OPS5); 3.event-condition-action rules; and 4.SQL (where views, queries, and facts are all rules). Adhering to this form also maximises reuse and interoperability of the ontology knowledge in the rules with other OWL-speaking systems that do not necessarily support OWL Rules.

Users also may want to restrict the expressiveness of the OWL classes and descriptions appearing in rules. One useful restriction on expressivity is Description Logic Programs which, e.g., prohibits existentially-quantified knowledge in consequents. Suitably-restricted OWL Rules can be straightforwardly extended to enable procedural attachments and/or nonmonotonic reasoning (negation-as-failure and/or prioritised conflict handling) of the kinds supported in CCI rule systems and in RuleML which facilitates interoperability between those CCI rule systems. Such adherence may thus facilitate combining OWL Rules knowledge with knowledge from those other rules languages. Suitable restrictions can also improve the empirical tractability of reasoning with rules.

BIBTEX

Is a tool for formatting lists of references. The BibTeX tool is typically used together with the LaTeX document preparation system.

code example:

@Book{abramowitz+stegun,
  author =    "Milton Abramowitz and Irene A. Stegun",
  title =     "Handbook of Mathematical Functions with
               Formulas, Graphs, and Mathematical Tables",
  publisher = "Dover",
  year =      1964,
  address =   "New York",
  edition =   "ninth Dover printing, tenth GPO printing"
  }

Inclusion bibliography base in the file follow by after command 'bibliography'

example:

\bibliography{file_name} - where 'file_name' is file with base.

Materiały

pl/miw/2009/miw09_owl_rules_1.txt · ostatnio zmienione: 2017/07/17 08:08 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0