reflection vocabulary stuff, mostly
authorSandro Hawke <sandro@hawke.org>
Wed, 09 May 2012 14:19:50 -0400
changeset 326 a7d53fc97cfd
parent 321 a62faa5be59b
child 327 52858dc6a9e2
reflection vocabulary stuff, mostly
rdf-spaces/index.html
--- a/rdf-spaces/index.html	Wed May 09 12:06:34 2012 -0400
+++ b/rdf-spaces/index.html	Wed May 09 14:19:50 2012 -0400
@@ -391,14 +391,22 @@
     <p>@@@ grammar, etc, based of Turtle spec</p>
 
   </section>
-
-
 </section>
 
 <section>
   <h2>Semantics</h2>
 
-  <p>formalize what's been said above.</p>
+  <p>@@@ formalize what's been said above.</p>
+
+  <p class="note">
+    We say nothing here about the fact that the truth value of a quad
+    is likely to change over time.  Time is orthogonal to RDF
+    semantics, and quads present no fundamentally different challenge
+    here than vcard, since people change addresses just like triples
+    are added to and removed some spaces.  Some approaches to handling
+    change-over-time are discussed in @@@example?  @@@temporal-rdf
+    note?
+  </p>
 
   <p>We now give <a>dataset</a>s declarative semantics, allowing
   dataset to be used as logical statements (like RDF Graphs).  We
@@ -755,35 +763,169 @@
 </section>
 </section>
 
