# Reasoning : can't find inferred properties

**URL:** <https://community.stardog.com/t/reasoning-cant-find-inferred-properties/1186>\
**Category:** Support\
**Created:** [August 6, 2018, 8:15am UTC](https://community.stardog.com/t/reasoning-cant-find-inferred-properties/1186 "2018-08-06T08:15:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhaybs](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@bhaybs](https://community.stardog.com/u/bhaybs)\
**Post date:** [August 6, 2018, 8:15am UTC](https://community.stardog.com/t/reasoning-cant-find-inferred-properties/1186/1 "2018-08-06T08:15:54Z")

</div>

Hello

I am new to Stardog  
I was able to upload an ontology and execute queries.  
I tried to test reasoning results and compare the results to Protégé reasoner.  
In Protégé, I can see the inferred properties, but not in stardog.

Here is my query in stardog :  
stardog query --reasoning myDB “select \* where {:action ?p ?o}”  
(I am looking for inferred properties on action)

Thank you

Saad

---

<div class="post-metadata">

**Author:** ![jess](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/jess/32/10_2.png) [@jess](https://community.stardog.com/u/jess)\
**Post date:** [August 6, 2018, 5:30pm UTC](https://community.stardog.com/t/reasoning-cant-find-inferred-properties/1186/2 "2018-08-06T17:30:29Z")

</div>

Hi Saad,

Welcome to the Stardog community. Your question is clear, but we will need more information to figure out why there are no results for your query.

Can you please share:

- Triples in the database
- Axioms in your ontology
- Expected results from query

Thanks,  
Jess

---

<div class="post-metadata">

**Author:** ![bhaybs](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@bhaybs](https://community.stardog.com/u/bhaybs)\
**Post date:** [August 7, 2018, 9:21am UTC](https://community.stardog.com/t/reasoning-cant-find-inferred-properties/1186/3 "2018-08-07T09:21:51Z")

</div>

Hello Jess

Thank you for answering back.  
I uploaded here a simplified version of my ontology structure.  
When I upload the triples in Protégé and run the reasoner, I can see inferred properties under "Patient" class instance (here, the inferred property is "person\_medicated")  
I run the same steps through Stardog (upload the triples and query the instance properties) but I don't have the expected inferred property.

Thanks

Saad

[onto\_test2.rdf](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/62eef799794367443c637dc1b2f7eaca37154e97.rdf) (8.4 KB)  
[onto\_test2.rdf](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/62eef799794367443c637dc1b2f7eaca37154e97.rdf) (8.4 KB)

---

<div class="post-metadata">

**Author:** ![bhaybs](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@bhaybs](https://community.stardog.com/u/bhaybs)\
**Post date:** [August 7, 2018, 2:51pm UTC](https://community.stardog.com/t/reasoning-cant-find-inferred-properties/1186/4 "2018-08-07T14:51:36Z")

</div>

Here is an extract of the log file stardog.log  
WARN 2018-08-07 16:03:20,990 [stardog-user-4] com.clarkparsia.blackout.ProfileFilterBase:apply(39): Not a valid SL axiom: EquivalentClasses(www:person\_medicated, and(www:person, or(some(www:PatientTakesMedication,www:drug\_k), some(www:PatientTakesMedication,www:other\_drugs))))

So I might need to change the axiom from SL to DL

is there anyway to do it in the command line ?

Thanks

---

<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:** [August 7, 2018, 3:22pm UTC](https://community.stardog.com/t/reasoning-cant-find-inferred-properties/1186/5 "2018-08-07T15:22:25Z")

</div>

No, you need to change the database option as explained here: [Home | Stardog Documentation Latest](https://www.stardog.com/docs/#_reasoning_types)

Changing to DL will work but is not a good move in general (see the above link). The major problem in this axiom is the disjunction. You might be able to get required inferences if you weaken your axiom into

```auto
SubClassOf(and(www:person, some(www:PatientTakesMedication,www:drug_k)), www:person_medicated)

```

and

```auto
SubClassOf(and(www:person, some(www:PatientTakesMedication,www:other_drugs)), www:person_medicated)

```

This is in SL (in fact, in OWL EL) and should be more scalable.

Your query `select * where {:action ?p ?o}` is also problematic because the predicate variable is not bound. Such queries, although supported by Stardog, are disallowed in the OWL Entailment Regimes spec because there's no efficient evaluation procedure for them (strictly speaking, they are not first-order conjunctive queries). You may want to execute a series of more specific queries instead, each for a specific property.

Best,  
Pavel

PS. Comparing results to Protege makes sense to verify correctness but you should always keep in mind that there's a substantial difference between working with a (in-memory) reasoner and a database. The latter by design has to deal with much tougher scalability challenges so some expressivity compromises are inevitable.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [August 21, 2018, 3:22pm UTC](https://community.stardog.com/t/reasoning-cant-find-inferred-properties/1186/6 "2018-08-21T15:22:25Z")

</div>

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