0

I am having problems with DL Queries that are based on object property cardinality and I am not sure if I am doing something wrong, or there is something wrong with HermiT.

First of all, I've attached a very simple ontology which demonstrates my problem. There are only two individuals A and B and the object property hasSomething. A hasSomething B is true.

The following DL Query returns A as a result:

hasSomething min 1

While the query

hasSomething exactly 1

cannot be satisfied.

Does anyone have an idea why the first one works and the second doesn't?

@prefix : <http://www.semanticweb.org/cg/ontologies/2015/9/untitled-ontology-3#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.semanticweb.org/cg/ontologies/2015/9/untitled-ontology-3> .

<http://www.semanticweb.org/cg/ontologies/2015/9/untitled-ontology-3> rdf:type owl:Ontology .


#################################################################
#
#    Object Properties
#
#################################################################


###  http://www.semanticweb.org/cg/ontologies/2015/9/untitled-ontology-3#hasSomething

:hasSomething rdf:type owl:ObjectProperty .





#################################################################
#
#    Classes
#
#################################################################


###  http://www.semanticweb.org/cg/ontologies/2015/9/untitled-ontology-3#SimpleClass

:SimpleClass rdf:type owl:Class .





#################################################################
#
#    Individuals
#
#################################################################


###  http://www.semanticweb.org/cg/ontologies/2015/9/untitled-ontology-3#A

:A rdf:type owl:NamedIndividual ;

   :hasSomething :B .



###  http://www.semanticweb.org/cg/ontologies/2015/9/untitled-ontology-3#B

:B rdf:type owl:NamedIndividual .




###  Generated by the OWL API (version 3.5.1) http://owlapi.sourceforge.net
Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
fourcube
  • 762
  • 3
  • 10
  • 1
    Well I'm not entirely sure but I would guess this has something to do with the Open World Assumption. From what I gather cardinality is used mainly as a restriction. But in the case of a query, because of the OWA, specifying "exactly 1" does not let the reasoner know that there are no other individuals that satisfy that condition. – Kunal Khaladkar Oct 09 '15 at 05:23
  • @KunalKhaladkar you are absolutely correct. It's because of the OWA that this cannot be inferred. – fourcube Oct 09 '15 at 08:50

1 Answers1

2

The query cannot be fulfilled because of the Open World Assumption (OWA).

From the OWL2 Primer:

If some fact is not present in a database, it is usually considered false (the so-called closed-world assumption) whereas in the case of an OWL 2 document it may simply be missing (but possibly true), following the open-world assumption.

csnyluas, who is a protegé contributor / maintainer gave the following answer:

This is correct. Because of the open world assumption (OWA) in OWL, from your assertions the reasoner cannot infer that A has no other "hasSomething" relationships to other individuals than B.

If you would modify your ontology to state that A is of type SimpleClass, and that SimpleClass is subclass of "hasSomething exactly 1", then the reasoner would return A as instance of both "hasSomething min 1" and "hasSomething exactly 1".

fourcube
  • 762
  • 3
  • 10