Revised PROV-DICTIONARY in response to Paolo's review (ISSUE-614)
authorTom De Nies <tom.denies@ugent.be>
Thu, 24 Jan 2013 15:39:18 +0100
changeset 5437 3b2f9e819fcf
parent 5436 8b48cc756748
child 5438 d4616b07870a
Revised PROV-DICTIONARY in response to Paolo's review (ISSUE-614)
dictionary/prov-dictionary.html
--- a/dictionary/prov-dictionary.html	Thu Jan 24 13:46:16 2013 +0100
+++ b/dictionary/prov-dictionary.html	Thu Jan 24 15:39:18 2013 +0100
@@ -794,8 +794,7 @@
 
 <p>Conceptually, a dictionary has a logical structure consisting of key-entity pairs. This structure is often referred to as a <em>map</em>, and is a generic indexing mechanism that can abstract commonly used data structures, including associative lists, relational tables, ordered lists, and more. The specification of such specialized structures in terms of key-value pairs is out of the scope of this document.</p>
 
-<p>A given dictionary forms a given structure for its members.  A different structure (obtained either by insertion or removal of members) constitutes a different dictionary. Hence,
- for the purpose of provenance, a dictionary entity is viewed as a snapshot of a structure. Insertion and removal operations result in new snapshots, each snapshot forming an identifiable dictionary entity.</p>
+<p>For the purpose of provenance, a dictionary entity is viewed as a snapshot of a dictionary data structure, following a sequence of state-changing insertion and removal operations. These  operations result in new snapshots, each snapshot forming an identifiable dictionary entity. Thus, when the structure of a dictionary changes (through insertions or removals), a new dictionary entity is defined, whereas the older dictionary entity remains the same.</p>
 
 <!--
 <span class="glossary-ref" data-ref="glossary-empty-dictionary"></span>
@@ -805,7 +804,7 @@
 <p>Following the earlier definitions for generic collections,  PROV-DM defines the following types related to dictionaries:</p>
 
 <ul>
-  <li> <span class="name">prov:Dictionary</span> is a subtype of <span class="name">prov:Collection</span>. It denotes an entity of type dictionary, i.e. an entity that  can participate in  relations amongst dictionaries;</li>
+  <li> <span class="name">prov:Dictionary</span> is a subtype of <span class="name">prov:Collection</span>. It denotes an entity of type dictionary, i.e. an entity that can participate in relations that involve dictionaries and their member entities;</li>
 
   <li><span class="name">prov:EmptyDictionary</span> is a subtype of both <span class="name">prov:EmptyCollection</span> and <span class="name">prov:Dictionary</span>. It denotes an empty dictionary.</li>
 </ul>
@@ -824,9 +823,9 @@
 
 <span class="glossary-ref" data-ref="glossary-dictionary-membership"></span>
 
-<p>The <strong>dictionary  membership</strong> allows stating the members of a Dictionary, and has the purpose of providing more structure than the <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-membership">collection membership</a> relation. 
-Whereas the <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-membership">collection membership</a> relation applies to entities having <span class="name">prov:type = 'prov:Collection'</span> or <span class="name">prov:type = 'prov:Dictionary'</span>, the <a href="#term-dictionary-membership">dictionary  membership</a> only applies to the latter. 
-	Note that <a href="#term-dictionary-membership">dictionary  membership</a> implies <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-membership">collection membership</a>, but not vice versa.</p>
+<p>Similar to the <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-membership">collection membership</a> relation, the <strong>dictionary  membership</strong> allows stating the members of a Dictionary. However, it provides additional structure.
+	Note that <a href="#term-dictionary-membership">dictionary  membership</a> implies <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-membership">collection membership</a>, but not vice versa. This implication is formalized in <a href="#dmembership-cmembership-inference">Inference 1</a>.
+	</p>
 
 <div class="attributes" id="attributes-hadMember-d">
  A <dfn title="hadMember-d">dictionary membership</dfn> relation, written <span class="pnExpression">hadDictionaryMember(d, e_1, key_1)</span>, has:
@@ -835,7 +834,9 @@
 <li><span class='attribute' id="membership-d.entity">entity</span>: an entity <span class="name">e_1</span> that is associated with the key and is a member of the dictionary;</li>
 <li><span class='attribute' id="membership-d.key">key</span>: a key <span class="name">key_1</span> that is associated with the specified entity. <span class="name">key_1</a> is a <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-value">value</a> ;</li>
 </ul>
