Skip to content

Commit

Permalink
Updated based on feedback from W3C public comments.
Browse files Browse the repository at this point in the history
Added prov-dictionary.
  • Loading branch information
NicolasRouquette committed Aug 3, 2021
1 parent 3373e72 commit 99f3fcf
Show file tree
Hide file tree
Showing 10 changed files with 989 additions and 94 deletions.
92 changes: 21 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# provenance-vocabularies

## [PROV-O](https://www.w3.org/TR/2013/REC-prov-o-20130430/)

A set of vocabularies to describe provenance according to https://www.w3.org/TR/2013/REC-prov-o-20130430/.

The W3C Prov-O ontology defines binary unqualfied properties (e.g. `prov:wasGeneratedBy`) that can be qualified using a class (e.g. `prov:Generation`).
Expand Down Expand Up @@ -135,58 +137,30 @@ In Turtle syntax, the above corresponds to the following:
] .
```

## Examples

The OML Prov-O vocabulary includes the 11 examples from the specification.
## [PROV-Dictionary](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/)

In OML, vocabularies are typically closed before using them for modeling instances in OML descriptions. Closing a vocabulary is a decision made at the level of a group of ontologies, in OML terminology, a vocabulary bundle. This closure applies a policy whereby any pair of classes that have no common specialization are asserted to be disjoint from each other. The resulting set of disjointness axioms computed over the taxonomy of all vocabularies in scope of a vocabulary bundle turns out to be very useful and powerful for OWL2-DL+SWRL reasoners to verify instances in OML description ontologies against the semantics of vocabularies in OML vocabulary bundles.
Compared with the [prov-dictionary overview](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#prov-dictionary-owl-terms-at-a-glance), the OML vocabulary uses the OML entity relation pattern instead of the RDF qualification pattern.

This technique pointed out problems in the examples from the Prov-O ontology.
### [Example 2](https://www.w3.org/TR/prov-o/#narrative-example-expanded-1)
Specifically:

This example includes the following axioms:
- The OML relation entity reification of [prov:derivedByInsertionFrom](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#derivedByInsertionFrom)
combined with the OML relation entity reification of [prov:insertedKeyEntryPair](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#insertedKeyEntityPair)
obliviates the need for the original vocabulary:
- [prov:dictionary](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#dictionary); it effectively corresponds to the target of the OML relation entity [prov:derivedByInsertionFrom](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#derivedByInsertionFrom) or [prov:derivedByRemovalFrom](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#derivedByRemovalFrom).
- [prov:Insertion](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#Insertion); it effectively corresponds to the OML relation entity class reifying [prov:derivedByInsertionFrom](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#derivedByInsertionFrom).
- [prov:qualifiedInsertion](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#qualifiedInsertion); it effectively corresponds to the source and class of the OML relation entity [prov:derivedByInsertionFrom](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#derivedByInsertionFrom).
- [prov:Removal](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#Removal); it effectively corresponds to the OML relation entity class reifying [prov:derivedByRemovalFrom](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#derivedByRemovalFrom).
- [prov:qualifiedRemoval](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#qualifiedRemoval); it effectively corresponds to the source and class of the OML relation entity [prov:derivedByRemovalFrom](https://www.w3.org/TR/2013/NOTE-prov-dictionary-20130430/#derivedByRemovalFrom).

```turtle
:derek
a prov:Person, prov:Agent
.
:publicationActivity1123
a prov:Activity;
prov:wasStartedBy :derek;
prov:wasEndedBy :derek
.
```

Note that the range of [prov:wasStartedBy](https://www.w3.org/TR/2013/REC-prov-o-20130430/#wasStartedBy) and of [prov:wasEndedBy](https://www.w3.org/TR/2013/REC-prov-o-20130430/#wasEndedBy) is [prov:Entity](https://www.w3.org/TR/2013/REC-prov-o-20130430/#Entity), not [prov:Agent](https://www.w3.org/TR/2013/REC-prov-o-20130430/#Agent) as used in the example.
## Examples

Under the open-world assumption, the example is fine; a reasoner will conclude that `:derek` is classified as both `prov:Agent` (as asserted) and `prov:Entity` (as inferred).
The OML Prov-O vocabulary includes the 11 examples from the specification.

With the OML bundle closure, the disjointness policy generates several sets of disjointness axioms including the following in Turtle syntax:
In OML, vocabularies are typically closed before using them for modeling instances in OML descriptions. Closing a vocabulary is a decision made at the level of a group of ontologies, in OML terminology, a vocabulary bundle. This closure applies a policy whereby any pair of classes that have no common specialization are asserted to be disjoint from each other. The resulting set of disjointness axioms computed over the taxonomy of all vocabularies in scope of a vocabulary bundle turns out to be very useful and powerful for OWL2-DL+SWRL reasoners to verify instances in OML description ontologies against the semantics of vocabularies in OML vocabulary bundles.

```turtle
[ rdf:type owl:AllDisjointClasses ;
owl:members ( <http://www.w3.org/ns/prov#Activity>
<http://www.w3.org/ns/prov#Agent>
<http://www.w3.org/ns/prov#Alternate>
<http://www.w3.org/ns/prov#AtLocation>
<http://www.w3.org/ns/prov#Entity>
<http://www.w3.org/ns/prov#HadActivity>
<http://www.w3.org/ns/prov#HadGeneration>
<http://www.w3.org/ns/prov#HadPlan>
<http://www.w3.org/ns/prov#HadRole>
<http://www.w3.org/ns/prov#HadUsage>
<http://www.w3.org/ns/prov#Influence>
<http://www.w3.org/ns/prov#Influencer>
<http://www.w3.org/ns/prov#Location>
<http://www.w3.org/ns/prov#Member>
<http://www.w3.org/ns/prov#QualifiedInfluence>
<http://www.w3.org/ns/prov#Role>
)
] .
```
This technique pointed out problems with the OML Bundle Closure algorithm that generates disjointness constraints that are too strong.
See https://github.com/opencaesar/oml/issues/80

With the OML bundle closure, this example becomes inconsistent unless the assertions about `:derek` are removed as is done in the OML [example2.oml](src/examples/oml/example.org/example2.oml).

### [Example 4](https://www.w3.org/TR/prov-o/#narrative-example-expanded-3)

Expand All @@ -208,33 +182,9 @@ This example includes the following axioms:
.
```

