Skip to content

Commit

Permalink
Merge pull request #39 from BFO-Mappings/release/v2025-01-19
Browse files Browse the repository at this point in the history
Release v2025-01-19
  • Loading branch information
tmprd authored Jan 19, 2025
2 parents a7b7bbd + 413a17a commit 067e886
Show file tree
Hide file tree
Showing 20 changed files with 2,957 additions and 342 deletions.
5 changes: 5 additions & 0 deletions catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri name="https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/refs/tags/v2025-01-19/prov-bfo-directmappings.ttl" uri="prov-bfo-directmappings.ttl"/>
<group id="Folder Repository, directory=, recursive=true, Auto-Update=false, version=2" prefer="public" xml:base=""/>
</catalog>
26 changes: 18 additions & 8 deletions prov-bfo-directmappings.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
<https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/main/prov-bfo-directmappings.ttl>
a owl:Ontology;
rdfs:label "Basic Formal Ontology (BFO) ISO 21838-2:2020 mappings for W3C PROVenance Interchange Ontology (PROV-O)"@en ;
owl:versionIRI <https://github.com/BFO-Mappings/PROV-to-BFO/releases/tag/v2024-11-23> ;
owl:versionIRI <https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/refs/tags/v2025-01-19/prov-bfo-directmappings.ttl> ;
dc:contributor "Tim Prudhomme", "Giacomo De Colle" , "Austin Liebers" , "Alec Sculley" , "Peihong Karl Xie", "Sydney Cohen", "John Beverley" ;
dc:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
prov:wasDerivedFrom <http://www.w3.org/ns/prov> ,
<https://github.com/bfo-ontology/bfo-2020> ;
rdfs:seeAlso <https://basic-formal-ontology.org/> ,
prov:wasDerivedFrom <https://www.w3.org/ns/prov-o-20130430> ,
<https://raw.githubusercontent.com/BFO-ontology/BFO-2020/release-2024-01-29/src/owl/bfo-core.ttl> ;
rdfs:seeAlso <https://www.w3.org/TR/prov-o/>,
<https://basic-formal-ontology.org/> ,
<https://github.com/BFO-Mappings/PROV-to-BFO> ;
.

Expand Down Expand Up @@ -104,6 +105,15 @@ prov:InstantaneousEvent rdf:type owl:Class .
rdfs:comment "A prov:InstantaneousEvent is equivalent to a process boundary because it is referred to as the boundary (start or end) of a prov:Activity as an occurrent."@en .


prov:Bundle rdf:type owl:Class .
[] rdf:type owl:Axiom ;
owl:annotatedSource prov:Bundle ;
owl:annotatedProperty rdfs:subClassOf ;
owl:annotatedTarget obo:BFO_0000031 ;
sssom:object_label "generically dependent continuant" ;
rdfs:comment "A prov:Bundle exists in virtue of the fact that there is at least one of what may be multiple copies; it is the content or the pattern that the multiple copies share."@en .


prov:Plan rdf:type owl:Class .
[] rdf:type owl:Axiom ;
owl:annotatedSource prov:Plan ;
Expand Down Expand Up @@ -167,11 +177,11 @@ prov:DictionaryInvolvement rdf:type owl:Class .


# PROV object property mappings
prov:hadMember rdf:type owl:ObjectProperty . obo:BFO_00000178 rdf:type owl:ObjectProperty .
prov:hadMember rdf:type owl:ObjectProperty . obo:BFO_0000178 rdf:type owl:ObjectProperty .
[] rdf:type owl:Axiom ;
owl:annotatedSource prov:hadMember ;
owl:annotatedProperty rdfs:subPropertyOf ;
owl:annotatedTarget obo:BFO_00000178 ;
owl:annotatedTarget obo:BFO_0000178 ;
sssom:object_label "has continuant part" ;
rdfs:comment "A prov:Collection that has member some prov:Entity also has it as a continuant part."@en .

Expand Down Expand Up @@ -294,11 +304,11 @@ prov:hadUsage rdf:type owl:ObjectProperty . obo:BFO_0000121 rdf:type owl:ObjectP


