W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2011

Re: Review test cases

From: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
Date: Tue, 5 Apr 2011 14:52:23 +0100
Message-ID: <BANLkTimMxe=GL8hQ7sM0R-C3_JyeW_PYSA@mail.gmail.com>
To: Olivier Corby <Olivier.Corby@sophia.inria.fr>
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Oliver,
I comment inline on issues regarding the ent. test cases. Some isues
such as uniform default prefix had already been taken care of. The
other issues I believe I have fixed now. Thanks Olivier!
Birte

On 28 March 2011 16:02, Olivier Corby <Olivier.Corby@sophia.inria.fr> wrote:
> Here is my review of test cases (Action-421)
>
[snip]
> entailment-owlds
> entailment-RDF
> entailment-RDFS

I believe they have been deleted, at least I don't have them.

> entailment
>
> I suggest to remove the @base statement from manifest.ttl (there is no base
> in other manifests)

done

> :rdfs03 rdf:type mf:QueryEvaluationTest ;
>     mf:name    "RDFS inference test RDFS rules incompleteness" ;
>     dawgt:approval dawgt:NotClassified ;
>     mf:action
>          [ qt:query  <rdfs03.rq> ;
>            qt:data   <rdfs03.ttl> ;
>            sd:entailmentRegime ent:RDFS ] ;
>     mf:result  <rdfs03.srx>
>
> query: SELECT ?x WHERE { ex:a ex:b1 ?x }
>
> data:
> ex:a ex:b1 ex:c1 .
> ex:b1 rdfs:subPropertyOf _:b2 .
> _:b2 rdfs:domain ex:c2 .
>
> result:
> x = http://example.org/ns#c1
> x = http://example.org/ns#c2
>
> rdfs:domain specifies the type of the subject, not the value,
> Result should be:
> x = http://example.org/ns#c1
>
> Furthermore, in RDF, properties cannot be blanks.

Actually, the test was meant to illustrate that the (informal) RDFS
inference rules from the RDF spec are incomplete (as shown by ter
Horst). However, my query and answer were messed up. The BGP of the
query is now
?x rdf:type ex:c2
and the result should be
x = http://example.org/ns#a

The instantiated BGP ex:a a ex:c2 is RDFS-entailed, but in order to
get that, one has to work with generalised RDF graphs when
materialising consequences:
"ex:a ex:b1 ex:c1" plus "ex:b1 rdfs:subPropertyOf _:b2"
gives
"ex:a _:b2 ex:c1" plus "_:b2 rdfs:domain ex:c2"
gives
"ex:a a ex:c2", which is an RDFS-entailed legal triple. "ex:a _:b2
ex:c1" is not legal RDF, but in order to derive all RDFS-consequences
you need such "internal" non-RDF triples. Otherwise the system is
incomplete, although this might not matter much in practise.

> _________________________
>
> :rdfs04 rdf:type mf:QueryEvaluationTest ;
>     mf:name    "RDFS inference test subClassOf" ;
>     dawgt:approval dawgt:NotClassified ;
>     mf:action
>          [ qt:query  <rdfs04.rq> ;
>            qt:data   <rdfs04.ttl> ;
>            sd:entailmentRegime ent:RDFS ] ;
>     mf:result  <rdfs04.srx> .
>
> query:
> SELECT ?x WHERE { ex:a ex:b ?x }
>
> data:
> ex:a ex:b ex:c1 .
> ex:c1 rdfs:subClassOf ex:c2 .
>
> result:
> x = http://example.org/ns#c1
> x = http://example.org/ns#c2
>
> Result should be:
>
> x = http://example.org/ns#c1
>
> Subsumption occurs with rdf:type

Again right. I always tried to avoid BGPs such as ex:a rdf:type ?x
since that would also give answers from axiomatic triples, e.g., ex:a
rdf:type rdf:Resource or other such triples and without having a
system that does this kind of entailment it is hard to make sure you
don't miss such triples. Anyway, I didn't successfully manage to avoid
the ssue either ;-)
Here my proposed fix that still tests class subsumption:
SELECT ?x WHERE { ?x rdf:type ex:c2 }
data:
ex:a rdf:type ex:c1 .
ex:c1 rdfs:subClassOf ex:c2 .
result:
x = http://example.org/ns#a

> __________________________
>
> :rdfs06 rdf:type mf:QueryEvaluationTest ;
>     mf:name    "RDFS inference test domain" ;
>     dawgt:approval dawgt:NotClassified ;
>     mf:action
>          [ qt:query  <rdfs06.rq> ;
>            qt:data   <rdfs06.ttl> ;
>            sd:entailmentRegime ent:RDFS ] ;
>     mf:result  <rdfs06.srx> .
>
> query:
> SELECT ?x WHERE { ?x ex:b ex:c }
>
> data:
> ex:a1 ex:b ex:c .
> ex:b rdfs:domain ex:a2 .
>
> result:
> x = http://example.org/ns#a1
> x = http://example.org/ns#a2
>
> rdfs:domain specifies the *type* of the subject, not the subject itself,
> Result should be:
>
> x = http://example.org/ns#a1

