Not getting results for OWL 2 DL constructs

Hi, I am trying to execute SPARQL queries on my ontology that includes OWL 2 DL constructs. I has set reasoning type to DL, still reasoner returns 0 results. I could get correct results only for "min 1 cardinality construct". other than that such as min,max,exact etc it returns NULL. What constructs does Stardog supports? and if it supports OWL 2 DL than what could be the reason for not getting results for OWL 2 DL constructs.

Can you share your ontology and are the any errors or warnings in the logs? $STARDOG_HOME/stardog.log

And what version of Stardog are you running?

max and exactly won't work in OWL DL due to Open World Assumption unless Stardog has some Closed World feature which I'm not aware of given that Pellet DL reasoner should be still the backend for OWL DL reasoning?
The devs might correct me if I'm wrong.

What queries were you executing, what results did you get and what results were you expecting?

I have this small ontology which i constructed using protege.
Classes:
Man (having instances m1,m2,m3)
Woman (having instances w1,w2,w3)
Person (disjoint union of Man and Woman)
Interest (having instances movie,sports,swimming,painting)
PersonWithManyHobbies (equivalent to Person and likes min 3 Interest)
PersonWithExactlyOneHobby (equivalent to Person and exactly 1 Interest)
PersonWithMaximum3Hobbies (equivalent to Person and likes max 3 Interest)
Object Properties:
likes
m1 likes movie, m1 likes swimming, m1 likes painting, m1 likes sports
m2 likes movie
m3 likes movie, m3 likes sports, m3 likes painting

now i wanted to execute the following sparql queries using Stardog (I had enabled DL reasoning option there)

  1. Select ?x
    Where {
    ?x rdf:type Person
    }
    ***gives correct result *** m1,m2,m3,w1,w2,w3

  2. Select ?x
    Where {
    ?x rdf:type PersonWithManyHobbies

Returns Null for second query where i expected m1 and m3 in the result .
and similarly for 3 )PersonWithExactlyOneHobby, 4) PersonWithMaximumOneHobby it returned null

In the stardog docs its mentioned that if we enable DL reasoning then stardog supports OWL 2 DL axioms.

I believe you need to make movie, sports, swimming, and painting not equivalent (owl:AllDifferent). Without that they could all be different names for the same thing and then everyone only has one interest.

Yes, it now worked for min 3 Interest
but still returns null for max and exact

I believe that is the correct answer. As it is right now, because of open world semantics, you might know that someone has one hobby or fewer than three hobbies but there could be more hobbies that you just aren't aware of yet. I don't believe you'll ever be able to infer that someone is a PersonWithExactlyOneHobby or PersonWithMaximum3Hobbies. The most you'll be able to do is say there is an inconsistency when you say that someone is a PersonWithExactlyOneHobby but list two distinct interests.

You could use ICV to require that there is one and only one interest for a PersonWithExactlyOneHabby or that someone has fewer than three interests if they're a PersonwithMaxmum3Hobbies.

test2.xml (10.4 KB)

Stardog 6.2.3

Guys, did you read my answer?

Open World Assumption is the "problem" here.

I know but how does this invalidate my answer?
Supports OWL DL axioms means reasoning follows OWL DL semantics with a standard OWL DL reasoner (in fact it's Pellet) which means Open World Assumption and no Unique Names Assumption.

I read it and mentioned OWA in my response. I’m not sure what you mean by “ won’t work”. It won’t work in the sense that it won’t give the inference that the poster is expecting but that’s a bit vague and I attempted to give a more detailed answer. Stardog does do closed world reasoning through the ICV feature that I mentioned as well. I hope that my response was accurate and would appreciate anyone correcting it if it wasn’t.

By "won't work" I just meant that it won't be inferred that those individuals belong to the class just based on the instance data.

And I didn't meant your response in particular, I was just wondering if the TE didn't read my previous comment regarding max and exactly cardinality restrictions because he tried it again.

As you said, either a) ICV or b) a complex SPARQL query translated from the OWL class expression would work (which indeed would be much more complex)

By the way, Stardog also provides an ICV to SAPRQL converter for those interested how complex OWL querying can be via SPARQL which was never made for OWL but RDF

You might be able achieve what you’re looking for with the use of a rule. I only qualify that because it’s something that I don’t think you can do with an axiom and uses closed world semantics. If that’s the case it’s an interesting question about how CWA rules and OWA axioms work together.

I suspect that you can't since that would make it non-monotomic but I'll have to check that out or have someone explain to me why it would or wouldn't work.

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