In the W3C explanation of OWL 2 QL it is mentioned that
In particular, this profile (i.e OWL 2 QL) contains the intersection of RDFS and OWL
2 DL.
This sentence is confusing me and I was wondering if somebody can clarify it. Does this mean that OWL 2 QL is a subset of RDFS? Or does this mean that it is a more restricted version of RDFS (and therefore more axioms to express these restrictions).
Assume that I have a KB that has only the following axioms used in it: rdfs:domain, rdfs:range, rdfs:subclassOF, rdf:type, owl:ObjectProperty and owl:DatatypeProperty. What can I say about the language of this KB? can I say it is expressed in RDFS, OWL 2 QL or both?
Is that the case that if I see a resource which is both an instance of something (rdf:type), and a class I would say it is RDFS, and if there is no resource which is both an instance and a class I would say it is also in OWL 2 QL?
If I say, “this box contains the intersection of my t-shirts and green things”, it doesn't mean the box contains only green t-shirts. All my green t-shirts are in the box, but it may contain also blue t-shirts or green socks or whatever else.
In particular, this profile (i.e OWL 2 QL) contains the intersection of RDFS and OWL 2 DL.
The sentence just says: Any KB that meets all the requirements of RDFS and OWL 2 DL happens to also be in OWL 2 QL. But as far as that sentence goes, OWL 2 QL may also contain all sorts of other things that are neither RDFS or OWL 2 DL.
(I am also not sure that the sentence is strictly true. For example, RDFS allows anonymous individuals a.k.a. blank nodes. OWL 2 QL doesn't.)
Your example KB uses OWL constructs, so it is clearly not RDFS. The strict separation between classes and individuals is something from OWL 1 DL, and no longer present in OWL 2 DL.
The terms you mention (rdfs:domain, rdf:type, owl:DatatypeProperty etc.) are not strictly speaking axioms. They are part of the RDF vocabulary that is used to represent OWL axioms if the ontology is represented as an RDF graphs. But the corresponding axioms are DataPropertyDomain, ClassAssertion and DataProperty. When one gets serious about OWL reasoning and the various OWL profiles, it is better to forget about RDF triples for a moment, and to think in terms of actual OWL axioms. For example, the grammar for OWL 2 QL defines exactly what is and is not allowed, but uses the language of OWL axioms and not the language of RDF triples.
Related
I am trying to represent a metamodel using OWL/RDF but I need to make sure that I use the correct OWL elements to describe my metamodel elements.
My metamodel has node and connector elements. All of them have properties/attributes (non-OWL sense).
Views are essentially sets of triples using instances of metamodel triples.
Are the following statements correct:
Metamodel node element Mn would be represented by an OWL Class
Metamodel node element Mn is an individual of an OWL Thing
Metamodel connector element Mc would be represented by an OWL ObjectProperty
Metamodel attribute/property element Ma would be represented by an OWL DatatypeProperty
A model view (mv) is an individual of a Metamodel View element (Mv - an OWL Class)
A model view comprises a collection or set of triples (that are individuals of Metamodel Triple [an OWL Class])
Is there a visualisation of the OWL metamodel (i.e an E-R-like diagram with triples) as it's easier to see the scope/set compared with text triples within a document?
Is there a choice to be made wrt flavour of OWL to use? Presumably not OWL Lite because equivalence cannot be asserted.
We are using GraphDB 8.4.0 as a triple store for a large data integration project. We want to make use of the reasoning capabilities, and are trying to decide between using HORST (pD*) and OWL2-RL.
However, the literature describing these is quite dense. I think I understand that OWL2-RL is more "powerful", but I am unsure how so. Can anyone provide some examples of the differences between the two reasoners? What kinds of statements are inferred by OWL2-RL, but not HORST (and vice versa)?
Brill, inside there GraphDB there is a single rule engine, which supports different reasoning profiles, depending on the rule-set which was selected. The predefined rule-sets are part of the distribution - look at the PIE files in folder configs/rules. One can also take one of the existing profiles and tailor it to her needs (e.g. remove a rule, which is not necessary).
The fundamental difference between OWL2 RL and what we call OWL-Horst (pD*) is that OWL2RL pushes the limits of which OWL constructs can be supported using this type of entailment rules. OWL Horst is limited to RDFS (subClassOf, subSpropertyOf, domain and range) plus what was popular in the past as OWL Lite: sameAs, equivalentClass, equivalentProperty, SymmetricProperty, TransitiveProperty, inverseOf, FunctionalProperty, InverseFunctionalProperty. There is also partial support for: intersectionOf, someValuesFrom, hasValue, allValuesFrom.
What OWL 2 RL adds on top is support for AsymmetricProperty, IrreflexiveProperty, propertyChainAxiom, AllDisjointProperties, hasKey, unionOf, complementOf, oneOf, differentFrom, AllDisjointClasses and all the property cardinality primitives. It also adds more complete support for intersectionOf, someValuesFrom, hasValue, allValuesFrom. Be aware that there are limitations to the inference supported by OWL 2 RL for some of these properties, e.g. what type of inferences should or should not be done for specific class expressions (OWL restrictions). If you chose OWL 2 RL, check Tables 5-8 in the spec, https://www.w3.org/TR/owl2-profiles/#OWL_2_RL. GraphDB's owl-2-rl data set is fully compliant with it. GraphDB is the only major triplestore with full OWL 2 RL compliance - see the this table (https://www.w3.org/2001/sw/wiki/OWL/Implementations) it appears with its former name OWLIM.
My suggestion would be to go with OWL Horst for a large dataset, as reasoning with OWL 2 RL could be much slower. It depends on your ontology and data patterns, but as a rule of thumb you can expect loading/updates to be 2 times slower with OWL 2 RL, even if you don't use extensively its "expensive" primitives (e.g. property chains). See the difference between loading speeds with RDFS+ and OWL 2 RL benchmarked here: http://graphdb.ontotext.com/documentation/standard/benchmark.html
Finally, I would recommend you to use the "optimized" versions of the pre-defined rule-sets. These versions exclude some RDFS reasoning rules, which are not useful for most of the applications, but add substantial reasoning overheads, e.g. the one that infers that the subject, the predicate and the object of a statement are instances of rdfs:Resource
Id: rdf1_rdfs4a_4b
x a y
-------------------------------
x <rdf:type> <rdfs:Resource>
a <rdf:type> <rdfs:Resource>
y <rdf:type> <rdfs:Resource>
If you want to stay 100% compliant with the W3C spec, you should stay with the non-optimized versions.
If you need further assistance, please, write to support#ontotext.com
In addition to what Atanas (our CEO) wrote and your excellent example, http://graphdb.ontotext.com/documentation/enterprise/rules-optimisations.html provides some ideas how to optimize your rulesets to make them faster.
Two of the ideas are:
ptop:transitiveOver is faster than owl:TransitiveProperty: quadratic vs cubic complexity over the length of transitive chains
ptop:PropChain (a 2-place chain) is faster than general owl:propertyChainAxiom (n-place chain) because it doesn't need to unroll the rdf:List underlying the representation of owl:propertyChainAxiom.
Under some conditions you can translate the standard OWL constructs to these custom constructs, to have both standards compliance and faster speed:
use rule TransitiveUsingStep; if every TransitiveProperty p (eg skos:broaderTransitive) is defined over a step property s (eg skos:broader) and you don't insert p directly
if you use only 2-step owl:propertyChainAxiom then translate them to custom using the following rule, and infer using rule ptop_PropChain:
Id: ptop_PropChain_from_propertyChainAxiom
q <owl:propertyChainAxiom> l1
l1 <rdf:first> p1
l1 <rdf:rest> l2
l2 <rdf:first> p2
l2 <rdf:rest> <rdf:nil>
----------------------
t <ptop:premise1> p1
t <ptop:premise2> p2
t <ptop:conclusion> q
t <rdf:type> <ptop:PropChain>
http://rawgit2.com/VladimirAlexiev/my/master/pubs/extending-owl2/index.html describes further ideas for extended property constructs, and has illustrations.
Let us know if we can help further.
After thinking this for bit, I came up with a concrete example. The Oral Health and Disease Ontology (http://purl.obolibrary.org/obo/ohd.owl) contains three interrelated entities:
a restored tooth
a restored tooth surface that is part of the restored tooth
a tooth restoration procedure that creates the restored tooth surface (e.g., when you have a filling placed in your tooth)
The axioms that define these entities are (using pseudo Manchester syntax):
restored tooth equivalent to Tooth and has part some dental restoration material
restored tooth surface subclass of part of restored tooth
filling procedure has specified output some restored tooth surface
The has specified output relation is a subproperty of the has participant relation, and the has participant relation contains the property chain:
has_specified_input o 'is part of'
The reason for this property chain is for reasoner to infer that if a tooth surface participates in a procedure, then the whole tooth that the surface is part of participates in the procedure, and, furthermore, the patient that the tooth is part of also participates in the procedure (due to the transitivity of part of).
As a concrete example, let define some individuals (using pseudo rdf):
:patient#1 a :patient .
:tooth#1 a :tooth; :part-of :patient#1
:restored-occlusal#1 a :restored-occlusal-surface; :part-of tooth#1 .
:procedure#1 :has-specified-output :restored-occlusal#1 .
Suppose you want to query for all restored teeth:
select ?tooth where {?tooth a :restored-tooth}
RDFS-Plus reasoning will not find any restored teeth b/c it doesn't reason over equivalent classes. But, OWL-Horst and OWL2-RL will find such teeth.
Now, suppose you want to find all patients that underwent (i.e. participated in) a tooth restoration procedure:
select ?patient where {
?patient a patient: .
?proc a tooth_restoration_procedure:; has_participant: ?patient .
}
Again, RDFS-Plus will not find any patients, and neither will OWL-Horst b/c this inference requires reasoning over the has participant property chain. OWL2-RL is needed in order to make this inference.
I hope this example is helpful for the interested reader :).
I welcome comments to improve the example. Please keep any comments within the scope of trying to make the example clearer. Its purpose is to give insight into what these different levels of reasoning do and not to give advice about which reasoner is most appropriate.
I am defining an ontology that contains several properties that share range/domain restrictions.
ns:synonym a owl:ObjectProperty ;
rdfs:domain ontolex:LexicalEntry ;
rdfs:range ontolex:LexicalEntry .
ns:antoym a owl:ObjectProperty ;
rdfs:domain ontolex:LexicalEntry ;
rdfs:range ontolex:LexicalEntry .
ns:meronym a owl:ObjectProperty ;
rdfs:domain ontolex:LexicalEntry ;
rdfs:range ontolex:LexicalEntry .
...
I would like to define a subclass of owl:ObjectProperty that will contain all these individual properties.
dbnary:NymProperty a rdfs:Class ;
rdfs:subClassOf owl:ObjectProperty;
<<where individuals has range XXX and domain YYY>> .
ns:synonym a dbnary:NymProperty.
ns:antoym a dbnary:NymProperty.
ns:meronym a dbnary:NymProperty.
...
Is it possible to do this in OWL ? What should I have instead of <<where individuals has range XXX and domain YYY>> ?
What is the impact (necessary reasoning, etc.) on the users of the ontology ?
I need this class of property to be defined as I would like to use these property individuals as range of another relation.
Is it possible to do this in OWL ?
No, but yes.
No because...
When someone asks if something can be expressed in OWL, they usually ask if it is allowed in an OWL Ontology, which is formally defined in the OWL 2 Web Ontology Language Structural Specification and Functional-Style Syntax. According to this specification, it is not possible to define a subclass of owl:ObjectProperty. Most tools that are described as "OWL tools", such as OWL editors (e.g., Protégé) or OWL APIs (e.g., the OWL API) or OWL reasoners (e.g., HermiT) are implementing this specification, which constrains what is allowed in an OWL ontology. In particular, not all RDF graphs can be processed correctly or completely by these tools.
Yes because...
OWL, in its broader definition, comprises multiple standards, including the OWL 2 Web Ontology Language RDF-Based Semantics that defines the notion of an OWL 2 Full ontology, which is a synonym of RDF Graph but with the intention of interpreting it according to the RDF-based semantics of OWL. The RDF-based semantics gives a meaning to any RDF graph, including those that would not be valid representations of OWL Ontologies. According to this formal semantics, it is possible to have subclasses of anything, including owl:ObjectProperty, which would match your requirements. However, the downside is that the RDF-based semantics is an undecidable logic. So the tools that are able to reason with OWL Full ontologies are incomplete. Some triplestore implement a partial axiomatisation of OWL RDF-based semantics, but some valid entailment cannot be derived with these tools.
Note that many existing ontologies do not match the requirements for being standard OWL 2 ontologies. Yet, they are simple enough to be used in many applications. Tools that implement the RDFS semantics of the RDF specification can be seen as simple, incomplete implementations of the OWL 2 RDF-based semantics. Some tools implement a superset of RDFS that can deal with more OWL constructs, but they are still incomplete.
With that said, it is generally ill-advised to use the owl: vocabulary in the definition of an RDF vocabulary, because the logical and practical consequences are hard to foresee. So use this kind of modelling responsibly.
What are the OWL ontology language boundaries? Like:
Can I use a class with different parents? (Multiple inheritance) Protege doesn't allow this.
What characters I can or cannot use? e.g. Cannot use '#' or '^' in Protege. Why?
Case-sensitive classes? e.g. class A and a are two different classes?
What else?
The boundaries of OWL are determined by the boundaries of logic of the respective OWL dialect. This is the taxonomy of the OWL2 dialects:
-First Order Logic
--SWRL/RIF
---OWL DL
----OWL EL, RL, QL
-----Concept Hierarchies
--OWL Full
---OWL DL
----OWL EL, RL, QL
-----Concept Hierarchies
---RDFS
-----Concept Hierarchies
You can find more about these dialects here.
The most used dialect is OWL-DL, as it offers a good balance between expressiveness and decidability. There is a classification system for Description Logic to determine expressiveness:
"AL" allows: Atomic negation; Concept intersection; Universal restrictions; Limited existential quantification
"FL" allows:Concept intersection; Universal restrictions; Limited existential quantification; Role restriction
"EL" allows: Concept intersection; Existential restrictions
Then there are the following extensions:
"F" - Functional properties, a special case of uniqueness quantification.
"E" - Full existential qualification
"U" - Concept union.
"C" - Complex concept negation.
"H" - Role hierarchy (subproperties - rdfs:subPropertyOf).
"R" - Limited complex role inclusion axioms; reflexivity and irreflexivity; role disjointness.
"O" - Nominals. (Enumerated classes of object value restrictions - owl:oneOf, owl:hasValue).
"I" - Inverse properties.
"N" - Cardinality restrictions (owl:cardinality, owl:maxCardinality), a special case of counting quantification
"Q" - Qualified cardinality restrictions
"D" - Use of datatype properties, data values or data types.
According to this classification the expressiveness of OWL2-DL is (SHROIQ(D)), where "S" stands for An abbreviation for "ALC" with transitive roles. (Note: there is a terminological difference between DL and OWL, for example OWL specification uses "properties", while DL uses "roles").
So, the short answer to you question is: the boundaries of OWL2-DL are (SHROIQ(D)).
Can I use a class with different parents? (Multiple inheritance)
Protege doesn't allow this
You should be careful when trying to apply metaphors from other modelling paradigms. Strictly speaking "Parents" and "inheritance" are not applicable in OWL. We can say that there is something like sharing of properties but its direction - unlike in the Object Oriented paradigm - is upwards, not downwords. OWL uses "classes" but you should think of them as sets, not as "classes" from OO. Being sets, a class can be as sub-class of different classes and Protégé allows this. In fact it is used quite often. "Boar" is a subclass of both "Bear" and "Male", just as "Bull" would be a subclass of both "Cattle" and "Male". We can always find a set of properties to create a new class. All examples so far would be of course subclasses of "Mammal"and then of "Animal", but they can be also subclasses of e.g. "Two-eyed agents", a class, which can have subclasses that are not animals, for example "two-eyed robots".
What characters I can or cannot use
OWL has different serialisations such OWL/XML, Turtle etc. Each has it's own syntax.
As you asked for useful resources, one such would be of course the OWL primer. I would also recommend this free course.
This might be a stupid question but it has been troubling me for quite some while.
I know that OWL has three variants (Full, Lite and DL) and that the newer OWL2 has three profiles (EL, QL and RL).
Now my questions:
- if a semantic reasoner supports OWL2, does that mean that is supports OWL Full too?
- if a reasoner supports OWL2 EL, does it support OWL DL then or is it simply a reasoner that is only focussed on the OWL2 EL profile?
- continuation of the above question, if it supports OWL2 EL, can such a reasoner be used to reason on normal ontologies?
Thx for your time
There is no reasoner that supports OWL 2 Full or OWL Full because they are undecidable - i.e., no reasoner can be complete on these languages.
The OWL and OWL 2 profiles overlap to a point, but do not match exactly - OWL 2 DL includes a few more constructs than OWL DL, and there are features like keys which were not defined at all in OWL.
A reasoner that supports OWL 2 EL can be used on an ontology of any expressivity, but it will not return inferences that are only valid within OWL 2 DL - which means you'll still get correct answers, but they will be incomplete wrt the answers you would get from an OWL 2 DL capable reasoner.
Reasoners that support a less expressive profile can be faster than reasoners that support a more expressive profile, since the underlying worst case complexity of reasoning is lower - i.e., for OWL 2 EL there are polynomial algorithms to compute inferences. That is not true for OWL 2 DL. This does not mean that any OWL 2 DL ontology will take more time to reason than any OWL 2 EL ontology, only that the simpler ontology is more predictable in terms of its requirements.