Hello,
in Stardog 5.3.3 Community basic (RDFS) inference seems to work inside EXISTS within FILTER (see Query #1) but not within BIND (see Query #2).
Create an empty default database, which therefore has SL reasoning, and activate reasoning in the query settings.
The stardog.log file does not show any entries about it.
Result of R#1 -> Q#1:
?pet ex:Rex
Result of R#1 -> Q#2:
?pet ?petIsAnimal ex:Rex false
Result of R#2 -> Q#1:
?pet ex:Rex
Result of R#2 -> Q#2:
?pet ?petIsAnimal ex:Rex true
Request #1:
PREFIX ex: <http://example.org#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> INSERT DATA { ex:Dog rdfs:subClassOf ex:Animal . ex:Rex a ex:Dog }
Request #2:
PREFIX ex: <http://example.org#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> INSERT DATA { ex:Dog rdfs:subClassOf ex:Animal . ex:Rex a ex:Dog . ex:Rex a ex:Animal }
Query #1:
PREFIX ex: <http://example.org#> SELECT * WHERE { BIND (ex:Rex AS ?pet) FILTER EXISTS { ?pet a ex:Animal } }
Query #2:
PREFIX ex: <http://example.org#> SELECT * WHERE { BIND (ex:Rex AS ?pet) BIND (EXISTS { ?pet a ex:Animal } AS ?petIsAnimal) }
Best regards,
Palladium