added 5.11 collections
authorPaolo Missier <pmissier@acm.org>
Fri, 16 Sep 2011 14:43:16 +0100
changeset 307 613c14ae9c48
parent 301 73369a600f9c
child 308 8be7e9ea81f0
added 5.11 collections
model/ProvenanceModel.html
--- a/model/ProvenanceModel.html	Fri Sep 16 13:00:48 2011 +0100
+++ b/model/ProvenanceModel.html	Fri Sep 16 14:43:16 2011 +0100
@@ -293,7 +293,7 @@
 </div>
 -->
 
-The following diagram provides a very high level overview of the PROV-DM. Examples of a set of provenance assertions that conform to this schema are provided in the next section.
+The following diagram provides a high level overview of the PROV-DM. Examples of a set of provenance assertions that conform to this schema are provided in the next section.
 
   <img src="overview.png" align="center"/>
 
@@ -2101,32 +2101,99 @@
 
 </section>
 
-</section>
 
 <section id="expression-Collection">
-<h3>Collection</h3>
-
-<div class='note'>To be written in september.</div>
-
-This section is a placeholder for a specification of relations used to express structuring of entities into collections. That is:
+<h3>Collections</h3>
+
+The purpose of this section is to enable modelling of part-of relationships amongst entities. In particular, a form of <strong>collection</strong> entity type is introduced, with relations for asserting
 <ul>
-  <li>By introducing "entity collection" as a specialization of Entity (this will be a recursive definition: a collection is a type of Entity that contains other Entities, which may be collections).  The proposal is to initially introduce nested ordered lists, possibly labelled, as a kind of collection that is grounded in a well-defined theory and is used in practice (i.e., as a model of XML documents)
-
-  <li> part-of relations to express current and past membership of Entities as part of a collection.
-
+  <li>that a new entity has been added to the collection
+  <li>that a new entity has been removed from the collection
+  <li>that an entity is a member of the collection
+ </ul>
+
+ A collection expression is defined as follows.
+<div class='grammar'>
+<span class="nonterminal">collectionExpression</span>&nbsp;:=  
+<span class="nonterminal">membershipExpression</span>
+| <span class="nonterminal">entityRemovalExpression</span>
+| <span class="nonterminal">entityAdditionExpression</span>  <br/>
+<span class="nonterminal">membershipExpression</span>&nbsp;:=  
+<span class="name">wasMemberOf</span> 
+ <span class="name">(</span>
+ <span class="nonterminal">entityExpression</span>
+ <span class="name">,</span>
+<span class="nonterminal">entityExpression</span>
+ <span class="name">,</span>
+  <span class="nonterminal">entityExpression</span>
+  <span class="name">,</span>
+  <span class="nonterminal">position</span>
+  <span class="name">)</span>
+<br/>
+
+  <span class="nonterminal">entityRemovalExpression</span>&nbsp;:=  
+<span class="name">wasRemovedFrom</span> 
+ <span class="name">(</span>
+ <span class="nonterminal">entityExpression</span>
+ <span class="name">,</span>
+<span class="nonterminal">entityExpression</span>
+ <span class="name">,</span>
+  <span class="nonterminal">entityExpression</span>
+  <span class="name">)</span>
+<br/>
+  
+  <span class="nonterminal">entityAdditionExpression</span>&nbsp;:=  
+<span class="name">wasAddedTo</span> 
+ <span class="name">(</span>
+ <span class="nonterminal">entityExpression</span>
+ <span class="name">,</span>
+<span class="nonterminal">entityExpression</span>
+ <span class="name">,</span>
+  <span class="nonterminal">position</span>
+  <span class="name">)</span>
+  </div>
+
+    In the expression:  <span class="name">wasMemberOf(e1,e2,p)</span>:
+
+  <ul>
+    <li> entity <span class="name">e1</span> is a member of a collection;
+    <li> entity <span class="name">e1</span> denotes the collection;
+    <li> <span class="name">p</span> denotes the position of  <span class="name">e1</span> in <span class="name">e2</span>. This argument is optional. The nature of the position depends on the specific collection type, and is left unspecified (in the case of a simple list, this is the position in the list)
+</ul>
+<p/>
+    Similarly, in expression <span class="name">wasRemovedFrom(e1,e2)</span>:
+     <ul>
+    <li>  <span class="name">e1</span> is a former member of a collection, which is now no longer a member;
+    <li> <span class="name">e1</span> denotes the collection;
+</ul>
+
+    Simmetrically, in expression <span class="name">wasAddedTo(e1,e2,p)</span>:
+     <ul>
+    <li>  <span class="name">e1</span> is a new member of a collection, which was previously not a member;
+    <li> <span class="name">e1</span> denotes the collection;
+           <li> <span class="name">p</span> denotes the position of  <span class="name">e1</span> in <span class="name">e2</span> after insertion.
+</ul>
+<p/>
+
+The following collection expressions:
+<pre class="example">
+<span class="name">wasAddedTo(e1,c1,p1)</span>
+<span class="name">memberOf(e1,c1,p1)</span>
+<span class="name">memberOf(e2,c1,p2)</span>
+<span class="name">memberOf(c1,c2,p3)</span>
+<span class="name">wasRemovedFrom(e1,c1)</span>
+</pre>
+assert that:
+<ul>
+  <li><span class="name">e1</span> was added to collection <span class="name">c1</span> at position <span class="name">p1</span>
+  <li><span class="name">e1</span> is a member of  collection <span class="name">c1</span> at position <span class="name">p1</span>
+  <li><span class="name">e2</span> is a member of collection <span class="name">c1</span> at position <span class="name">p2</span>
+  <li><span class="name">c1</span> (itself a collection) is a member of collection <span class="name">c1</span> at position <span class="name">p3</span>. This illustrates that collections can be nested within one another.
+  <li><span class="name">e1</span> was removed from collection <span class="name">c1</span>
   </ul>
-
-Specifically, the following relations are envisioned (to be made precise later):
-  <ul>
-    <li> current containment:  <strong>wasMemberOf(&lt;entity&gt;, &lt;collection&gt;, &lt;position&gt;)</strong>
-    <li> former containment:   <strong>wasRemovedFRom(&lt;entity&gt;, &lt;collection&gt;, &lt;position&gt;)</strong>
-    <li> new containment:      <strong>wasAddedTo(&lt;entity&gt;, &lt;collection&gt;, &lt;position&gt;)</strong>
-    </ul>
-  
-</section>
-
-
-    </section> 
+</p>
+
+      </section> 
 
     <section id="extensibility-section"> 
 <h2>PROV-DM Extensibility Points</h2>