some writing about semantics, rephrasing of the reflection vocab
authorSandro Hawke <sandro@hawke.org>
Thu, 10 May 2012 20:01:51 -0400
changeset 354 61e8e4c2401e
parent 345 ca2c2444493f
child 355 65b58c9eed81
some writing about semantics, rephrasing of the reflection vocab
rdf-spaces/index.html
--- a/rdf-spaces/index.html	Thu May 10 16:31:01 2012 -0400
+++ b/rdf-spaces/index.html	Thu May 10 20:01:51 2012 -0400
@@ -268,6 +268,16 @@
 
 
   <section>
+    <h2>Loading Untrusted Datasets</h2>
+
+    <p>@@@ what if one of the divisions gives you bad quads?  It
+    better not mess up provenance.  Maybe suggest GSP-style name
+    mangling...?</p>
+
+  </section>
+
+
+  <section>
     <h2>Showing Revision History</h2>
 
     <p>@@@ we want to be able to see all the changes, for auditing, to
@@ -277,7 +287,7 @@
 
 
   <section>
-    <h2>Expressing Past of Future States</h2>
+    <h2>Expressing Past or Future States</h2>
 
     <p>@@@ we want to be able to express when someone started and stopped having a particular role various ways, which might not be the time we put this into the db.
  </p>
@@ -509,6 +519,13 @@
   and therefore follow <a href="#semantics"
   class="sectionRef"></a>.</p>
 
+  <p>Dataset information may also be conveyed and manipulated using
+  SPARQL or using RDF triple-based tools and languages as per <a
+  href="#reflection-vocabulary" class="sectionRef"></a>.</p>
+
+  <p>@@@ Maybe call these quad languages?</p>
+
+
   <section>
     <h3>N-Quads</h3>
 
@@ -710,21 +727,21 @@
 &lt;http://example/org/a> &lt;http://example/org/b> "21"^^&lt;http://www.w3.org/2001/XMLSchema#integer> &lt;http://example/org/s2>.
 </pre>
 
-    <p class="issue">Are braces around default-graph triples required,
-    optional, or disallowed?    Assuming "optional" for now.
-    </p>
+    <div class="issue">
+      <p>There are several open issues concernting Trig syntax:</p>
+      <ul>
+	<li>Are braces around default-graph triples required,
+    optional, or disallowed?    Assuming "optional" for now.</li>
+        <li>Is the name prefixed by a keyword?  If so, is the
+    keyword "@graph" or "GRAPH"?   Assuming optional "GRAPH" for now.</li>
+        <li>     Are blank node labels scoped to the document, the
+    curly-brace expression, or the graph name?  Assuming
+    document-scope for now.   This is <a href="http://www.w3.org/2011/rdf-wg/track/issues/21">Issue-21</a>.</li>
+    <li>Can blank node labels be used as space names?
+    Assuming not, for now.</li>
+      </ul>
+    </div>
 
-    <p class="issue">Is the name prefixed by a keyword?  If so, is the
-    keyword "@graph" or "GRAPH"?   Assuming optional "GRAPH" for now.
-    </p>
-
-    <p class="issue">Are blank node labels scoped to the document, the
-    curly-brace expression, or the graph name?  Assuming
-    document-scope for now.   This is <a href="http://www.w3.org/2011/rdf-wg/track/issues/21">Issue-21</a>.
-    </p>
-
-    <p class="issue">Can blank node labels be used as space names?
-    Assuming not, for now.</p>
 
   </section>
 </section>
@@ -732,7 +749,67 @@
 <section>
   <h2>Semantics</h2>
 