True. To still test rdfs:domain inference, I changed the test to
query: SELECT ?x WHERE { ?x rdf:type ex:aType }
data:
ex:a ex:b ex:c .
ex:b rdfs:domain ex:aType .
result:
x = http://example.org/ns#a

> _________________________________________
>
> :rdfs07 rdf:type mf:QueryEvaluationTest ;
>     mf:name    "RDFS inference test range" ;
>     dawgt:approval dawgt:NotClassified ;
>     mf:action
>          [ qt:query  <rdfs07.rq> ;
>            qt:data   <rdfs07.ttl> ;
>            sd:entailmentRegime ent:RDFS ] ;
>     mf:result  <rdfs07.srx> .
> query:
> SELECT ?x WHERE { ex:a ex:b ?x }
> data:
> ex:a ex:b ex:c1 .
> ex:b rdfs:range ex:c2 .
> result:
> x = http://example.org/ns#c1
> x = http://example.org/ns#c2
>
> rdfs:range specifies the *type* of the value, not the value itself,
> Result should be:
> x = http://example.org/ns#c1

As above. Changed to
query: SELECT ?x WHERE { ?x rdf:type ex:cType }
data:
ex:a ex:b ex:c .
ex:b rdfs:range ex:cType .
result:
x = http://example.org/ns#c

> _________________________________________________
>
> :rdfs08 rdf:type mf:QueryEvaluationTest ;
>     mf:name    "RDFS inference test rdf:XMLLiteral subclass of rdfs:Literal"
> ;
>     dawgt:approval dawgt:NotClassified ;
>     mf:action
>          [ qt:query  <rdfs08.rq> ;
>            qt:data   <rdfs08.ttl> ;
>            sd:entailmentRegime ent:RDFS ] ;
>     mf:result  <rdfs08.srx> .
>
> query: SELECT ?x WHERE { ex:d rdfs:range ?x }
> data:
> ex:d rdfs:range rdf:XMLLiteral .
> result:
> x = http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral
> x = http://www.w3.org/2000/01/rdf-schema#Literal
>
> As we have also:
> rdfs:Literal rdfs:subClassOf rdfs:Resource
> result should be:
>
> x = http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral
> x = http://www.w3.org/2000/01/rdf-schema#Literal
> x = http://www.w3.org/2000/01/rdf-schema#Resource
>
True. That's easy to overlook without a system that does RDFS
entailment. Added now.
> _________________________________________________
>
> :rdfs11 rdf:type mf:QueryEvaluationTest ;
>     mf:name    "RDFS inference test subclasses of rdf:Container" ;
>     dawgt:approval dawgt:NotClassified ;
>     mf:action
>          [ qt:query  <rdfs11.rq> ;
>            qt:data   <rdfs11.ttl> ;
>            sd:entailmentRegime ent:RDFS ] ;
>     mf:result  <rdfs11.srx> .
> query: SELECT ?x WHERE { ?x rdfs:subClassOf rdfs:Container }
> data: ex:a ex:b ex:c .
> result:
> x = http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt
> x = http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
> x = http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq
>
> rdfs:subClassOf is Reflexive,
> result should be:
>
> x = http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt
> x = http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
> x = http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq
> x = http://www.w3.org/2000/01/rdf-schema#Container

Fixed.

> entailment:
>
> owl:DataProperty should be replaced by owl:DatatypeProperty
>
> bind01.rq:  ?p a owl:DataProperty .
> bind02.rq:  ?p a owl:DataProperty .
> bind03.rq:  ?p a owl:DataProperty .
> bind03.rq:  ?p1 a owl:DataProperty .
> bind04.rq:  ?p a owl:DataProperty .
> bind05.rq:  ?p a owl:DataProperty .
> bind06.rq:  ?p a owl:DataProperty .
> bind07.rq:  ?p a owl:DataProperty .
> bind08.rq:  ?p a owl:DataProperty .

Done.

> entailment: typos with prefix:
>
> rdfs01
> ex:b1 rdfs:rdfs:subPropertyOf ex:b2 .
>
> rdfs02
> ex:b1 rdfs:rdfs:subPropertyOf ex:b2 .

Fixed.

> rdfs08
> rdf prefix is missing
>
> rdfs09
> rdf prefix is missing
>
> rdfs12
> . missing
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>
> rdf02
> . missing
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>
> rdf03
> . missing
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>
All fixed.

[snip README issues]



-- 
Dr. Birte Glimm, Room 309
Computing Laboratory
Parks Road
Oxford
OX1 3QD
United Kingdom
+44 (0)1865 283520
Received on Tuesday, 5 April 2011 13:52:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:46 GMT