Added test cases for Constraints 35 and 51
authorTrung Dong Huynh <tdh@ecs.soton.ac.uk>
Fri, 07 Dec 2012 00:20:20 +0000
changeset 5312 aa13a03c4555
parent 5311 6a6753a07827
child 5313 a53f63bbc275
Added test cases for Constraints 35 and 51
testcases/constraints/ordering-communication-PASS-c35.provn
testcases/constraints/ordering-communication-PASS-c35.provx
testcases/constraints/ordering-communication-PASS-c35.ttl
testcases/constraints/prov-o-property-hadGeneration-FAIL-c51-DM.provn
testcases/constraints/prov-o-property-hadGeneration-FAIL-c51-DM.provx
testcases/constraints/prov-o-property-hadGeneration-FAIL-c51-DM.ttl
testcases/constraints/prov-o-property-hadUsage-FAIL-c51-DM.provn
testcases/constraints/prov-o-property-hadUsage-FAIL-c51-DM.provx
testcases/constraints/prov-o-property-hadUsage-FAIL-c51-DM.ttl
testcases/process.html
--- a/testcases/constraints/ordering-communication-PASS-c35.provn	Thu Dec 06 17:31:55 2012 +0000
+++ b/testcases/constraints/ordering-communication-PASS-c35.provn	Fri Dec 07 00:20:20 2012 +0000
@@ -1,11 +1,7 @@
 document
