Reasoning returns no result

Hi Team,

I am trying to execute reasoning on the query:

select * where {
  ?restriction owl:onProperty ?PROP .  
  ?restriction owl:someValuesFrom ?class .
  ?con rdfs:subClassOf ?restriction .
  }

Without reasoning it returns results. As i turn the reasoner on, it returns 0 results and there is this warning in the logs:
WARN 2018-07-10 10:44:38,781 [stardog-user-6] com.complexible.stardog.reasoning.blackout.TypeOracle:inferTypes(225): The type of variable http://www.w3.org/2002/07/owl#someValuesFrom is ambiguous; it will be assumed to be PROPERTY.

Not sure why so. Would you please help me on the same. Kindly let me know if i am doing something wrong.

Thank you!

I think I have some idea what might be going on. You should be seeing two similar warnings for both someValuesFrom and owl:onProperty but I don’t think that is a problem.

I used the dummy data

insert data {
  :restriction owl:onProperty :PROP .
  :restriction owl:someValuesFrom :class .
  :con rdfs:subClassOf :restriction .
}

try looking at the difference between the query plan with reasoning

starodg query explain -r test 'select * where { ?restriction owl:onProperty ?PROP . ?restriction owl:someValuesFrom ?class . ?con rdfs:subClassOf ?restriction . }'

and without reasoning

starodg query explain  test 'select * where { ?restriction owl:onProperty ?PROP . ?restriction owl:someValuesFrom ?class . ?con rdfs:subClassOf ?restriction . }'

The only difference is the reasoning is trying to scan for the subClassOf out of the extracted schema rather than the PSOC index.

If you issue the query and look at the query plan with reasoning for

select * {?s rdfs:subClassOf ?o}

you’ll see that it only scans the schema but it will not return :restriction

but if you only load

insert data {
  :con rdfs:subClassOf :restriction .
}

You’ll see :restriction

So it seems like there is something about the schema extraction that seems to eliminate :restriction. I know that’s not a complete answer but I hope it helps. I tried changing the schema graph from all to some specific but non existent graph but that didn’t change anything.

(Sorry I couldn’t include the query plan output)

PS:

I just tried looking at stardog reasoning schema test and it shows that :restriction is not part of the schma. and the subClassOf is being extracted as :con rdfs:subClassOf (:PROP some :class) which would explain why the query with reasoning is failing. (I just noticed for the first time that the schema output is in manchester format, cool) I can’t say I’m totally surprised there are problems here as you’re trying to apply reasoning to a query over the vocabulary that you’re using to model the reasoning. I’m not saying it shouldn’t work just it’s not surprising that things get a little wonky. It’s making my head hurt. :face_with_raised_eyebrow:

1 Like

Thank you so much for the explanation. I did try checking the schema and it makes sense to me (its too much to process and i am still processing it, will take little more time to understand).
But what confused me more is: the descriptive logic (DL) are restrictions and if restrictions are not picked up in schema then how does reasoning work at all for it?

I’m guessing that owl:onProperty and owl:someValuesFrom aren’t being picked up because they aren’t explicitly typed as owl:Restriction. I never really thought about it but I’m not sure if Stardog applies reasoning to the Schema extraction. (ie. will it infer that it’s an owl:Restriction from the domain of owl:onProperty? I don’t know)
I think not extracting onPropery and someValuesFrom is a secondary issue and isn’t the reason that you’re seeing no results with reasoning but seeing results without reasoning.

I also don’t know if the data I used matches what you’ve got but it was enough to at least replicate the behavior you were seeing.

Like I mentioned it’s a little difficult to understand or to even talk about for that matter because you’re reasoning over the model. I don’t think there’s any reason why you wouldn’t be able to do it but it’s just very meta…and cool. Hopefully someone that knows more than I do will weigh in and explain it all.

How can we explicitly tell its an owl:restriction?
I am little confused now :thinking: , if stardog will be able to reason other DLs if i upload similar ontology as stardog database.

Thank you!

I’d first ask which type of reasoning do you use?
There is a difference between rule-based reasoning and full OWL DL reasoning which is usually done by tableau algorithm (here by means of the Pellet OWL DL reasoner).

I tried SL reasoning! and in the ontology files I am majorly using DL.

You should see warnings in the logs if you’re using axioms that aren’t supported by your current reasoning profile.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.