From 70e63572e3a132a6ac74824e9d80ab91b0c0ef86 Mon Sep 17 00:00:00 2001
From: james anderson 17.4.1.4 NOT EXISTS
query evaluation.
No additional binding of variables occurs. The
NOT EXISTS
form
translates into fn:not(EXISTS{...})
.
xsd:boolean NOT EXISTS { pattern }
Returns false
if pattern
matches. Returns true otherwise.
NOT EXISTS { pattern }
is equivalent to fn:not(EXISTS { pattern })
.
xsd:boolean EXISTS
{ pattern }
Returns true
if pattern
matches.
- Returns false otherwise.
Variables in the pattern
that are bound in the current
+ Returns false otherwise.
+ Variables in the pattern pattern
that are not bound in the current
+ solution mapping take part in pattern matching.
+ Variables in the pattern
that are bound in the current
- solution mapping take the value that they have from the solution mapping.
- Variables in the pattern pattern
that are not bound in the current
- solution mapping take part in pattern matching.
To facilitate this, we introduce a function Exists + solution mapping take the value that they have from the solution mapping. + This value, whether a literal, an iri, or a blank node, + can constrain both pattern matching and operands in select claus expressions. +
To facilitate this, we introduce a function Exists that evaluates a SPARQL Algebra expression and returns true or false, depending on whether there are any solutions to the pattern, given the solution mapping - being tested by the filter operation.
xsd:boolean xsd:boolean left || xsd:boolean right
Returns a logical OR
of left
and right
. Note that logical-or operates on the effective boolean value of its arguments.
Note: see section 17.2, Filter Evaluation, for
the ||
operator's treatment of errors.
xsd:boolean xsd:boolean left && xsd:boolean right
Returns a logical AND
of left
and right
. Note that logical-and operates on the effective boolean value of its arguments.
Note: see section 17.2, Filter Evaluation, for @@ -3598,7 +3604,8 @@
substitute(pattern, μ) = the pattern formed by replacing every occurrence of a variable v in pattern by μ(v) for each v in dom(μ)
Definition: Evaluation of Exists
Let μ be the current solution mapping for a filter and P a graph pattern:
- The value exists(P), given D(G) is true if and only if eval(D(G), substitute(P, μ)) is a non-empty sequence. + The value exists(P), given D(G) is true if and only if eval(D(G), substitute(P, μ)) is a non-empty sequence. + In the evaluation, blank node do not contribute to RDF instance mapping of statement patterns, but instead act as contants to contrain the match.
eval(D(G), Join(P1, P2)) = Join(eval(D(G), P1), eval(D(G), P2))
eval(D(G), LeftJoin(P1, P2, F)) = LeftJoin(eval(D(G), P1), eval(D(G), P2), F)
eval(D(G), Union(P1,P2)) = Union(eval(D(G), P1), eval(D(G), P2))
if IRI is a graph name in D eval(D(G), Graph(IRI,P)) = eval(D(D[IRI]), P)
if IRI is not a graph name in D eval(D(G), Graph(IRI,P)) = the empty multiset
eval(D(G), Graph(var,P)) = @@ -4160,4 +4167,4 @@A.2 Other R