W3C home > Mailing lists > Public > public-xg-webid@w3.org > September 2011

Re: EARL Pointers into graphs?

From: Henry Story <henry.story@bblfish.net>
Date: Thu, 22 Sep 2011 14:53:27 +0200
Cc: WebID XG <public-xg-webid@w3.org>, Semantic Web <semantic-web@w3.org>
Message-Id: <E0C04E3D-0506-4F07-B7C4-A6442C5D1631@bblfish.net>
To: Shadi Abou-Zahra <shadi@w3.org>, public-earl10-comments@w3.org
Thanks Shadi,

Le me go over this again in more detailed steps.

One of the set of tests we have looks at a WebId Profile to see if all the Public Keys published there are well formed. We are only really interested in one of them, but we may as well alert users if their keys are somehow semantically nonsensical. So we want to iterate through each PublicKey and test it for well-form ed-ness.

I suppose the subject of the test is therefore either the document being tested, or the key in the document being tested. Let us assume that it is the document being tested just for now. Then what we want is to point to the subgraph of interest to us. This is best done in N3:

@prefix rsa: <http://www.w3.org/ns/auth/rsa#> .
@prefix cert: <http://www.w3.org/ns/auth/cert#> .

[]  a   earl:Assertion ;
    earl:test wit:pubkeyRSAExponentFunctional;
    earl:subject <http://bblfish.net/people/henry/card.n3> ;
    earl:result [ a earl:TestResult ;
               dc:description "Found one Modulus" ;
               earl:outcome earl:passed;
               earl:pointer { 
     []    a  rsa:RSAPublicKey ;
           cert:identity <http://bblfish.net/people/henry/card#me> ;
           rsa:modulus  "E7 E9 2E B9 E0 86 92 CB 8E B9 07 22 ... 4C 49 53 69 """^^cert:hex ;
           rsa:public_exponent \"65537\"^^cert:decimal .
   } ;
               ] .


Now one could also argue that the subject is that particular subgraph, but then the subject and the pointer would be the same...

In any case since most RDF formalisms don't support graphs directly - sadly only n3 does - one can't really write the above. One needs to serialise the graph and point to that, or perhaps to the log semantics of that subgraph.

@prefix log: <http://www.w3.org/2000/10/swap/log#> .