# PROV-Dictionary object property mappings
prov:hadDictionaryMember rdf:type owl:ObjectProperty . obo:BFO_00000178 rdf:type owl:ObjectProperty .
prov:hadDictionaryMember rdf:type owl:ObjectProperty . obo:BFO_0000178 rdf:type owl:ObjectProperty .
[] rdf:type owl:Axiom ;
owl:annotatedSource prov:hadDictionaryMember ;
owl:annotatedProperty rdfs:subPropertyOf ;
owl:annotatedTarget obo:BFO_00000178 ;
owl:annotatedTarget obo:BFO_0000178 ;
sssom:object_label "has continuant part (at some time)" ;
rdfs:comment "A prov:Dictionary has a prov:Key-Entity Pair as a member, then it has it as a continuant part."@en .

Expand Down
34 changes: 23 additions & 11 deletions prov-cco-directmappings.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
<https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/main/prov-cco-directmappings.ttl>
a owl:Ontology;
rdfs:label "Common Core Ontologies (CCO) mappings for W3C PROVenance Interchange Ontology (PROV-O)"@en ;
owl:versionIRI <https://github.com/BFO-Mappings/PROV-to-BFO/releases/tag/v2024-11-23> ;
owl:imports <https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/main/prov-bfo-directmappings.ttl> ;
rdfs:comment "This mapping depends on the imported PROV-O to BFO mapping" ;
owl:versionIRI <https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/refs/tags/v2025-01-19/prov-cco-directmappings.ttl> ;
dc:contributor "Tim Prudhomme", "Giacomo De Colle" , "Austin Liebers" , "Alec Sculley" , "Peihong Karl Xie", "Sydney Cohen", "John Beverley" ;
dc:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
prov:wasDerivedFrom <http://www.w3.org/ns/prov> ,
<https://github.com/CommonCoreOntology/CommonCoreOntologies> ;
rdfs:seeAlso <https://basic-formal-ontology.org/> ,
prov:wasDerivedFrom <https://www.w3.org/ns/prov-o-20130430> ,
<https://raw.githubusercontent.com/BFO-ontology/BFO-2020/release-2024-01-29/src/owl/bfo-core.ttl> ,
<https://raw.githubusercontent.com/CommonCoreOntology/CommonCoreOntologies/refs/tags/v2.0-2024-11-06/src/cco-merged/CommonCoreOntologiesMerged.ttl> ;
rdfs:comment "This mapping depends on the imported PROV-O to BFO mapping" ;
owl:imports <https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/refs/tags/v2025-01-19/prov-bfo-directmappings.ttl> ;
rdfs:seeAlso <https://www.w3.org/TR/prov-o/>,
<https://basic-formal-ontology.org/> ,
<https://github.com/CommonCoreOntology/CommonCoreOntologies> ,
<https://github.com/BFO-Mappings/PROV-to-BFO> ;
.

Expand Down Expand Up @@ -48,7 +51,7 @@ prov:Person rdf:type owl:Class .
owl:annotatedTarget [ owl:intersectionOf ( cco:ont00001262
prov:Agent)] ;
sssom:object_label "Person" ;
rdfs:comment "Every prov:Person is both a prov:Agent and a cco:ont00001262. However, not every cco:ont00001262 is a prov:Agent or cco:ont00001017. So, prov:Person and cco:ont00001262 are not coextensive."@en .
rdfs:comment "Every prov:Person is both a prov:Agent and a CCO Person. However, not every CCO Person is a prov:Agent or CCO Agent. So, prov:Person and CCO Person are not coextensive."@en .


prov:Organization rdf:type owl:Class .
Expand All @@ -58,16 +61,25 @@ prov:Organization rdf:type owl:Class .
owl:annotatedTarget [ owl:intersectionOf ( cco:ont00001180
prov:Agent)] ;
sssom:object_label "Organization" ;
rdfs:comment "Every prov:Organization is both a prov:Agent and a cco:ont00001180. However, not every cco:ont00001180 is a prov:Agent or cco:ont00001017. So, prov:Organization and cco:ont00001180 are not coextensive."@en .
rdfs:comment "Every prov:Organization is both a prov:Agent and a CCO Organization. However, not every CCO Organization is a prov:Agent or CCO Agent. So, prov:Organization and CCO Organization are not coextensive."@en .


