account and container
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Wed, 14 Sep 2011 20:33:46 +0100
changeset 285 d9134e05db76
parent 284 1726bf205510
child 286 f71811a1d4f2
account and container
model/ProvenanceModel.html
--- a/model/ProvenanceModel.html	Wed Sep 14 15:09:19 2011 +0100
+++ b/model/ProvenanceModel.html	Wed Sep 14 20:33:46 2011 +0100
@@ -342,7 +342,7 @@
 
 </section> 
 
-    <section> 
+    <section id="example-prov-asn-encoding"> 
 <h3>Encoding using PROV-ASN</h3>
 
 In this section, the example is encoded according to the provenance data model (specified in section <a href="#data-model-concepts">concepts</a>) and expressed in PROV-ASN. 
@@ -1681,22 +1681,29 @@
 <p>
 The following account expression
 <pre class="example">
-entity(a1, [])
-agent(a1)
-account(v1,a1, [
-                  entity(e1, [ type: "File", location: "/shared/crime.txt", creator: "Alice", content: "" ])
-                  wasGeneratedBy(e1,pe0,outContent)     
-                  processExecution(pe0,create-file,t)
-                  ...
-               ] )
+account(acc1,
+        http://x.com/asserter, 
+          entity(e0, [ type: "File", location: "/shared/crime.txt", creator: "Alice" ])
+          ...
+          wasDerivedFrom(e2,e1)
+          ...
+          processExecution(pe0,create-file,t)
+          ...
+          wasGeneratedBy(e0,pe0,outFile)     
+          ...
+          wasControlledBy(pe4,a5, [role=communicator])  )
 </pre>
-contains a set of provenance expressions, is asserted by agent  <span class="name">a1</span>, is referred to by identifier <span class="name">v1</span>.
+contains the set of provenance expressions of section <a href="#example-prov-asn-encoding">example-prov-asn-encoding</a>, is asserted by agent <span class="name">http://x.com/asserter</span>, and is identified by identifier <span class="name">acc1</span>.
 </p>
 
-<div class='note'>Luc: define well-formed account, and union of two well-formed accounts may not be a well-formed account.</div>
-
-<p> The union of two accounts can be defined by forming a container
-containing the unions of their respective expression. Accounts are not
+<p>
+An account is said to be well-formed if
+it satisfied the constraints  <a href="#generation-unicity">generation-unicity</a> and <a href="#derivation-use">derivation-use</a>.</p>
+
+<p> The union of two accounts is another account, 
+containing the unions of their respective expressions, where
+ expressions with a same identifier should be understood according to constraint <a href="#identified-entity-in-account">. Well-formed
+accounts are not
 closed under union because the
 constraint <a href="#generation-unicity">generation-unicity</a> may no
 longer be satisfied in the resulting union.  </p>
@@ -1705,61 +1712,78 @@
 <p>
 Indeed, let us consider another account expression
 <pre class="example">
-entity(a2, [])
-agent(a2)
-account(v2,a2, [
-                  entity(e1, [ type: "File", location: "/shared/crime.txt", creator: "Alice", content: "" ])
-                  wasGeneratedBy(e1,pe1,outContent)     
-                  processExecution(pe1,create-file,t1)
-                  ...
-               ] )
+account(acc2,
+        http://x.com/asserter2, 
+          entity(e0, [ type: "File", location: "/shared/crime.txt", creator: "Alice" ])
+          ...
+          processExecution(pe1,create-file,t1)
+          ...
+          wasGeneratedBy(e0,pe1,outFile)     
+          ... )
 </pre>