Note that the domain of [prov:wasAttributedTo](https://www.w3.org/TR/2013/REC-prov-o-20130430/#wasAttributedTo) is [prov:Entity](https://www.w3.org/TR/2013/REC-prov-o-20130430/#Entity), not [prov:Agent](https://www.w3.org/TR/2013/REC-prov-o-20130430/#Agent) as used in the example.

Under the open-world assumption, the example is fine; a reasoner will conclude that `:john` and `:postEditor` are classified as both `prov:Agent` (as asserted) and `prov:Entity` (as inferred).

With the OML bundle closure, the disjointness policy generates several sets of disjointness axioms including the following in Turtle syntax:
Note that the domain of [prov:wasAttributedTo](https://www.w3.org/TR/2013/REC-prov-o-20130430/#wasAttributedTo) is [prov:Entity](https://www.w3.org/TR/2013/REC-prov-o-20130430/#Entity), not [prov:Activity](https://www.w3.org/TR/2013/REC-prov-o-20130430/#Activity) as used in the example.

```turtle
[ rdf:type owl:AllDisjointClasses ;
owl:members ( <http://www.w3.org/ns/prov#Activity>
<http://www.w3.org/ns/prov#Agent>
<http://www.w3.org/ns/prov#Alternate>
<http://www.w3.org/ns/prov#AtLocation>
<http://www.w3.org/ns/prov#Entity>
<http://www.w3.org/ns/prov#HadActivity>
<http://www.w3.org/ns/prov#HadGeneration>
<http://www.w3.org/ns/prov#HadPlan>
<http://www.w3.org/ns/prov#HadRole>
<http://www.w3.org/ns/prov#HadUsage>
<http://www.w3.org/ns/prov#Influence>
<http://www.w3.org/ns/prov#Influencer>
<http://www.w3.org/ns/prov#Location>
<http://www.w3.org/ns/prov#Member>
<http://www.w3.org/ns/prov#QualifiedInfluence>
<http://www.w3.org/ns/prov#Role>
)
] .
```
Since [prov:Entity](https://www.w3.org/TR/2013/REC-prov-o-20130430/#Entity) and [prov:Activity](https://www.w3.org/TR/2013/REC-prov-o-20130430/#Activity) are disjoint, this example leads to an inconsistency.

With OML bundle closure, this example becomes inconsistent unless the assertions about `:john` and `:postEditor` are removed as is done in the OML [example4.oml](src/examples/oml/example.org/example4.oml).
Although the OML Provenance ontology does not have disjointness explicitly asserted, with OML bundle closure, this example becomes inconsistent unless the assertions about `:john` and `:postEditor` are removed as is done in the OML [example4.oml](src/examples/oml/example.org/example4.oml).

20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ task omlToOwl(type:io.opencaesar.oml2owl.Oml2OwlTask, dependsOn: downloadDepende
// OML catalog
inputCatalogPath = file('catalog.xml')
// OWL catalog
outputCatalogPath = file('build/ttl/catalog.xml')
outputFileExtension = 'ttl'
outputCatalogPath = file('build/trig/catalog.xml')
outputFileExtension = 'trig'
}

/*
* A task to run the Openllet reasoner on the OWL catalog
*/
task owlReasonProvenance(type:io.opencaesar.owl.reason.OwlReasonTask, dependsOn: omlToOwl) {
// OWL catalog
catalogPath = file('build/ttl/catalog.xml')
catalogPath = file('build/trig/catalog.xml')
// Input ontology IRI to reason on
inputOntologyIri = 'http://www.w3.org/ns/prov-bundle'
inputFileExtensions = ['ttl']
outputFileExtension = 'ttl'
inputFileExtensions = ['trig']
outputFileExtension = 'trig'
// Entailment statements to generate and the ontologies to persist them in
specs = [
'http://www.w3.org/ns/prov-bundle/classes = ALL_SUBCLASS',
Expand All @@ -100,11 +100,11 @@ task owlReasonProvenance(type:io.opencaesar.owl.reason.OwlReasonTask, dependsOn:

task owlReasonExamples(type:io.opencaesar.owl.reason.OwlReasonTask, dependsOn: omlToOwl) {
// OWL catalog
catalogPath = file('build/ttl/catalog.xml')
catalogPath = file('build/trig/catalog.xml')
// Input ontology IRI to reason on
inputOntologyIri = 'http://example.org/examples-bundle'
inputFileExtensions = ['ttl']
outputFileExtension = 'ttl'
inputFileExtensions = ['trig']
outputFileExtension = 'trig'
// Entailment statements to generate and the ontologies to persist them in
specs = [
'http://example.org/examples-bundle/classes = ALL_SUBCLASS',
Expand All @@ -119,9 +119,9 @@ task owlReasonExamples(type:io.opencaesar.owl.reason.OwlReasonTask, dependsOn: o
* A task to load an OWL catalog to a Fuseki dataset endpoint
*/
task owlLoad(type:io.opencaesar.owl.load.OwlLoadTask, dependsOn: [owlReasonProvenance]) {
catalogPath = file('build/ttl/catalog.xml')
catalogPath = file('build/trig/catalog.xml')
endpointURL = "http://localhost:3030/$fusekiDataset"
fileExtensions = ['ttl']
fileExtensions = ['trig']
iris = [
'http://www.w3.org/ns/prov-bundle/classes',
'http://www.w3.org/ns/prov-bundle/properties',
Expand Down
Binary file added diagrams/Prov-Dictionary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added diagrams/Provenance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 99f3fcf

Please sign in to comment.