-prefix xsd <http://www.w3.org/2001/XMLSchema>
-prefix prim <http://openprovenance.org/primitives#>
-prefix ex <http://example.org/>
-prefix prov <http://www.w3.org/ns/prov#>
-prefix xsi <http://www.w3.org/2001/XMLSchema-instance>
-prefix pc1 <http://www.ipaw.info/pc1/>
-activity(ex:a1,-,-)
-activity(ex:a2,-,-)
-wasInformedBy(ex:inf1;ex:a1,ex:a2)
+  prefix ex <http://example.org/>
+
+  activity(ex:a1,-,-)
+  activity(ex:a2,-,-)
+  wasInformedBy(ex:inf1; ex:a1, ex:a2)
 endDocument
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testcases/constraints/ordering-communication-PASS-c35.provx	Fri Dec 07 00:20:20 2012 +0000
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<prov:document xmlns:prov="http://www.w3.org/ns/prov#" xmlns:ns2="http://openprovenance.org/collection#" xmlns:ns3="http://openprovenance.org/validation#" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <prov:activity xmlns:ex="http://example.org/" prov:id="ex:a1"/>
+    <prov:activity xmlns:ex="http://example.org/" prov:id="ex:a2"/>
+    <prov:wasInformedBy xmlns:ex="http://example.org/" prov:id="ex:inf1">
+        <prov:effect prov:ref="ex:a1"/>
+        <prov:cause prov:ref="ex:a2"/>
+    </prov:wasInformedBy>
+</prov:document>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testcases/constraints/ordering-communication-PASS-c35.ttl	Fri Dec 07 00:20:20 2012 +0000
@@ -0,0 +1,12 @@
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex: <http://example.org/> .
+
+
+ex:a1 a prov:Activity .
+
+ex:a2 a prov:Activity .
+
+ex:inf1 a prov:Communication ;
+	prov:activity ex:a2 .
+
+ex:a1 prov:qualifiedCommunication ex:inf1 .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testcases/constraints/prov-o-property-hadGeneration-FAIL-c51-DM.provn	Fri Dec 07 00:20:20 2012 +0000
@@ -0,0 +1,9 @@
+document
+  default <http://example.com/>
+  prefix ex <http://example.com/vocab#>
+
+  activity(def:illustrationActivity,2012-04-03T00:00:00Z,2012-04-03T00:00:25Z)
+  entity(def:bar_chart,[prov:type='ex:Chart'])
+  wasDerivedFrom(def:bar_chart, def:aggregatedByRegions, -, def:illustration, -)
+  wasGeneratedBy(def:illustration;-,def:illustrationActivity,2012-04-03T00:00:11Z,[prov:type='prov:InstantaneousEvent'])
+endDocument
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testcases/constraints/prov-o-property-hadGeneration-FAIL-c51-DM.provx	Fri Dec 07 00:20:20 2012 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<prov:document xmlns:prov="http://www.w3.org/ns/prov#" xmlns:ns2="http://openprovenance.org/collection#" xmlns:ns3="http://openprovenance.org/validation#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:prim="http://openprovenance.org/primitives#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pc1="http://www.ipaw.info/pc1/">
+    <prov:activity xmlns:def="http://example.com/" prov:id="def:illustrationActivity">
+        <prov:startTime>2012-04-03T00:00:00Z</prov:startTime>
+        <prov:endTime>2012-04-03T00:00:25Z</prov:endTime>
+    </prov:activity>
+    <prov:entity xmlns:def="http://example.com/" prov:id="def:bar_chart">
+        <prov:type xmlns:ex="http://example.com/vocab#" xsi:type="xsd:QName">ex:Chart</prov:type>
+    </prov:entity>
+    <prov:wasDerivedFrom>
+        <prov:generation xmlns:def="http://example.com/" prov:ref="def:illustration"/>
+        <prov:generatedEntity xmlns:def="http://example.com/" prov:ref="def:bar_chart"/>
+        <prov:usedEntity xmlns:def="http://example.com/" prov:ref="def:aggregatedByRegions"/>
+    </prov:wasDerivedFrom>
+    <prov:wasGeneratedBy xmlns:def="http://example.com/" prov:id="def:illustration">
+        <prov:time>2012-04-03T00:00:11Z</prov:time>
+        <prov:activity prov:ref="def:illustrationActivity"/>
+        <prov:type xsi:type="xsd:QName">prov:InstantaneousEvent</prov:type>
+    </prov:wasGeneratedBy>
+</prov:document>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testcases/constraints/prov-o-property-hadGeneration-FAIL-c51-DM.ttl	Fri Dec 07 00:20:20 2012 +0000
@@ -0,0 +1,31 @@
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
+@prefix owl:  <http://www.w3.org/2002/07/owl#> .
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex:   <http://example.com/vocab#> .
+@prefix :     <http://example.com/> .
+
+:bar_chart
+   a prov:Entity, ex:Chart;
+   prov:wasDerivedFrom   :aggregatedByRegions;
+   prov:qualifiedDerivation [
+      a prov:Derivation;
+      prov:entity        :aggregatedByRegions;
+      prov:hadGeneration :illustration;
+   ];
+.
+
+:aggregatedByRegions a ex:Dataset .
+
+:illustration
+   a prov:Generation,
+     prov:InstantaneousEvent;
+   prov:activity :illustrationActivity;
+   prov:atTime   "2012-04-03T00:00:11Z"^^xsd:dateTime;
+.
+
+:illustrationActivity
+   a prov:Activity;
+   prov:startedAtTime "2012-04-03T00:00:00Z"^^xsd:dateTime;
+   prov:endedAtTime   "2012-04-03T00:00:25Z"^^xsd:dateTime;
+.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testcases/constraints/prov-o-property-hadUsage-FAIL-c51-DM.provn	Fri Dec 07 00:20:20 2012 +0000
@@ -0,0 +1,9 @@
+document
+  default <http://example.com/>
+
+  entity(proteinSample)
+  entity(digestedProteinSample1)
+  wasDerivedFrom(digestedProteinSample1, proteinSample, -)
+  wasDerivedFrom(digestedProteinSample1, -, -, u1)
+  used(u1; -, Trypsin, -,[prov:role='treatmentEnzyme'])
+endDocument
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testcases/constraints/prov-o-property-hadUsage-FAIL-c51-DM.provx	Fri Dec 07 00:20:20 2012 +0000
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<prov:document xmlns:prov="http://www.w3.org/ns/prov#" xmlns:ns2="http://openprovenance.org/collection#" xmlns:ns3="http://openprovenance.org/validation#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:prim="http://openprovenance.org/primitives#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pc1="http://www.ipaw.info/pc1/">
+    <prov:entity xmlns:def="http://example.com/" prov:id="def:proteinSample"/>
+    <prov:entity xmlns:def="http://example.com/" prov:id="def:digestedProteinSample1"/>
+    <prov:wasDerivedFrom>
+        <prov:generatedEntity xmlns:def="http://example.com/" prov:ref="def:digestedProteinSample1"/>
+        <prov:usedEntity xmlns:def="http://example.com/" prov:ref="def:proteinSample"/>
+    </prov:wasDerivedFrom>
+    <prov:wasDerivedFrom>
+        <prov:usage xmlns="" prov:ref="node17d8sv91ex2"/>
+        <prov:generatedEntity xmlns:def="http://example.com/" prov:ref="def:digestedProteinSample1"/>
+    </prov:wasDerivedFrom>
+    <prov:used>
+        <prov:entity xmlns:def="http://example.com/" prov:ref="def:Trypsin"/>
+        <prov:role xsi:type="xsd:string">http://example.com/treatmentEnzyme</prov:role>
+        <prov:role xmlns:def="http://example.com/" xsi:type="prov:AnyRef" prov:ref="def:treatmentEnzyme"/>
+    </prov:used>
+</prov:document>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testcases/constraints/prov-o-property-hadUsage-FAIL-c51-DM.ttl	Fri Dec 07 00:20:20 2012 +0000
@@ -0,0 +1,19 @@
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
+@prefix owl:  <http://www.w3.org/2002/07/owl#> .
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix :     <http://example.com/> .
+:digestedProteinSample1
+   a prov:Entity;
+   prov:wasDerivedFrom :proteinSample;
+   prov:qualifiedDerivation [
+      a prov:Derivation;
+      prov:hadUsage [
+         a prov:Usage;
+         prov:entity :Trypsin;
+        prov:hadRole :treatmentEnzyme;
+      ];
+   ];
+   prov:entity :proteinSample;
+.
+:proteinSample a prov:Entity .
--- a/testcases/process.html	Thu Dec 06 17:31:55 2012 +0000
+++ b/testcases/process.html	Fri Dec 07 00:20:20 2012 +0000
@@ -214,18 +214,19 @@
 </dl>
 
 <section>
