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

Konclude SPARQL not understanding owl:Class #22

Open mrnolte opened 2 years ago

mrnolte commented 2 years ago

Hi there, It's me again. Sorry for spamming issues. I loaded univ-bench.owl as stated on the sparql usage page and then tried to query for all classes (a sub-query of the example query):

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#>
PREFIX ub: <http://swat.cse.lehigh.edu/onto/univ-bench.owl#>
SELECT ?X
WHERE
{
    ?X rdf:type _:c1 . _:c1 rdf:type owl:Class .
}

However, Konclude answers with empty results and tells me in the log that Class http://www.w3.org/2002/07/owl#Class not used in queried ontology. Cheers, Robin

andreas-steigmiller commented 2 years ago

Thanks for spamming and reporting issues :). Indeed, Konclude does not correctly interpret owl:class at the moment (similar to many other owl/rdfs terms in SPARQL queries). In your case, I think it should work if you just use a non-anonymous variable and omit the owl:class pattern as follows:

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#>
PREFIX ub: <http://swat.cse.lehigh.edu/onto/univ-bench.owl#>
SELECT ?S ?C
WHERE
{   
    ?S rdf:type ?C .
}
mrnolte commented 2 years ago

Hi, thank you for the quick response! Unfortunately, no, your suggestion did not work either; this time, Konclude crashed without explanation. The log is as follows:

{info} 10:15:23:013 >> Initializing reasoner. Creating calculation context.
{info} 10:15:23:019 >> Reasoner initialized with 1 processing unit(s).
{info} 10:15:23:032 >> Listening on port '8080'
{info} 10:15:27:424 >> Downloading 'http://swat.cse.lehigh.edu/onto/univ-bench.owl'.
{info} 10:15:28:299 >> Successfully downloaded 'http://swat.cse.lehigh.edu/onto/univ-bench.owl', received 14 KBytes.
{error} 10:15:28:309 >> OWL2/XML Ontology node not found.
{info} 10:15:38:775 >> Preprocessing ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/'.
{info} 10:15:38:792 >> Finished preprocessing in 17 ms for ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/'.
{info} 10:15:38:792 >> Precomputing ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/', expressiveness 'SHI'.
{info} 10:15:38:814 >> Finished precomputing in 22 ms for ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/'.
{info} 10:15:38:815 >> Initializing complex query answering for ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/', expressiveness 'SHI'.
{info} 10:15:38:819 >> Preparing query answering handler.
{info} 10:15:38:819 >> Query answering hanlder prepared.
{info} 10:15:38:842 >> Extracted '1' sub-queries from BGPs of query 'Unknown-Rasqal-Query-Nr-1'.
{info} 10:15:38:842 >> Scheduling processing of sub-query 'Redland-Rasqal-BGP-Reasoning-SELECT-Individuals-Sub-Query-0'.
{info} 10:15:38:846 >> Classifying ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/', expressiveness 'SHI'.
{info} 10:15:38:846 >> Ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/' has been sufficiently saturated, extracting data for classification.
{info} 10:15:38:846 >> Finished class classification in 0 ms for ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/'.
{info} 10:15:38:846 >> Classifying object properties for ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/', expressiveness 'SHI'.
{info} 10:15:38:863 >> Finished object property classification in 17 ms for ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/'.
{info} 10:15:38:871 >> Building 1 class term expressions for computation of upper/lower bounds based on complex concepts.
{info} 10:15:38:871 >> Scheduling processing of (realization) requirements.
{info} 10:15:38:871 >> Realizing ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/', expressiveness 'SHI'.
{info} 10:15:38:875 >> Finished (lazy) realization in 0 ms for ontology 'http://Konclude.com/Ontologies/UnnamedOntologies/0/390d087c-6628-4d56-a152-0f0498094d4a/'.

I am sure that this is not due to the graph being empty like in #21, as, e.g., querying for ?C rdfs:subClassOf owl:Thing returns the expected results instead of crashing.