-Keys cannot be repeated in the same dictionary. However, a dictionary can contain the same entity more than once, as long as it is associated with different keys.
+<p>Keys cannot be repeated in the same dictionary. However, a dictionary can contain the same entity more than once, as long as it is associated with different keys.</p>
+<p>Note that the <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-membership">collection membership</a> relation, written <span class="name">hadMember(c, e)</span>, can be used when <span class="name">c</span> has <span class="name">prov:type = 'prov:Collection'</span> or <span class="name">prov:type = 'prov:Dictionary'</span>. However, the <a href="#term-dictionary-membership">dictionary  membership</a>, written <span class="name">hadDictionaryMember(d, e, "k")</span>, can only be used when <span class="name">d</span> has <span class="name">prov:type = 'prov:Dictionary'</span>. </p>
+	
 </div>
 
 <div class="anexample">
@@ -851,7 +852,7 @@
 </pre>
 From these descriptions, we conclude:
 <ul>
-<li> <span class="name">d</span>  has  the following key-entity pairs as members: <span class="name">("k1", e1), ("k2", e2)</span>, and may contain others.</li>
+<li> <span class="name">d</span>  had  the following key-entity pairs as members: <span class="name">("k1", e1), ("k2", e2)</span>, and may have contained others.</li>
 </ul>
 <p> Thus, the membership of <span class="name">d</span> is only partially known, unless it was derived through insertions and removals from an empty dictionary (See <a href="#insertion-removal-membership-inference_text">Completeness constraints</a>).</p>
 </div>
@@ -871,7 +872,7 @@
 <li><span class='attribute' id="insertion.after">after</span>: an identifier (<span class="name">d2</span>) for the dictionary <em>after</em> insertion; </li>
 <li><span class='attribute' id="insertion.before">before</span>: an identifier (<span class="name">d1</span>) for the dictionary <em>before</em> insertion;</li>
 <li><span class='attribute' id="insertion.key-entity-set">key-entity-set</span>: the inserted key-entity pairs <span class="name">(key_1, e_1)</span>, ..., <span class="name">(key_n, e_n)</span> in which each <span class="name">key_i</span> is a <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-value">value</a>, and <span class="name">e_i</span> is an identifier  for the entity that has been inserted with the key;
- each <span class="name">key_i</span> is expected to be unique for the key-entity-set;
+ each <span class="name">key_i</span> is expected to be unique for the key-entity-set, as formalized in <a href="#key-single-entity-inference">Inference 2</a>;
 </li>
 <li><span class='attribute' id="insertion.attributes">attributes</span>: an OPTIONAL set (<span class="name">attrs</span>) of attribute-value pairs representing additional information about this relation.</li>
 </ul>
@@ -896,9 +897,9 @@
 </pre>
 From this set of descriptions, we conclude:
 <ul>
-<li>   <span class="name">d0</span> is the set <span class="name">{  }</span> </li>
-<li>   <span class="name">d1</span> is the set <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
-<li>   <span class="name">d2</span> is the set <span class="name">{ ("k1", e1), ("k2", e2), ("k3", e3) }</span> </li>
+<li>   <span class="name">d0</span> was the set <span class="name">{  }</span> </li>
+<li>   <span class="name">d1</span> was the set <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
+<li>   <span class="name">d2</span> was the set <span class="name">{ ("k1", e1), ("k2", e2), ("k3", e3) }</span> </li>
 </ul>
 </div>
 
@@ -920,9 +921,9 @@
    This is a case of <em>update</em> of <span class="name">e1</span> to <span class="name">e3</span> for the same key, <span class="name">"k1"</span>. <br/>
   From this set of descriptions, we conclude:
 <ul>
-<li>   <span class="name">d0</span> is the set <span class="name">{  }</span> </li>
-<li>   <span class="name">d1</span> is the set <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
-<li>   <span class="name">d2</span> is the set <span class="name">{ ("k1", e3), ("k2", e2) }</span> </li>
+<li>   <span class="name">d0</span> was the set <span class="name">{  }</span> </li>
+<li>   <span class="name">d1</span> was the set <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
+<li>   <span class="name">d2</span> was the set <span class="name">{ ("k1", e3), ("k2", e2) }</span> </li>
 </ul>
 </div>
 
@@ -967,11 +968,11 @@
 </pre>
 From this set of descriptions, we conclude:
 <ul>