-with identifier <span class="name">v3</span>, and containing assertions by agent denoted by <span class="name">a2</span> stating that entity denoted by <span class="name">e1</span> was generated by process execution <span class="name">pe1</span> instead of <span class="name">pe0</span> in agent <span class="name">a1</span>'s account <span class="name">v1</span>.  If both account are merged together, the resulting set of expressions violates <a href="#generation-unicity">generation-unicity</a>.
+with identifier <span class="name">acc2</span>, containing assertions by asserter by <span class="name">http://x.com/asserter2</span> stating that entity expression identified by <span class="name">e0</span> was generated by process execution expression identified by <span class="name">pe1</span> instead of <span class="name">pe0</span> in the previous account <span class="name">acc1</span>.  If both account are merged together, the resulting set of expressions violates <a href="#generation-unicity">generation-unicity</a>.</p>
+
+<p>Account expressions constitue a scope for identifiers. Since accounts can be nested, their scope can also be nested; thus, the scope of identifiers should be understood in the context of such nested scopes.  When an identifiable expression occurs directly within an account, then its identifier denotes this identifiable expression in the scope of this account, except in sub-accounts where expressions with the same identifier occur. </p>
+
+<p>
+The following account expression is inspired from section <a href="#example-prov-asn-encoding">example-prov-asn-encoding</a>. This account, identified by <span class="name">acc3</span>, declares entity expression identified by <span class="name">e0</span>, which is being referred to in the nested account <span class="name">acc4</span>. The scope of identifier <span class="name">e0</span> is account <span class="name">acc3</span>, including subaccount <span class="name">acc4</span>.
+<pre class="example">
+account(acc3,
+        http://x.com/asserter1, 
+          entity(e0, [ type: "File", location: "/shared/crime.txt", creator: "Alice" ])
+          processExecution(pe0,create-file,t)
+          wasGeneratedBy(e0,pe0,outFile)  
+          account(acc4,
+                 http://x.com/asserter2,
+                 entity(e1, [ type: "File", location: "/shared/crime.txt", creator: "Alice", content="" ])
+                 processExecution(pe0,copy-file,t)
+                 wasGeneratedBy(e1,pe0,outFile)
+                 isComplement(e1,e0)))
+</pre>
+Alternatively, a process expression identified by <span class="name">pe0</span> occurs in each of the two accounts. Therefore, they constitue process execution expression in separate scope, which may represent different characterized things in the world.
 </p>
 
+<p>The account expression is the hook by which further meta information can be expressed about provenance, such as asserter, time of creation, signatures. How general meta-information is expressed is beyond the scope of this specification, except for asserters.</p>
+
+
 </section>
 
 <section id="ProvenanceContainer">
 <h4>Provenance Container</h4>
 
-<p>A <dfn id="dfn-ProvenanceContainer">provenance container expression</dfn> is an identifiable wrapper for a set of PROV-DM expressions, which allows for additional meta-information pertaining to these expressions to be expressed and associated with them. A provenance container expression MAY contain other provenance containers.</p> 
-
-<p>Such meta-information may be asserter, date of creation, justification for assertions, and cryptographic signature. </p>
-
-<p>In PROV-ASN, a provenance container expression's text matches the <span class="nonterminal">provenanceContainer</span> production of the grammar defined in this specification document.</p>
+<p>A <dfn id="dfn-ProvenanceContainer">provenance container</dfn> is a house-keeping construct of PROV-DM, also capable of bundling PROV-DM expressions. A provenance container is not an expression, but can be exploited to return all the provenance assertions in response to a request for the provenance of something (here, refer to PAQ document). </p> 
+
+<p>In PROV-ASN, a provenance container's text matches the <span class="nonterminal">provenanceContainer</span> production of the grammar defined in this specification document.</p>
 
 
 <div class='grammar'>
 <span class="nonterminal">provenanceContainer</span>&nbsp;:=  
 <span class="name">provenanceContainer</span> 
 <span class="name">(</span> 
-<span class="nonterminal">identifier</span> 
+{ <span class="nonterminal">namespaceDeclaration</span> }
 <span class="name">,</span> 
-<span class="name">[</span> 
+{ <span class="nonterminal">identifier</span> }
+<span class="name">,</span> 
 { <span class="nonterminal">expression</span> }
-<span class="name">]</span> 
 <span class="name">)</span> 
 </div>
 
-<p>An instance of a provenance container expression, noted <span class="name">provenanceContainer(id, constructs)</span> in PROV-ASN:
+<p>An instance of a provenance container, noted <span class="name">provenanceContainer(decls, ids, exprs)</span> in PROV-ASN:
 <ul>