-<section>
+
+
+  <section class="appendix">
+    <h2>Reflection Vocabulary</h2>
+
+    <p class="note">This section is entirely novel/experimental at
+    this time.</p>
+
+    <p>This section specifies an RDF vocabulary for conveying datasets
+    in RDF Graphs.  This is done by describing&mdash;in RDF
+    triples&mdash;the specific structures occuring in a given dataset.
+    This technique is sometimes called <dfn>reflection</dfn> or
+    <dfn>reification</dfn>.  This vocabulary is distinct from the
+    1999/2004 RDF reification vocabulary; we prefer to use the term
+    "reflection" to help maintain the separation.</p>
+
+    <p>This vocabulary allows systems to convey datasets using normal
+    triple-based RDF machinery, including RDF/XML, Turtle, and RDFa,
+    when necessary.  In general, in systems where languages and APIs
+    are available which directly support datasets, this vocabulary is
+    not useful.</p>
+
+    <p>As an example, the quad [ eg:subject eg:predicate eg:object1
+    eg:space1 ] can be expressed in Turtle using this vocabulary:</p>
+
+    <pre class="example">@prefix : &lt;http://example.org/>.
+[] a rdf:Triple;
+   rdf:subjectIRI "http://example.org/subject";
+   rdf:predicateIRI "http://example.org/predicate";
+   rdf:objectIRI "http://example.org/object1";
+   rdf:inSpace :space1.</pre>
+
+   <p>The terms in the triple are encoded (turned into literal
+   strings, in this example), to provide referential opacity.  In the
+   semantics of quads, it does not follow from [a b c d] and a=aa that
+   [aa b c d].  Without this term-encoding, that conclusion <em>would</em>
+   follow from the reflection.</p>
+
+   <p>Terms in this vocabulary:</p>
+
+   <dl>
+
+     <dt>rdf:Triple</dt>
+     <dd>The class of RDF Triples, each of which is just a triple
+     (3-tuple) of a three RDF terms, called its "subject",
+     "predicate", and "object".  Triples have no identity apart from
+     their three components.</dd>
+
+     <dt>rdf:subjectIRI</dt>
+     <dd>A predicate expressing the relationship to the triple's subject term,
+     when the subject term is an IRI.  The value is the IRI (a string)
+     which is the subject-term part of the triple.</dd>
+
+     <dt>rdf:subjectNode</dt>
+     <dd>A predicate expressing the relationship to the triple's
+     subject term, when the subject term is a blank node.  The value
+     is any RDF Resource; it simply serves as a placeholder,
+     representing the blank node which serves as the subject-term part
+     of the triple.</dd>
+
+     <dt>rdf:predicateIRI</dt>
+     <dd>A predicate expressing the relationship to the triple's
+     predicate term.  The value is the IRI (a string) which serves as
+     the predicate-term part of the triples.</dd>
+
+     <dt>rdf:objectIRI</dt>
+     <dd>A predicate expressing the relationship to the triple's
+     object term, when the object term is an IRI.  The value is the
+     IRI (a string) which is the object-term part of the triple.</dd>
+
+     <dt>rdf:objectNode</dt>
+     <dd>A predicate expressing the relationship to the triple's
+     object term, when the object term is a blank node.  The value
+     is any RDF Resource; it simply serves as a placeholder,
+     representing the blank node which serves as the object-term part
+     of the triple.</dd>
+
+     <dt>rdf:objectValue</dt>
+     <dd>A predicate expressing the relationship to the triple's
+     object term, when the object term is literal.  The value is the
+     value which serves as the object-term part of the triple.</dd>
+
+     <dt>rdf:inSpace</dt>
+     <dd>A predicate expressing the relationship between an a triple
+     and an RDF space which contains it.</dd>
+
+   </dl>
+
+   <p>This vocabulary is used in a specific template form, always
+   matching this SPARQL graph pattern: </p>   
+
+   <pre>[] a rdf:Triple;
+   rdf:subjectIRI|rdf:subjectNode ?s;
+   rdf:predicateIRI ?p;
+   rdf:objectIRI|rdf:objectNode|rdf:objectValue ?o;
+   rdf:inSpace ?sp</pre>
+
+   <p>This one template uses SPARQL 1.1 property paths, with
+   alternation using the "|" character.  It could also be expressed as
+   six different SPARQL 1.0 graph patterns.</p>
+
+   <p>The terms in this vocabulary only have fully-defined meaning
+   when they occur in the template pattern.  When they do, the set of
+   triples matching the template has the same meaning as the
+   <a>quad</a> [ ?s ?p ?o ?sp ].</p>
+
+   <p><dfn>Reflecting a dataset</dfn> is the act of completely
+   conveying the facts in a dataset in RDF triples, using this
+   reflection vocabulary.  The procedure is: (1) check for occurances
+   of the reflection template in the default graph -- if they occur,
+   abort, since reflection is not defined for this dataset; (2) copy
+   the triples in the default graph of the input to the output; (3)
+   for each quad in the input, generate a matching instance of the
+   reflection template and put the resulting five triples in the
+   output.</p>
+
+   <p><dfn>Unreflecting a dataset</dfn> is the act of turning an RDF
+   graph into a dataset, using this reflection vocabulary.  The
+   procedure is: (1) make a mutable copy of the input graph, (2) for
+   each match of the reflection template, add the resulting quad to the
+   output dataset and delete the five triples which matched the
+   template, (3) copy the remaining triples to the output as the
+   default graph of the dataset.</p>
+
+   <p>The reflect and unreflect functions are inverses of each other.
+   That is, for all datasets D on which reflect is defined, D =
+   unreflect(reflect(D)) and for all graphs G, G =
+   (reflect(unreflect(G)).  The functions are also essentially
+   idempotent.  If we align their domains and ranges by considering a
+   graph to be dataset which has only its default graph, then
+   reflect(D) = reflect(reflect(D)) and unreflect(G) =
+   unreflect(unreflect(G))</p>
+
+</section>
+
+
+
+<section class="Appendix">
   <h2>Issues</h2>
 
   <p class="issue">Do the named graphs in a dataset include all the
   triples in the spaces with those names, or only some of them?  Aka
   partial-graph or complete-graph semantics.</p>
 
-  <p class="issue">What do we do about RDF reification.  Should we try
-  to fix it to be talking about spaces?</p>
-
   <p class="issue">How should we talk about change-over-time?  The
   archiving example gets into it right now.</p>
   
-
 </section>
 
 
+<section id="references">
+</section>
+
 <section class="appendix informative" id="changes">
   <h2>Changes</h2>
   <ul>
-    <li>2012-05-09: Renamed "layers" as "spaces"; some word-smithing in Concepts and the Abstract; removed "Turtle in HTML" as a dataset syntax; added some text about trig and nquads.</li>
+    <li>2012-05-09: Renamed "layers" as "spaces"; some word-smithing in Concepts and the Abstract; removed "Turtle in HTML" as a dataset syntax; added some text about trig and nquads; added a note about change-over-time; added an appendix with a reflection vocabulary</li>
     <li>2012-05-02: Removed obsolete text from the introduction, removed the section on datasets borrowed from RDF Concepts, and added many entries to Concepts (and renamed it from Terminology).</li>
     <li>2012-05-01: Starting with a little text from RDF Concepts, a few ideas, and the text from <a href="http://www.w3.org/2011/rdf-wg/wiki/Layers">Layers</a></li>
   </ul>
 </section>
 
 
-<section id="references">
-</section>
 
   </body>
 </html>