w3c pub example
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Thu, 09 Feb 2012 09:36:46 +0000
changeset 1510 b7147cd9de30
parent 1509 16578b3705e2 (current diff)
parent 1508 3d93d985694b (diff)
child 1511 15ef44b3255d
w3c pub example
model/working-copy/towards-wd4.html
--- a/model/working-copy/towards-wd4.html	Wed Feb 08 17:32:16 2012 +0000
+++ b/model/working-copy/towards-wd4.html	Thu Feb 09 09:36:46 2012 +0000
@@ -916,7 +916,7 @@
 
 <p>
 A usage record's id is OPTIONAL. It MUST be present when annotating usage records (see Section <a href="#record-annotation">Annotation Record</a>) or when defining precise-1 derivations (see
-<a href="#Derivation-Relation">Derivation Record</a>).</p>
+<a href="#Derivation-Relation">Derivation</a>).</p>
 </div>
 
 
@@ -1577,18 +1577,350 @@
 <h3>Activity Ordering</h3>
 
 
-The following two relations are used to express dependencies amongst activities.
+The following  relation is used to express dependencies amongst activities.
 
 <ul>
   <li> An <dfn id="InformationFlowOrdering">information flow ordering relation</dfn> states that activity  <span class="name">a2</span> is dependent on another <span class="name">a1</span>, by way of some entity <span class="name">e</span> that is generated by <span class="name">a1</span> and used by <span class="name">a2</span>.
     <li>A <dfn id="ControlOrdering">control ordering record</dfn> states that  activity <span class="name">a2</span> was initiated by another activity <span class="name">a1</span>.
 </ul>
 
