3

I'm trying to understand why I'm obtaining different results between Stardog and Protege reasoning.

I have the following ontology in both tools:

Number

Class: Number

Number DisjointUnionOf OddNumber,EvenNumber

OddNumber

OddNumber subClassOf Number

EvenNumber

EvenNumber subClassOf Number

EvenNumber EquivalentTo hasValue {"2", "4", "6" }

hasValue

DataProperty: hasValue

hasValue Range xsd:string

hasValue SubPropertyOf: owl:topDataProperty

hasValue Domain Number

Functional: hasValue

Then I create two instances called num1 and num2 which are defined as follows:

num1

num1 hasValue "1"^^xsd:string

individual: num1

num1 Type Number

num2

num2 hasValue "2"^^xsd:string

individual: num2

num2 Type Number

When applying reasoning in Protege and Stardog, both reasoners show that num2 is an instance of EvenNumber and Number. When applying the reasoners with num1, Protege says num1 is an instance of OddNumber and Number, while Stardog says num1 is just an instance of Number.

I need Stardog to classify num1 as an OddNumber too. Am I missing some restriction in order to achieve this behavior? Is it possible to configure Stardog to behave like this?

Note: I'm using a default installation of Stardog (version 4.2.3) and Protege (version 5.1.0) by default with reasoner Hermit 1.3.8.

Thanks.

semanticuy
  • 31
  • 1

1 Answers1

3

The reason Stardog is returning no results is that there is an unsupported axiom in your ontology (EvenNumber EquivalentTo hasValue {"2", "4", "6" }), which is being ignored. There should be a line in your stardog.log file saying as much.

There are two possible solutions to this:

  1. Configure your Stardog server to approximate axioms that ARE supported instead of just ignoring the unsupported ones (via reasoning.approximate=true). This is not guaranteed, but in this case it could work.

  2. Replace this axiom with a supported one; a stardog rule would work nicely.

For further help with either of these, feel free to make a post in the support forums over at Stardog community.

  • Stephen, thanks for your answer. I have created the database again and stardog log isn't showing any problem with the restriction you mention and actually it's working right with instance num2 (which Stardog says is a EvenNumber). I have also tried to enable reasoning approximate but I'm getting the same results as I mentioned in the question (num1 isn't considered an instance of OddNumber). – semanticuy Apr 12 '17 at 19:48