# Strange effects querying OWL property with reasoning enabled

**URL:** <https://community.stardog.com/t/strange-effects-querying-owl-property-with-reasoning-enabled/1118>\
**Category:** Bug\
**Created:** [July 3, 2018, 12:11am UTC](https://community.stardog.com/t/strange-effects-querying-owl-property-with-reasoning-enabled/1118 "2018-07-03T00:11:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rivettp](https://avatars.discourse-cdn.com/v4/letter/r/82dd89/32.png) [@rivettp](https://community.stardog.com/u/rivettp)\
**Post date:** [July 3, 2018, 12:11am UTC](https://community.stardog.com/t/strange-effects-querying-owl-property-with-reasoning-enabled/1118/1 "2018-07-03T00:11:18Z")

</div>

I'm getting fewer, and inexplicable, results with reasoning.  
I have my database configured with the following i.e. including the default named graph.  
reasoning.schema.graphs=[http://com.adaptive.Ontology](http://com.adaptive.Ontology),tag:stardog:api:context:default.

My data is the very simple property declaration.  
prefix ex: [http://adaptive.com/example](http://adaptive.com/example)  
insert {ex:annotp a owl:AnnotationProperty}  
where {}

Having just created the property I cannot get its type when using reasoning. In all these cases I'm using Stardog Studio and have the reasoning defaulted to EL.

prefix ex: [http://adaptive.com/example](http://adaptive.com/example)  
select \* where {ex:annotp a ?t}

returns nothing with reasoning; returns owl:AnnotationProperty without reasoning

prefix ex: [http://adaptive.com/example](http://adaptive.com/example)  
select \* where {ex:annotp ?p ?t}

returns nothing with reasoning, rdf:type owl:AnnotationProperty without reasoning

prefix ex: [http://adaptive.com/example](http://adaptive.com/example)  
select \* where {?p a owl:AnnotationProperty}

returns ex:annotp without reasoning; that and a whole bunch more (from the non-default named graph used for reasoning) with reasoning. This is the one query that did behave as expected.

prefix ex: [http://adaptive.com/example](http://adaptive.com/example)  
select \* where {BIND (ex:annotp as ?p). ?p a owl:AnnotationProperty}

returns ex:annotp without reasoning, nothing with reasoning

prefix ex: [http://adaptive.com/example](http://adaptive.com/example)  
ASK {ex:annotp a owl:AnnotationProperty}

returns false with reasoning, true without reasoning

This seems pretty weird to me - is something subtle going on I'm not grasping?

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [July 3, 2018, 1:06pm UTC](https://community.stardog.com/t/strange-effects-querying-owl-property-with-reasoning-enabled/1118/2 "2018-07-03T13:06:06Z")

</div>

Seems a bit odd. Is there anything in the logs? I seem to remember something about Stardog having to guess the predicate type that might have something to do with it or maybe it has nothing to do with it. I’ll have to do a quick search to remind myself what that particular issue is.

---

<div class="post-metadata">

**Author:** ![rivettp](https://avatars.discourse-cdn.com/v4/letter/r/82dd89/32.png) [@rivettp](https://community.stardog.com/u/rivettp)\
**Post date:** [July 11, 2018, 12:10am UTC](https://community.stardog.com/t/strange-effects-querying-owl-property-with-reasoning-enabled/1118/3 "2018-07-11T00:10:28Z")

</div>

> [@rivettp](#):
>
> prefix ex: [http://adaptive.com/example](http://adaptive.com/example)  
> select \* where {ex:annotp ?p ?t}

Nothing untoward in stardog.log.

---

<div class="post-metadata">

**Author:** ![pavel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pavel/32/18_2.png) [@pavel](https://community.stardog.com/u/pavel)\
**Post date:** [July 11, 2018, 10:43am UTC](https://community.stardog.com/t/strange-effects-querying-owl-property-with-reasoning-enabled/1118/4 "2018-07-11T10:43:09Z")

</div>

Thanks, we can reproduce this and will investigate.

Best,  
Pavel

---

<div class="post-metadata">

**Author:** ![rivettp](https://avatars.discourse-cdn.com/v4/letter/r/82dd89/32.png) [@rivettp](https://community.stardog.com/u/rivettp)\
**Post date:** [July 13, 2018, 7:12pm UTC](https://community.stardog.com/t/strange-effects-querying-owl-property-with-reasoning-enabled/1118/5 "2018-07-13T19:12:19Z")

</div>

If it helps, this is using the same database I already sent you, Pavel.  
And it’s still a problem on 5.3.2 I just installed.

---

<div class="post-metadata">

**Author:** ![pavel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pavel/32/18_2.png) [@pavel](https://community.stardog.com/u/pavel)\
**Post date:** [July 13, 2018, 7:18pm UTC](https://community.stardog.com/t/strange-effects-querying-owl-property-with-reasoning-enabled/1118/6 "2018-07-13T19:18:28Z")

</div>

Yeah, this one was fairly clear, Stardog misses type inferences for annotation properties. It’ll also be fixed in the Aug release.

Cheers,  
Pavel