-
-
+<p>
+An information flow ordering assertion, written as 
+<span class="name">wasInformedBy(id,a2,a1,attrs)</span> in PROV-ASN, contains: 
+<ul>
+<li><em>id</em>:  an OPTIONAL identifier  <span class="name">id</span> identifying the relation;</li> 
+<li><em>informed</em>: the identifier <span class="name">a2</span> of an activity representing the informed activity;
+<li><em>informant</em>: the identifier <span class="name">a1</span> of an activity representing the informant activity;
+<li><em>attributes</em>: an OPTIONAL set <span class="name">attrs</span> of attribute-value pairs to further describe properties of the relation.</li>
+</ul>
+
+<p>
+A control ordering assertion, written as 
+<span class="name">wasStartedBy(a2,a1, attrs)</span> in PROV-ASN, contains: </p>
+<ul>
+<li><em>id</em>:  an OPTIONAL identifier  <span class="name">id</span> of the relation;</li> 
+<li><em>started</em>: refers to an activity  identified by <span class="name">a2</span>, representing the started activity;
+<li><em>starter</em>: refers to an activity  identified by <span class="name">a1</span>, representing the activity that started <span class="name">a1</span>;</li>
+<li><em>attributes</em>: an OPTIONAL set <span class="name">attrs</span> of attribute-value pairs to further describe the properties of the relation.</li>
+</ul>
+
+
+<p>Further considerations:</p>
+
+<ul>
+  <li>Information flow assertions are equivalent to a combination of generation and use assertions with shared entity, that is:<br/>
+        <span class="name">wasInformedBy(a2,a1)</span> <span class='conditional'>if and only if</span> there is an entity  <span class=name>e</span> such that <span class="name">wasGeneratedBy(e,a1,attrs1)</span> and
+  <span class="name">used(a2,e,attrs2)</span>.
+
+  <li> Relation <span class="name">wasInformedBy()</span> is not transitive.
+</ul>
+
+<div class="note">I have omitted the rendering of the wasStartedBy constraint. It was controversial during the F2F and it really reads odd, as wasStartedBy(actiity, activity) is defined in terms of wasStartedBy(agent, entity). That requires a lot of explaining. This needs to be resolved, or the new wasStartedBy just removed [PM].</div>
+
+<div class="anexample">
+<p>
+Suppose activities <span class="name">a1</span> and <span class="name">a2</span> are computer processes that are executed on different hosts, and that <span class="name">a1</span> started <span class="name">a1</span>. This can be expressed as follows:</p>
+<pre class="codeexample">
+activity(a1,t1,t2,[ex:host="server1.example.org",prov:type="workflow"])
+activity(a2,t3,t4,[ex:host="server2.example.org",prov:type="subworkflow"])
+wasStartedBy(a2,a1)
+</pre>
+
+<p>Alternatively, we could have asserted the existence of an entity, representing a request to create a sub-workflow. This request, issued by <span class="name">a1</span>, triggered the
+start of <span class="name">a2</span>.
+</p>
+<pre class="codeexample">
+entity(e,[prov:type="creation-request"])
+wasGeneratedBy(e,a1)
+wasStartedBy(a2,e)
+</pre>
+</div
+
+</section>
+
+</section>
+
+<section id="record-Revision">
+<h3>Revision</h3>
+
+<p> A <dfn id="dfn-Revision">revision relation</dfn> is a particular case of  <a href="#Derivation-Relation">derivation</a>, used to state that  an entity is a revised version of another. The agent who is responsible for making the revision may optionally be specified.</p>
+
+<p> A revision assertion, written <span class="name">wasRevisionOf(e2,e1,ag,attrs)</span> in PROV-ASN, contains:</p>
+<ul>
+<li><em>id</em>: an OPTIONAL identifier  <span class="name">id</span> for the relation;</li> 
+<li><em>newer</em>: the revised  entity <span class="name">e2</span>, identifying an entity that represents a newer version of an entity;
+<li><em>older</em>: an identifier <span class="name">e1</span> identifying an entity that represents an older version of an entity;
+<li><em>responsibility</em>: an OPTIONAL  identifier <span class="name">ag</span> for the agent who approved that <span class="name">e2</span> is a variant of <span class="name">e1</span>;
+<li><em>attributes</em>: an OPTIONAL set <span class="name">attrs</span> of attribute-value pairs to further describe this record.</li>
+</ul>
+
+
+
+<div class="anexample">
+<p>
+ Suppose document <span class="name">e1</span> is subject to revision by a quality controller, <span class="name">ag</span>.
+The following assertions state that <span class="name">ag</span> has been instrumental in creating a new version <span class="name">e2</span> of document <span class="name">e1</span>:
+<pre class="codeexample">
+agent(ag,[prov:type="QualityController"])
+entity(e1,[prov:type="document"])
+entity(e2,[prov:type="document"])
+wasRevisionOf(e2,e1,ag)
+</pre>
+</div>
+
+<!--
+<p>Further considerations:</p>
+
+<ul>
+  <li><span class="name">wasRevisionOf</span> is a particular case of <span class="name">wasDerivedFrom</span>. That is, <span class="name">wasRevisionOf(e2, e1, ag)</span> implies  <span class="name">wasDerivedFrom(e2, e1, ag)</span>.
+  </ul>
+-->
+
+</section>  <!-- end revision -->
+
+
+<section id="record-attribution">
+<h3>Attribution</h3> 
+
+<p>An <dfn>attribution relation</dfn> states that an entity is attributed to an agent. More precisely, asserting that an entity  <span class="name">e</span> is attributed to agent  <span class="name">ag</span> means that <span class="name">e</span> was generated by some activity <span class="name">a</span>, which in turn was associated to agent  <span class="name">ag</span>. Thus, this relation is useful when the activity is not known, or irrelevant.
+
+<p> An attribution assertion, written <span class="name"> wasAttributedTo(e,ag,attr)</span> in PROV-ASN, contains the following elements:</p>
+<ul>
+<li><em>entity</em>: an entity identifier <span class="name">e</span>;</li>
+<li><em>agent</em>: an agent identifier <span class="name">ag</span>. This is the agent who the entity is ascribed to;</li>
+<li><em>attributes</em>: an OPTIONAL set <span class="name">attrs</span> of attribute-value pairs to further describe the properties of the relation.</li>
+</ul>
+
+<div class="anexample">
+<p>
+ Suppose one knows that agent <span class="name">ag</span>, a document quality controller, has been responsible for the generation of a certain version <span class="name">e</span> of a document.
+  This can be asserted simply as:
+
+<pre class="codeexample">
+agent(ag,[prov:type="QualityController"])
+entity(e,[prov:type="document"])
+wasAttributedTo(e,ag, )
+</pre>
+</div>
+
+</section>  <!-- end attribution -->
+
+
+<section id="record-quotation">
+<h3>Quotation Record</h3>
+
+<div class="note">I find that quotation is really a misnomer. This expands into derivation with attribution, in what sense is the derived entity a "quote" of the original?  . The agent that is quoted is particularly obscure. It does not seem to be involved in the quoting at all.  Why isn't quoting an activity with the quoting agent associated with it? [PM]</div>
+
+<p> A <dfn>quotation relation</dfn> is a particular case of  <a href="#Derivation-Relation">derivation</a>, used to state that entity <span class="name">e2</span> is derived from entity <span class="name">e1</span> by copying, or "quoting", parts of it.</p>
+
+<p>  A quotation assertion, written <span class="name"> wasQuotedFrom(e2,e1,ag2,ag1,attrs)</span> in PROV-ASN, contains:</p>
+<ul>
+<li><em>quote</em>:  an identifier  <span class="name">e2</span> of the entity that represents the quote (the partial copy);
+<li><em>quoted</em>: an identifier  <span class="name">e1</span> of the entity being quoted;
+<li><em>quoterAgent</em>: an OPTIONAL identifier <span class="name">ag2</span> of the agent who is doing the quoting;
+<li><em>quotedAgent</em>: an OPTIONAL identifier <span class="name">ag1</span> of the agent that is quoted;
+<li><em>attributes</em>: an OPTIONAL set <span class="name">attrs</span> of attribute-value pairs to further describe the properties of the relation.</li>
+
+</ul>
+
+<p>Further considerations:<p/>
+
+<ul>
+  <li>When both agents involved in the relation are known, an assertion of the form <span class="name"> wasQuotedFrom(e2,e1,ag2,ag1,attrs)</span> expands into the following:
+<pre>
+wasDerivedFrom(e2,e1)
+wasAttributedTo(e2,ag2)
+wasAttributedTo(e1,ag1)
+</pre>
+</ul>
+
+</section>  <!-- end quotation -->
+
+
+<section id="record-summary">
+<h3>Summary</h3>
+
+<div class="note">Omitted as this is likely to be removed [PM]</div>
+
+<div class='issue'>Drop this relation  <a href="http://www.w3.org/2011/prov/track/issues/220">ISSUE-220</a>.</div>
+
+
+</section>  <!-- end summary -->
+
+
+<section id="record-orignal-source">
+<h3>Original Source</h3>
+
+<div class="note"> I find this relation confusing. Please add an example. I wouldn't really know when to use this. [PM]</div>
+
+<p> An <dfn>original source relation</dfn> is a particular case of <a href="#Derivation-Relation">derivation</a>, used to state that an entity <span class="name">e2</span> (derived) was originally part of some other entity <span class="name">e1</span> (the original source).</p>
+
+<p> An original source assertion, written <span class="name"> hadOriginalSource(e2,e1,attrs)</span>, contains:</p>
+<ul>
+<li><em>derived</em>: an identifier <span class="name">e2</span> for the derived entity; </li>
+<li><em>source</em>: an identifier <span class="name">e1</span> for the original source entity;</li>
+<li><em>attributes</em>: an OPTIONAL set <span class="name">attrs</span> of attribute-value pairs to further describe the properties of the relation.</li>
+</ul>
+
+</section>  <!-- end original source -->
+
+
+
+<section id="record-Collection">
+<h3>Collections</h3>
+
+<strong>Collection relations</strong> address the need to describe the evolution of entities that have a collection structure, that is, which may contain other entities. Specifically this section introduces a new built-in type for entities, called <span class="name">collection</span>, and two relations to describe the effect of adding elements to, and removing elements from, a collection entity.
+The intent of these relations and entity types is to capture the <em>history of changes that occurred to a collection</em>. </p>
+
+<p>The <span class="name">collection</span> entity type denotes an abstract data type consisting of a <strong>set of key-value pairs</strong>, often referred to as a <strong>map</strong>.
+
+More precisely, the following entity types are introduced:
+
+<ul>
+  <li> <span class="name">prov:type="Collection"%%xsd:QName</span>  denotes that a collection. An entity of this type can participate in insertion and removal relations;
+
+  <li><span class="name">prov:type="emptyCollection"%%xsd:QName</span> denotes an empty collection.
+</ul>
+
+The following relations are used to describe the effect of adding or removing a new pair to (resp. from) a collection:
+
+<ul>
+  <li>Insertion assertion <span class="name">CollectionAfterInsertion(c2,c1, k, v)</span> states that collection  <span class="name">c2</span> represents the new state of collection <span class="name">c1</span>,
+following the insertion of pair <span class="name">(k,v)</span> into  <span class="name">c1</span>;</li>
+
+<li>  Removal assertion <span class="name">CollectionAfterRemoval(c2,c1, k)</span> states that collection  <span class="name">c2</span> represents the  new state of collection <span class="name">c1</span>, following the removal of the pair corresponding to key  <span class="name">k</span> from  <span class="name">c1</span>.</li>
+
+</ul>
+
+<div class="anexample">
+<pre class="codeexample">
+   entity(c, [prov:type="EmptyCollection"])    // e is an empty collection
+   entity(k1)
+   entity(v1)
+   entity(k2)
+   entity(v2)
+   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) }
+</pre>
+</div>
+
+
+<p> An assertion CollectionAfterInsertion, written <span class="name"> CollectionAfterInsertion(collAfter, collBefore, key, value)</span>, contains:</p>
+<ul>
+<li><em>entity</em>: an identifier <span class="name">collAfter</span> for the collection <em>after</em> the insertion; </li>
+<li><em>source</em>: an identifier <span class="name">collBefore</span>  for the collection <em>before</em> the insertion;</li>
+<li><em>source</em>: an identifier <span class="name">key</span>  for the key that has been inserted into <span class="name">collBefore</span></li>
+<li><em>source</em>: an identifier <span class="name">value</span>  for the value corresponding to the key that has been inserted into <span class="name">collBefore</span></li>
+</ul>
+
+<p> An assertion CollectionAfterDeletion, written <span class="name"> CollectionAfterDeletion(collAfter, collBefore, key)</span>, contains:</p>
+<ul>
+<li><em>entity</em>: an identifier <span class="name">collAfter</span> for the collection  <em>after</em> the deletion; </li>
+<li><em>source</em>: an identifier <span class="name">collBefore</span>  for the collection <em>before</em> the deletion;</li>
+<li><em>source</em>: an identifier <span class="name">key</span>  for the key corresponding to the (key, value) pair that has been deleted from <span class="name">collBefore</span></li>
+</ul>
+
+
+
+<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).</p>
+
+<li>Keys are literals, and values are entities. This allows expressing nested collections, that is, collections whose values include entities of type collection.</p>
+
+<li>Insertion and removal relations are a particular case of <a href="#Derivation-Relation">derivation</a>.</p>
+
+ <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 derivation assertions involving insertions and removals. Entity type <span class="name">prov:type="emptyCollection"</span> can be used in this context as it marks the start of a sequence of collection operations.</p>
+
+  <li> One can have multiple assertions regarding the state of a collection following a <em>set</em> of insertions, for example:<br/>
+<span class="name">CollectionAfterInsertion(c2,c1, k1, v1)</span><br/>
+<span class="name">CollectionAfterInsertion(c2,c1, k2, v2)</span><br/>
+  <span class="name">...</span><br/>
+This is interpreted as <em>" <span class="name">c2</span> is the state that results from inserting  <span class="name">(k1, v1)</span>,  <span class="name">(k2, v2)</span> etc. into  <span class="name">c1</span></em></li></p>
+
+<li> It is possible to have multiple derivations from a single root collection, possibly by different asserters, as shown in the following example.
+
+<div class="anexample">
+<pre class="codeexample">
+  entity(c, [prov:type="EmptyCollection"])    // e is an empty collection
+  entity(k1)
+  entity(v1)
+  entity(k2)
+  entity(v2)
+  entity(k3)
+  entity(v3)
+  entity(c1, [prov:type="Collection"])
+  entity(c2, [prov:type="Collection"])
+  entity(c3, [prov:type="Collection"])
+  
+  CollectionAfterInsertion(c1, c, k1, v1)       // c1 = { (k1,v1) }
+  CollectionAfterInsertion(c2, c, k2, v2)       // c2 = { (k2 v2) }
+  CollectionAfterInsertion(c3, c1, k3,v3)       // c3 = { (k1,v1),  (k3,v3) }
+</pre>
+</div>
+</li></p>
+
+
+<li>Given the pair of assertions:
+
+<span class="name">CollectionAfterInsertion(c, c1, k1, v1)</span><br/>
+<span class="name">CollectionAfterInsertion(c, c2, k2, v2)</span><br/>
+
+it follows that <span class="name">c1==c2, k1==k2, v1==v2</span>, because one cannot have two different derivations for the same final collection state.</li></p>
+
+
+<li>Given the following set of insertions:<br/>
+
+<span class="name">CollectionAfterInsertion(c1, c, k, v1)</span><br/>
+<span class="name">CollectionAfterInsertion(c1, c, k, v2)</span><br/>
+
+it follows that  <span class="name">v1==v2</span>.</li></p>
+
+
+<li> The state of a collection is only known to the extent that a chain of derivations starting from an empty collection can be found. Since a set of assertions regarding a collection's evolution may be incomplete, so is the reconstructed state obtained by querying those assertions. In general, all assertions reflect the asserter's partial knowledge of a sequence of data transformation events. In the particular case of collection evolution, in which the asserter  <em>knows</em> that some of the state changes may have been missed, then the more generic  <a href="#Derivation-Relation">derivation</a> relation should be used to signal that some updates may have occurred, which cannot be precisely asserted as insertions or removals. The following two examples illustrate this.
+
+<div class="anexample">
+<pre class="codeexample">
+  entity(c, [prov:type="collection"])    // e is a collection, possibly not empty
+  entity(k1)
+  entity(v1)
+  entity(k2)
+  entity(v2, [prov:type="collection"])    // v2 is a collection
+
+  CollectionAfterInsertion(c1, c, k1, v1)       // c1 <em>includes</em> { (k1,v1) } but may contain additional unknown pairs
+  CollectionAfterInsertion(c2, c1, k2, v2)      // c2 includes { (k1,v1), (k2 v2) } where v2 is a collection with unknown state
+</pre>
+</div>
+  In the example, the state of <span class="name">c2</span> is only partially known because the collection is constructed from partially known other collections.
+
+<div class="anexample">
+<pre class="codeexample">
+  entity(c, [prov:type="emptyCollection"])    // e is an empty collection
+  entity(k1)
+  entity(v1)
+  entity(k2)
+  entity(v2)
+
+  CollectionAfterInsertion(c1, c, k1, v1)       // c1 = { (k1,v1) }
+  wasDerivedFrom(c2, c1)                        // the asserted knows that c2 is somehow derived from c1, but cannot assert the precise sequence of updates
+    CollectionAfterInsertion(c3, c2, k2, v2)       
+</pre>
+</div>
+Here  <span class="name">c3</span> includes <span class="name">{ (k2 v2) }</span> but the earlier "gap" leaves uncertainty regarding  <span class="name">(k1,v1)</span>  (it may have been removed) or any other pair that may have been added as part of the derivation activities.</li></p>
+
+</ul>
+
+
+</section>   <!-- end collections-->
 
 
 </section>
+<!-- end sec. 5 -->
 
     <section id="extensibility-section"> 
 <h2>PROV-DM Extensibility Points</h2>