结果不一致的基数查询

Cardinality query with inconsistent results

我在使用基于对象 属性 基数的 DL 查询时遇到问题,我不确定是我做错了什么,还是 HermiT 有问题。

首先,我附上了一个非常简单的 ontology 来说明我的问题。只有两个人 AB 和对象 属性 hasSomethingA hasSomething B 是真的。

以下 DL 查询 returns A 结果:

hasSomething min 1

查询时

hasSomething exactly 1

无法满足。

有谁知道为什么第一个有效而第二个无效?

@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

由于开放世界假设 (OWA),查询无法完成。

来自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,一位门生贡献者/维护者给出了以下答案:

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