-<li> contains an identifier <span class="name">id</span> intended to name this provenance container;</li>
-<li> contains zero or more provenance constructs <span class="name">constructs</span>.</li>
+<li> contains a set of namespace declarations  <span class="name">decls</span>, declaring namespaces and associated prefixes, which can be used in attributes (conformant to production <span class="nonterminal">attribute</span>) and names (conformant to production <span class="nonterminal">name</span>) in  <span class="name">exprs</span>;</li>
+<li> contains a set of identifiers <span class="name">ids</span> naming all accounts occurring (at any nesting level) in  <span class="name">exprs</span>;</li>
+<li> contains one or more  expressions <span class="name">exprs</span>.</li>
 </ul>
-
-<p>How general meta-information is expressed is beyond the scope of this specification, except for a few key metatypes specified in the <a href="#expression-Account">Account</a> construct.</p>
+<p>All the expressions in <span class="name">exprs</span> are implictly wrapped in a default account, scoping all the identifiers they declare directly, and constituting a toplevel account, in the hierarchy of accounts.</p>
 
 <p>
-The following container expression
+The following container 
 <pre class="example">
-containerExpression(v, [
-                          entity(e1, [ type: "File", location: "/shared/crime.txt", creator: "Alice", content: "" ])
-                          wasGeneratedBy(e1,pe0,outContent)     
-                          processExecution(pe0,create-file,t)
-                          ...     
-                       ] )
+container([x http://x.com#],[acc1,acc2]
+          account(acc1,http://x.com/asserter1,...)
+          account(acc2,http://x.com/asserter1,...))
 </pre>
-contains a set of provenance expressions and identified by <span class="name">v</span>.
+ illustrates how two accounts with identifiers <span class="name">acc1</span> and <span class="name">acc2</span> can be returned in a PROV-ASN serialization of the provenance of something.
 </p>
 
 
@@ -1793,9 +1817,7 @@
 <section  id="expression-other">
 <h3>Other Expressions</h3>
 
-<section id="expression-literal">
-<h4>Literal</h4>
-</section>
+
 <section id="expression-qualifier">
 <h4>Qualifier</h4>
 
@@ -1808,22 +1830,48 @@
 <span class="nonterminal">controlQualifier</span>&nbsp;:=  
 <span class="nonterminal">qualifier</span> <br/>
 <span class="nonterminal">qualifier</span>&nbsp;:=  
-<span class="nonterminal">attribute-values</span> <br/>
+<span class="nonterminal">name-values</span> <br/>
 <!--   -->
-<span class="nonterminal">attribute-values</span>&nbsp;:=  
-<span class="nonterminal">attribute-value</span>
-|<span class="nonterminal">attribute-value</span> <span class="name">,</span> <span class="nonterminal">attribute-values</span>
+<span class="nonterminal">name-values</span>&nbsp;:=  
+<span class="nonterminal">name-value</span>
+|<span class="nonterminal">name-value</span> <span class="name">,</span> <span class="nonterminal">name-values</span>
 <br/>
-<span class="nonterminal">attribute-value</span>&nbsp;:=  
-<span class="nonterminal">attribute</span>
+<span class="nonterminal">name-value</span>&nbsp;:=  
+<span class="nonterminal">name</span>
 <span class="name">:</span>
 <span class="nonterminal">Literal</span></div>
 </section>
 
 <section id="expression-attribute">
 <h4>Attribute</h4>
+
+<div class='grammar'>
+<span class="nonterminal">attribute</span>&nbsp;:=  
+<em>a qualified name</em></div>
+
+<p>If a namespace prefix occurs in the qualified name, it refers to a namespace declared in the provenance container.</p>
 </section>
 
+<section id="expression-name">
+<h4>Name</h4>
+</section>
+
+<div class='grammar'>
+<span class="nonterminal">name</span>&nbsp;:=  
+<em>a qualified name</em></div>
+<p>If a namespace prefix occurs in the qualified name, it refers to a namespace declared in the provenance container.</p>
+</section>
+
+
+<section id="expression-literal">
+<h4>Literal</h4>
+
+<div class='note'>It is proposed to use the definition of Literal as in OWL2.  Add URL here.</div>
+
+</section>
+
+
+
 
 <section id="expression-Time">
 <h4>Time</h4>
@@ -1863,6 +1911,10 @@
 <h3>Asserter</h3>
 </section>
 
+<section id="expression-NamespaceDeclaration">
+<h3>Namespace Declaration</h3>
+</section>
+
 
 <section id="expression-RecipeLink">
 <h3>Recipe Link</h3>