this query (something like it):
Select ?A ?S ?P
{
?A ans:has ?S .
bind ( EXISTS { ?S a* ans:oS } as ?AoS ) .
Optional { ?S ans:SoS ?P . }
bind (EXISTS { ?P a* ans:oP } as ?SoP) .
Filter ( ?AoS || ?SoP)
}
fails in stardog - ie no rows
but returns two rows in Jena
because ?AoS and ?SoP are both false in Stardog, but one is true in Jena, which it should be.
I couldn't come up with a logically equivalent expression to do this in Stardog Sparql.