prov:Bundle rdf:type owl:Class .
[] rdf:type owl:Axiom ;
owl:annotatedSource prov:Bundle ;
owl:annotatedProperty rdfs:subClassOf ;
owl:annotatedTarget cco:ont00000958 ;
sssom:object_label "Information Content Entity" ;
rdfs:comment "A prov:Bundle is information content which is about entities."@en .


prov:Plan rdf:type owl:Class .
[] rdf:type owl:Axiom ;
owl:annotatedSource prov:Plan ;
owl:annotatedProperty rdfs:subClassOf ;
owl:annotatedTarget cco:ont00000958 ;
sssom:object_label "Information Content Entity" ;
rdfs:comment "Plans are information content which are about entities. prov:Plan is similar to cco:ont00000974, except that PROV explicitly does not constrain the type of information content that prov:Plans consist of."@en .
rdfs:comment "A prov:Plan is information content which is about entities. prov:Plan is similar to CCO Plan, except that PROV explicitly does not constrain the type of information content that PROV plans consist of."@en .


prov:Start rdf:type owl:Class .
Expand All @@ -76,7 +88,7 @@ prov:Start rdf:type owl:Class .
owl:annotatedProperty owl:equivalentClass ;
owl:annotatedTarget cco:ont00000197 ;
sssom:object_label "Process Beginning" ;
rdfs:comment "TODO add justification"@en .
rdfs:comment "PROV-O treats a PROV Start as an instantaneous event connected to a particular activity via the Qualification Property PROV qualifiedStart, subject to further restrictions by particular triggering entities, locations, time data, and so on. So, PROV Start can be matched to CCO process beginning. A process beginning is a process boundary occurring on the starting instant of the temporal period occupied by a process that is equivalent to PROV Activity"@en .


prov:End rdf:type owl:Class .
Expand All @@ -85,7 +97,7 @@ prov:End rdf:type owl:Class .
owl:annotatedProperty owl:equivalentClass ;
owl:annotatedTarget cco:ont00000083 ;
sssom:object_label "Process Ending" ;
rdfs:comment "TODO add justification"@en .
rdfs:comment "PROV-O treats a PROV End as an instantaneous event connected to a particular activity via the Qualification Property PROV qualifiedEnd, subject to further restrictions by particular triggering entities, locations, time data, and so on. So, PROV End can be matched to CCO process ending. A process ending is a process boundary occurring on the ending instant of the temporal period occupied by a process that is equivalent to PROV Activity"@en .


# PROV-Dictionary class mappings
Expand Down
15 changes: 9 additions & 6 deletions prov-ro-directmappings.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
<https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/main/prov-ro-directmappings.ttl>
a owl:Ontology;
rdfs:label "Relation Ontology (RO) mappings for W3C PROVenance Interchange Ontology (PROV-O)"@en ;
owl:versionIRI <https://github.com/BFO-Mappings/PROV-to-BFO/releases/tag/v2024-11-23> ;
owl:imports <https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/main/prov-bfo-directmappings.ttl> ;
rdfs:comment "This mapping depends on the imported PROV-O to BFO mapping." ;
owl:versionIRI <https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/refs/tags/v2025-01-19/prov-ro-directmappings.ttl> ;
dc:contributor "Tim Prudhomme", "Giacomo De Colle" , "Austin Liebers" , "Alec Sculley" , "Peihong Karl Xie", "Sydney Cohen", "John Beverley" ;
dc:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
prov:wasDerivedFrom <http://www.w3.org/ns/prov> ,
<https://obofoundry.org/ontology/ro.html> ;
rdfs:seeAlso <https://basic-formal-ontology.org/> ,
prov:wasDerivedFrom <https://www.w3.org/ns/prov-o-20130430> ,
<https://raw.githubusercontent.com/BFO-ontology/BFO-2020/release-2024-01-29/src/owl/bfo-core.ttl> ,
<https://raw.githubusercontent.com/oborel/obo-relations/refs/tags/v2024-04-24/ro.owl> ;
rdfs:comment "This mapping depends on the imported PROV-O to BFO mapping." ;
owl:imports <https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/refs/tags/v2025-01-19/prov-bfo-directmappings.ttl> ;
rdfs:seeAlso <https://www.w3.org/TR/prov-o/>,
<https://basic-formal-ontology.org/> ,
<https://obofoundry.org/ontology/ro.html> ,
<https://github.com/BFO-Mappings/PROV-to-BFO> ;
.