-  <h3>Unit Test Cases</h3>
-  
-  <p>All test cases SHOULD be checked for their validity with respect to the  constraints they cover. A success test result for a test case means its validity MUST be the same as its expected validation result as provided in Table 2 below.</p>
+
+<h3>Unit Test Cases</h3>
   
-  <table class="simple" id="table-unit-test-cases">
-    <caption>Table 2. PROV-CONSTRAINTS test cases</caption>
-    <tr>
-      <th>Identifier</th>
-      <th>Constraints</th>
-      <th>Expected Validation Result</th>
-      <th>Download links</th>
-      </tr>
+<p>All test cases SHOULD be checked for their validity with respect to the  constraints they cover. A success test result for a test case means its validity MUST be the same as its expected validation result as provided in Table 2 below.</p>
+  
+<table class="simple" id="table-unit-test-cases">
+  <caption>Table 2. PROV-CONSTRAINTS test cases</caption>
+  <tr>
+    <th>Identifier</th>
+    <th>Constraints</th>
+    <th>Expected Validation Result</th>
+    <th>Download links</th>
+  </tr>
   <tr>
     <td id="ordering-activity1-PASS-c30"><a class="internalDFN" href="#ordering-activity1-PASS-c30">ordering-activity1-PASS-c30</a></td>
     <td>
@@ -335,6 +336,18 @@
     </td>
   </tr>
   <tr>
+    <td id="ordering-communication-PASS-c35"><a class="internalDFN" href="#ordering-communication-PASS-c35">ordering-communication-PASS-c35</a></td>
+    <td>
+      <a class="externalDFN" href="http://www.w3.org/TR/2012/CR-prov-constraints-20121211/#wasInformedBy-ordering">Constraint 35 (wasInformedBy-ordering)</a>
+    </td>
+    <td>PASS</td>
+    <td>
+      <a href="constraints/ordering-communication-PASS-c35.ttl" title="ordering-communication-PASS-c35.ttl">RDF</a>
+      <a href="constraints/ordering-communication-PASS-c35.provn" title="ordering-communication-PASS-c35.provn">PROV-N</a>
+      <a href="constraints/ordering-communication-PASS-c35.provx" title="ordering-communication-PASS-c35.provx">XML</a>
+    </td>
+  </tr>
+  <tr>
     <td id="ordering-delegation1-PASS-c49"><a class="internalDFN" href="#ordering-delegation1-PASS-c49">ordering-delegation1-PASS-c49</a></td>
     <td>
       <a class="externalDFN" href="http://www.w3.org/TR/2012/CR-prov-constraints-20121211/#actedOnBehalfOf-ordering">Constraint 49 (actedOnBehalfOf-ordering)</a>
@@ -2206,6 +2219,32 @@
       <a href="constraints/unification-usage-s8-PASS-c23.provx" title="unification-usage-s8-PASS-c23.provx">XML</a>
     </td>
   </tr>
