grammar definition
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Tue, 06 Sep 2011 10:56:27 +0100
changeset 213 ae2ac0824152
parent 212 34d177593e99
child 214 35e8dfed9dbe
grammar definition
model/ProvenanceModel.html
model/extra.css
--- a/model/ProvenanceModel.html	Tue Sep 06 10:12:39 2011 +0100
+++ b/model/ProvenanceModel.html	Tue Sep 06 10:56:27 2011 +0100
@@ -174,8 +174,8 @@
 entity(e1, [ type: "File", location: "/shared/crime.txt", creator: "Alice", content: "" ])
 entity(e2, [ type: "File", location: "/shared/crime.txt", creator: "Alice", content: "There was a lot of crime in London last month."])
 entity(e3, [ type: "File", location: "/shared/crime.txt", creator: "Alice", content: "There was a lot of crime in London and New York last month."])
-entity(e4)
-entity(e5)
+entity(e4,[])
+entity(e5,[])
 entity(e6, [ type: "File", location: "/shared/crime.txt", creator: "Alice", content: "There was a lot of crime in London and New York last month.", spellchecked: "yes"])
 </pre>
 </p>
@@ -1353,6 +1353,121 @@
 </li>
 <li> Preliminary BNF grammar for the Provenance Abstract Syntax Notation
 <pre data-include='grammar.html'></pre> 
+
+<div class='grammar'>
+<span class="nonterminal">construct</span>&nbsp;:=  
+<span class="nonterminal">node</span>   <!-- better name than node?? -->
+| <span class="nonterminal">relation</span> 
+| <span class="nonterminal">assertionBundle</span> 
+<br/>
+<!-- -->
+<span class="nonterminal">node</span>&nbsp;:=  
+<span class="nonterminal">entity</span> 
+|<span class="nonterminal">processExecution</span> 
+|<span class="nonterminal">agent</span> <br/>
+<!-- -->
+<span class="nonterminal">relation</span>&nbsp;:=  
+<span class="nonterminal">generation</span> 
+|<span class="nonterminal">use</span> 
+|<span class="nonterminal">derivation</span> 
+|<span class="nonterminal">control</span> 
+|<span class="nonterminal">complement</span> 
+|<span class="nonterminal">peOrdering</span> 
+|<span class="nonterminal">revision</span> 
+|<span class="nonterminal">participation</span> <br/>
+<!-- -->
+<span class="nonterminal">assertionBundles</span>&nbsp;:=  
+|<span class="nonterminal">container</span> 
+|<span class="nonterminal">account</span>  <br/>
+<!-- -->
+<br/>
+<span class="nonterminal">entity</span>&nbsp;:=  
+<span class="name">entity</span>
+<span class="name">(</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="name">[</span>
+<span class="nonterminal">attribute-values</span>
+<span class="name">]</span>
+<span class="name">)</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>
+<br/>
+<span class="nonterminal">attribute-value</span>&nbsp;:=  
+<span class="nonterminal">attribute</span>
+<span class="name">:</span>
+<span class="nonterminal">Literal</span>
+<br/>
+<br/>
+
+<!-- -->
+<span class="nonterminal">generation</span>&nbsp;:=  
+<span class="name">wasGeneratedBy</span>
+<span class="name">(</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">role</span>
+<span class="name">)</span><br/>
+<br/>
+
+<!-- -->
+<span class="nonterminal">use</span>&nbsp;:=  
+<span class="name">used</span>
+<span class="name">(</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">role</span>
+<span class="name">)</span><br/>
+<br/>
+
+<!-- -->
+<span class="nonterminal">derivation</span>&nbsp;:=  <br/>
+<span class="name">wasDerivedFrom</span>
+<span class="name">(</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">processExecution</span>
+<span class="name">,</span>
+<span class="nonterminal">role</span>
+<span class="name">,</span>
+<span class="nonterminal">role</span>
+<span class="name">)</span><br/>
+| <span class="name">wasDerivedFrom</span>
+<span class="name">(</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">identifier</span>
+<span class="name">)</span><br/>
+| <span class="name">wasEventuallyDerivedFrom</span>
+<span class="name">(</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">identifier</span>
+<span class="name">)</span><br/>
+| <span class="name">dependedOn</span>
+<span class="name">(</span>
+<span class="nonterminal">identifier</span>
+<span class="name">,</span>
+<span class="nonterminal">identifier</span>
+<span class="name">)</span><br/>
+<!-- -->
+<br/>
+<span class="nonterminal">identifier</span>&nbsp;:=  <span class="nonterminal">token</span><br/>
+<span class="nonterminal">role</span>&nbsp;:=  <span class="nonterminal">token</span><br/>
+<span class="nonterminal">attribute</span>&nbsp;:=  <span class="nonterminal">token</span><br/>
+<span class="nonterminal">Literal</span>&nbsp;:=  <span class="nonterminal">string</span> <!-- to be revisited -->
+|<span class="nonterminal">number</span>
+|<span class="nonterminal">time</span><br/>
+<br/>
+<div>
 </li>
 </ul>
 </section> 
--- a/model/extra.css	Tue Sep 06 10:12:39 2011 +0100
+++ b/model/extra.css	Tue Sep 06 10:56:27 2011 +0100
@@ -107,3 +107,22 @@
     color: blue;
 }
 
+.grammar {
+    margin-top: 1ex;
+    margin-bottom: 1ex;
+    padding-left: 1ex;
+    padding-right: 1ex;
+    padding-top: 1ex;
+    padding-bottom: 0.6ex;
+    border: 1px dashed #2f6fab;
+    font-family: monospace;
+}
+.nonterminal {
+    font-weight: bold;
+    font-family: sans-serif;
+    font-size: 95%;
+}
+
+.name {
+    font-family: monospace;
+}