Expand Down
46 changes: 28 additions & 18 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
# --------------------------------------------------------------------------------
#### Configuration / details about our project
# Project essentials
config.ONTOLOGY_FILE := prov-mappings-edit.ttl
config.ONTOLOGY_PREFIX := prov-bfo-directmappings
config.ONTOLOGY-IRI := https://github.com/BFO-Mappings/PROV-to-BFO
config.BASE_IRI := $(config.ONTOLOGY-IRI)_
config.DEV_IRI := $(config.ONTOLOGY-IRI)/dev
config.MODULES_IRI := $(config.DEV_IRI)/modules
config.ONTOLOGY_FILE := prov-mappings-edit.ttl
config.ONTOLOGY_PREFIX := prov-bfo-directmappings
config.ONTOLOGY_IRI := https://raw.githubusercontent.com/BFO-Mappings/PROV-to-BFO/main
config.BASE_IRI := $(config.ONTOLOGY_IRI)_
config.DEV_IRI := $(config.ONTOLOGY_IRI)/dev
config.MODULES_IRI := $(config.DEV_IRI)/modules
config.ALIGNMENT_FILES := prov-bfo-directmappings.ttl prov-ro-directmappings.ttl prov-cco-directmappings.ttl

# Local project directories
config.SOURCE_DIR := /
Expand Down Expand Up @@ -51,9 +52,10 @@ REQUIRED_DIRS = $(config.TEMP_DIR) $(config.LIBRARY_DIR) $(config.SOURCE_DIR) $(

# --------------------------------------------------------------------------------
#### Custom targets
MAPPINGS_FILE := prov-bfo-mappings.sssom.csv # csv for importing into google sheets
mappings:
$(ROBOT) query --input $(EDITOR_BUILD_FILE) -q $(config.QUERIES_DIR)/get-mappings.rq $(MAPPINGS_FILE) --use-graphs true
SSSOM_FILE := $(config.TEMP_DIR)/prov-bfo-mappings.sssom.csv # csv for importing into google sheets
SSSOM:
$(ROBOT) relax --input $(EDITOR_BUILD_FILE) --include-subclass-of true \
query -q $(config.QUERIES_DIR)/SSSOM-mappings.rq $(SSSOM_FILE) --use-graphs true

candidates:
$(ROBOT) query --input $(EDITOR_BUILD_FILE) -q $(config.QUERIES_DIR)/candidate-superproperties.rq $(config.TEMP_DIR)/candidate-superproperties.tsv --use-graphs true ;
Expand All @@ -65,25 +67,33 @@ candidates-complex:
# Axioms to materialize in reasoning
AXIOM_GENERATORS = "SubClass EquivalentClass SubObjectProperty EquivalentObjectProperty InverseObjectProperties"

# Check for unmapped terms after materializing inferred mappings (after removing individuals)
# Check for unmapped terms after materializing entailed mappings (after removing individuals)
unmapped:
$(ROBOT) remove --input $(EDITOR_BUILD_FILE) --select individuals \
reason --reasoner HermiT --axiom-generators "SubClass SubObjectProperty InverseObjectProperties" --include-indirect true \
query --output-dir $(config.TEMP_DIR) --queries $(config.QUERIES_DIR)/unmapped-terms.rq --use-graph true

# Materialize all mappings as a list
inferred-mappings:
# Materialize all entailed mappings
# TODO: Make ROBOT filter SWRL rules
ENTAILED_MAPPINGS_FILENAME = $(config.ONTOLOGY_IRI)/$(config.TEMP_DIR)/all-entailed-mappings
entailed-mappings:
$(ROBOT) remove --input $(EDITOR_BUILD_FILE) --select individuals \
reason --reasoner HermiT --axiom-generators $(AXIOM_GENERATORS) --include-indirect true \
query --output-dir $(config.TEMP_DIR) --queries $(config.QUERIES_DIR)/inferred-mappings.rq --use-graph true
reason --reasoner HermiT --axiom-generators $(AXIOM_GENERATORS) --include-indirect true --remove-redundant-subclass-axioms false --exclude-duplicate-axioms true \
merge --catalog catalog-v001.xml --collapse-import-closure false --input "../prov-bfo-directmappings.ttl" --input "../prov-cco-directmappings.ttl" --input "../prov-ro-directmappings.ttl" \
remove --axioms external --base-iri http://www.w3.org/ns/prov# --base-iri http://www.w3.org/2003/11/swrl# --base-iri http://swrl.stanford.edu/ontologies/3.3/swrla.owl# --select "imports ontology" --trim false \
annotate --ontology-iri $(ENTAILED_MAPPINGS_FILENAME).ttl --version-iri $(ENTAILED_MAPPINGS_FILENAME).ttl --annotation owl:versionInfo $(TODAY) \
--annotation rdfs:comment "This file was generated using ROBOT and the HermiT reasoner from the PROV-BFO alignments" \
--annotation rdfs:comment "Note that this does not include SWRL rules but may in future versions." \
--annotation prov:wasDerivedFrom $(config.ONTOLOGY_IRI)/src/prov-mappings-edit.ttl \
--output $(config.TEMP_DIR)/all-entailed-mappings.ttl

# Materialize old and new entailments, then compare the differences. This doesn't include disjoint axioms.
deductive-diff:
$(ROBOT) remove --input $(EDITOR_BUILD_FILE) --select individuals \
reason --reasoner HermiT --axiom-generators $(AXIOM_GENERATORS) --include-indirect true \
reason --reasoner HermiT --axiom-generators $(AXIOM_GENERATORS) --include-indirect true --equivalent-classes-allowed all \
query --query $(config.CONSTRUCT_QUERIES_DIR)/prov-triples.rq $(config.TEMP_DIR)/new-prov-triples.ttl --use-graph true

$(ROBOT) reason --input $(config.IMPORTS_DIR)/PROV/prov-ontologies.ttl --reasoner HermiT --axiom-generators $(AXIOM_GENERATORS) --include-indirect true \
$(ROBOT) reason --input $(config.IMPORTS_DIR)/PROV/prov-ontologies.ttl --reasoner HermiT --axiom-generators $(AXIOM_GENERATORS) --include-indirect true --equivalent-classes-allowed all \
query --query $(config.CONSTRUCT_QUERIES_DIR)/prov-triples.rq $(config.TEMP_DIR)/old-prov-triples.ttl --use-graph true
$(ROBOT) diff --left $(config.TEMP_DIR)/old-prov-triples.ttl --right $(config.TEMP_DIR)/new-prov-triples.ttl --output $(config.TEMP_DIR)/deductive-diff.txt

Expand Down Expand Up @@ -180,8 +190,8 @@ $(RELEASE_BUILD_FILE): $(EDITOR_BUILD_FILE)

# Function (aka "canned recipe") using parameters to build arguments for `annnotate`
define annotation-inputs
--ontology-iri "$(config.ONTOLOGY-IRI)/$1" \
--version-iri "$(config.ONTOLOGY-IRI)/$(TODAY)/$1" \
--ontology-iri "$(config.ONTOLOGY_IRI)/$1" \
--version-iri "$(config.ONTOLOGY_IRI)/$(TODAY)/$1" \
--annotation owl:versionInfo "$(TODAY)" \
--output $2
endef
Expand Down
Loading

0 comments on commit 067e886

Please sign in to comment.