Re: reificiation - was Re: adding inline graphs to TriG

On Jul 22, 2013, at 7:12 AM, Sandro Hawke wrote:

> On 07/21/2013 05:43 AM, Ivan Mikhailov wrote:
>> On Tue, 2013-07-16 at 20:53 -0400, Sandro Hawke wrote:
>>> I know this is going to seem to some people like it's going too far,
>>> but it seems to me like such a good idea, in good conscience I have to
>>> at least seriously propose it.    If there aren't at least three +1's
>>> for this email, I wont mention it again.
>>> 
>>> Right now, in TriG, you can say things like:
>>>         [ a :Patch;
>>>           :deletes _:g1;
>>>           :inserts _:g2 ].
>>>         GRAPH _:g1 { ... }
>>>         GRAPH _:g2 { ... }
>>>         I think it would make a whole lot of sense to allow a little syntactic
>>> sugar.  I'd like to allow this:
>>>         [ a :Patch;
>>>            :delete { ... };
>>>            :inserts { ... } ].
>> I'm sorry, the syntax { triple . triples . triples ... } is in use for
>> blank node formulas in some dialects.
>> 
>> SQL> TTLP ('<s> <p> { <s1> <p1> <o1> , <o2> } .', 'http://example.com/',
>> 'http://example.com/');
>> 
>> SQL> sparql define output:format "NICE_TTL" with <http://example.com/>
>> construct where { ?s ?p ?o };
>> fmtaggret-NICE_TTL
>> LONG VARCHAR
>> _______________________________________________________________________________
>> 
>> 
>> @prefix ns0:    <http://example.com/> .
>> @prefix ns1:    <http://www.w3.org/2000/10/swap/reify#> .
>> @prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>> 
>> ns0:s
>>         ns0:p   [       ns1:statement   [       rdf:type
>> rdf:Statement ;
>>                                                 rdf:object      ns0:o1 ;
>>                                                 rdf:predicate   ns0:p1 ;
>>                                                 rdf:subject     ns0:s1
>> ] ,
>>                                         [    rdf:type
>> rdf:Statement ;
>>                                                 rdf:object      ns0:o2 ;
>>                                                 rdf:predicate   ns0:p1 ;
>>                                                 rdf:subject     ns0:s1 ]
>> ] .
>> ns0:s1
>>         ns0:p1  ns0:o1 , ns0:o2 .
> 
> So you like the syntax, you just want to use it for RDF Reification instead of RDF Datasets.    If we didn't have datasets, I'd probably like that design a lot.
> 
> But this is TriG, which is a dataset syntax.   If people want to use RDF Reification, then it seems to me TriG is not the right language for them.
> 
> 
>> 
>> So I'd strongly insist on disambiguation keyword like
>> 
>> [ a :Patch;
>>    :delete GRAPH { ... };
>>    :inserts GRAPH { ... } ].
>> 
>> or something like that if the feature is ever introduced.
> 
> Alternatively, OpenLink could use a keyword for this reification extension, like ":delete REIFIED { ... }" or (in keeping with the encoding you're using) ":delete STATEMENTS { ... }".   That would have a much better chance of being accepted in SPARQL some day, I think.  It seems pretty unlikely to me that a future SPARQL WG would ever endorse this extension, with its use of reification, the way you have it.
> 
> Of course, what I really wish is that we could really solve the underlying problem by making Datasets and Reification be interoperable.  I don't know a way to do that, technically, since reification is referentially transparent and datasets are referentially opaque.     Maybe no one cares about that distinction, and we can just by fiat make Reification also opaque, with some magical handwaving.   The idea is to somehow end up with:
> 
> <s> <p> ?x.
> ?x rdf:subject <s1>;
>    rdf:predicate <p1>;
>    rdf:object <o1>.
> 
> being somehow equivalent to (and interoperable with):
> 
> <s> <p> ?x.
> GRAPH ?x { <s1> <p1> <o1> }
> 
> (for all ?x).   Anyone think that's possible?

Not easily. The easiest way to do it would be to make datasets transparent rather than making reification opaque. (You can't really make a transparent construction opaque, the transparency arises from a loss of (syntactic) information, and there is no way to get it back.) So if we were to say that what the ?x denotes in that dataset is not the graph but something like the proposition expressed by the graph, then this might be made to work. But I havn't checked the details. 

Or, the WG could have gone back and changed the semantics of reification, which was never normative in any case. But I guess it is a bit late for that now; and it would rather mess with the semantics of RDF, since it requires the object of rdf:subject to be the IRI rather than its denotation. So for example owl:sameAs reasoniong would have to be blocked for just the reification vocabulary. Overall, I wonder if it is worth all this fuss just to make reification and datasets interoperable. They really are different, so why not just admit that and move on?

Pat

> 
>      -- Sandro
> 
>> Best Regards,
>> 
>> Ivan Mikhailov
>> OpenLink Software
>> http://virtuoso.openlinksw.com
>> 
>> 
>> 
> 
> 
> 

------------------------------------------------------------
IHMC                                     (850)434 8903 or (650)494 3973   
40 South Alcaniz St.           (850)202 4416   office
Pensacola                            (850)202 4440   fax
FL 32502                              (850)291 0667   mobile
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes

Received on Tuesday, 23 July 2013 15:30:11 UTC