edited collection section in prov-dm.html
authorPaolo Missier <pmissier@acm.org>
Tue, 27 Mar 2012 09:42:07 +0100
changeset 2012 06682de5f023
parent 2009 83cd9491cc3d
child 2013 b2fbbd487b1d
edited collection section in prov-dm.html
model/prov-dm.html
--- a/model/prov-dm.html	Tue Mar 27 09:30:45 2012 +0100
+++ b/model/prov-dm.html	Tue Mar 27 09:42:07 2012 +0100
@@ -1930,6 +1930,7 @@
 </section>
 </section>
 
+
 <section id="component5"> 
 <h3>Component 5: Collections</h3>
 
@@ -1949,13 +1950,20 @@
   <li><span class="name">prov:EmptyCollection</span> denotes an empty collection.
 </ul>
 
+<!--
+In addition, the attribute  <span class="name">prov:content</span> is introduced to allow the explicit specification of the collection's content. The example below illustrates the syntax.
+-->
+
 <div class="anexample">
 <pre class="codeexample">
    entity(c, [prov:type="EmptyCollection"])    // e is an empty collection
    entity(c1, [prov:type="Collection"])   // c1 is a collection, with unknown content
+<!--   entity(c2, [prov:type="Collection", prov:content="{ ("k1", v1), ("k2", v2), ("k3", v3)} ])  -->
 </pre>
 </div>
 
+
+
 </section>  <!-- end of collection-types -->
 
 
@@ -1963,16 +1971,15 @@
 <h3>Insertion</h3>
 
 
-<strong>Derivation-by-Insertion</strong> 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>.
-
-<p> A Derivation-by-Insertion relation<span class="withPn">, written <span class="pnExpression"> derivedByInsertionFrom(id, collAfter, collBefore, key, value, attrs)</span>,</span> contains:</p>
+<strong>Derivation-by-Insertion</strong> relation <span class="name">derivedByInsertionFrom(c2, c1,  {(key_1, value_1), ..., (key_n, value_n)})</span> states that  <span class="name">c2</span> is the state of the collection
+following the insertion of the set of pairs <span class="name"> {(key_1, value_1), ..., (key_n, value_n)}</span> into collection  <span class="name">c1</span>.
+
+<p> A Derivation-by-Insertion relation<span class="withPn">, written <span class="pnExpression"> derivedByInsertionFrom(id, collAfter, collBefore, key-value-set, 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'>key-value-set</span>: a set of inserted key-value pairs, of the form {(key_1, value_1), ..., (key_n, value_n)} where each key_i is a value, and value_i is an identifier  for the value that has been inserted with the key. This may be an entity identifier;</li>
 <li><span class='attribute'>attributes</span>: an OPTIONAL set of attribute-value pairs to further describe the properties of the relation.</li>
 </ul>
 
@@ -1985,14 +1992,14 @@
    entity(c1, [prov:type="Collection"])
    entity(c2, [prov:type="Collection"])
   
-  derivedByInsertionFrom(c1, c, "k1", v1)       
-  derivedByInsertionFrom(c2, c1, "k2", v2)    
+  derivedByInsertionFrom(c1, c, {("k1", v1), ("k2",v2)})       
+  derivedByInsertionFrom(c2, c1, {("k3", v3)})    
 </pre>
   From this set of assertions, we conclude:
   <pre class="codeexample">
    c =  {  }
-   c1 = { ("k1",v1) }
-   c2 = { ("k1",v1), ("k2", v2) }
+   c1 = { ("k1",v1),("k2",v2) }
+   c2 =  { ("k1",v1),("k2",v2), ("k3", v3) }
   </pre>
 </div>
 
@@ -2002,14 +2009,14 @@
 <section id="term-collection-removal">
 <h3>Removal</h3>
 
-<strong>Derivation-by-Removal</strong> 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>.
-
-<p> A Derivation-by-Removal relation, written <span class="pnExpression"> derivedByRemovalFrom(id, collAfter, collBefore, key, attrs)</span>, contains:</p>
+<strong>Derivation-by-Removal</strong> relation <span class="name">derivedByRemovalFrom(c2,c1, {key_1, ... key_n})</span> states that  <span class="name">c2</span> is  the  state of the collection following the removal of the set of pairs corresponding to keys  <span class="name">key_1...key_n</span> from  <span class="name">c1</span>.
+
+<p> A Derivation-by-Removal relation, written <span class="pnExpression"> derivedByRemovalFrom(id, collAfter, collBefore, key-set, 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'>key-set</span>: a set of deleted keys, of the form {key_1,..., key_n};</li>
 <li><span class='attribute'>attributes</span>: an OPTIONAL set of attribute-value pairs to further describe the properties of the relation.</li>
 </ul>
 
@@ -2021,16 +2028,16 @@
    entity(v2)
    entity(c1, [prov:type="Collection"])
    entity(c2, [prov:type="Collection"])
-  
-  derivedByInsertionFrom(c1, c, "k1", v1)       
-  derivedByInsertionFrom(c2, c1, "k2", v2)      
-  derivedByRemovalFrom(c3, c2, k1)              
+
+  derivedByInsertionFrom(c1, c, {("k1", v1), ("k2",v2)})       
+  derivedByInsertionFrom(c2, c1, {("k3", v3)})
+  derivedByRemovalFrom(c3, c2, {k1,k3})   
 </pre>
   From this set of assertions, we conclude:
   <pre class="codeexample">
    c =  {  }
-   c1 = { ("k1",v1) }
-   c2 = { ("k1",v1), ("k2", v2) }
+   c1 = { ("k1",v1), ("k2", v2)  }
+   c2 = { ("k1",v1), ("k2", v2), ("k3", v3) }
    c3 = { ("k2",v2) }
   </pre>
 
@@ -2040,20 +2047,11 @@
 </section>  <!-- removal -->
 
 
-
-<section id="collection-convenience-relations">
-<h3>Convenience relations</h3>
-
-<div class="note">
-This is the only subsection of this kind in the document, and results in 4.5.4.1 and 4.5.4.2. It should be removed.
-</div>
-
-The following set of additional relations are introduced to simplify assertions about the state and state changes of collections.
-
+<!--
 <section id="term-collection-bulk">
 <h3>Bulk insertion and removal</h3>
 
-The following relations allow for insertion and removal assertions involving a set of key-value pairs..
+The following relations allow for insertion and removal assertions involving a set of key-value pairs.
 
 <p> A  <strong>Derivation-by-Bulk-Insertion</strong> relation <span class="withPn">, written <span class="pnExpression"> derivedByBulkInsertionFrom(id, collAfter, collBefore, key-value-set, attrs)</span>,</span> contains:</p>
 <ul>
@@ -2073,25 +2071,26 @@
 <li><span class='attribute'>attributes</span>: an OPTIONAL set of attribute-value pairs to further describe the properties of the relation.</li>
 </ul>
 
-
-
 </section> <!-- bulk ops -->
 
+
+
 <section id="term-collection-containment">
-<h3>Containment</h3>
-
-The insertion and removal relations make insertions and removals explicit as part of the history of a collection. This, however, requires explicit mention of the state of the collection prior to each insertion. The containment relation removes this needs, allowing the state of a collection <span class="name">c</span> to be asserted without having to introduce a prior state. This allows for the natural expression of a collection state, for instance in cases where a program or workflow block produces a new collection <span class="name">c</span>  with known content. In such cases, 
-<span class="name">contained(c,k, v)</span> asserts that  <span class="name">c</span> is known to contain <span class="name">(k,v)</span>, without having to introduce an initial state. <br/>
+<h3>Membership</h3>
+
+The insertion and removal relations make insertions and removals explicit as part of the history of a collection. This, however, requires explicit mention of the state of the collection prior to each insertion. The membership relation removes this needs, allowing the state of a collection <span class="name">c</span> to be asserted without having to introduce a prior state. This allows for the natural expression of a collection state, for instance in cases where a program or workflow block produces a new collection <span class="name">c</span>  with known content. In such cases, 
+<span class="name">memberOf(c,{(key_1, value_1), ..., (key_n, value_n)})</span> asserts that  <span class="name">c</span> is known to include <span class="name">{(key_1, value_1), ..., (key_n, value_n)}</span>, without having to introduce an initial state. <br/>
+
+<!--
 This relation is introduced as a convenience, as it can be rewritten as an insertion operation by introducing a prior state:  <br/>
 <span class="name">contained(c,k, v)</span> iff there exists a collection <span class="name">c0</span>  such that <span class="name">derivedByInsertionFrom(c, c0, k, v)</span>.     
-
-
-<p> A <strong>Containment</strong> relation, written <span class="pnExpression"> contained(id, coll, key, values, attrs)</span>, contains:</p>
+-->
+
+<p> A <strong>Membership</strong> relation, written <span class="pnExpression"> memberOf(id, coll, key-value-set, 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 whose members are asserted; </li>
-<li><span class='attribute'>key</span>: the key of the pair contained by the collection;</li>
-<li><span class='attribute'>value</span>: an identifier for the value corresponding to the key;</li>
+<li><span class='attribute'>key-value-set</span>: a set of key-value pairs that are members of the collection, of the form {(key_1, value_1), ..., (key_n, value_n)}</li>
 <li><span class='attribute'>attributes</span>: an OPTIONAL set of attribute-value pairs to further describe the properties of the relation.</li>
 
 </ul>
@@ -2105,13 +2104,12 @@
   
    entity(v1)
    entity(v2)
-   contained(c, "k1", v1)
-   contained(c, "k1", v2)    // c is contains at least ("k1", v1)  and ("k2", v2)
+   memberOf(c, {("k1", v1), ("k2", v2)} )  // c is contains ("k1", v1), ("k2", v2)
   
    entity(v2)
    entity(c1, [prov:type="Collection"])
   
-   derivedByInsertionFrom(c1, c, "k3", v3)     
+   derivedByInsertionFrom(c1, c, {("k3", v3)})     
 </pre>
   From this set of assertions, we conclude:
   <pre class="codeexample">
@@ -2123,6 +2121,7 @@
   one would conclude that, based on these assertions,  <span class="name">c1 = {("k1", v1) ("k2", v2), ("k3",v3)}</span>.
 </div>
 
+<!--
 <p> A <strong>Bulk-Containment</strong> relation, written <span class="pnExpression"> containedBulk(id, coll, key-value-set, attrs)</span>, contains:</p>
 <ul>
 <li><span class='attribute'>id</span>:  an OPTIONAL identifier identifying the relation;</li>
@@ -2151,12 +2150,10 @@
    c3  = { ("k2", v2), ("k4", v4), ("k5", v5)}
   </pre>
 </div>
-
-
+-->
 </section>  <!-- Containment -->
 
 
-</section> <!-- convenience relations -->
 
 <section id="term-collection-state">
 
@@ -2170,8 +2167,8 @@
   entity(v1)
   entity(v2, [prov:type="collection"])    // v2 is a collection
 
- derivedByInsertionFrom(c1, c, k1, v1)       
-   derivedByInsertionFrom(c2, c1, k2, v2)    
+ derivedByInsertionFrom(c1, c, {(k1, v1)})       
+   derivedByInsertionFrom(c2, c1, {(k2, v2)})    
  </pre>
      From this set of assertions, we conclude:
    <pre class="codeexample">
@@ -2191,9 +2188,9 @@
    entity(c2, [prov:type="collection"])    
    entity(c3, [prov:type="collection"])    
  
-   derivedByInsertionFrom(c1, c, k1, v1)       
+   derivedByInsertionFrom(c1, c, {(k1, v1)})       
    wasDerivedFrom(c2, c1)                       
-   derivedByInsertionFrom(c3, c2, k2, v2)       
+   derivedByInsertionFrom(c3, c2, {(k2, v2)})       
  </pre>
      From this set of assertions, we conclude:
    <pre class="codeexample">