OWL Terminology - Names for Metamodel Description - owl

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.

Related

Best way to represent part-of (mereological) transitivity for OWL classes?

I have a background in frame-based ontologies, in which classes represent concepts and there's no restriction against assertion of class:class relationships.
I am now working with an OWL2 ontology and trying to determine the best/recommended way to represent "canonical part-of" relationships - conceptually, these are relationships that are true, by definition, of the things represented by each class (i.e., all instances). The part-of relationship is transitive, and I want to take advantage of that so that I'd be able to query the ontology for "all parts of (a canonical) X".
For example, I might want to represent:
"engine" is a part of "car", and
"piston" is a part of "engine"
and then query transitively, using SPARQL, for parts of cars, getting back both engine and piston. Note that I want to be able to represent individual cars later (and be able to deduce their parts by reference to their rdf:type), and of course I want to be able to represent sub-classes of cars as well, so I can't model the above-described classes as individuals - they must be classes.
It seems that I have 3 options using OWL, none ideal. Is one of these recommended (or are any discouraged), and am I missing any?
OWL restriction axioms:
rdfs:subClassOf(engine, someValuesFrom(partOf, car))
rdfs:subClassOf(piston, someValuesFrom(partOf, engine))
The major drawback of the above is that there's no way in SPARQL to query transitively over the partOf relationship, since it's embedded in an OWL restriction. I would need some kind of generalized recursion feature in SPARQL - or I would need the following rule, which is not part of any standard OWL profile as far as I can tell:
antecedent (body):
subClassOf(B, (P some A) ^
subClassOf(C, (P some B) ^
transitiveProperty(P)
consequent (head):
subClassOf(C, (P some A))
OWL2 punning: I could effectively represent the partOf relationships on canonical instances of the classes, by asserting the object-property directly on the classes. I'm not sure that that'd work transparently with SPARQL though, since the partOf relationships would be asserted on instances (via punning) and any subClassOf relationships would be asserted on classes. So if I had, for example, a subclass six_cylinder_engine, the following SPARQL snippet would not bind six_cylinder_engine:
?part (rdfs:subClassOf*/partOf*)+ car
Annotation property: I could assert partOf as an annotation property on the classes, with values that are also classes. I think that would work (minus transitivity, but I could recover that easily enough with SPARQL paths as in the query above), but it seems like an abuse of the intended use of annotation properties.
I think you have performed a good analysis of the problem and the advantages/disadvantages of different approaches. I don't know if any one is discouraged or encouraged. IMHO this problem has not received sufficient attention, and is a bigger problem in some domains than others (I work in bio-ontologies which frequently use partonomies, and hence this is very important).
For 1, your rule is valid and justified by OWL semantics. There are other ways to implement this using OWL reasoners, as well as RDF-level reasoners. For example, using the ROBOT command line wrapper to the OWLAPI, you can run the reason command using an Expression Materializing Reasoner. E.g
robot reason --exclude-tautologies true --include-indirect true -r emr -i engine.owl -o engine-reasoned.owl
This will give you an axiom piston subClassOf partOf some car that can be queried using a non-transitive SPARQL query.
The --exclude-tautologies removes inferences to owl:Thing, and --include-indirect will include transitive inferences.
For your option 2, you have to be careful in that you may introduce incorrect inferences. For example, assume there are some engines without pistons, i.e. engine SubClassOf inverse(part_of) some piston does not hold. However, in your punned shadow world, this would be entailed. This may or may not be a problem depending on your use case.
A variant of your 2 is to introduce different mapping rules for layering OWL T-Tboxes onto RDF, such as described in my OWLStar proposal. With this proposal, existentials would be mapped to direct triples, but there is another mechanism (e.g. reification) to indicate the intended quantification. This allows writing rules that are both safe (no undesired inferences) and complete (for anything expressible in OWL-RL). Here there is no punning (under the alternative RDF to OWL interpretation). You can also use the exact same transitive SPARQL query you wrote to get the desired results.

OWL 2 QL vs. RDFS

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.

OWLAPI : Performance impact while dealing with update/delete of axioms

I want to update/delete the axioms from a OWL Class (e.g SubclassOf axioms).
I have following two approaches :
1) Delete all old axioms then create all new axioms.
2) Delete selective axioms by comparing it with new axioms.
Note :- Due to some limitations I have to treat update cases as delete + create
Q. Which is the best strategy to go aheas in terms of performance for OWLAPI ?
E.g.
I have following SubclassOF axioms for Class X -
1) A or B
2) name exactly 1 xsd:string
3) P and not Q
and I want to update/delete these axioms with -
1) A [Update]
2) name min 1 xsd:string [Update]
3) Axiom is deleted [Delete]
The performance of axiom removals is equivalent to axiomatization additions. The main actions are searches through maps to find existing elements or add new ones.
The structures involved are O(Constant) for the input, so the total complexity is mostly independent of the ontology size (this might not hold true for very large ontologies, but it's accurate for most ontologies).
In short there is no performance issue with your proposed solution (2).
I would not suggest recreating axioms - this is likely to be expensive in terms of memory use. Axioms are immutable, so the new and old objects behave exactly the same.

OWL ontology language boundaries

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.

OWL2 profiles support OWL variants?

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.

Resources