From ac62616e36e358e4d84c09f7374861cf4d14d8ac Mon Sep 17 00:00:00 2001 From: Olaf Hartig Date: Sat, 17 May 2025 17:55:40 +0200 Subject: [PATCH] Consider bnode graph names in evaluation of Graph --- spec/index.html | 63 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/spec/index.html b/spec/index.html index 2369ddd..7fbc74a 100644 --- a/spec/index.html +++ b/spec/index.html @@ -107,6 +107,7 @@ div.defn p { margin-top: 1ex ; margin-bottom: 1.5ex ;} div.defn ul { margin-top: 1ex ; margin-bottom: 1.5ex ; } span.definedTerm {font-weight: bold;} +div.indentedFormula { margin-left: 5ex ; margin-top: 2mm ; margin-bottom: 2mm ; } div.grammarExtract { border: thin solid #888888; @@ -9448,8 +9449,6 @@

Basic Graph Patterns

Write Ω0 for the multiset consisting of exactly the empty mapping μ0, with multiplicity 1. This is the join identity.

Write μ(x) for the solution mapping variable x to RDF term t : { (x, t) }.

-

Write Ω(x) for the multiset consisting of exactly μ(?x->t), that is, { { (x, t) } } - with multiplicity 1.

Definition: Compatible Mappings

Two solution mappings μ1 and μ2 are compatible if, for every @@ -10288,9 +10287,8 @@

Sample

Evaluation Semantics

We define eval(|D|(|G|), |A|) as the evaluation of an algebra expression |A| with respect to a dataset |D| having active graph |G|. The active graph is initially the default - graph of |D|. Further symbols and notation used in the following definitions are:

+ graph of |D|. Further symbols used in the following definitions are:

Definition: Evaluation of Graph

-
-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) ) =
-    Let R be the empty multiset
-    foreach IRI i in D
-        R := Union(R, Join( eval(D(D[i]), P) , Ω(var->i) ) )
-    the result is R
-            
+

For every |x| that is + an IRI or + a variable, + eval( |D|(|G|), Graph(|x|, |P|) ) + is defined as follows:

+
-

The evaluation of graph uses the Union operator. The multiplicity of a - solution mapping is the sum of the multiplicities of that solution mapping in each Join - operation.

Definition: Evaluation of Group