- From: Seaborne, Andy <andy.seaborne@hp.com>
- Date: Fri, 8 May 2009 17:26:47 +0000
- To: Steve Harris <steve.harris@garlik.com>, SPARQL Working Group <public-rdf-dawg@w3.org>
> -----Original Message----- > From: public-rdf-dawg-request@w3.org [mailto:public-rdf-dawg- > request@w3.org] On Behalf Of Steve Harris > Sent: 8 May 2009 18:05 > To: SPARQL Working Group > Subject: ProjectExpression andAssignment equivalence > > re. http://www.w3.org/2009/sparql/track/actions/13 > > With some help from Luke I've worked out a plausible definition for > the LET() syntax that was in the wiki page, and shown an equivalent > general form in SPARQL + SubQueries + ProjectExpressions. > > http://www.w3.org/2009/sparql/wiki/Feature:Assignment#Equivalence_with_S > ubSelects_and_ProjectExpressions Looks good. I think you have to require that A does not mention v i...n as well in your approach, which is OK. I came up with some evaluation rules for variables when I added assignment: A1: If the expression does not evaluate (e.g. unbound variable in the expression), no assignment occurs and the query continues. A2: If the variable is unbound, and the expression evaluates, the variable is bound to the value. A3: If the variable is bound to the same value as the expression evaluates, nothing happens and the query continues. A4: If the variable is bound to a different value as the expression evaluates, an error occurs and the current solution will be excluded from the results. ---- A1 is a manifestation of whatever we decide to do with expression failures in SelectExpressions. A2 is the expected case! A3 and A4 are there for the cases when the assigned to variable occurs earlier (deeper) in the query. It works better with OPTIONALs in the first pattern than simply forbidding the mention of a variable in a pattern. It can used to provide for default values. Again, this is not assignment-specific and occur in SelectExpressions. Andy > > I believe that discharges my action, and I'm never going to attempt to > write algebra in wiki syntax again! > > - Steve
Received on Friday, 8 May 2009 17:28:06 UTC