konclude / Konclude

Konclude: A parallel, tableau-based, high-performance reasoner for the Description Logic SROIQV(D)/the Web Ontology Language (OWL) 2 DL
http://konclude.com
35 stars 4 forks source link

SPARQL-query for all pairs of subclasses and superclasses returns no body #23

Open mrnolte opened 2 years ago

mrnolte commented 2 years ago

Hi there, The following SPARQL-query returns no body; only the HTTP code 200 on any ontology i tried, e.g., this one from issue 20.

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?c1 ?c2
WHERE
{
        ?c1 rdfs:subClassOf ?c2 .
}

The log is as follows:

{info} 13:44:03:935 >> Extracted '1' sub-queries from BGPs of query 'Unknown-Rasqal-Query-Nr-8'.
{info} 13:44:03:935 >> Scheduling processing of sub-query 'Redland-Rasqal-BGP-Reasoning-SELECT-Classes-Sub-Query-0'.
{info} 13:44:03:935 >> Computed first complex query result in 0 ms.
{info} 13:44:03:935 >> Determined 0 answers for complex ABox query with 2 answer variables (c1, c2).
{info} 13:44:03:935 >> Finished processing of complex query 'Redland-Rasqal-BGP-Reasoning-SELECT-Classes-Sub-Query-0' in 0 ms.
{info} 13:44:03:935 >> Sub-queries of 'Unknown-Rasqal-Query-Nr-8' computed in 0 ms, starting answer resolving with Redland Rasqal.
{info} 13:44:03:935 >> Complex query processing with Redland Rasqal determined 0 answers in 0 ms, using 1 reasoning-based sub-queries.

Cheers!

andreas-steigmiller commented 2 years ago

Thanks for the report. Konclude indeed only supports a very limited amount of SPARQL queries that do not relate to property/role assertions. In most cases, Konclude just tries to map the patterns to ABox assertions. The support of other types of patterns should be considered experimental/prototypical at the moment. But I agree, it would be nice to extend it to fully support rdfs:subClassOf. I think it works if only one variable in the rdfs:subClassOf pattern is a variable (and the other a class name). So you could query all subsumptions by sending a separate query for each class in your ontology (Konclude allows for concatenating several queries in one SPARQL request file/HTTP request).