diff --git a/spec/index.html b/spec/index.html index 2369ddde..3a7641f6 100644 --- a/spec/index.html +++ b/spec/index.html @@ -8421,6 +8421,171 @@
To define the evaluation semantics of a SPARQL query, + the abstract syntax tree of the SPARQL query string + (as defined by the SPARQL grammar) + is first translated into a syntax that resembles the + SPARQL algebra. + This section defines the expressions that can be formed in this algebraic syntax, + and the translation of SPARQL query strings into this algebraic syntax is then defined + in Section .
+An + algebraic query expression + is defined recursively as follows:
+The notion of an + algebraic property path expression, + as used in the previous definition, + is defined recursively as follows:
+This section defines the process of converting graph patterns and solution modifiers in a @@ -8758,9 +8923,10 @@
FILTER
ElementsThe following table gives the translation of property paths expressions from SPARQL - syntax to terms in the SPARQL algebra. This applies to all elements of a property path - expression recursively.
+The following table gives the translation + of property path expressions in SPARQL query strings + into algebraic property path expressions. + This applies to all elements of a property path expression recursively.
The next step after this one translates certain forms to triple patterns, and these are converted later to basic graph patterns by adjacency (without intervening group pattern delimiters @@ -8769,114 +8935,116 @@
Notes:
We introduce the following symbols:
-Syntax Form (path) | -Algebra (path) | +Syntax Form (path) | +Algebraic Form (path) |
---|---|---|---|
iri |
- link(iri) |
+ link(iri) |
|
^path |
- inv(path) |
+ inv(path) |
|
!(:iri1|...|:irin) |
- NPS({:iri1 ... :irin}) |
+ NPS({:iri1 ... :irin}) |
|
!(^:iri1|...|^:irin) |
- inv(NPS({:iri1 ... :irin})) |
+ inv( NPS({:iri1 ... :irin}) ) |
|
!(:iri1|...|:irii|^:irii+1|...|^:irim) |
- alt(NPS({:iri1 ...:irii}), | ||
path1 / path2 |
- seq(path1, path2) |
+ seq(path1, path2) |
|
path1 | path2 |
- alt(path1, path2) |
+ alt(path1, path2) |
|
path* |
- ZeroOrMorePath(path) |
+ ZeroOrMorePath(path) |
|
path+ |
- OneOrMorePath(path) |
+ OneOrMorePath(path) |
|
path? |
- ZeroOrOnePath(path) |
+ ZeroOrOnePath(path) |
The previous step translated property path - expressions. This step translates property path - patterns, which are a subject end point, property path expression and object end - point, into triple patterns or wraps in a general algebra operation for path - evaluation.
+The previous step translated property path expressions. + This step translates property path patterns, + which are a subject end point, a property path expression, and an object end + point. + This step assumes that the property path expression + of the property path pattern is already given in the form of an + algebraic property path expression. + The result of this step may be triple patterns and + algebraic query expressions + of the form Path(...).
Notes:
Path(...)
.Algebra (path) | +Algebraic Form (path) | Translation | |
---|---|---|---|
X link(iri) Y |
- X iri Y |
+ |x| link(|iri|) |y| | +|x| |iri| |y| |
X inv(iri) Y |
- Y iri X |
+ |x| inv(|iri|) |y| | +|y| |iri| |x| |
X seq(P, Q) Y |
- X P ?V . ?V Q Y |
+ |x| seq(ppe1, ppe2) |y| | +|x| ppe1 |var| . |var| ppe2 |y| |
X P Y |
- Path(X, P, Y) |
+ |x| |ppe| |y| | +Path(|x|, |ppe|, |y|) |
Examples of the whole path translation process (?_V
is a fresh
variable):
Definition: Evaluation of a Basic Graph Pattern
eval( |D|(|G|), |BGP| ) = multiset of solution mappings