[]  a   earl:Assertion ;
    earl:test wit:pubkeyRSAExponentFunctional;
    earl:subject <http://bblfish.net/people/henry/card.n3> ;
    earl:result [ a earl:TestResult ;
               dc:description "Found one Modulus" ;
               earl:outcome earl:passed;
               earl:pointer [ is log:semantics of """ 
     []    a  rsa:RSAPublicKey ;
           cert:identity <http://bblfish.net/people/henry/card#me> ;
           rsa:modulus  "E7 E9 2E B9 E0 86 92 CB 8E B9 07 22 ... 4C 49 53 69 """^^cert:hex ;
           rsa:public_exponent \"65537\"^^cert:decimal .
   """^^<http://purl.org/NET/mediatypes/text/turtle> ;
  ] .

Here one would need to perhaps create an inverse for log:semantics for formats such as RDF/XML or even turtle or NTriples . Otherwise one could have the pointer point straight to the literal, though that could be misleading (but for whome?)

Anyway, these are some issues I am trying to work over.

Henry

On 22 Sep 2011, at 11:23, Shadi Abou-Zahra wrote:

> Hi Henry,
> 
> Admittedly we have not considered this specific usecase for Pointers but I do not think there should be a design limitation. The Pointers spec focuses on "documents" (which reflects our primary usecase) but this could probably be replaced by "resources" in general.
> 
> We will consider this input for the upcoming draft but please let us know your findings and experiences. Send your comments to:
> - <public-earl10-comments@w3.org>
> 
> Best,
>  Shadi
> 
> 
> On 22.9.2011 00:30, Henry Story wrote:
>> Hi,
>> 
>>   At the WebID XG [1] we are using EARL [2] to test protocol implementations. In all of the test there is only one where we test the syntax of a document - the WebID Profile - and where this may have a syntactic error that we may need the Pointers-in-RDF10 [3] ontology for.
>> 
>>  Most of the test cases we really need to point into subgraphs of the graph that is the log:semantics of the returned Profile. Since the subgraph of interest could be serialised anywhere in the document, it does not make sense to try to point into the document to positions where those triples were encoded: it would be extremely difficult to do, and the value would be very low.
>> 
>>   So what we need is a way to point into subgraphs of a document. One way we were thinking of doing this is by naming graphs indirectly via a literal, so for example by
>> 
>> _:b1  owl:sameAs """
>>         @prefix rsa:<http://www.w3.org/ns/auth/rsa#>  .
>>         @prefix cert:<http://www.w3.org/ns/auth/cert#>  .
>> 
>>        []    a  rsa:RSAPublicKey ;
>>           cert:identity<http://bblfish.net/people/henry/card#me>  ;
>>           rsa:modulus  \"\"\"
>> E7 E9 2E B9 E0 86 92 CB 8E B9 07 22 22 B7 FB 86 34 91 89 A8 41 F1 CD E1 77 C8 4F 8D 31 FF EA 4F 8D 04 A3 7E 1F 43 11 1C F8 92 54 25 70 BE F8 6C B4 5D B3 98 4E 8C B3 43 70 CD 20 D6 1E E4 8E AA 31 30 BB AF 82 28 4F 2D BC BD 18 D0 E1 E4 6E 48 55 0E 17 A7 2C F4 1A 80 A2 16 8D 77 B4 93 80 83 21 C8 B3 C8 D8 F5 2F CC D1 C2 C3 74 4D AC 6B 61 96 4F 95 A4 F1 DB F5 69 30 8D C0 A5 A5 4A C9 BF F8 FA 62 78 51 90 C1 A2 5F 53 32 44 DF C8 16 CF AB 78 88 48 CC FA AE DD EF B0 D8 24 B1 76 AB D0 30 9F B4 66 A0 D9 5D 84 D4 BF ED F0 7B EE 0D ED 14 6A A2 9A 8E C2 25 56 DB BF 89 43 12 60 AB B8 D5 D6 49 09 50 98 9B F0 EB A9 C5 F4 9B 56 94 C0 70 18 58 AB 52 6A 9F 59 E6 9E CF 9C 95 68 C2 AA 76 FF 78 E7 B1 FE E1 E9 69 54 37 DC 90 B6 6F C5 78 47 8C A7 ED CC C7 B0 E8 90 06 18 4C 49 53 69 \"\"\"^^cert:hex ;
>>           rsa:public_exponent \"65537\"^^cert:decimal .
>> """^^<http://purl.org/NET/mediatypes/text/turtle>  .
>> 
>> This gives us a turtle literal named _:b1 that we can then refer to, in a test case such as the following for example
>> 
>> []    a   earl:Assertion ;
>>      earl:result [ a earl:TestResult ;
>>                 dc:description "Found one Modulus" ;
>>                 earl:outcome earl:passed;
>>                 earl:pointer _:b1 ;
>>               ] ;
>>       earl:subject _:b1 ;
>>       earl:test wit:pubkeyRSAExponentFunctional .
>> 
>> ( this test tests that the exponent is correctly a owl:functional relation )
>> 
>> In fact in this case it's not so clear what the subject and what the pointer should be. We are trying to work this out. But in any case it seems that we would like to point into a subgraph, rather than into a document.
>> 
>> Any guidance here from people who have done this before?
>> 
>> Henry
>> 
>> 
>> 
>> 
>> [1] http://webid.info/
>>     http://www.w3.org/2005/Incubator/webid/wiki/Main_Page
>> [2] http://www.w3.org/WAI/intro/earl
>> [3] http://www.w3.org/TR/Pointers-in-RDF10/
>> 
>> Social Web Architect
>> http://bblfish.net/
>> 
>> 
>> 
> 
> -- 
> Shadi Abou-Zahra - http://www.w3.org/People/shadi/
> Activity Lead, W3C/WAI International Program Office
> Evaluation and Repair Tools Working Group (ERT WG)
> Research and Development Working Group (RDWG)

Social Web Architect
http://bblfish.net/
Received on Thursday, 22 September 2011 12:54:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 September 2011 12:54:21 GMT