Re: comments on section 12 (and a little more)

Pat Hayes wrote:
> Overall comment (important).
> 
> There is a disconnect between the ideas of 
> dataset and graph, which I think needs to be 
> fixed. Section 8 discusses datasets in great 
> detail with many examples, but it nowhere 
> actually defines explicitly which RDF graph is 
> determined to be the one that BGPs are required 
> to match against. Section 12.3.2 defines matching 
> for BGPs, but speaks of matching to a dataset 
> (mia culpa). Section 12.5 finally introduces and 
> uses the terminology "active graph", but it does 
> not formally define this notion or say how it is 
> computed. (See detailed comments of 12.5 below) 
> In any case, it is far too late in the document 
> for this idea to be defined.
> 
> "Active graph" is a basic concept which should be 
> defined in section 8, which should give clear 
> criteria for how to determine it given a query 
> and a dataset. Then 12.3.2 should use this term 
> when defining BGP matching, and the references in 
> 12.3.2 and 12.5 should have internal links to the 
> definition in section 8.
> 

...

> 12.2
> 
> "an SPARQL query" -> "a SPARQL query"
> 
> This is hard to follow. After parsing, the syntax 
> tree is composed of .. a table?? What is the 
> 'query form' in this table? Is it part of the 
> syntax tree, or just there for reference?
> 
> "uses theses symbols" -> "uses these symbols"
> 
> What exactly is meant by "mapping" in "The result 
> of mapping a SPARQL query..." ? 

Together with the changes ("SPARQL abstract query" became "SPARQL query")

"""
The result of converting such an abstract syntax tree is a SPARQL query that 
uses these symbols in the SPARQL algebra:
"""

> This mapping idea 
> hasn't been mentioned previously or defined 
> (unless you mean solution mapping? Surely not.) 
> Is this mapping the same as "converting"? 

Yes - "Converting" is better than "mapping".

 >
The
> early material in the beginning of the section 12 
> talks about a series of 'steps' and of 'turning 
> into', but does not say 'mapping' or 
> 'converting'. Suggest choosing a uniform 
> terminology and sticking to it throughout. Might 
> also be a good idea to review that early material 
> here (unless you put 12.2 before 12.1, as I 
> suggested above)
> 
> What is a 'result form' in the definition of 
> abstract query? The internal link is broken.

Link fixed to point to the Query Forms section 10.

In an ideal world (that's one with a lot more time in it), there'd be a extra 
part of section 12 that covered query forms.  Currently section 12 only covers 
up to the solution sequence after modifiers but at least that's the core of 
defining SPARQL.

> 
> 12.2.1
> 
> What does the title of this section mean? (Mapping graph patterns to what?)
> 
> Step 2
> second line, remove comma after "GroupGraphPattern"
> "replace with a sequence of nested union 
> operators:" => "replace with nested union 
> operators, associated to the left:"

removed comma - added "then"

> 
> Step 3. Odd change of font. Is it meaningful?

Fixed


> 
> Does "Map ... to ..." mean the same as "replace 
> ... by ...."? Suggest use consistent terminology 
> in describing these steps. "Replace ..by.." seems 
> nicely unambiguous.
> 
> Step 4.
> 
> What is the point of the link from the cryptic 
> word "Constraint" in parentheses, without 
> explanation?

No idea! Who added this? Removed for now.

> 
> What does "Write: "A" for an algebra expression" 
> mean? The earlier steps have been instructions to 
> do something: is this an instruction (imperative) 
> also? If not, what is it? If it is, where does 
> one write "A" exactly?

In the box "A" is used to match some (inner) algebra expression.

> 
> In box:
> "for i := 0 ; i < length(SP); i++"  Yechhh, do we 
> really want to use C++ in the formal spec? 
> Couldn't you write this in some kind of readable 
> pseudocode?

for each algebra sub-expression SA:

and using SPA for each SP[i].

> 
> BTW, what is the scope of this iteration? Is the 
> "If F is nonempty" inside it or after it?

after.


> 
> "LeftJoin(G , A, true)" -> "LeftJoin(G, A, true)" (no space after G)
> 
> "SP := List " -> "SP := list "
> 
> "If G = Join(A1, A2) then G := Filter(F, Join(A1, 
> A2)" -> "If G = Join(A1, A2) then G := Filter(F, 
> Join(A1, A2))" (extra paren at end)
> ----------

Done.

> 
> This step 4 is incomprehensible as written, I 
> have to say. I have no idea what it is telling me 
> to do. If that stuff in the box is a procedure, 
> where is A initialized? I can't see how G can 
> ever get rid of a LeftJoin; is this right?
> 
> What does "Map all sub-patterns contained in this 
> group" mean? Sub-pattern hasn't been defined, and 
> contain hasn't been defined.

Moved outside the block : text is now:

"""
A group pattern is mapped into the SPARQL algebra as follows: first, convert 
all elements making up the group into algebra expressions, then apply the 
following transformation:
"""

> 
> step 5. "join({}, A)" -> "join({ }, A)" (space added)
> 
> 12.2.3 What is this doing? A word or two would be helpful.
> 
> Step 1 "There is no implied ordering to the 
> sequence" OK, but does it have to be fixed? That 
> is, is ToList a real function?

ToList is a conversion from a multiset to a sequence. It is not required to be 
a deterministic conversion so it not a function.

> 
> This step says "set M =". Earlier part of this 
> section have used assignment := or said "replace 
> ... by ..." Later steps in the subsection omit 
> "set" and are written using equality, which is 
> misleading if read as an equation. Suggest using 
> uniform notation and terminology.
> 
> Step 2. Where does the list of order conditions come from?

Changed to comparators which is the current language in sec 9.1

> 
> Step 3. What is a 'named variable' ? Suggest 
> rephrase as "all variables occurring in the query"

Distinguishes from blank nodes as variables.

> 
> Step 5. "If the query mentions.." Does this mean 
> the same as "If the query contains.." ? If so, 
> suggest use consistent wording.
> 
> "defaults to the (size(M)-start)" -> "defaults to (size(M)-start)"

Done.

(To be continued)

	Andy

Received on Monday, 19 March 2007 17:29:13 UTC