Re: SPARQL.js: a SPARQL 1.1 parser for JavaScript

Hi Gregg,

>> I would gladly use the SPARQL syntax test suite (as I did for Turtle [1]),
>> but unlike Turtle, the SPARQL test suite doesn't seem to give the correct solution.
> 
> How so?

Well, given the SPARQL query exists01.rq, I don't have the correct parse tree.
(Only the expected result of the query, but then I need to have an executor as well.)

> The approach I used for the Ruby SPARQL gem is to ensure that the grammar parses to essentially the same algebra as Jena produces. I have a copy of these results included with the published tests at [2]. For example, parsing data-sparql11/exists/exists01.rq should generate data-sparql11/exists/exists01.sse.

Ah okay, I hadn't found "exists01.sse" and related documents.
They don't seem to be linked from anywhere.

So when the library generates SPARQL algebra, those can be tested.

>  found this approach to be pretty effective at implementing most everything; the few things that this doesn't cover are done in some gem-specific rspec tests.

I'm now testing with queries from the spec, and queries that I made myself.
The test suite verifies them against manually verified JSON documents.

Best,

Ruben

Received on Monday, 25 August 2014 13:35:35 UTC