Reasoning test for disjoint classes

0 views
Skip to first unread message

jrh...@thematix.com

unread,
Jun 15, 2015, 4:27:27 PM6/15/15
to sta...@clarkparsia.com
One way to test whether two classes A and B are disjoint is to add a single named individual to both classes. Is there a way in Stardog 3.1 to perform this test without adding anything permanently to the database?
 

Evren Sirin

unread,
Jun 15, 2015, 4:42:55 PM6/15/15
to Stardog
You can simply execute the query `ASK { A owl:disjointWith B }` to
check if two classes are disjoint.

Best,
Evren
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

jrh...@thematix.com

unread,
Jun 23, 2015, 4:20:52 PM6/23/15
to sta...@clarkparsia.com
I notice that this pattern has no variables. If I were to add some assertions and axioms (in RDF form) in an ASK query pattern with reasoning on, will the reasoner add these assertions and axioms to the TBox before answering the query?
Here's a specific example: I would like to assert class membership and object property relationships for a small collection of individuals in order to test for an inconsistency. For example, suppose the OP is functional in the TBox and I assert in the ASK query that (a,b) and (a,c) are in the OP. Will this work with reasoning and will I get the answer false?

Evren Sirin

unread,
Jun 23, 2015, 4:48:23 PM6/23/15
to Stardog
You cannot assert anything with ASK (or SELECT) queries. The patterns
in these queries would be matched against the database (with reasoning
if enabled). If you want to check that a property is functional then
again a schema query would be enough. You can check if OP is
functional "ASK { OP a owl:FunctionalProperty }", or you can ask for
all the types of OP "SELECT ?type { OP a ?type }", or you can get all
functional properties "SELECT ?p { ?p a owl:FunctionalProperty }".

If you really need to make some temporary changes and query that state
you can do so by starting a transaction and query before committing.
In the end you can rollback the transaction and all changes will
disappear. But querying uncommitted state has certain overhead so you
will pay a performance penalty.

Best,
Evren
Reply all
Reply to author
Forward
0 new messages