You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/index.html
+22-15Lines changed: 22 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -8617,13 +8617,14 @@ <h3>Algebraic Syntax</h3>
8617
8617
<span id="sparqlQuery"><!-- obsolete id --></span>
8618
8618
<h3>Translation to the Algebraic Syntax</h3>
8619
8619
<p>This section defines the process of converting graph patterns and solution modifiers in a
8620
-
SPARQL query string into an <a href="#defn_AlgebraicQueryExpression">algebraic query expression</a>. The process described converts one
8620
+
SPARQL query string into an <a href="#defn_AlgebraicQueryExpression">algebraic
8621
+
query expression</a>. The process described converts one
8621
8622
level of query nesting, as formed by subqueries using the nested <code>SELECT</code> syntax and
8622
8623
is applied recursively on subqueries. Each level consists of graph pattern matching and
8623
8624
filtering, followed by the application of solution modifiers.</p>
8624
8625
<p>The SPARQL query string is parsed and the abbreviations for IRIs and triple patterns given
8625
-
in Section <a href="#sparqlSyntax" class="sectionRef"></a> are applied. At this point the abstract syntax tree
8626
-
is composed of:</p>
8626
+
in Section <a href="#sparqlSyntax" class="sectionRef"></a> are applied.
8627
+
At this point, the abstract syntax tree is composed of the following:</p>
8627
8628
<table class="plain">
8628
8629
<tbody>
8629
8630
<tr>
@@ -8708,12 +8709,13 @@ <h3>Translation to the Algebraic Syntax</h3>
8708
8709
</table>
8709
8710
<section id="variableScope">
8710
8711
<h4>Variable Scope</h4>
8711
-
<p>We define a variable to be <i>in-scope</i> if there is a way for a variable to be in the
8712
-
domain of a solution mapping at that point in the evaluation of the <a href="#defn_AlgebraicQueryExpression">algebraic expression</a> for the
8713
-
query. The definition below provides a way of determining this from the abstract syntax tree of a
8714
-
query.</p>
8712
+
<p>We define a variable to be <i>in-scope</i> if there is a way for the variable to be in the
8713
+
domain of a solution mapping at that point in the evaluation of the
8714
+
<a href="#defn_AlgebraicQueryExpression">algebraic expression</a> of the
8715
+
query. The definition below provides a way of determining this from the
8716
+
abstract syntax tree of a query.</p>
8715
8717
<p>Note that a subquery with a projection can hide variables; use of a variable in
8716
-
<code>FILTER</code>, or in <code>MINUS</code> does not cause a variable to be in-scope
8718
+
<code>FILTER</code>, or in <code>MINUS</code> does not cause the variable to be in-scope
8717
8719
outside of those forms.</p>
8718
8720
<p>Let <b>P</b>, <b>P1</b>, <b>P2</b> be graph patterns and <b>E</b>,
8719
8721
<b>E1</b>,...<b>En</b> be expressions. A variable <code>v</code> is in-scope if:</p>
@@ -8792,9 +8794,12 @@ <h4>Variable Scope</h4>
8792
8794
</section>
8793
8795
<section id="convertGraphPattern">
8794
8796
<h4>Converting Graph Patterns</h4>
8795
-
<p>This section describes the process for translating a SPARQL graph pattern into an <a href="#defn_AlgebraicQueryExpression">algebraic query expression</a>. This process is applied to the group graph pattern (the unit between
8796
-
<code>{...}</code> delimiters) forming the <code>WHERE</code> clause of a query, and
8797
-
recursively to each syntactic element within the group graph pattern. The result of the
8797
+
<p>This section describes the process for translating a SPARQL graph pattern into an
8798
+
<a href="#defn_AlgebraicQueryExpression">algebraic query expression</a>. This
8799
+
process is applied to the group graph pattern (the unit between brace
8800
+
("<code>{ }</code>") delimiters) forming the <code>WHERE</code> clause of a
8801
+
query, and recursively to each syntactic element within the group graph pattern.
8802
+
The result of the
8798
8803
translation is an <a href="#defn_AlgebraicQueryExpression">algebraic query expression</a>.</p>
8799
8804
<p>In summary, the steps are applied as follows:</p>
8800
8805
<ul>
@@ -9134,9 +9139,10 @@ <h5>Filters of Group</h5>
9134
9139
</section>
9135
9140
<section id="sparqlSimplification">
9136
9141
<h5>Simplification step</h5>
9137
-
<p>Some groups of one graph pattern become <a href="#defn_absJoin" class="absOp">Join</a>(|Z|, |A|), where |Z| is the empty
9138
-
basic graph pattern (which is the empty set). These are replaced by |A|. The empty graph
9139
-
pattern |Z| is the identity for join:</p>
9142
+
<p>Some groups of one graph pattern become <a href="#defn_absJoin"
9143
+
class="absOp">Join</a>(|Z|, |A|), where |Z| is the empty basic graph
9144
+
pattern (which is the empty set). These are replaced by |A|. The empty
9145
+
graph pattern |Z| is the identity for join:</p>
9140
9146
<pre class="code nohighlight">
9141
9147
Replace <a href="#defn_absJoin" class="absOp">Join</a>(<var>Z</var>, <var>A</var>) by <var>A</var>
9142
9148
Replace <a href="#defn_absJoin" class="absOp">Join</a>(<var>A</var>, <var>Z</var>) by <var>A</var>
@@ -9417,7 +9423,8 @@ <h5>Grouping and Aggregation</h5>
0 commit comments