-  <p>@@@ formalize what's been said above.</p>
+  <p>This section specifies a declarative semantics for <a>quad</a>s,
+  <a>quadset</a>, and <a>dataset</a>s, allowing them to be used to
+  express knowledge, especially knowledge about spaces.  This makes
+  the languages defined in <a href="#syntax"
+  class="sectionRef"></a> suitable for conveying knowledge about
+  spaces and providing a foundation for addressing the challenges
+  described in <a href="#use-cases" class="sectionRef"></a>.</p>
+
+  <p>@@@ the section needs some revision by someone with a good ear
+  for formal semantics.</p>
+
+  <p>The basic declarative meaning of RDF quads is this:</p>
+
+  <div style="padding: 1em; border: 1px solid blue;">
+
+    <p>The RDF <a>quad</a> (s, p, o, sp) is true if and only if:</p>
+    <ol>
+      <li>I(sp) is an RDF <a>space</a>, and</li>
+      <li>The RDF triple (s, p, o) is contained in that space</li>
+    </ol>
+
+  </div>
+
+  <p>The declarative meaning of a quadset is to simply read the
+  quadset as a conjunction of its quads and its triples.  Given the
+  structural mapping between quadsets and datasets, it follows
+  that:</p>
+
+  <div style="padding: 1em; border: 1px solid blue;">
+
+    <p>The RDF <a>dataset</a> (DG, (n0,g0),... (ni,gi), ...(nn,gn)) is
+    true if and only if:</p>
+
+    <ol>
+    <li>DG is true according to standard RDF semantics, and</li>
+    <li>For every (ni,gi) (0<=i<=n)
+    <ul>
+      <li>I(ni) is an RDF <a>space</a>, and</li>
+      <li>every triple in gi is in that space</li>
+    </ul>
+    </li>
+    </ol>
+
+  </div>
+
+  <p>It follows from these definitions that a (name,graph) pair in a
+  dataset where the graph is the empty graph has no effect on the
+  meaning of the dataset.  This matches the SPARQL specifications
+  which note that implementations are free to remove empty named
+  graphs from datasets.</p>
+
+  <p>It also follows that a dataset with no names graphs and a quadset
+  with no quads have the same declarative meaning as the RDF graph
+  which is the default graph of the dataset or the set of triples in
+  the quadset.  This makes dataset languages natural extensions of the
+  RDF syntaxes.</p>
+
+  <p>@@@ define "strip"["narrow"?], "union", "merge", and
+  "reflect"[fold?] as functions mapping from datasets to graphs; and
+  "unreflect"[unfold?] and "splay"/widen/...? as mapping the other
+  directions.</p>
 
   <p class="note">
     We say nothing here about the fact that the truth value of a quad
@@ -740,20 +817,13 @@
     semantics, and quads present no fundamentally different challenge
     here than vcard, since people change addresses just like triples
     are added to and removed from spaces.  Some approaches to handling
-    change-over-time are discussed in @@@example?  @@@temporal-rdf
-    note?
+    change-over-time are discussed in @@@ some use cases
   </p>
 
-  <p>We now give <a>dataset</a>s declarative semantics, allowing
-  dataset to be used as logical statements (like RDF Graphs).  We
-  define a dataset as being true if and only if (1) its default graph
-  is true, and (2) for every (<i>name</i>, <i>graph</i>) pair in the
-  dataset, the space denoted by <i>name</i> contains every triple in
-  <i>graph</i>.</p>
-
   <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>
+  partial-graph or complete-graph semantics.  Assuming partial, but
+  maybe we can say something about how things SHOULD be done?</p>
 
 </section>
 
@@ -1110,7 +1180,7 @@
     <h2>Reflection Vocabulary</h2>
 
     <p class="note">This section is entirely novel/experimental at
-    this time.</p>
+    this time.  Might be better called "FOLDING" and "UNFOLDING".</p>
 
     <p>This section specifies an RDF vocabulary for conveying datasets
     in RDF Graphs.  This is done by describing&mdash;in RDF
@@ -1130,11 +1200,11 @@
     eg:space1 ] can be expressed in Turtle using this vocabulary:</p>
 
     <pre class="example">@prefix : &lt;http://example.org/>.
-[] a rdf:Triple;
+:space1 rdf:containsTriple [   
+   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>
+   rdf:objectIRI "http://example.org/object1";</pre>
 
    <p>The terms in the triple are encoded (turned into literal
    strings, in this example), to provide referential opacity.  In the
@@ -1186,9 +1256,9 @@
      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>
+     <dt>rdf:containsTriple</dt>
+     <dd>A predicate expressing the relationship between an RDF
+     <a>space</a> and a triple which it contains.</dd>
 
    </dl>
 
@@ -1252,7 +1322,7 @@
 <section class="appendix informative" id="changes">
   <h2>Changes</h2>
   <ul>
-    <li>2012-05-10: Wrote a short intro.  Started writing the Use Cases section for real.   Added grammar for N-Quads and Trig.</li>
+    <li>2012-05-10: Wrote a short intro.  Started writing the Use Cases section for real.   Added grammar for N-Quads and Trig.  Did a first draft of the semantics.</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>