CONSTRUCT and abstract queries

Hi all,
I am currently writing about SPARQL and in particular about how a
SPARQL query can be translated into an abstract query. Doing this, I
was wondering about the CONSTRUCT query form. As far as I can see, the
template part of such a query is not at all part of the abstract
query, which would make it difficult to evaluate such an abstract
query properly. From the current and the SPARQL 1.0 spec, I would
translate the query:
CONSTRUCT { ?x a foaf:Person } WHERE { ?x foaf:name ?name }
(prefixes omitted) into the abstract query:
(E, D, CONSTRUCT) with E=toList(BGP(?x foaf:name ?name)) and D the
dataset of the SPARQL endpoint. This means, however, that  the
template is lost and I am not able to evaluate the query just by
working with the abstract query. Am I missing something?

If not, wouldn't it make sense to extend the algebra construction with
something like construct as a last step:
E:= Construct(E, template) if the query form is CONSTRUCT, where
template is the template of the construct query.

The evaluation of construct then could be defined as currently
outlined with an example, i.e., construct an RDF graph by
instantiating the template with all solutions.

In general, I think it wold be good to have at least a short paragraph
about the query forms in the section about query evaluation just
saying that you return the result of the evaluation for SELECT and
CONSTRUCT (if properly defined) and for ASK you return whether the
solution sequence obtained by the evaluation is empty or not. DESCRIBE
is anyway not precisely defined.

Best regards,
Birte

-- 
Dr. Birte Glimm, Room 309
Computing Laboratory
Parks Road
Oxford
OX1 3QD
United Kingdom
+44 (0)1865 283520

Received on Thursday, 27 January 2011 14:52:17 UTC