Search code examples
owlontologyrdfs

Defining a subclass of owl:ObjectProperty with domains/range constraint


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.


Solution

  • 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.