|
|
This is a description of a proposed rules extension to the OWL Web Ontology Language. It includes a high-level abstract syntax for horn clause rules in both the OWL DL and OWL Lite sublanguages of OWL. A model-theoretic semantics is given to provide a formal meaning for OWL ontologies including rules written in this abstract syntax. An XML syntax based on the OWL XML presentation syntax and a mapping to RDF graphs based on the OWL RDF/XML exchange syntax are also given, along with several examples.
axiom ::= rule rule ::= 'Implies(' { annotation } antecedent consequent ')' antecedent ::= 'Antecedent(' { atom } ')' consequent ::= 'Consequent(' { atom } ')' atom ::= description '(' i-object ')' | individualvaluedPropertyID '(' i-object i-object ')' | datavaluedPropertyID '(' i-object d-object ')' | sameAs '(' i-object i-object ')' | differentFrom '(' i-object i-object ')' i-object ::= i-variable | individualID d-object ::= d-variable | dataLiteral i-variable ::= 'I-variable(' URIreference ')' d-variable ::= 'D-variable(' URIreference ')'
| 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) |
Assert that the combination of the hasParent and hasBrother properties implies the hasUncle property:
Common 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))))
<owlx:Rule>
<owlx:antecedent>
<owlx:individualPropertyAtom owlx:property="hasParent">
<owlx:Variable owlx:name="x1" />
<owlx:Variable owlx:name="x2" />
</owlx:individualPropertyAtom>
<owlx:individualPropertyAtom owlx:property="hasBrother">
<owlx:Variable owlx:name="x2" />
<owlx:Variable owlx:name="x3" />
</owlx:individualPropertyAtom>
</owlx:antecedent>
<owlx:consequent>
<owlx:individualPropertyAtom owlx:property="hasUncle">
<owlx:Variable owlx:name="x1" />
<owlx:Variable owlx:name="x3" />
</owlx:individualPropertyAtom>
</owlx:consequent>
</owlx:Rule>
Assert that the combination of the hasParent and hasBrother properties is exactly equivalent to the hasUncle property (needs the previous rule as well).
Common rule syntax (sort of)
hasUncle(x1,x3) -> hasParent(x1,x2) & hasBrother(x2,x3)
Abstract OWL syntax
Implies(Antecedent(hasUncle(I-variable(x1) I-variable(x3))) Consequent(Restriction(hasParent someValuesFrom(Restriction(hasBrother someValuesFrom(owl:Thing))))))
<owlx:Rule>
<owlx:antecedent>
<owlx:individualPropertyAtom owlx:property="hasUncle">
<owlx:Variable owlx:name="x1" />
<owlx:Variable owlx:name="x2" />
</owlx:individualPropertyAtom>
</owlx:antecedent>
<owlx:consequent>
<owlx:classAtom>
<owlx:ObjectRestriction owlx:property="hasParent">
<owlx:someValuesFrom>
<owlx:ObjectRestriction owlx:property="hasBrother">
<owlx:someValuesFrom>
<owlx:class="&owl;Thing" />
</owlx:someValuesFrom>
</owlx:ObjectRestriction>
</owlx:someValuesFrom>
</owlx:ObjectRestriction>
<owlx:Variable owlx:name="x1" />
</owlx:classAtom>
</owlx:consequent>
</owlx:Rule>
<owlx:SubClassOf>
<owlx:sub>
<owlx:ObjectRestriction owlx:property="hasUncle">
<owlx:someValuesFrom>
<owlx:class="&owl;Thing" />
</owlx:someValuesFrom>
</owlx:ObjectRestriction>
</owlx:sub>
<owlx:super>
<owlx:ObjectRestriction owlx:property="hasParent">
<owlx:someValuesFrom>
<owlx:ObjectRestriction owlx:property="hasBrother">
<owlx:someValuesFrom>
<owlx:class="&owl;Thing" />
</owlx:someValuesFrom>
</owlx:ObjectRestriction>
</owlx:someValuesFrom>
</owlx:ObjectRestriction>
</owlx:super>
</owlx:SubClassOf>
An alternative formulation for the first rule.
<owlx:Rule>
<owlx:antecedent>
<owlx:individualPropertyAtom owlx:property="hasParent">
<owlx:Variable owlx:name="x1" />
<owlx:Variable owlx:name="x2" />
</owlx:individualPropertyAtom>
<owlx:individualPropertyAtom owlx:property="hasSibling">
<owlx:Variable owlx:name="x2" />
<owlx:Variable owlx:name="x3" />
<owlx:individualPropertyAtom owlx:property="hasSex">
<owlx:Variable owlx:name="x3" />
<owlx:Individual owlx:name="#male" />
</owlx:individualPropertyAtom>
</owlx:antecedent>
<owlx:consequent>
<owlx:individualPropertyAtom owlx:property="hasUncle">
<owlx:Variable owlx:name="x1" />
<owlx:Variable owlx:name="x3" />
</owlx:individualPropertyAtom>
</owlx:consequent>
</owlx:Rule>
Due to Guus Schreiber, 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>
From an extended example due to Mike Dean.
<!--
Background knowledge about airports and maps:
-->
<owlx:DatatypeProperty owlx:name="latitude"/>
<owlx:DatatypeProperty owlx:name="longitude"/>
<owlx:SubClassOf>
<owlx:sub>
<owlx:class="Location" />
</owlx:sub>
<owlx:super>
<owlx:IntersectionOf>
<owlx:ObjectRestriction owlx:property="latitude">
<owlx:allValuesFrom owlx:datatype="&xsd;double"/>
</owlx:ObjectRestriction>
<owlx:ObjectRestriction owlx:property="longitude">
<owlx:allValuesFrom owlx:datatype="&xsd;double"/>
</owlx:ObjectRestriction>
</owlx:IntersectionOf>
</owlx:super>
</owlx:SubClassOf>
<owlx:Individual owlx:name="&airport;GEC">
<owlx:type owlx:name="&airport-ont;Airport" />
<owlx:DataPropertyValue owlx:property="airport-ont:name">
<owlx:DataValue owlx:datatype="&xsd;string">Spokane Intl</owlx:DataValue>
</owlx:DataPropertyValue>
<owlx:ObjectPropertyValue owlx:property="location">
<owlx:Individual>
<owlx:DataPropertyValue owlx:property="latitude">
<owlx:DataValue>47.6197</owlx:DataValue>
</owlx:DataPropertyValue>
<owlx:DataPropertyValue owlx:property="longitude">
<owlx:DataValue>-117.5336</owlx:DataValue>
</owlx:DataPropertyValue>
</owlx:Individual>
</owlx:ObjectPropertyValue>
</owlx:Individual>
<owlx:Individual owlx:name="layer">
<owlx:type owlx:name="↦DrawingLayer" />
</owlx:Individual>
<owlx:Individual owlx:name="map">
<owlx:type owlx:name="↦Map" />
<owlx:DataPropertyValue owlx:property="↦name">
<owlx:DataValue owlx:datatype="&xsd;string">Airports</owlx:DataValue>
</owlx:DataPropertyValue>
<owlx:ObjectPropertyValue owlx:property="map:layer">
<owlx:Individual owlx:name="layer"/>
</owlx:ObjectPropertyValue>
</owlx:Individual>
<!--
A map:Location has latitude and longitude, both of which are doubles:
-->
<owlx:SubClassOf>
<owlx:sub>
<owlx:class="↦Location" />
</owlx:sub>
<owlx:super>
<owlx:IntersectionOf>
<owlx:ObjectRestriction owlx:property="↦latitude">
<owlx:someValuesFrom owlx:datatype="&xsd;double"/>
</owlx:ObjectRestriction>
<owlx:ObjectRestriction owlx:property="↦latitude">
<owlx:allValuesFrom owlx:datatype="&xsd;double"/>
</owlx:ObjectRestriction>
<owlx:ObjectRestriction owlx:property="↦longitude">
<owlx:someValuesFrom owlx:datatype="&xsd;double"/>
</owlx:ObjectRestriction>
<owlx:ObjectRestriction owlx:property="↦longitude">
<owlx:allValuesFrom owlx:datatype="&xsd;double"/>
</owlx:ObjectRestriction>
</owlx:IntersectionOf>
</owlx:super>
</owlx:SubClassOf>
<!--
If a map:Location is the sameLocation as another location,
then it has the same values for latitude and longitude.
-->
<owlx:Rule>
<owlx:antecedent>
<owlx:classAtom>
<owlx:class="↦Location" />
<owlx:Variable owlx:name="_maploc" />
</owlx:classAtom>
<owlx:individualPropertyAtom owlx:property="sameLocation">
<owlx:Variable owlx:name="_loc" />
<owlx:Variable owlx:name="_maploc" />
</owlx:individualPropertyAtom>
<owlx:datavaluedPropertyAtom owlx:property="latitude">
<owlx:Variable owlx:name="_loc" />
<owlx:Variable owlx:name="_lat" />
</owlx:datavaluedPropertyAtom>
<owlx:datavaluedPropertyAtom owlx:property="longitude">
<owlx:Variable owlx:name="_loc" />
<owlx:Variable owlx:name="_lon" />
</owlx:datavaluedPropertyAtom>
</owlx:antecedent>
<owlx:consequent>
<owlx:datavaluedPropertyAtom owlx:property="↦latitude">
<owlx:Variable owlx:name="_maploc" />
<owlx:Variable owlx:name="_lat" />
</owlx:datavaluedPropertyAtom>
<owlx:datavaluedPropertyAtom owlx:property="↦longitude">
<owlx:Variable owlx:name="_maploc" />
<owlx:Variable owlx:name="_lon" />
</owlx:datavaluedPropertyAtom>
</owlx:consequent>
</owlx:Rule>
<!--
Wherever an Airport is located, there is some map:Location
that is the sameLocation as the Airport's location, and that
is the location of a map Point that is an object of the
map:DrawingLayer "layer":
-->
<owlx:ObjectProperty owlx:name="↦location" owlx:inverseOf="↦isLocationOf" />
<owlx:ObjectProperty owlx:name="↦object" owlx:inverseOf="↦isObjectOf" />
<owlx:Rule>
<owlx:antecedent>
<owlx:classAtom>
<owlx:class="&airport-ont;Airport" />
<owlx:Variable owlx:name="_airport" />
</owlx:classAtom>
<owlx:individualPropertyAtom owlx:property="location">
<owlx:Variable owlx:name="_airport" />
<owlx:Variable owlx:name="_loc" />
</owlx:individualPropertyAtom>
<owlx:datavaluedPropertyAtom owlx:property="&airport-ont;name">
<owlx:Variable owlx:name="_airport" />
<owlx:Variable owlx:name="_name" />
</owlx:datavaluedPropertyAtom>
<owlx:datavaluedPropertyAtom owlx:property="latitude">
<owlx:Variable owlx:name="_loc" />
<owlx:Variable owlx:name="_lat" />
</owlx:datavaluedPropertyAtom>
<owlx:datavaluedPropertyAtom owlx:property="longitude">
<owlx:Variable owlx:name="_loc" />
<owlx:Variable owlx:name="_lon" />
</owlx:datavaluedPropertyAtom>
</owlx:antecedent>
<owlx:consequent>
<owlx:classAtom>
<owlx:ObjectRestriction owlx:property="sameLocation">
<owlx:someValuesFrom>
<owlx:IntersectionOf>
<owlx:class="↦Location" />
<owlx:ObjectRestriction owlx:property="↦isLocationOf">
<owlx:someValuesFrom>
<owlx:IntersectionOf>
<owlx:class="↦Point" />
<owlx:ObjectRestriction owlx:property="↦isObjectOf">
<owlx:someValuesFrom>
<owlx:OneOf>
<owlx:Individual owlx:name="#layer" />
</owlx:OneOf>
</owlx:someValuesFrom>
</owlx:ObjectRestriction owlx:property="↦isObjectOf">
</owlx:IntersectionOf>
</owlx:someValuesFrom>
</owlx:ObjectRestriction owlx:property="↦isLocationOf">
</owlx:IntersectionOf>
</owlx:someValuesFrom>
</owlx:ObjectRestriction>
<owlx:Variable owlx:name="_loc" />
</owlx:classAtom>
</owlx:consequent>
</owlx:Rule>
<!--
The map:Point whose map:location is the map:Location of an Airport
has the airport as a map:underlyingObject and has a map:label
which is the name of the Airport.
-->
<owlx:Rule>
<owlx:antecedent>
<owlx:classAtom>
<owlx:class="&airport-ont;Airport" />
<owlx:Variable owlx:name="_airport" />
</owlx:classAtom>
<owlx:individualPropertyAtom owlx:property="location">
<owlx:Variable owlx:name="_airport" />
<owlx:Variable owlx:name="_loc" />
</owlx:individualPropertyAtom>
<owlx:individualPropertyAtom owlx:property="sameLocation">
<owlx:Variable owlx:name="_loc" />
<owlx:Variable owlx:name="_maploc" />
</owlx:individualPropertyAtom>
<owlx:individualPropertyAtom owlx:property="↦location">
<owlx:Variable owlx:name="_point" />
<owlx:Variable owlx:name="_maploc" />
</owlx:individualPropertyAtom>
<owlx:datavaluedPropertyAtom owlx:property="&airport-ont;name">
<owlx:Variable owlx:name="_airport" />
<owlx:Variable owlx:name="_name" />
</owlx:datavaluedPropertyAtom>
</owlx:antecedent>
<owlx:consequent>
<owlx:individualPropertyAtom owlx:property="↦underlyingObject">
<owlx:Variable owlx:name="_point" />
<owlx:Variable owlx:name="_airport" />
</owlx:individualPropertyAtom>
<owlx:datavaluedPropertyAtom owlx:property="↦label">
<owlx:Variable owlx:name="_point" />
<owlx:Variable owlx:name="_name" />
</owlx:datavaluedPropertyAtom>
</owlx:consequent>
</owlx:Rule>
<owlr:Variable rdf:ID="_x1"/>
<owlr:Variable rdf:ID="_x2"/>
<owlr:Variable rdf:ID="_x3"/>
<owlr:Rule>
<owlr:antecedent rdf:parseType="Collection">
<owlr:individualPropertyAtom>
<owlr:propertyPredicate rdf:resource="⪚hasParent"/>
<owlr:argument1 rdf:about="#_x1" />
<owlr:argument2 rdf:about="#_x2" />
</owlr:individualPropertyAtom>
<owlr:individualPropertyAtom>
<owlr:propertyPredicate rdf:resource="⪚hasSibling"/>
<owlr:argument1 rdf:about="#_x2" />
<owlr:argument2 rdf:about="#_x3" />
</owlr:individualPropertyAtom>
<owlr:individualPropertyAtom>
<owlr:propertyPredicate rdf:resource="⪚hasSex"/>
<owlr:argument1 rdf:about="#_x3" />
<owlr:argument2 rdf:about="#male" />
</owlr:individualPropertyAtom>
</owlr:antecedent>
<owlr:consequent rdf:parseType="Collection">
<owlr:individualPropertyAtom>
<owlr:propertyPredicate rdf:resource="⪚hasUncle"/>
<owlr:argument1 rdf:about="#_x1" />
<owlr:argument2 rdf:about="#_x3" />
</owlr:individualPropertyAtom>
</owlr:consequent>
</owlr:Rule>
<owlr:Variable rdf:ID="_x"/>
<owlr:Variable rdf:ID="_y"/>
<owlr:Variable rdf:ID="_z"/>
<owlr:Rule>
<owlr:antecedent rdf:parseType="Collection">
<owlr:classAtom>
<owlr:classPredicate rdf:about="&ulan;Artist"/>
<owlr:argument1 rdf:about="#_x" />
</owlr:classAtom>
<owlr:classAtom>
<owlr:classPredicate rdf:about="&aat;Style"/>
<owlr:argument1 rdf:about="#_y" />
</owlr:classAtom>
<owlr:individualPropertyAtom>
<owlr:propertyPredicate rdf:resource="&aatulan;artistStyle"/>
<owlr:argument1 rdf:about="#_x" />
<owlr:argument2 rdf:about="#_y" />
</owlr:individualPropertyAtom>
<owlr:individualPropertyAtom>
<owlr:propertyPredicate rdf:resource="&vra;creator"/>
<owlr:argument1 rdf:about="#_x" />
<owlr:argument2 rdf:about="#_z" />
</owlr:individualPropertyAtom>
</owlr:antecedent>
<owlr:consequent rdf:parseType="Collection">
<owlr:individualPropertyAtom>
<owlr:propertyPredicate rdf:resource="&vra;style/period"/>
<owlr:argument1 rdf:about="#_z" />
<owlr:argument2 rdf:about="#_y" />
</owlr:individualPropertyAtom>
</owlr:consequent>
</owlr:Rule>
<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="&airport-ont;name"/>
<owlr:argument1 rdf:about="#_airport" />
<owlr:argument2 rdf:about="#_name" />
</owlr:datavaluedPropertyAtom>
<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="↦Location"/>
<owl:Restriction>
<owl:onProperty rdf:resource="↦isLocationOf"/>
<owl:someValuesFrom>
<owl:intersectionOf rdf:parseType="Collection">
<owl:Class rdf:about="↦Point"/>
<owl:Restriction>
<owl:onProperty rdf:resource="↦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>