Re: RDF* semantics

Hi William,

On tisdag 3 september 2019 kl. 10:37:28 CEST William Waites wrote:
> > I explicitly said "semantically equivalent" rather than just "equivalent."
> > Hence, what I meant is that the given RDF* triple should be interpreted to
> > have the same meaning as the the given set of five RDF triples (i.e., they
> > represents the same information).
> > 
> > > >   :Alice :asserts << :Bob foaf:age"23"^^xsd:integer >> .
> 
> Does that imply a rule that says,
> 
>   { ?s ?p << ?ss ?pp ??oo >> } <=>
>   { ?s ?p [ rdf:subject ?ss; rdf:predicate ?pp rdf:object ?oo ] }.

Kind of.

What I said in my earlier email is only half of the story. 

Currently, I am considering the option of having two different "modes" in 
which RDF*/SPARQL* may be used. I call these modes i) the "Property Graph
mode" (PG mode, for short) and ii) the "separate-assertions mode" (SA mode). I 
have introduced the intuition behind these modes in the first email of this 
thread; see: 
https://lists.w3.org/Archives/Public/public-rdf-star/2019Aug/0001.html


For PG mode I have defined a direct mapping from RDF* to RDF and a 
corresponding mapping from SPARQL* to SPARQL [1]. The idea of the RDF*-to-RDF 
mapping is to recursively unnest the nested RDF* triples in an RDF* graph by 
using the RDF reification vocabulary and by also adding explicitly the triples 
that are contained in the nested triples. For instance, the nested RDF* triple

   ( (:s, :p, :o), :pp, :oo )

would be mapped to the following set of six triples (where _:b denotes a fresh 
blank node):

   ( :s, :p, :o )
   ( _:b, rdf:type, rdf:Statement )
   ( _:b, rdf:subject, :s )
   ( _:b, rdf:predicate, :p )
   ( _:b, rdf:object, :o )
   ( _:b, :pp, :oo ) .

Note that the very first of these triples is an artifact that is specific to the 
PG mode. Now, for this mapping I have shown that it is information preserving 
[1]; that is, given any RDF graph resulting from this mapping, it is possible 
to convert this graph back into the exact same RDF* graph to which the mapping 
was applied (i.e., formally, there exists an inverse mapping that is 
computable). Additionally, for the corresponding SPARQL*-to-SPARQL mapping 
(which employs the same idea as the RDF*-to-RDF mapping), I have shown that it 
is query-result preserving [1], which essentially means that evaluating a 
SPARQL* query over an RDF* graph gives you the same query result as if you map 
the SPARQL* query to a SPARQL query and the RDF* graph to an RDF graph, and 
the evaluate the resulting SPARQL query over the resulting RDF graph.

Having said all that, my earlier responses to Kingsley and you assumed SA mode 
(instead of PG mode). I have not published anything about SA mode yet, but I 
think it is not difficult to see that for SA mode it is possible to define 
similar direct mappings (RDF* to RDF and SPARQL* to SPARQL) and to show that 
these mappings posses the same properties (information preservation and query 
result preservation) as I have done in the context of PG mode. In particular, 
the RDF*-to-RDF mapping for SA mode would be defined such that the 
aforementioned RDF* triple

   ( (:s, :p, :o), :pp, :oo )

would be mapped to the following set of five triples (again, _:b denotes a 
fresh blank node):

   ( _:b, rdf:type, rdf:Statement )
   ( _:b, rdf:subject, :s )
   ( _:b, rdf:predicate, :p )
   ( _:b, rdf:object, :o )
   ( _:b, :pp, :oo ) .

Notice that, in this case, the triple ( :s, :p, :o ) is *not* part of the 
output of the mapping, which highlights the main conceptual difference between 
the two modes.

Notice also that, in both cases, the mappings are defined from RDF* to RDF (and 
SPARQL* to SPARQL) but not the other way around. While it would be possible to 
define mappings for the other direction by employing the same idea of the 
aforementioned mappings (essentially, recursively nesting all RDF 
reifications), the resulting RDF-to-RDF* mappings would not be information 
preserving. The issue can be illustrated with a simple example. Consider two 
RDF graphs, G1 and G2, where G1 consists of the following five RDF triples:

   ( _:b1, rdf:type, rdf:Statement )
   ( _:b1, rdf:subject, :s )
   ( _:b1, rdf:predicate, :p )
   ( _:b1, rdf:object, :o )
   ( _:b1, :pp, :oo ) ,

and G2 also contains these triples, plus the following five:

   ( _:b2, rdf:type, rdf:Statement )
   ( _:b2, rdf:subject, :s )
   ( _:b2, rdf:predicate, :p )
   ( _:b2, rdf:object, :o )
   ( _:b2, :pp, :oo ) .

Now, the possible RDF-to-RDF* mapping (using SA mode) would map the first five 
triples to the nested RDF* triple

   ( (:s, :p, :o), :pp, :oo ) ,

and the last five triples would also be mapped to the very same RDF* triple. 
Hence, the RDF* graph (which, by definition, are sets of RDF* triples) that 
would be obtained from G1 and the RDF* graph obtained from G2 are in fact the 
same RDF* graph (which contains only the aforementioned RDF* triple). Then, 
given this RDF* graph, it is impossible to figure out whether the input to the 
mapping was G1 or G2.

Let me know whether this clarifies your question.

Thanks,
Olaf

[1] Olaf Hartig: Foundations of RDF* and SPARQL* - An Alternative Approach to 
Statement-Level Metadata in RDF. In Proceedings of the 11th Alberto Mendelzon 
International Workshop on Foundations of Data Management (AMW), 2017.
http://olafhartig.de/files/Hartig_AMW2017_RDFStar.pdf

Received on Tuesday, 3 September 2019 16:37:07 UTC