+  <tr>
+    <td id="prov-o-property-hadGeneration-FAIL-c51-DM"><a class="internalDFN" href="#prov-o-property-hadGeneration-FAIL-c51-DM">prov-o-property-hadGeneration-FAIL-c51-DM</a></td>
+    <td>
+      <a class="externalDFN" href="http://www.w3.org/TR/2012/CR-prov-constraints-20121211/#impossible-unspecified-derivation-generation-use">Constraint 51 (impossible-unspecified-derivation-generation-use)</a><br>
+      <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#prov-dm-types-and-relations">Malformed statement(s)</a>
+    </td>
+    <td>FAIL</td>
+    <td>
+      <a href="constraints/prov-o-property-hadGeneration-FAIL-c51-DM.ttl" title="prov-o-property-hadGeneration-FAIL-c51-DM.ttl">RDF</a>
+      <a href="constraints/prov-o-property-hadGeneration-FAIL-c51-DM.provn" title="prov-o-property-hadGeneration-FAIL-c51-DM.provn">PROV-N</a>
+      <a href="constraints/prov-o-property-hadGeneration-FAIL-c51-DM.provx" title="prov-o-property-hadGeneration-FAIL-c51-DM.provx">XML</a>
+    </td>
+  </tr>
+  <tr>
+    <td id="prov-o-property-hadUsage-FAIL-C51-DM"><a class="internalDFN" href="#prov-o-property-hadUsage-FAIL-C51-DM">prov-o-property-hadUsage-FAIL-C51-DM</a></td>
+    <td>
+      <a class="externalDFN" href="http://www.w3.org/TR/2012/CR-prov-constraints-20121211/#impossible-unspecified-derivation-generation-use">Constraint 51 (impossible-unspecified-derivation-generation-use)</a><br>
+      <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#prov-dm-types-and-relations">Malformed statement(s)</a>
+    </td>
+    <td>FAIL</td>
+    <td>
+      <a href="constraints/prov-o-property-hadUsage-FAIL-C51-DM.ttl" title="prov-o-property-hadUsage-FAIL-C51-DM.ttl">RDF</a>
+      <a href="constraints/prov-o-property-hadUsage-FAIL-C51-DM.provn" title="prov-o-property-hadUsage-FAIL-C51-DM.provn">PROV-N</a>
+      <a href="constraints/prov-o-property-hadUsage-FAIL-C51-DM.provx" title="prov-o-property-hadUsage-FAIL-C51-DM.provx">XML</a>
+    </td>
+  </tr>
 </table>
   
 
@@ -3491,7 +3530,7 @@
   <tr>
     <td><a class="externalDFN" href="http://www.w3.org/TR/2012/CR-prov-constraints-20121211/#wasInformedBy-ordering">Constraint 35 (wasInformedBy-ordering)</a></td>
     <td>
-      
+      <a class="internalDFN" href="#ordering-communication-PASS-c35">ordering-communication-PASS-c35</a>
     </td>
     <td>
       
@@ -3648,7 +3687,8 @@
       
     </td>
     <td>
-      
+      <a class="internalDFN" href="#prov-o-property-hadGeneration-FAIL-c51-DM">prov-o-property-hadGeneration-FAIL-c51-DM</a><br>
+      <a class="internalDFN" href="#prov-o-property-hadUsage-FAIL-C51-DM">prov-o-property-hadUsage-FAIL-C51-DM</a>
     </td>
   </tr>
   <tr>
@@ -3717,7 +3757,9 @@
       <a class="internalDFN" href="#unification-influence-f2-FAIL-DM">unification-influence-f2-FAIL-DM</a><br>
       <a class="internalDFN" href="#unification-membership-f1-FAIL-DM">unification-membership-f1-FAIL-DM</a><br>
       <a class="internalDFN" href="#unification-specialization-f1-FAIL-DM">unification-specialization-f1-FAIL-DM</a><br>
-      <a class="internalDFN" href="#unification-specialization-f2-FAIL-DM">unification-specialization-f2-FAIL-DM</a>
+      <a class="internalDFN" href="#unification-specialization-f2-FAIL-DM">unification-specialization-f2-FAIL-DM</a><br>
+      <a class="internalDFN" href="#prov-o-property-hadGeneration-FAIL-c51-DM">prov-o-property-hadGeneration-FAIL-c51-DM</a><br>
+      <a class="internalDFN" href="#prov-o-property-hadUsage-FAIL-C51-DM">prov-o-property-hadUsage-FAIL-C51-DM</a>
     </td>
   </tr>
 </table>