Turtle tests blank ID patches, and EARL report for Serd

I finally took some time to implement most of the new Turtle spec.

To be able to run the test suite in my existing test framework, I needed
to fix up the test output slightly.  Attached is a patch to:

 * Normalize generated blank labels to a machine style (_:b1 _:b2 etc),
   so conformance can be tested with simple file comparison.
 * Use the same generated blank label style in both test suites
 * Make non-generated output blank labels match those in the input,
   for implementations that can preserve blank node labels.
 * Re-order some triples in the tests-ttl output, so output triple order
   matches input triple order (for streaming parser/serialisers)

These change make testing streaming implementations nicer, but shouldn't
break anything since the RDF is the same.

Also attached is a conformance report for my implementation, Serd [1],
which now passes all the /coverage tests byte-for-byte except for 2
(SPARQL PREFIX and BASE).  Serd is a very fast reader/writer which can
abbreviate while streaming, particularly useful for abbreviating
extremely large dumps.

I still have some work to do on the tests-ttl tests, though most pass.

Issue: There are tests-ttl tests that do not match the current grammar
[2], e.g. turtle-syntax-prefix-02.ttl contains "PreFIX :
<http://example/>", but the grammar only allows PREFIX.

Regarding those rules, since the draft has a request for feedback: I
formally object to the rules [5s] sparqlBase and [6s] sparqlPrefix, they
are inconsistent and not appropriate for Turtle.  If SPARQL
implementations want to support a superset of Turtle, they can, but
these rules do not belong in the spec.  Directives starting with @ is a
good convention: consistent, extensible, and simple/fast to parse.

Note there are quite a few gaps in these test cases (they cover 77% of
my code, my extended test suite covers 99%).  There are several new
things I have not yet implemented (like dots in prefixed names) that
weren't exposed by tests.  If they will be used I can contribute
additional test cases.

The attached EARL report was generated with some pretty kludgey code,
but more or less matches the format of 
https://github.com/ruby-rdf/rdf-turtle/blob/master/etc/earl.ttl

Cheers,

-dr

[1] http://drobilla.net/software/serd/
[2] https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/index.html

Received on Monday, 25 February 2013 06:14:13 UTC