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
+81-36Lines changed: 81 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -4694,6 +4694,15 @@ <h3>Operand Data Types</h3>
4694
4694
<section id="expression-evaluation">
4695
4695
<span id="evaluation"><!-- Legacy name --></span>
4696
4696
<h3>Expression Evaluation</h3>
4697
+
<p>
4698
+
A SPARQL expression is evaluated
4699
+
with respect to a <a href="#defn_sparqlSolutionMapping">solution mapping</a>
4700
+
and in the context of an <a href="#sparqlDataset">RDF dataset</a>
4701
+
with an <a href="#defn_ActiveGraph">active graph</a>.
4702
+
The result of such an evaluation is either
4703
+
an <a data-cite="RDF12-CONCEPTS#dfn-rdf-term">RDF term</a> or
4704
+
an [=error=].
4705
+
</p>
4697
4706
<p>
4698
4707
SPARQL provides a subset of the functions and operators defined by
4699
4708
<a data-cite="XPATH-FUNCTIONS-31#">XPath and XQuery Functions and Operators</a>.
@@ -10048,16 +10057,18 @@ <h3>SPARQL Algebra</h3>
10048
10057
|D| be a <a href="#sparqlDataset">dataset</a>,
10049
10058
and |G| be the <a href="#defn_ActiveGraph">active graph</a>.
10050
10059
We define:</p>
10051
-
<p><a href="#defn_algFilter" class="algFct">Filter</a>(<var>expr</var>, <var>Ω</var>, |D|, |G|) = { <var>μ</var> in <var>Ω</var> | <var>expr</var>(<var>μ</var>) is an expression that has an
10052
-
[=effective boolean value=] of true }</p>
10053
-
<div class="issue" data-number="254">
10054
-
It is not clear what <var>expr</var>(<var>μ</var>) is, and it is not apparent in the formula that the expression |expr| is meant to be evaluated not only with respect to <var>μ</var> but also with respect to |D| with active graph |G|.</div>
<p>Let <var>Ω<sub>1</sub></var> and <var>Ω<sub>2</sub></var> be multisets of solution mappings and <var>expr</var> be an
10081
-
<a href="#expressions">expression</a>. We define:</p>
10082
-
<p><a href="#defn_algDiff" class="algFct">Diff</a>(<var>Ω<sub>1</sub></var>, <var>Ω<sub>2</sub></var>, <var>expr</var>) = { <var>μ</var> | <var>μ</var> in <var>Ω<sub>1</sub></var> such that ∀ <var>μ'</var> in
10083
-
<var>Ω<sub>2</sub></var>, either <var>μ</var> and <var>μ'</var> are not <a href="#defn_algCompatibleMapping">compatible</a> or <var>μ</var> and <var>μ'</var> are <a href="#defn_algCompatibleMapping">compatible</a> and
10084
-
<var>expr</var>(merge(<var>μ</var>, <var>μ'</var>)) does not have an [=effective boolean value=] of true }</p>
10085
-
<div class="issue" data-number="254">
10086
-
It is not clear what <var>expr</var>(<var>μ</var>) is, and it is not apparent in the formula that the expression |expr| is meant to be evaluated not only with respect to <var>μ</var> but also with respect to |D| with active graph |G|.</div>
with respect to <var>μ</var>, in the context of dataset |D| with active graph |G|.
10115
+
</p>
10089
10116
</div>
10090
-
<p>The evaluation of <var>expr</var>(merge(<var>μ</var>, <var>μ'</var>)) does not have an
10091
-
[=effective boolean value=] of true if it evaluates to false or if it raises an error.</p>
10092
10117
<p><a href="#defn_algDiff" class="algFct">Diff</a> is used internally for the definition of <a href="#defn_algLeftJoin" class="algFct">LeftJoin</a>.</p>
<p><b>Definition: <span id="defn_algExtend">Extend</span><span id="defn_extend"><!-- obsolete id --></span></b></p>
10131
-
<p>Let <var>μ</var> be a solution mapping, <var>Ω</var> a multiset of solution mappings, <var>var</var> a variable
10132
-
and <var>expr</var> be an <a href="#expressions">expression</a>, then we define:</p>
10133
-
<p><a href="#defn_algExtend" class="algFct">Extend</a>(<var>μ</var>, <var>var</var>, <var>expr</var>) = <var>μ</var> ∪ { (<var>var</var>, <var>value</var>) | <var>var</var> not in dom(<var>μ</var>) and <var>value</var> = <var>expr</var>(<var>μ</var>) }</p>
10134
-
<div class="issue" data-number="254">
10135
-
It is not clear what <var>expr</var>(<var>μ</var>) is, and it is not apparent in the formula that the expression |expr| is meant to be evaluated not only with respect to <var>μ</var> but also with respect to |D| with active graph |G|.</div>
10136
-
<p><a href="#defn_algExtend" class="algFct">Extend</a>(<var>μ</var>, <var>var</var>, <var>expr</var>) = <var>μ</var> if <var>var</var> not in dom(<var>μ</var>) and expr(<var>μ</var>) is an error</p>
10137
-
<p><a href="#defn_algExtend" class="algFct">Extend</a> is undefined if <var>var</var> in dom(<var>μ</var>).</p>
0 commit comments