Re: SWObjects test results

Eric, the assertion about correcting existing tests seems confusing 
given that we have/had multiple passing implementations for all of the 
uncorrected tests. Given that, will you be present at tomorrow's telecon 
so we can go through all of these?

Lee

On 10/1/2012 5:50 PM, Eric Prud'hommeaux wrote:
> SWObjects doesn't implement property paths, but apart from that, here are the data-sparql11 test result diffs. They are annotated (leading character '#' after the patches) here and attached without annotations. I believe these patches correct the existing tests.
>
> Index: aggregates/agg-numeric.ttl
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/aggregates/agg-numeric.ttl,v
> retrieving revision 1.1
> diff -r1.1 agg-numeric.ttl
> 8c8
> < :mixed2 :double 2E-1 ; :dec 2.2 .
> ---
>> :mixed2 :double 2.0E-1 ; :dec 2.2 .
> # Generated terms must be in some form, let's use the canonical form.
> Index: aggregates/manifest.ttl
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/aggregates/manifest.ttl,v
> retrieving revision 1.22
> diff -r1.22 manifest.ttl
> 338c338
> <     mf:name "Aggregate over empty group resulting in a row with unbound variables" ;
> ---
>>      # mf:name "Aggregate over empty group resulting in a row with unbound variables" ;
> # Two mf:name arcs -- get rid of one.
> Index: functions/ceil01.srx
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/functions/ceil01.srx,v
> retrieving revision 1.1
> diff -r1.1 ceil01.srx
> 17c17
> < 			<binding name="ceil"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">3</literal></binding>
> ---
>> 			<binding name="ceil"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">3.0</literal></binding>
> 27c27
> < 			<binding name="ceil"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">2</literal></binding>
> ---
>> 			<binding name="ceil"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">2.0</literal></binding>
> 32c32
> < 			<binding name="ceil"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">-1</literal></binding>
> ---
>> 			<binding name="ceil"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">-1.0</literal></binding>
> # Use canonical form for generated terms
> Index: functions/floor01.srx
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/functions/floor01.srx,v
> retrieving revision 1.1
> diff -r1.1 floor01.srx
> 17c17
> < 			<binding name="floor"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">2</literal></binding>
> ---
>> 			<binding name="floor"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">2.0</literal></binding>
> 27c27
> < 			<binding name="floor"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">1</literal></binding>
> ---
>> 			<binding name="floor"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">1.0</literal></binding>
> 32c32
> < 			<binding name="floor"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">-2</literal></binding>
> ---
>> 			<binding name="floor"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">-2.0</literal></binding>
> # Use canonical form for generated terms
> Index: functions/round01.srx
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/functions/round01.srx,v
> retrieving revision 1.1
> diff -r1.1 round01.srx
> 17c17
> < 			<binding name="round"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">3</literal></binding>
> ---
>> 			<binding name="round"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">3.0</literal></binding>
> 27c27
> < 			<binding name="round"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">1</literal></binding>
> ---
>> 			<binding name="round"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">1.0</literal></binding>
> 32c32
> < 			<binding name="round"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">-2</literal></binding>
> ---
>> 			<binding name="round"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">-2.0</literal></binding>
> # Use canonical form for generated terms
> Index: functions/seconds-01.srx
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/functions/seconds-01.srx,v
> retrieving revision 1.3
> diff -r1.3 seconds-01.srx
> 10c10
> < 			<binding name="x"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">1</literal></binding>
> ---
>> 			<binding name="x"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">1.0</literal></binding>
> 14c14
> < 			<binding name="x"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">2</literal></binding>
> ---
>> 			<binding name="x"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">2.0</literal></binding>
> 18c18
> < 			<binding name="x"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">0</literal></binding>
> ---
>> 			<binding name="x"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">0.0</literal></binding>
> 22c22
> < 			<binding name="x"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">3</literal></binding>
> ---
>> 			<binding name="x"><literal datatype="http://www.w3.org/2001/XMLSchema#decimal">3.0</literal></binding>
> # Use canonical form for generated terms
> Index: functions/sha1-02.srx
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/functions/sha1-02.srx,v
> retrieving revision 1.1
> diff -r1.1 sha1-02.srx
> 8c8
> < 			<binding name="hash"><literal>d46696735b6a09ff407bfc1a9407e008840db9c9</literal></binding>
> ---
>> 			<binding name="hash"><literal>dae30070783bd163def39a3db66fbef89171fa8c</literal></binding>
> # SWObjects didn't get the same value. I tested with a pretty well-exercised tool and got the "dae3...fa8c" value
> # perl -e 'use Digest::SHA; print Digest::SHA::sha1_hex("98DF"), "\n"'
> # dae30070783bd163def39a3db66fbef89171fa8c
> Index: functions/sha256-02.srx
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/functions/sha256-02.srx,v
> retrieving revision 1.1
> diff -r1.1 sha256-02.srx
> 8c8
> < 			<binding name="hash"><literal>0fbe868d1df356ca9df7ebff346da3a56280e059a7ea81186ef885b140d254ee</literal></binding>
> ---
>> 			<binding name="hash"><literal>06d13a5cb62a47c7bd2c040c6276f322259d246fdbaac73cf3dee402ae923269</literal></binding>
> # perl -e 'use Digest::SHA; print Digest::SHA::sha256_hex("98DF"), "\n"'
> # 06d13a5cb62a47c7bd2c040c6276f322259d246fdbaac73cf3dee402ae923269
> Index: functions/sha512-02.srx
> ===================================================================
> RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/functions/sha512-02.srx,v
> retrieving revision 1.1
> diff -r1.1 sha512-02.srx
> 8c8
> < 			<binding name="hash"><literal>b433ed0e60c818bea72d3aa1a43db89b3ed2b624597407b7912bbb7685f2e45ae5500e092da5f938391d282b26bc43e4035b12460c93ab5e2e1a05d582331d85</literal></binding>
> ---
>> 			<binding name="hash"><literal>b43de20b1b0147e07290af96dad226a66c80bad483f9c8388726d2fe67b06d5bc7bc25eaee8d4fee8de5fbe4947bb65e13738881ec0320a5f15366fa132d201b</literal></binding>
> # perl -e 'use Digest::SHA; print Digest::SHA::sha512_hex("98DF"), "\n"'
> # b43de20b1b0147e07290af96dad226a66c80bad483f9c8388726d2fe67b06d5bc7bc25eaee8d4fee8de5fbe4947bb65e13738881ec0320a5f15366fa132d201b
>
> There's one more which I would have a hard time explaining in a SPARQL tutorial. How does the graph ?g in subquery03 simultaneously constrain the subselect's BGP to be in some (all, really) named graph without constraining the ?g to be that graph?
> [[
> select ?x where {
> graph ?g {
>    {select ?x where {?x ?p ?g}}
> }
> }
> ]]
> Having subselects ignore containing graph constraints seems like a more consistent and predictable language. Thus the above {?x ?p ?g} would be matched against the default graph. If the user wants it to be in a named graph, they can utter the graph constraint. This is trivial to implement (similar to what one does with nested name graphs) and IMO, far more clear to readers/writers of SPARQL queries, as well as 3rd party rewriters.

Received on Tuesday, 2 October 2012 00:52:21 UTC