From ab035ff0fb8a0aaba7b6a70eaf35b1817f98fd79 Mon Sep 17 00:00:00 2001
From: Olaf Hartig We define an auxiliary function, ALP, used in the definitions of ZeroOrMorePath and
+ We define an auxiliary function, ALP, used in the definitions of ZeroOrMorePath and
OneOrMorePath. Note that the algorithm given here serves to specify the feature. An
implementor is free to implement evaluation by any method that produces the same results
for the query overall. The ZeroOrMorePath and OneOrMorePath forms return matches based on
@@ -9960,24 +9960,24 @@ Property Path Patterns
when starting at RDF term x.
ALP(x:term, ppe) =
- Let V = empty set
+ Let V = empty set of nodes
ALP(x:term, ppe, V)
return is V
- # V is the set of nodes visited
-
ALP(x:term, ppe, V:set of RDF terms) =
if ( x in V ) return
add x to V
From b0a6719d2e0ac2a826b2d1f5411811405b0d7796 Mon Sep 17 00:00:00 2001
From: Olaf Hartig Property Path Patterns
ALP(x:term, ppe) =
Let V = empty set of nodes
- ALP(x:term, ppe, V)
+ ALP'(x:term, ppe, V)
return is V
- ALP(x:term, ppe, V:set of RDF terms) =
+ ALP'(x:term, ppe, V:set of RDF terms) =
if ( x in V ) return
add x to V
X = reachableTerms(x, ppe)
For n:term in X
- ALP(n, ppe, V)
+ ALP'(n, ppe, V)
End
@@ -10013,7 +10013,7 @@ Property Path Patterns
Let X = reachableTerms(x, ppe)
Let V = the empty multiset
For n in X
- ALP(n, ppe, V)
+ ALP'(n, ppe, V)
End
result is V
From dc6d0719caf0a71e02252f685d668a0fd6c838e4 Mon Sep 17 00:00:00 2001
From: Olaf Hartig Property Path Patterns
when starting at RDF term x.
ALP(x:term, ppe) =
- Let V = empty set of nodes
+ Let V = empty set of terms
ALP'(x:term, ppe, V)
return is V
From a1f48b3fc03d70774aa820d63a083761378215f6 Mon Sep 17 00:00:00 2001
From: Olaf Hartig Property Path Patterns
either (yn in nodes(G) and xn = yn)
or {(X, xn), (Y, yn)} in ppeval(X, ppe, Y) }
- Property Path Patterns
a node has been visited for the path under consideration, it is not a candidate for another
step.
Definition: Function ALP
+Definition: Function ALP
Let ppe be an algebraic property path expression. Let reachableTerms(x:term, ppe) be the set of RDF terms reached by repeated matches of ppe, when starting at RDF term x. - ALP(x:term, ppe) = + ALP(x:term, ppe) = Let V = empty set of terms - ALP'(x:term, ppe, V) + ALP_recurse(x:term, ppe, V) return is V - ALP'(x:term, ppe, V:set of RDF terms) = + ALP_recurse(x:term, ppe, V:set of RDF terms) = if ( x in V ) return add x to V X = reachableTerms(x, ppe) For n:term in X - ALP'(n, ppe, V) + ALP_recurse(n, ppe, V) End
ppeval(X:term, ZeroOrMorePath(ppe), vy:var) =
- { { (vy, n) } | n in ALP(X, ppe) }
+ { { (vy, n) } | n in ALP(X, ppe) }
ppeval(vx:var, ZeroOrMorePath(ppe), vy:var) =
{ { (vx, t), (vy, n) } |
@@ -10013,7 +10013,7 @@ Property Path Patterns
Let X = reachableTerms(x, ppe)
Let V = the empty multiset
For n in X
- ALP'(n, ppe, V)
+ ALP_recurse(n, ppe, V)
End
result is V
@@ -12725,7 +12725,7 @@ Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language
in
from eval to ppeval.