editing collections in WD5
authorPaolo Missier <pmissier@acm.org>
Fri, 09 Mar 2012 15:15:52 +0000
changeset 1854 909b61e16109
parent 1851 c0ce300cbb57
child 1855 595c8a568412
editing collections in WD5
model/prov-dm.html
--- a/model/prov-dm.html	Fri Mar 09 13:59:17 2012 +0000
+++ b/model/prov-dm.html	Fri Mar 09 15:15:52 2012 +0000
@@ -1943,10 +1943,10 @@
 The following relations relate a collection <span class="name">c1</span> with a collection <span class="name">c2</span> obtained after adding or removing a new pair to (resp. from) <span class="name">c1</span>:
 
 <ul>
-  <li>Insertion relation <span class="name">CollectionAfterInsertion(c2, c1, k, v)</span> states that  <span class="name">c2</span> is the state of the collection
+  <li>Derivation-by-Insertion relation <span class="name">derivedByInsertionFrom(c2, c1, k, v)</span> states that  <span class="name">c2</span> is the state of the collection
 following the insertion of pair <span class="name">(k,v)</span> into collection  <span class="name">c1</span>;</li>
 
-<li>  Removal relation <span class="name">CollectionAfterRemoval(c2,c1, k)</span> states that  <span class="name">c2</span> is  the  state of the collection following the removal of the pair corresponding to key  <span class="name">k</span> from  <span class="name">c1</span>.</li>
+<li>  Derivation-by-Removal relation <span class="name">derivedByRemovalFrom(c2,c1, k)</span> states that  <span class="name">c2</span> is  the  state of the collection following the removal of the pair corresponding to key  <span class="name">k</span> from  <span class="name">c1</span>.</li>
 
 </ul>
 
@@ -1958,44 +1958,58 @@
    entity(c1, [prov:type="Collection"])
    entity(c2, [prov:type="Collection"])
   
-  CollectionAfterInsertion(c1, c, "k1", v1)       // c1 = { ("k1",v1) }
-  CollectionAfterInsertion(c2, c1, "k2", v2)      // c2 = { ("k1",v1), ("k2", v2) }
-  CollectionAfterRemoval(c3, c2, k1)              // c3 = { ("k2",v2) }
+  derivedByInsertionFrom(c1, c, "k1", v1)       // c1 = { ("k1",v1) }
+  derivedByInsertionFrom(c2, c1, "k2", v2)      // c2 = { ("k1",v1), ("k2", v2) }
+  derivedByRemovalFrom(c3, c2, k1)              // c3 = { ("k2",v2) }
 </pre>
 </div>
 
 
-<p> A relation CollectionAfterInsertion<span class="withPn">, written <span class="pnExpression"> CollectionAfterInsertion(collAfter, collBefore, key, value)</span>,</span> contains:</p>
+<p> A relation derivedByInsertionFrom<span class="withPn">, written <span class="pnExpression"> derivedByInsertionFrom(id, collAfter, collBefore, key, value, attrs)</span>,</span> contains:</p>
 <ul>
+<li><span class='attribute'>id</span>:  an OPTIONAL identifier identifying the relation;</li>
 <li><span class='attribute'>after</span>: an identifier for the collection <em>after</em> insertion; </li>
 <li><span class='attribute'>before</span>: an identifier for the collection <em>before</em> insertion;</li>
 <li><span class='attribute'>key</span>: the key that has been inserted</li>
 <li><span class='attribute'>value</span>: an identifier  for the value that has been inserted with the key.</li>
+<li><span class='attribute'>attributes</span>: an OPTIONAL set of attribute-value pairs to further describe the properties of the relation.</li>
 </ul>
 
-<p> A relation CollectionAfterDeletion, written <span class="pnExpression"> CollectionAfterDeletion(collAfter, collBefore, key)</span>, contains:</p>
+<p> A relation CollectionAfterDeletion, written <span class="pnExpression"> CollectionAfterDeletion(id, collAfter, collBefore, key, attrs)</span>, contains:</p>
 <ul>
+<li><span class='attribute'>id</span>:  an OPTIONAL identifier identifying the relation;</li>
 <li><span class='attribute'>after</span>: an identifier  for the collection  <em>after</em> the deletion; </li>
 <li><span class='attribute'>before</span>: an identifier  for the collection <em>before</em> the deletion;</li>
 <li><span class='attribute'>key</span>: the key corresponding to the (key, value) pair that has been deleted from the collection.</li>
+<li><span class='attribute'>attributes</span>: an OPTIONAL set of attribute-value pairs to further describe the properties of the relation.</li>
 </ul>
 
+<!--
 <div class='note'>
 I propose to call them afterInsertion instead of CollectionAfterInsertion (likewise, for deletion).
 What about attributes and optional Id?
 </div>
-
+-->
 
 <p>Further considerations:</p>
 
 <ul>
   <li>The <strong>map</strong> collection type provides a generic indexing structure that can be used to model commonly used data structures, including associative lists (also known as "dictionaries" in some programming languages), 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).</li>
 
-<li>Keys are literals, and values are entities. This allows expressing nested collections, that is, collections whose values include entities of type collection.</li>
-
-<li>Insertion and removal relations are a particular case of <a href="#Derivation-Relation">derivation</a>.</li>
-
- <li>This representation of a collection's evolution makes no assumption regarding the underlying data structure used to store and manage collections. In particular, no assumptions are needed regarding the mutability of a data structure that is subject to updates.   In fact, the state of a collection (i.e., the set of key-value pairs it contains) at a given point in a sequence of operations is never stated explicitly. Rather, it can be obtained by querying the chain of derivations involving insertions and removals. Entity type <span class="name">emptyCollection</span> can be used in this context as it marks the start of a sequence of collection operations.</li>
+<li>Values are entities. This allows expressing nested collections, that is, collections whose values include entities of type collection.</li>
+
+<li>As the relation names suggest, insertion and removal relations are a particular case of <a href="#Derivation-Relation">derivation</a>.</li>
+
+<li>This representation of a collection's evolution makes no assumption regarding the underlying data structure used to store and manage collections. In particular, no assumptions are needed regarding the mutability of a data structure that is subject to updates. Entities, however, are immutable and this applies  to those entities that represent collections. This is reflected in the constraints listed in Part II.  </li>
+
+<li>The state of a collection (i.e., the set of key-value pairs it contains) at a given point in a sequence of operations is never stated explicitly. Rather, it can be obtained by querying the chain of derivations involving insertions and removals. Entity type <span class="name">emptyCollection</span> can be used in this context as it marks the start of a sequence of collection operations.</li>
+
+<li>Collections with a content may be generated as a result of an activity. This can be modelled in PROV by asserting insertions to reflect the state of the collection after generation.
+
+<div class='note'>
+TBC with an example
+</div>
+
 
 
 <!--