- From: Tim Berners-Lee <timbl@w3.org>
- Date: Tue, 3 Oct 2006 08:46:54 -0400
- To: Yoshio Fukushige <fukushige.yoshio@jp.panasonic.com>
- Cc: public-cwm-bugs@w3.org, Yosi Scharf <syosi@mit.edu>
Yoshio, Looks like a bug in the SPARQL compiler. Yosi, do you have any time to look at that? Tim On Oct 3, 2006, at 7:11, Yoshio Fukushige wrote: > > Hi, > > With the data triples in file <gomi.n3> > -- > @prefix : <#> . > :s :p :o1, :o2. > -- > > and a SPARQL query > -- > PREFIX : <gomi.n3#> > > SELECT ?x ?y > WHERE{ > :s :p ?x, ?y. > } > -- > > cwm (1.1.0rc2) breaks (on cygwin). > Did you mean "cwm works"? Or is there a separate bug in that test? > But with > -- > PREFIX : <gomi.n3#> > > SELECT ?x ?y > WHERE{ > :s :p ?x. > :s :p ?y. > } > -- > or > -- > PREFIX : <gomi.n3#> > > SELECT ?x ?y > WHERE{ > :s :p ?x; :p ?y. > } > -- > > it's OK and spit > (A) > -- > @prefix : <http://www.w3.org/2000/10/swap/sparqlCwm#> . > @prefix gomi: <#> . > { > gomi:o1 :bound "x", > "y" . > > } a :Result . > { > gomi:o1 :bound "x" . > gomi:o2 :bound "y" . > > } a :Result . > { > gomi:o1 :bound "y" . > gomi:o2 :bound "x" . > > } a :Result . > { > gomi:o2 :bound "x", > "y" . > > } a :Result . > -- > > I'm afraid it's a bug. > > Here's what I got as the error message > > -- > #Processed by Id: cwm.py,v 1.177 2005/08/28 22:53:56 syosi Exp > # using base file:/cygdrive/c/home/MEI/NEDO2006/local- > test/member/fuku/sparql-test/gomi.n3 > loaded from file 0.196000099182 > ['_O_QCOMMA_E____QObjectList_E__C', ('http://www.w3.org/ > 2000/10/swap/grammar/sparql#GT_COMMA', u','), ('andExtra', > ('objectList', [('Var', y)]), [])] > Traceback (most recent call last): > File "/usr/local/cwm-1.1.0rc2/cwm", line 715, in ? > doCommand() > File "/usr/local/cwm-1.1.0rc2/cwm", line 534, in doCommand > filterContext = _store.load(_uri, why=r, referer="", > contentType="x-application/sparql") > File "/usr/local/cwm-1.1.0rc2/swap/llyn.py", line 1329, in load > F = webAccess.load(store, uri, openFormula, asIfFrom, > contentType, flags, referer, why) > File "/usr/local/cwm-1.1.0rc2/swap/webAccess.py", line 166, in load > F = p.parse(sparql_parser.start).close() > File "/usr/local/cwm-1.1.0rc2/swap/sparql/sparql_parser.py", line > 100, in parse > self.onFinish() > File "/usr/local/cwm-1.1.0rc2/swap/sparql/sparql_parser.py", line > 112, in onFinish > prod = self.sink.prod(self.productions.pop()) > File "/usr/local/cwm-1.1.0rc2/swap/sparql2cwm.py", line 388, in prod > return getattr(self, 'on_' + abbr(production[0]))(production) > File "/usr/local/cwm-1.1.0rc2/swap/sparql2cwm.py", line 1409, in > on__O_QCOMMA_E____QObjectList_E__C > raise RuntimeError(`p`) > RuntimeError: ['_O_QCOMMA_E____QObjectList_E__C', ('http:// > www.w3.org/2000/10/swap/grammar/sparql#GT_COMMA', u','), > ('andExtra', ('objectList', [('Var', y)]), [ > ])] > -- > > And I'm not completely sure if it's OK > to have only one variable bound in the result (A) above. > (and always with "x" bound but not "y") > > In contrast SPARQLer [1] returns a result > where the two variables got always bound, > although there are cases where the two variables are bound to a > single resource (:o1 or :o2). > > [1] http://sparql.org/sparql.html > > Best, > Yoshio > > -- > Yoshio Fukushige <fukushige.yoshio@jp.panasonic.com> > Network Development Center, > Matsushita Electric Industrial Co., Ltd. > >
Received on Tuesday, 3 October 2006 12:47:38 UTC