-<li><span class="name">d0</span> is the set <span class="name">{  }</span> </li>
-<li><span class="name">d1</span> is the set <span class="name">{ ("k1", e1), ("k2", e2)  }</span> </li>
-<li><span class="name">d2</span> is the set <span class="name">{ ("k1", e1), ("k2", e2), ("k3", e3) }</span> </li>
-<li><span class="name">d3</span> is the set <span class="name">{ ("k2", e2) }</span> </li>
-<li><span class="name">d4</span> is the set <span class="name">{ ("k2", e2) }</span> </li>
+<li><span class="name">d0</span> was the set <span class="name">{  }</span> </li>
+<li><span class="name">d1</span> was the set <span class="name">{ ("k1", e1), ("k2", e2)  }</span> </li>
+<li><span class="name">d2</span> was the set <span class="name">{ ("k1", e1), ("k2", e2), ("k3", e3) }</span> </li>
+<li><span class="name">d3</span> was the set <span class="name">{ ("k2", e2) }</span> </li>
+<li><span class="name">d4</span> was the set <span class="name">{ ("k2", e2) }</span> </li>
 </ul>
 Note that "k1" was not present in d3, and thus its removal to obtain d4 did not change the contents of the dictionary.
 </div>
@@ -989,7 +990,7 @@
 
 <section id="dictionary-notation"> 
 <h2>PROV-N Notation of Dictionary Concepts</h2>
-<section id="expression-collection-membership">
+<section id="expression-dictionary-membership">
 <h3>Membership</h3>
 
 <div class="grammar">
@@ -1012,11 +1013,11 @@
 <tr><td><b>Dictionary Membership</b></td><td><b>Non-Terminal</b></td></tr>
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td></tr>
 
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#membership-d.dictionary"><span class='attribute' id="provn-membership-d.dictionary">dictionary</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-dIdentifier">dIdentifier</a></code></td></tr>
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#membership-d.key-entity-set"><span class='attribute' id="provn-membership-d.entity">entity</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-entity">entity</a></code></td></tr>
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#membership-d.key-entity-set"><span class='attribute' id="provn-membership-d.key">key</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-key">key</a></code></td></tr>
+<tr><td><a href="#term-dictionary-membership"><span class='attribute' id="provn-membership-d.dictionary">dictionary</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-dIdentifier">dIdentifier</a></code></td></tr>
+
+<tr><td><a href="#term-dictionary-membership"><span class='attribute' id="provn-membership-d.entity">entity</span></a></td><td><code class="content"><a class="grammarRef" href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-eIdentifier">eIdentifier</a></code></td></tr>
+
+<tr><td><a href="#term-dictionary-membership"><span class='attribute' id="provn-membership-d.key">key</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-key">key</a></code></td></tr>
 
 </table>
 </div>
@@ -1038,7 +1039,7 @@
 </div>
 
 </section> <!-- membership -->
-<section id="expression-collection-insertion">
+<section id="expression-dictionary-insertion">
 <h3>Insertion</h3>
 <div class="grammar">
 	<span class="nonterminal">derivationByInsertionFromExpression</span>&nbsp;::=  
@@ -1064,16 +1065,16 @@
 <tr><td><b>Insertion</b></td><td><b>Non-Terminal</b></td></tr>
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td></tr>
 
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#insertion.id"><span class='attribute' id="provn-insertion.id">id</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-optionalIdentifier">optionalIdentifier</a></code></td></tr>
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#insertion.after"><span class='attribute' id="provn-insertion.after">after</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-cIdentifier">dIdentifier</a></code></td></tr>
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#insertion.before"><span class='attribute' id="provn-insertion.before">before</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-cIdentifier">dIdentifier</a></code></td></tr>
-
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#insertion.key-entity-set"><span class='attribute' id="provn-insertion.key-entity-set">key-entity-set</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-keyEntitySet">keyEntitySet</a></code></td></tr>
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#insertion.attributes"><span class='attribute' id="provn-insertion.attributes">attributes</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-optionalAttributeValuePairs">optionalAttributeValuePairs</a></code></td></tr>
+<tr><td><a href="#term-dictionary-insertion"><span class='attribute' id="provn-insertion.id">id</span></a></td><td><code class="content"><a class="grammarRef" href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-optionalIdentifier">optionalIdentifier</a></code></td></tr>
+
+<tr><td><a href="#term-dictionary-insertion"><span class='attribute' id="provn-insertion.after">after</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-dIdentifier">dIdentifier</a></code></td></tr>
+
+<tr><td><a href="#term-dictionary-insertion"><span class='attribute' id="provn-insertion.before">before</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-dIdentifier">dIdentifier</a></code></td></tr>
+
+
+<tr><td><a href="#term-dictionary-insertion"><span class='attribute' id="provn-insertion.key-value-pairs">key-value-pairs</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-keyValuePairs">keyValuePairs</a></code></td></tr>
+
+<tr><td><a href="#term-dictionary-insertion"><span class='attribute' id="provn-insertion.attributes">attributes</span></a></td><td><code class="content"><a class="grammarRef" href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-optionalAttributeValuePairs">optionalAttributeValuePairs</a></code></td></tr>
 </table>
 </div>
 
@@ -1100,7 +1101,7 @@
 
 
 </section> <!-- Insertion -->
-<section id="expression-collection-removal">
+<section id="expression-dictionary-removal">
 	<h3>Removal</h3>
 <div class="grammar">
  <span class="nonterminal">derivationByRemovalFromExpression</span>&nbsp;::=  
@@ -1126,16 +1127,16 @@
 <tr><td><b>Removal</b></td><td><b>Non-Terminal</b></td></tr>
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td></tr>
 
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#removal.id"><span class='attribute' id="provn-removal.id">id</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-optionalIdentifier">optionalIdentifier</a></code></td></tr>
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#removal.after"><span class='attribute' id="provn-removal.after">after</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-cIdentifier">dIdentifier</a></code></td></tr>
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#removal.before"><span class='attribute' id="provn-removal.before">before</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-cIdentifier">dIdentifier</a></code></td></tr>
-
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#removal.key-set"><span class='attribute' id="provn-removal.key-set">key-set</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-keySet">keySet</a></code></td></tr>
-
-<tr><td><a href="http://www.w3.org/TR/prov-dm/#removal.attributes"><span class='attribute' id="provn-removal.attributes">attributes</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-optionalAttributeValuePairs">optionalAttributeValuePairs</a></code></td></tr>
+<tr><td><a href="#term-dictionary-removal"><span class='attribute' id="provn-removal.id">id</span></a></td><td><code class="content"><a class="grammarRef" href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-optionalIdentifier">optionalIdentifier</a></code></td></tr>
+
+<tr><td><a href="#term-dictionary-removal"><span class='attribute' id="provn-removal.after">after</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-dIdentifier">dIdentifier</a></code></td></tr>
+
+<tr><td><a href="#term-dictionary-removal"><span class='attribute' id="provn-removal.before">before</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-dIdentifier">dIdentifier</a></code></td></tr>
+
+
+<tr><td><a href="#term-dictionary-removal"><span class='attribute' id="provn-removal.key-set">key-set</span></a></td><td><code class="content"><a class="grammarRef" href="#prod-keySet">keySet</a></code></td></tr>
+
+<tr><td><a href="#term-dictionary-removal"><span class='attribute' id="provn-removal.attributes">attributes</span></a></td><td><code class="content"><a class="grammarRef" href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-optionalAttributeValuePairs">optionalAttributeValuePairs</a></code></td></tr>
 </table>
 </div>
 
@@ -1165,6 +1166,29 @@
 
 </section> <!-- removal -->
 
+<section id="expression-dictionary-other">
+	<h3>Other expressions</h3>
+	For the notation of dictionaries, we used some new non-terminals. We provide their production rules here.
+	
+<div class="grammar">
+	<p id="prod-dIdentifier"><span class="nonterminal">dIdentifier</span>&nbsp;::=  
+	<span class="name"><a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-identifier" class="grammarRef">identifier</a></span> </p>
+	
+	<p id="prod-key"><span class="nonterminal">key</span>&nbsp;::=  
+	<span class="name"><a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-literal" class="grammarRef">literal</a></span> </p>
+	
+	<p id="prod-keyValuePairs"><span class="nonterminal">keyValuePairs</span>&nbsp;::=  
+	<span class="name"><a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-keyValuePair" class="grammarRef">keyValuePair</a> ( "," <a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-keyValuePair" class="grammarRef">keyValuePair</a> )*</span> </p>
+	
+	<p id="prod-keyValuePair"><span class="nonterminal">keyValuePair</span>&nbsp;::=  
+	<span class="name">( <a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-key" class="grammarRef">key</a> , <a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-eIdentifier" class="grammarRef">eIdentifier</a> )</span> </p>
+	
+	<p id="prod-keySet"><span class="nonterminal">keySet</span>&nbsp;::=  
+	<span class="name"><a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-key" class="grammarRef">key</a> ( "," <a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-key" class="grammarRef">key</a> )*</span> </p>
+
+</div>
+</section> <!-- other -->
+
 </section>
 
 <section id="dictionary-ontological-definition">