
xsparql.testcases-dawg-sparql-1.1.negation.subset-02.xsparql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xsparql-test-suite Show documentation
Show all versions of xsparql-test-suite Show documentation
XSPARQL compliance test suite
The newest version!
prefix :
prefix rdf:
{for ($s1 as $subset) ($s2 as $superset)
from where
{
# all pairs of sets
$s2 rdf:type :set .
$s1 rdf:type :set .
minus {
$s1 rdf:type :set .
$s2 rdf:type :set .
# assumes $s1 has at least one member
$s1 :member $x .
# if we want to exclude a as a subset of a.
# this is not perfect as "$s1 = $s2" is not a
# contents based comparison.
filter ( $s1 = $s2 || not exists { $s2 :member $x . } )
}
minus {
# if we don't want the empty set being a subset of itself.
$s1 rdf:type :set .
$s2 rdf:type :set .
# choose the pair (empty set, empty set)
filter ( not exists { $s1 :member $y . } )
filter ( not exists { $s2 :member $y . } )
}
}
return
{$subset}
{$superset}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy