From 2af4551737196f6cb990eb634b525e6a7e93d78a Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 9 Apr 2026 19:36:16 -0400 Subject: [PATCH 01/15] Add and test top-level class uco-core:UcoType to anchor metaclass hierarchy A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 20 +++++++++++++++++++- tests/examples/Makefile | 8 ++++++-- tests/examples/test_validation.py | 14 ++++++++++++++ tests/examples/uco_type_PASS.json | 29 +++++++++++++++++++++++++++++ tests/examples/uco_type_XFAIL.json | 17 +++++++++++++++++ tests/test_uco_monolithic.py | 6 +++--- 6 files changed, 88 insertions(+), 6 deletions(-) create mode 100644 tests/examples/uco_type_PASS.json create mode 100644 tests/examples/uco_type_XFAIL.json diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index b4f59e84..a9037148 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -487,7 +487,7 @@ core:UcoThing ; rdfs:subClassOf owl:Thing ; rdfs:label "UcoThing"@en ; - rdfs:comment "UcoThing is the top-level class within UCO."@en ; + rdfs:comment "UcoThing is the top-level class for individuals within UCO."@en ; rdfs:seeAlso core:UcoThing-identifier-regex-shape ; sh:sparql [ a sh:SPARQLConstraint ; @@ -533,6 +533,24 @@ core:UcoThing-identifier-regex-shape sh:targetClass core:UcoThing ; . +core:UcoType + a + owl:Class , + sh:NodeShape + ; + rdfs:subClassOf owl:Thing ; + rdfs:label "UcoType"@en ; + rdfs:comment "UcoThing is the top-level class for metaclasses within UCO. An instance of core:UcoType is also an instance of owl:Class, and is or specializes core:UcoThing."@en ; + sh:class owl:Class ; + sh:property [ + sh:hasValue core:UcoThing ; + sh:path [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + ] ; + sh:targetClass core:UcoType ; + . + core:confidence a owl:DatatypeProperty ; rdfs:label "confidence"@en ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 441fce4e..96526f8a 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -58,7 +58,9 @@ all: \ relationship_XFAIL_validation.ttl \ thread_PASS_validation.ttl \ thread_XFAIL_validation.ttl \ - uco_thing_XFAIL_validation.ttl + uco_thing_XFAIL_validation.ttl \ + uco_type_PASS_validation.ttl \ + uco_type_XFAIL_validation.ttl .PRECIOUS: \ %_validation.ttl @@ -136,7 +138,9 @@ check: \ relationship_XFAIL_validation.ttl \ thread_PASS_validation.ttl \ thread_XFAIL_validation.ttl \ - uco_thing_XFAIL_validation.ttl + uco_thing_XFAIL_validation.ttl \ + uco_type_PASS_validation.ttl \ + uco_type_XFAIL_validation.ttl source $(top_srcdir)/venv/bin/activate \ && pytest \ --log-level=DEBUG diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index b8f051e0..9273cef0 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -619,3 +619,17 @@ def uco_thing_XFAIL_validation() -> None: "uco_thing_XFAIL_validation.ttl", False, ) + +def uco_type_PASS_validation() -> None: + confirm_validation_results( + "uco_type_PASS_validation.ttl", + expected_focus_node_severities={ + "http://example.org/kb/Thing-1", str(NS_SH.Info) + } + ) + +def uco_type_XFAIL_validation() -> None: + confirm_validation_results( + "uco_type_XFAIL_validation.ttl", + False, + ) diff --git a/tests/examples/uco_type_PASS.json b/tests/examples/uco_type_PASS.json new file mode 100644 index 00000000..a6970b72 --- /dev/null +++ b/tests/examples/uco_type_PASS.json @@ -0,0 +1,29 @@ +{ + "@context": { + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "kb": "http://example.org/kb/", + "owl": "http://www.w3.org/2002/07/owl#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "@graph": [ + { + "@id": "kb:UcoType-1", + "@type": [ + "owl:Class", + "core:UcoType" + ], + "rdfs:subClassOf": { + "@id": "core:UcoThing" + } + }, + { + "@id": "kb:Thing-1", + "@type": "kb:UcoType-1", + "rdfs:comment": "Triggers Info-severity violation of IRI not ending with UUID." + }, + { + "@id": "kb:Thing-dec9123e-9e4a-4bd3-bd1a-d7a3834c7340", + "@type": "kb:UcoType-1" + } + ] +} diff --git a/tests/examples/uco_type_XFAIL.json b/tests/examples/uco_type_XFAIL.json new file mode 100644 index 00000000..a887d901 --- /dev/null +++ b/tests/examples/uco_type_XFAIL.json @@ -0,0 +1,17 @@ +{ + "@context": { + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "@graph": [ + { + "@id": "kb:UcoType-0", + "@type": "core:UcoType", + "rdfs:comment": [ + "Triggers violation from not instantiating owl:Class.", + "Triggers violation from not subclassing UcoThing." + ] + } + ] +} diff --git a/tests/test_uco_monolithic.py b/tests/test_uco_monolithic.py index 3503a35e..4795499d 100644 --- a/tests/test_uco_monolithic.py +++ b/tests/test_uco_monolithic.py @@ -271,11 +271,11 @@ def test_semi_open_vocabulary_owl_shacl_alignment(graph: Graph) -> None: raise -def test_only_one_uco_class_is_owl_thing_direct_subclass(graph: Graph) -> None: +def test_only_two_uco_classes_are_owl_thing_direct_subclass(graph: Graph) -> None: """ - UCO expects all classes defined in UCO namespaces (i.e. excluding the "import review" ontologies) are subclasses of core:UcoThing. Within OWL, absence of an rdfs:subClassOf statement implies being a subclass of owl:Thing. Review UCO for any accidental omission of rdfs:subClassOf. + UCO expects all classes defined in UCO namespaces (i.e. excluding the "import review" ontologies) are subclasses of core:UcoThing or core:UcoType. Within OWL, absence of an rdfs:subClassOf statement implies being a subclass of owl:Thing. Review UCO for any accidental omission of rdfs:subClassOf. """ - expected: Set[URIRef] = {NS_UCO_CORE.UcoThing} + expected: Set[URIRef] = {NS_UCO_CORE.UcoThing, NS_UCO_CORE.UcoType} computed: Set[URIRef] = set() # Create temporary graph where subClassOf statements for non-UCO classes are removed. From 2cd9bc103a87f0e1e380711f099b66c069bfddbf Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 9 Apr 2026 19:38:01 -0400 Subject: [PATCH 02/15] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- tests/examples/uco_type_PASS_validation.ttl | 41 ++++++++++++++++++++ tests/examples/uco_type_XFAIL_validation.ttl | 39 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 tests/examples/uco_type_PASS_validation.ttl create mode 100644 tests/examples/uco_type_XFAIL_validation.ttl diff --git a/tests/examples/uco_type_PASS_validation.ttl b/tests/examples/uco_type_PASS_validation.ttl new file mode 100644 index 00000000..66d5c3d2 --- /dev/null +++ b/tests/examples/uco_type_PASS_validation.ttl @@ -0,0 +1,41 @@ +@prefix core: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + sh:result [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "UcoThings are suggested to end with a UUID." ; + sh:resultSeverity sh:Info ; + sh:sourceConstraint [ + a sh:SPARQLConstraint ; + rdfs:seeAlso ; + sh:message "UcoThings are suggested to end with a UUID."@en ; + sh:select ''' + PREFIX rdfs: + PREFIX core: + SELECT $this + WHERE { + $this a/rdfs:subClassOf* core:UcoThing . + FILTER ( + ! REGEX ( + STR($this), + "[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$", + "i" + ) + ) + } + ''' ; + ] ; + sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; + sh:sourceShape core:UcoThing-identifier-regex-shape ; + sh:value ; + ] ; + . + diff --git a/tests/examples/uco_type_XFAIL_validation.ttl b/tests/examples/uco_type_XFAIL_validation.ttl new file mode 100644 index 00000000..9beef22d --- /dev/null +++ b/tests/examples/uco_type_XFAIL_validation.ttl @@ -0,0 +1,39 @@ +@prefix core: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node kb:UcoType-0->[ sh:zeroOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['core:UcoThing']" ; + sh:resultPath [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + sh:hasValue core:UcoThing ; + sh:path [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class owl:Class" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape core:UcoType ; + sh:value ; + ] + ; + . + From 96190a7c8764a64c22c242a33d7b8c00555ddf91 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 9 Apr 2026 20:19:41 -0400 Subject: [PATCH 03/15] Add and test uco-action:Technique as metaclass A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- ontology/uco/action/action.ttl | 18 +++ tests/examples/Makefile | 27 +++- tests/examples/technique/.gitignore | 1 + tests/examples/technique/Makefile | 136 ++++++++++++++++ tests/examples/technique/README.md | 22 +++ .../technique/technique_data_PASS.json | 53 +++++++ .../technique/technique_data_XFAIL.json | 33 ++++ .../technique/technique_ontology_PASS.ttl | 150 ++++++++++++++++++ .../technique/technique_ontology_XFAIL.ttl | 103 ++++++++++++ .../technique/technique_shapes_PASS.ttl | 59 +++++++ tests/examples/uco_type_XFAIL.json | 13 ++ 11 files changed, 614 insertions(+), 1 deletion(-) create mode 100644 tests/examples/technique/.gitignore create mode 100644 tests/examples/technique/Makefile create mode 100644 tests/examples/technique/README.md create mode 100644 tests/examples/technique/technique_data_PASS.json create mode 100644 tests/examples/technique/technique_data_XFAIL.json create mode 100644 tests/examples/technique/technique_ontology_PASS.ttl create mode 100644 tests/examples/technique/technique_ontology_XFAIL.ttl create mode 100644 tests/examples/technique/technique_shapes_PASS.ttl diff --git a/ontology/uco/action/action.ttl b/ontology/uco/action/action.ttl index 80b67a3d..9cb50b29 100644 --- a/ontology/uco/action/action.ttl +++ b/ontology/uco/action/action.ttl @@ -350,6 +350,24 @@ action:ArrayOfAction sh:targetClass action:ArrayOfAction ; . +action:Technique + a + owl:Class , + sh:NodeShape + ; + rdfs:subClassOf core:UcoType ; + rdfs:label "Technique"@en ; + rdfs:comment "A technique is a class of actions joined by some common characteristics."@en ; + sh:property [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] ; + sh:targetClass action:Technique ; + . + action:action a owl:ObjectProperty ; rdfs:label "action"@en ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 96526f8a..a7cb2823 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -24,6 +24,7 @@ all: \ action_inheritance_PASS_validation.ttl \ action_inheritance_XFAIL_validation.ttl \ action_result_PASS_validation.ttl \ + all-technique \ alternate_data_stream_PASS_validation.ttl \ co_PASS_validation.ttl \ co_XFAIL_validation.ttl \ @@ -62,6 +63,11 @@ all: \ uco_type_PASS_validation.ttl \ uco_type_XFAIL_validation.ttl +.PHONY: \ + all-technique \ + check-technique \ + clean-technique + .PRECIOUS: \ %_validation.ttl @@ -100,11 +106,18 @@ all: \ rm __$@ mv _$@ $@ +all-technique: \ + $(top_srcdir)/.venv.done.log \ + $(tests_srcdir)/uco_monolithic.ttl + $(MAKE) \ + --directory technique + check: \ action_inheritance_PASS_validation.ttl \ action_inheritance_XFAIL_validation.ttl \ action_result_PASS_validation.ttl \ alternate_data_stream_PASS_validation.ttl \ + check-technique \ co_PASS_validation.ttl \ co_XFAIL_validation.ttl \ configuration_setting_PASS_validation.ttl \ @@ -145,6 +158,18 @@ check: \ && pytest \ --log-level=DEBUG -clean: +check-technique: \ + all-technique + $(MAKE) \ + --directory technique \ + check + +clean: \ + clean-technique @rm -f \ *_validation.ttl + +clean-technique: + @$(MAKE) \ + --directory technique \ + clean diff --git a/tests/examples/technique/.gitignore b/tests/examples/technique/.gitignore new file mode 100644 index 00000000..c8dd22b3 --- /dev/null +++ b/tests/examples/technique/.gitignore @@ -0,0 +1 @@ +generated-* diff --git a/tests/examples/technique/Makefile b/tests/examples/technique/Makefile new file mode 100644 index 00000000..9f4a4458 --- /dev/null +++ b/tests/examples/technique/Makefile @@ -0,0 +1,136 @@ +#!/usr/bin/make -f + +# Portions of this file contributed by NIST are governed by the +# following statement: +# +# This software was developed at the National Institute of Standards +# and Technology by employees of the Federal Government in the course +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. +# +# We would appreciate acknowledgement if the software is used. + +SHELL := /bin/bash + +top_srcdir := $(shell cd ../../.. ; pwd) + +all: \ + check + +check: \ + technique_ontology_XFAIL_validation.ttl \ + technique_data_PASS_validation.ttl \ + technique_data_XFAIL_validation.ttl + +clean: + @rm -f \ + _* \ + generated-* + +generated-shapes.ttl: \ + $(top_srcdir)/.venv.done.log \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + $(top_srcdir)/tests/thing.ttl \ + technique_shapes_PASS.ttl + source $(top_srcdir)/venv/bin/activate \ + && rdfpipe \ + --output-format turtle \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + technique_shapes_PASS.ttl \ + > _$@ + source $(top_srcdir)/venv/bin/activate \ + && pyshacl \ + --format turtle \ + --metashacl \ + --shacl _$@ \ + $(top_srcdir)/tests/thing.ttl + mv _$@ $@ + +generated-tbox.ttl: \ + $(top_srcdir)/.venv.done.log \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + generated-shapes.ttl \ + technique_ontology_PASS.ttl + source $(top_srcdir)/venv/bin/activate \ + && rdfpipe \ + --output-format turtle \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + technique_ontology_PASS.ttl \ + > _$@ + source $(top_srcdir)/venv/bin/activate \ + && pyshacl \ + --format turtle \ + --shacl generated-shapes.ttl \ + _$@ + mv _$@ $@ + +technique_data_PASS_validation.ttl: \ + generated-tbox.ttl \ + technique_data_PASS.json + source $(top_srcdir)/venv/bin/activate \ + && pyshacl \ + --format turtle \ + --ont-graph generated-tbox.ttl \ + --output __$@ \ + --shacl generated-shapes.ttl \ + technique_data_PASS.json + java -jar $(top_srcdir)/lib/rdf-toolkit.jar \ + --inline-blank-nodes \ + --source __$@ \ + --source-format turtle \ + --target _$@ \ + --target-format turtle + rm __$@ + mv _$@ $@ + +technique_data_XFAIL_validation.ttl: \ + generated-tbox.ttl \ + technique_data_XFAIL.json + source $(top_srcdir)/venv/bin/activate \ + && pyshacl \ + --format turtle \ + --ont-graph generated-tbox.ttl \ + --output __$@ \ + --shacl generated-shapes.ttl \ + technique_data_XFAIL.json \ + ; test 1 -eq $$? + java -jar $(top_srcdir)/lib/rdf-toolkit.jar \ + --inline-blank-nodes \ + --source __$@ \ + --source-format turtle \ + --target _$@ \ + --target-format turtle + rm __$@ + mv _$@ $@ + +technique_ontology_XFAIL_validation.ttl: \ + $(top_srcdir)/.venv.done.log \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + generated-shapes.ttl \ + technique_ontology_XFAIL.ttl + source $(top_srcdir)/venv/bin/activate \ + && rdfpipe \ + --output-format turtle \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + technique_ontology_XFAIL.ttl \ + > _$@ + source $(top_srcdir)/venv/bin/activate \ + && pyshacl \ + --format turtle \ + --output __$@ \ + --shacl generated-shapes.ttl \ + _$@ \ + ; test 1 -eq $$? + rm _$@ + java -jar $(top_srcdir)/lib/rdf-toolkit.jar \ + --inline-blank-nodes \ + --source __$@ \ + --source-format turtle \ + --target _$@ \ + --target-format turtle + rm __$@ + mv _$@ $@ diff --git a/tests/examples/technique/README.md b/tests/examples/technique/README.md new file mode 100644 index 00000000..941377e5 --- /dev/null +++ b/tests/examples/technique/README.md @@ -0,0 +1,22 @@ +# Tests of Technique metaclass + +The test matrix for PASS conditions is as follows: + +* `uco-action:Technique` is: + + - Not specialized (see `ex0:Technique-A`) + - Specialized (see `ex1:Technique`, `ex2:StandardOperatingProcedure`) + +* Each of the above degrees of `Technique` specialization is instantiated with some `Action` subclass. + + - No specialization (see `ex0:Technique-A`) + - One level of specialization (see `ex1:Technique-T0001`, `ex2:SOP-0001`) + - Two levels of specialization, using the same Technique-subclass (see `ex1:T0002`) + - Two levels of specialization, using different Technique-subclasses (see `ex2:SOP-0099`) + +* Each of the above instantiations by some degree of `Technique` specialization is instantiated. + + - No specialization (see `kb:Action-a34208f4-31ea-4d78-95c9-153a73fbb628`) + - One level of specialization (see `kb:Action-c44d57af-a6c3-4350-b08b-0dac5f3b7aca`) + - Two levels of specialization, using the same Technique-subclass (see `kb:Action-8f84a98c-2ab5-454d-9c2f-443fe64b7158`) + - Two levels of specialization, using different Technique-subclasses (see `kb:Action-f6625d7d-978d-4562-83d7-23d9ac398073`) diff --git a/tests/examples/technique/technique_data_PASS.json b/tests/examples/technique/technique_data_PASS.json new file mode 100644 index 00000000..690405a7 --- /dev/null +++ b/tests/examples/technique/technique_data_PASS.json @@ -0,0 +1,53 @@ +{ + "@context": { + "ex0": "http://example/ontology/", + "ex1": "http://example.com/framework/", + "ex2": "http://example.org/operations/", + "kb": "http://example.org/kb/", + "owl": "http://www.w3.org/2002/07/owl#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "uco-action": "https://ontology.unifiedcyberontology.org/uco/action/" + }, + "@graph": [ + { + "@id": "kb:Action-8f84a98c-2ab5-454d-9c2f-443fe64b7158", + "@type": "ex1:Technique-T0002", + "uco-action:object": { + "@id": "kb:Device-765e3d23-ce91-459d-b5ec-6c60d37df842" + } + }, + { + "@id": "kb:Action-a34208f4-31ea-4d78-95c9-153a73fbb628", + "@type": "ex0:Technique-A" + }, + { + "@id": "kb:Action-c44d57af-a6c3-4350-b08b-0dac5f3b7aca", + "@type": "ex1:Technique-T0001", + "uco-action:object": { + "@id": "kb:Device-765e3d23-ce91-459d-b5ec-6c60d37df842" + } + }, + { + "@id": "kb:Action-dd609c02-176d-40ed-9858-ead8bdc47757", + "@type": "ex2:SOP-0001" + }, + { + "@id": "kb:Action-f6625d7d-978d-4562-83d7-23d9ac398073", + "@type": "ex2:SOP-0099", + "uco-action:instrument": { + "@id": "kb:Device-e79fb51b-6c45-4e70-9e79-9f600509ca6c" + }, + "uco-action:object": { + "@id": "kb:Device-765e3d23-ce91-459d-b5ec-6c60d37df842" + } + }, + { + "@id": "kb:Device-765e3d23-ce91-459d-b5ec-6c60d37df842", + "@type": "ex1:YDevice" + }, + { + "@id": "kb:Device-e79fb51b-6c45-4e70-9e79-9f600509ca6c", + "@type": "ex2:ZDevice" + } + ] +} diff --git a/tests/examples/technique/technique_data_XFAIL.json b/tests/examples/technique/technique_data_XFAIL.json new file mode 100644 index 00000000..f6cbb121 --- /dev/null +++ b/tests/examples/technique/technique_data_XFAIL.json @@ -0,0 +1,33 @@ +{ + "@context": { + "ex0": "http://example/ontology/", + "ex1": "http://example.com/framework/", + "ex2": "http://example.org/operations/", + "kb": "http://example.org/kb/", + "owl": "http://www.w3.org/2002/07/owl#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "uco-action": "https://ontology.unifiedcyberontology.org/uco/action/" + }, + "@graph": [ + { + "@id": "kb:Action-8f84a98c-2ab5-454d-9c2f-443fe64b7158", + "@type": "ex1:Technique-T0002" + }, + { + "@id": "kb:Action-c44d57af-a6c3-4350-b08b-0dac5f3b7aca", + "@type": "ex1:Technique-T0001" + }, + { + "@id": "kb:Action-f6625d7d-978d-4562-83d7-23d9ac398073", + "@type": "ex2:SOP-0099" + }, + { + "@id": "kb:Device-765e3d23-ce91-459d-b5ec-6c60d37df842", + "@type": "ex1:YDevice" + }, + { + "@id": "kb:Device-e79fb51b-6c45-4e70-9e79-9f600509ca6c", + "@type": "ex2:ZDevice" + } + ] +} diff --git a/tests/examples/technique/technique_ontology_PASS.ttl b/tests/examples/technique/technique_ontology_PASS.ttl new file mode 100644 index 00000000..4c6ff99c --- /dev/null +++ b/tests/examples/technique/technique_ontology_PASS.ttl @@ -0,0 +1,150 @@ +@prefix ex0: . +@prefix ex1: . +@prefix ex2: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix uco-action: . +@prefix uco-observable: . +@prefix xsd: . + +ex1:Technique + a owl:Class ; + rdfs:subClassOf + uco-action:Technique , + [ + a owl:Restriction ; + rdfs:comment + "(Technical demonstration: Instances of the metaclass can have a datatype property assigned.)"@en , + "This Restriction states, but does not enforce, that an Technique (as defined by Organization 1) has a technique ID. SHACL validation handles enforcement."@en + ; + owl:onProperty ex2:procedureID ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:comment + "(Technical demonstration: Technique is subclassed.)"@en , + "A Technique in Organization 1 is a member of Organization 1's Framework, indexed with a technique ID."@en + ; + . + +ex1:Technique-T0001 + a + ex1:Technique , + owl:Class + ; + rdfs:subClassOf + uco-action:Action , + [ + a owl:Restriction ; + rdfs:comment "This Restriction states, but does not enforce, that execution of this SOP involves some Y-Device as action-input. SHACL validation handles enforcement."@en ; + owl:onProperty uco-action:object ; + owl:someValuesFrom ex1:YDevice ; + ] + ; + rdfs:comment + "(Technical demonstration: Technique-subclass is instantiated.)"@en , + "A technique where X is done to a Y-device."@en + ; + ex1:techniqueID "T0001" ; + . + +ex1:Technique-T0002 + a + ex1:Technique , + owl:Class + ; + rdfs:subClassOf ex1:Technique-T0001 ; + rdfs:comment + "(Technical demonstration: Technique-subclass is instantiated, specializing another instance of the same Technique-subclass.)"@en , + "A technique where X is done more thoroughly to a Y-device."@en + ; + ex1:techniqueID "T0001" ; + . + +ex1:YDevice + a owl:Class ; + rdfs:subClassOf uco-observable:Device ; + . + +ex1:techniqueID + a owl:DatatypeProperty ; + rdfs:domain ex1:Technique ; + rdfs:range xsd:string ; + . + +ex2:SOP-0001 + a + ex2:StandardOperatingProcedure , + owl:Class + ; + rdfs:subClassOf uco-action:Action ; + rdfs:comment + "(Technical demonstration: A Technique-subclass instance that directly specializes uco-action:Action.)"@en , + "A procedure where logging is configured to store data in an instance of Example-L Logging Service."@en + ; + ex2:procedureID "SOP-0001" ; + . + +ex2:SOP-0099 + a + ex2:StandardOperatingProcedure , + owl:Class + ; + rdfs:subClassOf + ex1:Technique-T0001 , + [ + a owl:Restriction ; + rdfs:comment "This Restriction states, but does not enforce, that execution of this SOP involves some Z-Device as action-instrument. SHACL validation handles enforcement."@en ; + owl:onProperty uco-action:instrument ; + owl:someValuesFrom ex2:ZDevice ; + ] + ; + rdfs:comment + "(Technical demonstration: Technique-subclass is instantiated, specializing an instance of a different Technique-subclass. Note that the class ex2:SOP-0099 is not required to be assigned a ex1:techniqueID, nor to be typed as a ex1:Technique or uco-action:Technique.)"@en , + "A procedure where X is done to a Y-device using a Z-device."@en + ; + ex2:procedureID "SOP-0099" ; + . + +ex2:StandardOperatingProcedure + a owl:Class ; + rdfs:subClassOf + uco-action:Technique , + [ + a owl:Restriction ; + rdfs:comment + "(Technical demonstration: Instances of the metaclass can have a datatype property assigned.)"@en , + "This Restriction states, but does not enforce, that an SOP has a procedureID. SHACL validation handles enforcement."@en + ; + owl:onProperty ex2:procedureID ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:comment + "(Technical demonstration: Technique is subclassed, again.)"@en , + "A Standard Operating Procedure in Organization 2 is a Technique in Organization 2's operations manual, indexed with a procedure ID."@en + ; + . + +ex2:ZDevice + a owl:Class ; + rdfs:subClassOf uco-observable:Device ; + . + +ex2:procedureID + a owl:DatatypeProperty ; + rdfs:comment "(Technical demonstration: Assignment of a Technique identifier is done with an OWL datatype Property.)"@en ; + rdfs:domain ex2:StandardOperatingProcedure ; + rdfs:range xsd:string ; + . + +ex0:Technique-A + a + owl:Class , + uco-action:Technique + ; + rdfs:subClassOf uco-action:Action ; + rdfs:comment "(Technical demonstration: Technique is instantiated.)"@en ; + . + diff --git a/tests/examples/technique/technique_ontology_XFAIL.ttl b/tests/examples/technique/technique_ontology_XFAIL.ttl new file mode 100644 index 00000000..2911a916 --- /dev/null +++ b/tests/examples/technique/technique_ontology_XFAIL.ttl @@ -0,0 +1,103 @@ +@prefix ex0: . +@prefix ex1: . +@prefix ex2: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix uco-action: . +@prefix uco-core: . +@prefix uco-observable: . +@prefix xsd: . + +ex1:Technique + a owl:Class ; + rdfs:subClassOf + uco-action:Technique , + [ + a owl:Restriction ; + owl:onProperty ex2:procedureID ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:comment "(No difference from ex1:Technique in PASS graph.)"@en ; + . + +ex1:Technique-T0003 + a + ex1:Technique , + owl:Class + ; + rdfs:subClassOf uco-action:Action ; + rdfs:comment "(Technical demonstration: Technique XFAILS due to techniqueID absence.)"@en ; + . + +ex1:techniqueID + a owl:DatatypeProperty ; + rdfs:comment "(No difference from ex1:techniqueID in PASS graph.)"@en ; + rdfs:domain ex1:Technique ; + rdfs:range xsd:string ; + . + +ex2:SOP-0033 + a + ex2:StandardOperatingProcedure , + owl:Class + ; + rdfs:subClassOf uco-action:Action ; + rdfs:comment "(Technical demonstration: Technique XFAILs due to procedureID absence."@en ; + ex2:procedureID "SOP-0001" ; + . + +ex2:SOP-0044 + a + ex2:StandardOperatingProcedure , + owl:Class + ; + rdfs:subClassOf ex1:Technique-T0003 ; + rdfs:comment "(Technical demonstration: Technique XFAILs due to procedureID absence. Subclassing a ex1:Technique has no influence."@en ; + ex2:procedureID "SOP-0001" ; + . + +ex2:StandardOperatingProcedure + a owl:Class ; + rdfs:subClassOf + uco-action:Technique , + [ + a owl:Restriction ; + owl:onProperty ex2:procedureID ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:comment "(No difference from ex2:StandardOperatingProcedure in PASS graph.)"@en ; + . + +ex2:procedureID + a owl:DatatypeProperty ; + rdfs:comment + "(No difference from ex2:procedureID in PASS graph.)"@en , + "(Technical demonstration: Assignment of a Technique identifier is done with an OWL datatype Property.)"@en + ; + rdfs:domain ex2:StandardOperatingProcedure ; + rdfs:range xsd:string ; + . + +ex0:Technique-B + a + owl:Class , + uco-action:Technique + ; + rdfs:comment + "(Technical demonstration: Technique XFAILs due to not specializing uco-action:Action.)"@en , + "(Technical demonstration: Technique XFAILs due to not specializing uco-core:UcoThing.)"@en + ; + . + +ex0:Technique-C + a + owl:Class , + uco-action:Technique + ; + rdfs:subClassOf uco-core:UcoObject ; + rdfs:comment "(Technical demonstration: Technique XFAILs due to not specializing uco-action:Action.)"@en ; + . + diff --git a/tests/examples/technique/technique_shapes_PASS.ttl b/tests/examples/technique/technique_shapes_PASS.ttl new file mode 100644 index 00000000..f66ac339 --- /dev/null +++ b/tests/examples/technique/technique_shapes_PASS.ttl @@ -0,0 +1,59 @@ +@prefix ex1: . +@prefix ex2: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sh-ex1: . +@prefix sh-ex2: . +@prefix uco-action: . +@prefix xsd: . + +sh-ex1:Technique-T0001-shape + a sh:NodeShape ; + sh:property [ + rdfs:comment "This property shape enforces that execution of this Technique involves some Y-device as action-input."@en ; + sh:path uco-action:object ; + sh:qualifiedMinCount "1"^^xsd:integer ; + sh:qualifiedValueShape [ + sh:class ex1:YDevice ; + ] ; + ] ; + sh:targetClass ex1:Technique-T0001 ; + . + +sh-ex1:Technique-shape + a sh:NodeShape ; + sh:property [ + rdfs:comment "This property shape enforces that an instance of an Organization 1 Technique has techniqueID assigned. (Recall that an instance of ex1:Technique is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex1:techniqueID ; + ] ; + sh:targetClass ex1:Technique ; + . + +sh-ex2:SOP-0099-shape + a sh:NodeShape ; + sh:property [ + rdfs:comment "This property shape enforces that execution of this SOP involves some Z-device as action-instrument."@en ; + sh:path uco-action:instrument ; + sh:qualifiedMinCount "1"^^xsd:integer ; + sh:qualifiedValueShape [ + sh:class ex2:ZDevice ; + ] ; + ] ; + sh:targetClass ex2:SOP-0099 ; + . + +sh-ex2:StandardOperatingProcedure-shape + a sh:NodeShape ; + sh:property [ + rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex2:procedureID ; + ] ; + sh:targetClass ex2:StandardOperatingProcedure ; + . + diff --git a/tests/examples/uco_type_XFAIL.json b/tests/examples/uco_type_XFAIL.json index a887d901..8a736f61 100644 --- a/tests/examples/uco_type_XFAIL.json +++ b/tests/examples/uco_type_XFAIL.json @@ -1,10 +1,23 @@ { "@context": { + "action": "https://ontology.unifiedcyberontology.org/uco/action/", "core": "https://ontology.unifiedcyberontology.org/uco/core/", "kb": "http://example.org/kb/", + "owl": "http://www.w3.org/2002/07/owl#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#" }, "@graph": [ + { + "@id": "kb:Technique-4b05a7c7-fbb2-4731-8a84-9abe8c108a35", + "@type": [ + "owl:Class", + "action:Technique" + ], + "rdfs:comment": [ + "Triggers violation from not subclassing UcoThing.", + "Triggers violation from not subclassing Action." + ] + }, { "@id": "kb:UcoType-0", "@type": "core:UcoType", From 5e5d745f5c2a70f9d7b3659ba5229f95e94d8593 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 9 Apr 2026 20:20:05 -0400 Subject: [PATCH 04/15] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- .../technique_data_PASS_validation.ttl | 11 +++ .../technique_data_XFAIL_validation.ttl | 80 +++++++++++++++++++ .../technique_ontology_XFAIL_validation.ttl | 80 +++++++++++++++++++ tests/examples/uco_type_XFAIL_validation.ttl | 34 ++++++++ 4 files changed, 205 insertions(+) create mode 100644 tests/examples/technique/technique_data_PASS_validation.ttl create mode 100644 tests/examples/technique/technique_data_XFAIL_validation.ttl create mode 100644 tests/examples/technique/technique_ontology_XFAIL_validation.ttl diff --git a/tests/examples/technique/technique_data_PASS_validation.ttl b/tests/examples/technique/technique_data_PASS_validation.ttl new file mode 100644 index 00000000..33496ff0 --- /dev/null +++ b/tests/examples/technique/technique_data_PASS_validation.ttl @@ -0,0 +1,11 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + . + diff --git a/tests/examples/technique/technique_data_XFAIL_validation.ttl b/tests/examples/technique/technique_data_XFAIL_validation.ttl new file mode 100644 index 00000000..3bef8ccc --- /dev/null +++ b/tests/examples/technique/technique_data_XFAIL_validation.ttl @@ -0,0 +1,80 @@ +@prefix ex1: . +@prefix ex2: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix uco-action: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Focus node does not conform to shape MinCount 1: [ sh:class ex1:YDevice ]" ; + sh:resultPath uco-action:object ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that execution of this Technique involves some Y-device as action-input."@en ; + sh:path uco-action:object ; + sh:qualifiedMinCount "1"^^xsd:integer ; + sh:qualifiedValueShape [ + sh:class ex1:YDevice ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Focus node does not conform to shape MinCount 1: [ sh:class ex1:YDevice ]" ; + sh:resultPath uco-action:object ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that execution of this Technique involves some Y-device as action-input."@en ; + sh:path uco-action:object ; + sh:qualifiedMinCount "1"^^xsd:integer ; + sh:qualifiedValueShape [ + sh:class ex1:YDevice ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Focus node does not conform to shape MinCount 1: [ sh:class ex1:YDevice ]" ; + sh:resultPath uco-action:object ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that execution of this Technique involves some Y-device as action-input."@en ; + sh:path uco-action:object ; + sh:qualifiedMinCount "1"^^xsd:integer ; + sh:qualifiedValueShape [ + sh:class ex1:YDevice ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Focus node does not conform to shape MinCount 1: [ sh:class ex2:ZDevice ]" ; + sh:resultPath uco-action:instrument ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that execution of this SOP involves some Z-device as action-instrument."@en ; + sh:path uco-action:instrument ; + sh:qualifiedMinCount "1"^^xsd:integer ; + sh:qualifiedValueShape [ + sh:class ex2:ZDevice ; + ] ; + ] ; + ] + ; + . + diff --git a/tests/examples/technique/technique_ontology_XFAIL_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_validation.ttl new file mode 100644 index 00000000..f474e429 --- /dev/null +++ b/tests/examples/technique/technique_ontology_XFAIL_validation.ttl @@ -0,0 +1,80 @@ +@prefix core: . +@prefix ex1: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix uco-action: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ex1:Technique-T0003 ; + sh:resultMessage "Less than 1 values on ex1:Technique-T0003->ex1:techniqueID" ; + sh:resultPath ex1:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 1 Technique has techniqueID assigned. (Recall that an instance of ex1:Technique is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex1:techniqueID ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-B->[ sh:oneOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['uco-action:Action']" ; + sh:resultPath [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue uco-action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-B->[ sh:zeroOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['core:UcoThing']" ; + sh:resultPath [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + sh:hasValue core:UcoThing ; + sh:path [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-C->[ sh:oneOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['uco-action:Action']" ; + sh:resultPath [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue uco-action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] + ; + . + diff --git a/tests/examples/uco_type_XFAIL_validation.ttl b/tests/examples/uco_type_XFAIL_validation.ttl index 9beef22d..14cbd64f 100644 --- a/tests/examples/uco_type_XFAIL_validation.ttl +++ b/tests/examples/uco_type_XFAIL_validation.ttl @@ -1,3 +1,4 @@ +@prefix action: . @prefix core: . @prefix owl: . @prefix rdf: . @@ -9,6 +10,39 @@ a sh:ValidationReport ; sh:conforms "false"^^xsd:boolean ; sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node kb:Technique-4b05a7c7-fbb2-4731-8a84-9abe8c108a35->[ sh:oneOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['action:Action']" ; + sh:resultPath [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node kb:Technique-4b05a7c7-fbb2-4731-8a84-9abe8c108a35->[ sh:zeroOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['core:UcoThing']" ; + sh:resultPath [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + sh:hasValue core:UcoThing ; + sh:path [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , [ a sh:ValidationResult ; sh:focusNode ; From 0b5f40dd4b94141dd5644afc54c0f62f8e4840fb Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 9 Apr 2026 20:35:03 -0400 Subject: [PATCH 05/15] Designate UcoType as disjoint from UcoThing; test on ActionPattern A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 11 +++++++++++ tests/examples/uco_type_XFAIL.json | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index a9037148..e8fe0020 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -505,6 +505,16 @@ core:UcoThing sh:targetClass core:UcoThing ; . +core:UcoThing-disjointWith-UcoType-shape + a sh:NodeShape ; + sh:message "core:UcoThing and core:UcoType are disjoint classes."@en ; + sh:not [ + a sh:NodeShape ; + sh:class core:UcoType ; + ] ; + sh:targetClass core:UcoThing ; + . + core:UcoThing-identifier-regex-shape a sh:NodeShape ; rdfs:comment "This shape is given an independent IRI for applications that have sufficient controls in place to deactivate this advisory of node identification practice."@en ; @@ -541,6 +551,7 @@ core:UcoType rdfs:subClassOf owl:Thing ; rdfs:label "UcoType"@en ; rdfs:comment "UcoThing is the top-level class for metaclasses within UCO. An instance of core:UcoType is also an instance of owl:Class, and is or specializes core:UcoThing."@en ; + owl:disjointWith core:UcoThing ; sh:class owl:Class ; sh:property [ sh:hasValue core:UcoThing ; diff --git a/tests/examples/uco_type_XFAIL.json b/tests/examples/uco_type_XFAIL.json index 8a736f61..eb16563d 100644 --- a/tests/examples/uco_type_XFAIL.json +++ b/tests/examples/uco_type_XFAIL.json @@ -18,6 +18,18 @@ "Triggers violation from not subclassing Action." ] }, + { + "@id": "kb:Technique-db4c2ac7-0fa0-4f74-9058-242a40d71a63", + "@type": [ + "owl:Class", + "action:ActionPattern", + "action:Technique" + ], + "rdfs:comment": "Triggers violation from instantiating both UcoThing and UcoType.", + "rdfs:subClassOf": { + "@id": "action:Action" + } + }, { "@id": "kb:UcoType-0", "@type": "core:UcoType", From 6174cdec50130364e232b9f1efa742a30336bae7 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 9 Apr 2026 20:35:18 -0400 Subject: [PATCH 06/15] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- tests/examples/uco_type_XFAIL_validation.ttl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/examples/uco_type_XFAIL_validation.ttl b/tests/examples/uco_type_XFAIL_validation.ttl index 14cbd64f..cfbb2dc5 100644 --- a/tests/examples/uco_type_XFAIL_validation.ttl +++ b/tests/examples/uco_type_XFAIL_validation.ttl @@ -43,6 +43,15 @@ ] ; ] ; ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "core:UcoThing and core:UcoType are disjoint classes."@en ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NotConstraintComponent ; + sh:sourceShape core:UcoThing-disjointWith-UcoType-shape ; + sh:value ; + ] , [ a sh:ValidationResult ; sh:focusNode ; From bb1025191ada5577aba976ad8e582ae13b8b35c9 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 Apr 2026 12:55:10 -0400 Subject: [PATCH 07/15] Add and test techniqueID A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- ontology/uco/action/action.ttl | 35 ++++++++--- tests/examples/technique/Makefile | 60 +++++++++++++++++++ .../technique/technique_ontology_PASS.ttl | 4 +- .../technique/technique_ontology_XFAIL.ttl | 20 +++++++ 4 files changed, 111 insertions(+), 8 deletions(-) diff --git a/ontology/uco/action/action.ttl b/ontology/uco/action/action.ttl index 9cb50b29..2a42374a 100644 --- a/ontology/uco/action/action.ttl +++ b/ontology/uco/action/action.ttl @@ -358,13 +358,20 @@ action:Technique rdfs:subClassOf core:UcoType ; rdfs:label "Technique"@en ; rdfs:comment "A technique is a class of actions joined by some common characteristics."@en ; - sh:property [ - rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; - sh:hasValue action:Action ; - sh:path [ - sh:oneOrMorePath rdfs:subClassOf ; - ] ; - ] ; + sh:property + [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] , + [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path action:techniqueID ; + ] + ; sh:targetClass action:Technique ; . @@ -529,6 +536,20 @@ action:subaction rdfs:range action:Action ; . +action:techniqueID + a owl:DatatypeProperty ; + rdfs:label "techniqueID"@en ; + rdfs:comment "An identifier for a technique within some cataloguing system. At the general level of UCO, techniqueID is left optional and minimally-described aside from needing to be Literal-valued. Specializations of Technique should also consider specializing a corresponding subproperty of techniqueID to enable support of global review of technique identifiers."@en ; + rdfs:domain action:Technique ; + . + +action:techniqueID-subjects-shape + a sh:NodeShape ; + rdfs:comment "This shape enforces that action:techniqueID is only used on Techniques."@en ; + sh:class action:Technique ; + sh:targetSubjectsOf action:techniqueID ; + . + action:trend a owl:DatatypeProperty ; rdfs:label "trend"@en ; diff --git a/tests/examples/technique/Makefile b/tests/examples/technique/Makefile index 9f4a4458..6af51a2f 100644 --- a/tests/examples/technique/Makefile +++ b/tests/examples/technique/Makefile @@ -23,6 +23,8 @@ all: \ check: \ technique_ontology_XFAIL_validation.ttl \ + technique_ontology_XFAIL_rdfs_validation.ttl \ + technique_ontology_XFAIL_owlrl_validation.ttl \ technique_data_PASS_validation.ttl \ technique_data_XFAIL_validation.ttl @@ -107,6 +109,64 @@ technique_data_XFAIL_validation.ttl: \ rm __$@ mv _$@ $@ +technique_ontology_XFAIL_owlrl_validation.ttl: \ + $(top_srcdir)/.venv.done.log \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + generated-shapes.ttl \ + technique_ontology_XFAIL.ttl + source $(top_srcdir)/venv/bin/activate \ + && rdfpipe \ + --output-format turtle \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + technique_ontology_XFAIL.ttl \ + > _$@ + source $(top_srcdir)/venv/bin/activate \ + && pyshacl \ + --format turtle \ + --inference owlrl \ + --output __$@ \ + --shacl generated-shapes.ttl \ + _$@ \ + ; test 1 -eq $$? + rm _$@ + java -jar $(top_srcdir)/lib/rdf-toolkit.jar \ + --inline-blank-nodes \ + --source __$@ \ + --source-format turtle \ + --target _$@ \ + --target-format turtle + rm __$@ + mv _$@ $@ + +technique_ontology_XFAIL_rdfs_validation.ttl: \ + $(top_srcdir)/.venv.done.log \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + generated-shapes.ttl \ + technique_ontology_XFAIL.ttl + source $(top_srcdir)/venv/bin/activate \ + && rdfpipe \ + --output-format turtle \ + $(top_srcdir)/tests/uco_monolithic.ttl \ + technique_ontology_XFAIL.ttl \ + > _$@ + source $(top_srcdir)/venv/bin/activate \ + && pyshacl \ + --format turtle \ + --inference rdfs \ + --output __$@ \ + --shacl generated-shapes.ttl \ + _$@ \ + ; test 1 -eq $$? + rm _$@ + java -jar $(top_srcdir)/lib/rdf-toolkit.jar \ + --inline-blank-nodes \ + --source __$@ \ + --source-format turtle \ + --target _$@ \ + --target-format turtle + rm __$@ + mv _$@ $@ + technique_ontology_XFAIL_validation.ttl: \ $(top_srcdir)/.venv.done.log \ $(top_srcdir)/tests/uco_monolithic.ttl \ diff --git a/tests/examples/technique/technique_ontology_PASS.ttl b/tests/examples/technique/technique_ontology_PASS.ttl index 4c6ff99c..918ce92a 100644 --- a/tests/examples/technique/technique_ontology_PASS.ttl +++ b/tests/examples/technique/technique_ontology_PASS.ttl @@ -69,6 +69,7 @@ ex1:YDevice ex1:techniqueID a owl:DatatypeProperty ; + rdfs:subPropertyOf uco-action:techniqueID ; rdfs:domain ex1:Technique ; rdfs:range xsd:string ; . @@ -134,7 +135,8 @@ ex2:ZDevice ex2:procedureID a owl:DatatypeProperty ; - rdfs:comment "(Technical demonstration: Assignment of a Technique identifier is done with an OWL datatype Property.)"@en ; + rdfs:subPropertyOf uco-action:techniqueID ; + rdfs:comment "(Technical demonstration: Assignment of a Technique identifier is done with an OWL Datatype Property.)"@en ; rdfs:domain ex2:StandardOperatingProcedure ; rdfs:range xsd:string ; . diff --git a/tests/examples/technique/technique_ontology_XFAIL.ttl b/tests/examples/technique/technique_ontology_XFAIL.ttl index 2911a916..c10bf0d0 100644 --- a/tests/examples/technique/technique_ontology_XFAIL.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL.ttl @@ -33,6 +33,7 @@ ex1:Technique-T0003 ex1:techniqueID a owl:DatatypeProperty ; + rdfs:subPropertyOf uco-action:techniqueID ; rdfs:comment "(No difference from ex1:techniqueID in PASS graph.)"@en ; rdfs:domain ex1:Technique ; rdfs:range xsd:string ; @@ -58,6 +59,17 @@ ex2:SOP-0044 ex2:procedureID "SOP-0001" ; . +ex2:SOP-0055 + a + ex2:StandardOperatingProcedure , + owl:Class + ; + rdfs:subClassOf uco-action:Action ; + rdfs:comment "(Technical demonstration: Technique XFAILs due to techniqueID incorrect node-kind.)"@en ; + ex2:procedureAltID ex2:P-5555 ; + ex2:procedureID "SOP-0055" ; + . + ex2:StandardOperatingProcedure a owl:Class ; rdfs:subClassOf @@ -71,8 +83,16 @@ ex2:StandardOperatingProcedure rdfs:comment "(No difference from ex2:StandardOperatingProcedure in PASS graph.)"@en ; . +ex2:procedureAltID + a owl:ObjectProperty ; + rdfs:subPropertyOf uco-action:techniqueID ; + rdfs:comment "(Technical demonstration: Assignment of a Technique identifier must be done with an OWL Datatype Property. RDFS or OWL-RL inferencing enables detecting this modeling error.)"@en ; + rdfs:domain ex2:StandardOperatingProcedure ; + . + ex2:procedureID a owl:DatatypeProperty ; + rdfs:subPropertyOf uco-action:techniqueID ; rdfs:comment "(No difference from ex2:procedureID in PASS graph.)"@en , "(Technical demonstration: Assignment of a Technique identifier is done with an OWL datatype Property.)"@en From 7541a0fcbf449eb6612203a416f04b1cde697f02 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 Apr 2026 12:55:58 -0400 Subject: [PATCH 08/15] Regenerate Make-managed files No effects were observed on prior Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- ...hnique_ontology_XFAIL_owlrl_validation.ttl | 137 ++++++++++++++++++ ...chnique_ontology_XFAIL_rdfs_validation.ttl | 137 ++++++++++++++++++ 2 files changed, 274 insertions(+) create mode 100644 tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl create mode 100644 tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl diff --git a/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl new file mode 100644 index 00000000..8f7e44e8 --- /dev/null +++ b/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl @@ -0,0 +1,137 @@ +@prefix core: . +@prefix ex1: . +@prefix ex2: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix uco-action: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ex1:Technique-T0003 ; + sh:resultMessage "Less than 1 values on ex1:Technique-T0003->ex1:techniqueID" ; + sh:resultPath ex1:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 1 Technique has techniqueID assigned. (Recall that an instance of ex1:Technique is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex1:techniqueID ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0033 ; + sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultPath uco-action:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path uco-action:techniqueID ; + ] ; + sh:value "SOP-0001" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0044 ; + sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultPath uco-action:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path uco-action:techniqueID ; + ] ; + sh:value "SOP-0001" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0055 ; + sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultPath uco-action:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path uco-action:techniqueID ; + ] ; + sh:value "SOP-0055" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0055 ; + sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultPath uco-action:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path uco-action:techniqueID ; + ] ; + sh:value ex2:P-5555 ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-B->[ sh:oneOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['uco-action:Action']" ; + sh:resultPath [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue uco-action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-B->[ sh:zeroOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['core:UcoThing']" ; + sh:resultPath [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + sh:hasValue core:UcoThing ; + sh:path [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-C->[ sh:oneOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['uco-action:Action']" ; + sh:resultPath [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue uco-action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] + ; + . + diff --git a/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl new file mode 100644 index 00000000..8f7e44e8 --- /dev/null +++ b/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl @@ -0,0 +1,137 @@ +@prefix core: . +@prefix ex1: . +@prefix ex2: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix uco-action: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ex1:Technique-T0003 ; + sh:resultMessage "Less than 1 values on ex1:Technique-T0003->ex1:techniqueID" ; + sh:resultPath ex1:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 1 Technique has techniqueID assigned. (Recall that an instance of ex1:Technique is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex1:techniqueID ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0033 ; + sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultPath uco-action:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path uco-action:techniqueID ; + ] ; + sh:value "SOP-0001" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0044 ; + sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultPath uco-action:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path uco-action:techniqueID ; + ] ; + sh:value "SOP-0001" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0055 ; + sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultPath uco-action:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path uco-action:techniqueID ; + ] ; + sh:value "SOP-0055" ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0055 ; + sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultPath uco-action:techniqueID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; + sh:datatype sh:Literal ; + sh:path uco-action:techniqueID ; + ] ; + sh:value ex2:P-5555 ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-B->[ sh:oneOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['uco-action:Action']" ; + sh:resultPath [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue uco-action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-B->[ sh:zeroOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['core:UcoThing']" ; + sh:resultPath [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + sh:hasValue core:UcoThing ; + sh:path [ + sh:zeroOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Node ex0:Technique-C->[ sh:oneOrMorePath rdfs:subClassOf ] does not contain a value in the set: ['uco-action:Action']" ; + sh:resultPath [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:HasValueConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; + sh:hasValue uco-action:Action ; + sh:path [ + sh:oneOrMorePath rdfs:subClassOf ; + ] ; + ] ; + ] + ; + . + From 1ebbe17492776437b109ed4959746e00331befc9 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 Apr 2026 14:50:52 -0400 Subject: [PATCH 09/15] Correct nodeKind test A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- ontology/uco/action/action.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontology/uco/action/action.ttl b/ontology/uco/action/action.ttl index 2a42374a..1c1859d3 100644 --- a/ontology/uco/action/action.ttl +++ b/ontology/uco/action/action.ttl @@ -368,7 +368,7 @@ action:Technique ] , [ rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; + sh:nodeKind sh:Literal ; sh:path action:techniqueID ; ] ; From c3f4ec37ceccf55bce4b4f59de02f3ff22335dd3 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 Apr 2026 14:51:04 -0400 Subject: [PATCH 10/15] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- ...hnique_ontology_XFAIL_owlrl_validation.ttl | 48 ++----------------- ...chnique_ontology_XFAIL_rdfs_validation.ttl | 48 ++----------------- 2 files changed, 6 insertions(+), 90 deletions(-) diff --git a/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl index 8f7e44e8..28b9baf0 100644 --- a/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl @@ -26,58 +26,16 @@ sh:path ex1:techniqueID ; ] ; ] , - [ - a sh:ValidationResult ; - sh:focusNode ex2:SOP-0033 ; - sh:resultMessage "Value is not Literal with datatype sh:Literal" ; - sh:resultPath uco-action:techniqueID ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; - sh:path uco-action:techniqueID ; - ] ; - sh:value "SOP-0001" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ex2:SOP-0044 ; - sh:resultMessage "Value is not Literal with datatype sh:Literal" ; - sh:resultPath uco-action:techniqueID ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; - sh:path uco-action:techniqueID ; - ] ; - sh:value "SOP-0001" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ex2:SOP-0055 ; - sh:resultMessage "Value is not Literal with datatype sh:Literal" ; - sh:resultPath uco-action:techniqueID ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; - sh:path uco-action:techniqueID ; - ] ; - sh:value "SOP-0055" ; - ] , [ a sh:ValidationResult ; sh:focusNode ex2:SOP-0055 ; - sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultMessage "Value is not of Node Kind sh:Literal" ; sh:resultPath uco-action:techniqueID ; sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; sh:sourceShape [ rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; + sh:nodeKind sh:Literal ; sh:path uco-action:techniqueID ; ] ; sh:value ex2:P-5555 ; diff --git a/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl index 8f7e44e8..28b9baf0 100644 --- a/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl @@ -26,58 +26,16 @@ sh:path ex1:techniqueID ; ] ; ] , - [ - a sh:ValidationResult ; - sh:focusNode ex2:SOP-0033 ; - sh:resultMessage "Value is not Literal with datatype sh:Literal" ; - sh:resultPath uco-action:techniqueID ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; - sh:path uco-action:techniqueID ; - ] ; - sh:value "SOP-0001" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ex2:SOP-0044 ; - sh:resultMessage "Value is not Literal with datatype sh:Literal" ; - sh:resultPath uco-action:techniqueID ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; - sh:path uco-action:techniqueID ; - ] ; - sh:value "SOP-0001" ; - ] , - [ - a sh:ValidationResult ; - sh:focusNode ex2:SOP-0055 ; - sh:resultMessage "Value is not Literal with datatype sh:Literal" ; - sh:resultPath uco-action:techniqueID ; - sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; - sh:sourceShape [ - rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; - sh:path uco-action:techniqueID ; - ] ; - sh:value "SOP-0055" ; - ] , [ a sh:ValidationResult ; sh:focusNode ex2:SOP-0055 ; - sh:resultMessage "Value is not Literal with datatype sh:Literal" ; + sh:resultMessage "Value is not of Node Kind sh:Literal" ; sh:resultPath uco-action:techniqueID ; sh:resultSeverity sh:Violation ; - sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; sh:sourceShape [ rdfs:comment "This shape will find violations after RDFS or OWL-RL inferencing, but might not find some violations without inferencing."@en ; - sh:datatype sh:Literal ; + sh:nodeKind sh:Literal ; sh:path uco-action:techniqueID ; ] ; sh:value ex2:P-5555 ; From 30aa21ad2b04fab883e34e0763f91f8a015e2666 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 Apr 2026 14:58:16 -0400 Subject: [PATCH 11/15] Align test condition with test documentation A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- tests/examples/technique/technique_ontology_XFAIL.ttl | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/examples/technique/technique_ontology_XFAIL.ttl b/tests/examples/technique/technique_ontology_XFAIL.ttl index c10bf0d0..809d9500 100644 --- a/tests/examples/technique/technique_ontology_XFAIL.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL.ttl @@ -46,7 +46,6 @@ ex2:SOP-0033 ; rdfs:subClassOf uco-action:Action ; rdfs:comment "(Technical demonstration: Technique XFAILs due to procedureID absence."@en ; - ex2:procedureID "SOP-0001" ; . ex2:SOP-0044 @@ -56,7 +55,6 @@ ex2:SOP-0044 ; rdfs:subClassOf ex1:Technique-T0003 ; rdfs:comment "(Technical demonstration: Technique XFAILs due to procedureID absence. Subclassing a ex1:Technique has no influence."@en ; - ex2:procedureID "SOP-0001" ; . ex2:SOP-0055 From 54f3fe1f9e2eee09c8206dde596969b721c23f55 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 Apr 2026 14:58:32 -0400 Subject: [PATCH 12/15] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- ...hnique_ontology_XFAIL_owlrl_validation.ttl | 28 ++++++++++++++++++ ...chnique_ontology_XFAIL_rdfs_validation.ttl | 28 ++++++++++++++++++ .../technique_ontology_XFAIL_validation.ttl | 29 +++++++++++++++++++ 3 files changed, 85 insertions(+) diff --git a/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl index 28b9baf0..abd0cb22 100644 --- a/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl @@ -26,6 +26,34 @@ sh:path ex1:techniqueID ; ] ; ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0033 ; + sh:resultMessage "Less than 1 values on ex2:SOP-0033->ex2:procedureID" ; + sh:resultPath ex2:procedureID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex2:procedureID ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0044 ; + sh:resultMessage "Less than 1 values on ex2:SOP-0044->ex2:procedureID" ; + sh:resultPath ex2:procedureID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex2:procedureID ; + ] ; + ] , [ a sh:ValidationResult ; sh:focusNode ex2:SOP-0055 ; diff --git a/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl index 28b9baf0..abd0cb22 100644 --- a/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl @@ -26,6 +26,34 @@ sh:path ex1:techniqueID ; ] ; ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0033 ; + sh:resultMessage "Less than 1 values on ex2:SOP-0033->ex2:procedureID" ; + sh:resultPath ex2:procedureID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex2:procedureID ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0044 ; + sh:resultMessage "Less than 1 values on ex2:SOP-0044->ex2:procedureID" ; + sh:resultPath ex2:procedureID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex2:procedureID ; + ] ; + ] , [ a sh:ValidationResult ; sh:focusNode ex2:SOP-0055 ; diff --git a/tests/examples/technique/technique_ontology_XFAIL_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_validation.ttl index f474e429..157f0cd1 100644 --- a/tests/examples/technique/technique_ontology_XFAIL_validation.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL_validation.ttl @@ -1,5 +1,6 @@ @prefix core: . @prefix ex1: . +@prefix ex2: . @prefix owl: . @prefix rdf: . @prefix rdfs: . @@ -25,6 +26,34 @@ sh:path ex1:techniqueID ; ] ; ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0033 ; + sh:resultMessage "Less than 1 values on ex2:SOP-0033->ex2:procedureID" ; + sh:resultPath ex2:procedureID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex2:procedureID ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ex2:SOP-0044 ; + sh:resultMessage "Less than 1 values on ex2:SOP-0044->ex2:procedureID" ; + sh:resultPath ex2:procedureID ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape [ + rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + sh:maxCount "1"^^xsd:integer ; + sh:minCount "1"^^xsd:integer ; + sh:path ex2:procedureID ; + ] ; + ] , [ a sh:ValidationResult ; sh:focusNode ; From fb4e9e7835fdbe11b3ddfe6036b675e4413de490 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 10 Apr 2026 17:05:08 -0400 Subject: [PATCH 13/15] Make explicit metaclass and parent-class note on Technique No effects were observed on Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666#issuecomment-4226651237 Requested-by: Cory Hall Signed-off-by: Alex Nelson --- ontology/uco/action/action.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontology/uco/action/action.ttl b/ontology/uco/action/action.ttl index 1c1859d3..07f251a5 100644 --- a/ontology/uco/action/action.ttl +++ b/ontology/uco/action/action.ttl @@ -357,7 +357,7 @@ action:Technique ; rdfs:subClassOf core:UcoType ; rdfs:label "Technique"@en ; - rdfs:comment "A technique is a class of actions joined by some common characteristics."@en ; + rdfs:comment "A technique is a class of actions joined by some common characteristics. uco-action:Technique itself is a metaclass. A Technique instance is an owl:Class that is a subclass of uco-action:Action."@en ; sh:property [ rdfs:comment "This shape confirms a Technique is an eventual subclass of Action. The Action class itself is not a Technique."@en ; From 20580d16a6c4ea62b07069eaf4426bbeb9e4ad4f Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 30 Jun 2026 11:39:09 -0400 Subject: [PATCH 14/15] Replace "SOP" in test examples with other-namespace Technique "SOP" was acknowledged to be a term of a sufficiently different scoping. Turtle files were intentionally not normalized in this patch, to avoid confusion from string-replacements. Normalizing later is acceptable. A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- tests/examples/technique/README.md | 6 +-- .../technique/technique_data_PASS.json | 4 +- .../technique/technique_data_XFAIL.json | 2 +- .../technique/technique_ontology_PASS.ttl | 30 +++++++-------- .../technique/technique_ontology_XFAIL.ttl | 38 +++++++++---------- .../technique/technique_shapes_PASS.ttl | 14 +++---- 6 files changed, 47 insertions(+), 47 deletions(-) diff --git a/tests/examples/technique/README.md b/tests/examples/technique/README.md index 941377e5..d59aa3f2 100644 --- a/tests/examples/technique/README.md +++ b/tests/examples/technique/README.md @@ -5,14 +5,14 @@ The test matrix for PASS conditions is as follows: * `uco-action:Technique` is: - Not specialized (see `ex0:Technique-A`) - - Specialized (see `ex1:Technique`, `ex2:StandardOperatingProcedure`) + - Specialized (see `ex1:Technique`, `ex2:AdaptedTechnique`) * Each of the above degrees of `Technique` specialization is instantiated with some `Action` subclass. - No specialization (see `ex0:Technique-A`) - - One level of specialization (see `ex1:Technique-T0001`, `ex2:SOP-0001`) + - One level of specialization (see `ex1:Technique-T0001`, `ex2:AT-0001`) - Two levels of specialization, using the same Technique-subclass (see `ex1:T0002`) - - Two levels of specialization, using different Technique-subclasses (see `ex2:SOP-0099`) + - Two levels of specialization, using different Technique-subclasses (see `ex2:AT-0099`) * Each of the above instantiations by some degree of `Technique` specialization is instantiated. diff --git a/tests/examples/technique/technique_data_PASS.json b/tests/examples/technique/technique_data_PASS.json index 690405a7..a6bf7670 100644 --- a/tests/examples/technique/technique_data_PASS.json +++ b/tests/examples/technique/technique_data_PASS.json @@ -29,11 +29,11 @@ }, { "@id": "kb:Action-dd609c02-176d-40ed-9858-ead8bdc47757", - "@type": "ex2:SOP-0001" + "@type": "ex2:AT-0001" }, { "@id": "kb:Action-f6625d7d-978d-4562-83d7-23d9ac398073", - "@type": "ex2:SOP-0099", + "@type": "ex2:AT-0099", "uco-action:instrument": { "@id": "kb:Device-e79fb51b-6c45-4e70-9e79-9f600509ca6c" }, diff --git a/tests/examples/technique/technique_data_XFAIL.json b/tests/examples/technique/technique_data_XFAIL.json index f6cbb121..d288d406 100644 --- a/tests/examples/technique/technique_data_XFAIL.json +++ b/tests/examples/technique/technique_data_XFAIL.json @@ -19,7 +19,7 @@ }, { "@id": "kb:Action-f6625d7d-978d-4562-83d7-23d9ac398073", - "@type": "ex2:SOP-0099" + "@type": "ex2:AT-0099" }, { "@id": "kb:Device-765e3d23-ce91-459d-b5ec-6c60d37df842", diff --git a/tests/examples/technique/technique_ontology_PASS.ttl b/tests/examples/technique/technique_ontology_PASS.ttl index 918ce92a..fb4f39c3 100644 --- a/tests/examples/technique/technique_ontology_PASS.ttl +++ b/tests/examples/technique/technique_ontology_PASS.ttl @@ -18,7 +18,7 @@ ex1:Technique "(Technical demonstration: Instances of the metaclass can have a datatype property assigned.)"@en , "This Restriction states, but does not enforce, that an Technique (as defined by Organization 1) has a technique ID. SHACL validation handles enforcement."@en ; - owl:onProperty ex2:procedureID ; + owl:onProperty ex2:techniqueID ; owl:cardinality "1"^^xsd:nonNegativeInteger ; ] ; @@ -37,7 +37,7 @@ ex1:Technique-T0001 uco-action:Action , [ a owl:Restriction ; - rdfs:comment "This Restriction states, but does not enforce, that execution of this SOP involves some Y-Device as action-input. SHACL validation handles enforcement."@en ; + rdfs:comment "This Restriction states, but does not enforce, that execution of this AdaptedTechnique involves some Y-Device as action-input. SHACL validation handles enforcement."@en ; owl:onProperty uco-action:object ; owl:someValuesFrom ex1:YDevice ; ] @@ -74,9 +74,9 @@ ex1:techniqueID rdfs:range xsd:string ; . -ex2:SOP-0001 +ex2:AT-0001 a - ex2:StandardOperatingProcedure , + ex2:AdaptedTechnique , owl:Class ; rdfs:subClassOf uco-action:Action ; @@ -84,31 +84,31 @@ ex2:SOP-0001 "(Technical demonstration: A Technique-subclass instance that directly specializes uco-action:Action.)"@en , "A procedure where logging is configured to store data in an instance of Example-L Logging Service."@en ; - ex2:procedureID "SOP-0001" ; + ex2:techniqueID "AT-0001" ; . -ex2:SOP-0099 +ex2:AT-0099 a - ex2:StandardOperatingProcedure , + ex2:AdaptedTechnique , owl:Class ; rdfs:subClassOf ex1:Technique-T0001 , [ a owl:Restriction ; - rdfs:comment "This Restriction states, but does not enforce, that execution of this SOP involves some Z-Device as action-instrument. SHACL validation handles enforcement."@en ; + rdfs:comment "This Restriction states, but does not enforce, that execution of this AdaptedTechnique involves some Z-Device as action-instrument. SHACL validation handles enforcement."@en ; owl:onProperty uco-action:instrument ; owl:someValuesFrom ex2:ZDevice ; ] ; rdfs:comment - "(Technical demonstration: Technique-subclass is instantiated, specializing an instance of a different Technique-subclass. Note that the class ex2:SOP-0099 is not required to be assigned a ex1:techniqueID, nor to be typed as a ex1:Technique or uco-action:Technique.)"@en , + "(Technical demonstration: Technique-subclass is instantiated, specializing an instance of a different Technique-subclass. Note that the class ex2:AT-0099 is not required to be assigned a ex1:techniqueID, nor to be typed as a ex1:Technique or uco-action:Technique.)"@en , "A procedure where X is done to a Y-device using a Z-device."@en ; - ex2:procedureID "SOP-0099" ; + ex2:techniqueID "AT-0099" ; . -ex2:StandardOperatingProcedure +ex2:AdaptedTechnique a owl:Class ; rdfs:subClassOf uco-action:Technique , @@ -116,9 +116,9 @@ ex2:StandardOperatingProcedure a owl:Restriction ; rdfs:comment "(Technical demonstration: Instances of the metaclass can have a datatype property assigned.)"@en , - "This Restriction states, but does not enforce, that an SOP has a procedureID. SHACL validation handles enforcement."@en + "This Restriction states, but does not enforce, that an AdaptedTechnique has an Organization 2 techniqueID. SHACL validation handles enforcement."@en ; - owl:onProperty ex2:procedureID ; + owl:onProperty ex2:techniqueID ; owl:cardinality "1"^^xsd:nonNegativeInteger ; ] ; @@ -133,11 +133,11 @@ ex2:ZDevice rdfs:subClassOf uco-observable:Device ; . -ex2:procedureID +ex2:techniqueID a owl:DatatypeProperty ; rdfs:subPropertyOf uco-action:techniqueID ; rdfs:comment "(Technical demonstration: Assignment of a Technique identifier is done with an OWL Datatype Property.)"@en ; - rdfs:domain ex2:StandardOperatingProcedure ; + rdfs:domain ex2:AdaptedTechnique ; rdfs:range xsd:string ; . diff --git a/tests/examples/technique/technique_ontology_XFAIL.ttl b/tests/examples/technique/technique_ontology_XFAIL.ttl index 809d9500..7ff9faef 100644 --- a/tests/examples/technique/technique_ontology_XFAIL.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL.ttl @@ -15,7 +15,7 @@ ex1:Technique uco-action:Technique , [ a owl:Restriction ; - owl:onProperty ex2:procedureID ; + owl:onProperty ex2:techniqueID ; owl:cardinality "1"^^xsd:nonNegativeInteger ; ] ; @@ -39,63 +39,63 @@ ex1:techniqueID rdfs:range xsd:string ; . -ex2:SOP-0033 +ex2:AT-0033 a - ex2:StandardOperatingProcedure , + ex2:AdaptedTechnique , owl:Class ; rdfs:subClassOf uco-action:Action ; - rdfs:comment "(Technical demonstration: Technique XFAILs due to procedureID absence."@en ; + rdfs:comment "(Technical demonstration: Technique XFAILs due to techniqueID absence."@en ; . -ex2:SOP-0044 +ex2:AT-0044 a - ex2:StandardOperatingProcedure , + ex2:AdaptedTechnique , owl:Class ; rdfs:subClassOf ex1:Technique-T0003 ; - rdfs:comment "(Technical demonstration: Technique XFAILs due to procedureID absence. Subclassing a ex1:Technique has no influence."@en ; + rdfs:comment "(Technical demonstration: Technique XFAILs due to techniqueID absence. Subclassing a ex1:Technique has no influence."@en ; . -ex2:SOP-0055 +ex2:AT-0055 a - ex2:StandardOperatingProcedure , + ex2:AdaptedTechnique , owl:Class ; rdfs:subClassOf uco-action:Action ; rdfs:comment "(Technical demonstration: Technique XFAILs due to techniqueID incorrect node-kind.)"@en ; - ex2:procedureAltID ex2:P-5555 ; - ex2:procedureID "SOP-0055" ; + ex2:techniqueAltID ex2:P-5555 ; + ex2:techniqueID "AT-0055" ; . -ex2:StandardOperatingProcedure +ex2:AdaptedTechnique a owl:Class ; rdfs:subClassOf uco-action:Technique , [ a owl:Restriction ; - owl:onProperty ex2:procedureID ; + owl:onProperty ex2:techniqueID ; owl:cardinality "1"^^xsd:nonNegativeInteger ; ] ; - rdfs:comment "(No difference from ex2:StandardOperatingProcedure in PASS graph.)"@en ; + rdfs:comment "(No difference from ex2:AdaptedTechnique in PASS graph.)"@en ; . -ex2:procedureAltID +ex2:techniqueAltID a owl:ObjectProperty ; rdfs:subPropertyOf uco-action:techniqueID ; rdfs:comment "(Technical demonstration: Assignment of a Technique identifier must be done with an OWL Datatype Property. RDFS or OWL-RL inferencing enables detecting this modeling error.)"@en ; - rdfs:domain ex2:StandardOperatingProcedure ; + rdfs:domain ex2:AdaptedTechnique ; . -ex2:procedureID +ex2:techniqueID a owl:DatatypeProperty ; rdfs:subPropertyOf uco-action:techniqueID ; rdfs:comment - "(No difference from ex2:procedureID in PASS graph.)"@en , + "(No difference from ex2:techniqueID in PASS graph.)"@en , "(Technical demonstration: Assignment of a Technique identifier is done with an OWL datatype Property.)"@en ; - rdfs:domain ex2:StandardOperatingProcedure ; + rdfs:domain ex2:AdaptedTechnique ; rdfs:range xsd:string ; . diff --git a/tests/examples/technique/technique_shapes_PASS.ttl b/tests/examples/technique/technique_shapes_PASS.ttl index f66ac339..023b61f1 100644 --- a/tests/examples/technique/technique_shapes_PASS.ttl +++ b/tests/examples/technique/technique_shapes_PASS.ttl @@ -33,27 +33,27 @@ sh-ex1:Technique-shape sh:targetClass ex1:Technique ; . -sh-ex2:SOP-0099-shape +sh-ex2:AT-0099-shape a sh:NodeShape ; sh:property [ - rdfs:comment "This property shape enforces that execution of this SOP involves some Z-device as action-instrument."@en ; + rdfs:comment "This property shape enforces that execution of this AdaptedTechnique involves some Z-device as action-instrument."@en ; sh:path uco-action:instrument ; sh:qualifiedMinCount "1"^^xsd:integer ; sh:qualifiedValueShape [ sh:class ex2:ZDevice ; ] ; ] ; - sh:targetClass ex2:SOP-0099 ; + sh:targetClass ex2:AT-0099 ; . -sh-ex2:StandardOperatingProcedure-shape +sh-ex2:AdaptedTechnique-shape a sh:NodeShape ; sh:property [ - rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + rdfs:comment "This property shape enforces that an instance of an Organization 2 AdaptedTechnique has Organization 2's techniqueID assigned. (Recall that an instance of ex2:AdaptedTechnique is an OWL Class.)"@en ; sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; - sh:path ex2:procedureID ; + sh:path ex2:techniqueID ; ] ; - sh:targetClass ex2:StandardOperatingProcedure ; + sh:targetClass ex2:AdaptedTechnique ; . From 871bb2912a725ce63def9d2c0bfd65e9251219e4 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 30 Jun 2026 11:41:01 -0400 Subject: [PATCH 15/15] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/666 Signed-off-by: Alex Nelson --- .../technique_data_XFAIL_validation.ttl | 2 +- ...hnique_ontology_XFAIL_owlrl_validation.ttl | 22 +++++++++---------- ...chnique_ontology_XFAIL_rdfs_validation.ttl | 22 +++++++++---------- .../technique_ontology_XFAIL_validation.ttl | 20 ++++++++--------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/examples/technique/technique_data_XFAIL_validation.ttl b/tests/examples/technique/technique_data_XFAIL_validation.ttl index 3bef8ccc..32c3a5dc 100644 --- a/tests/examples/technique/technique_data_XFAIL_validation.ttl +++ b/tests/examples/technique/technique_data_XFAIL_validation.ttl @@ -67,7 +67,7 @@ sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:QualifiedMinCountConstraintComponent ; sh:sourceShape [ - rdfs:comment "This property shape enforces that execution of this SOP involves some Z-device as action-instrument."@en ; + rdfs:comment "This property shape enforces that execution of this AdaptedTechnique involves some Z-device as action-instrument."@en ; sh:path uco-action:instrument ; sh:qualifiedMinCount "1"^^xsd:integer ; sh:qualifiedValueShape [ diff --git a/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl index abd0cb22..09d7d9ef 100644 --- a/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL_owlrl_validation.ttl @@ -28,35 +28,35 @@ ] , [ a sh:ValidationResult ; - sh:focusNode ex2:SOP-0033 ; - sh:resultMessage "Less than 1 values on ex2:SOP-0033->ex2:procedureID" ; - sh:resultPath ex2:procedureID ; + sh:focusNode ex2:AT-0033 ; + sh:resultMessage "Less than 1 values on ex2:AT-0033->ex2:techniqueID" ; + sh:resultPath ex2:techniqueID ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:MinCountConstraintComponent ; sh:sourceShape [ - rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + rdfs:comment "This property shape enforces that an instance of an Organization 2 AdaptedTechnique has Organization 2's techniqueID assigned. (Recall that an instance of ex2:AdaptedTechnique is an OWL Class.)"@en ; sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; - sh:path ex2:procedureID ; + sh:path ex2:techniqueID ; ] ; ] , [ a sh:ValidationResult ; - sh:focusNode ex2:SOP-0044 ; - sh:resultMessage "Less than 1 values on ex2:SOP-0044->ex2:procedureID" ; - sh:resultPath ex2:procedureID ; + sh:focusNode ex2:AT-0044 ; + sh:resultMessage "Less than 1 values on ex2:AT-0044->ex2:techniqueID" ; + sh:resultPath ex2:techniqueID ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:MinCountConstraintComponent ; sh:sourceShape [ - rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + rdfs:comment "This property shape enforces that an instance of an Organization 2 AdaptedTechnique has Organization 2's techniqueID assigned. (Recall that an instance of ex2:AdaptedTechnique is an OWL Class.)"@en ; sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; - sh:path ex2:procedureID ; + sh:path ex2:techniqueID ; ] ; ] , [ a sh:ValidationResult ; - sh:focusNode ex2:SOP-0055 ; + sh:focusNode ex2:AT-0055 ; sh:resultMessage "Value is not of Node Kind sh:Literal" ; sh:resultPath uco-action:techniqueID ; sh:resultSeverity sh:Violation ; diff --git a/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl index abd0cb22..09d7d9ef 100644 --- a/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL_rdfs_validation.ttl @@ -28,35 +28,35 @@ ] , [ a sh:ValidationResult ; - sh:focusNode ex2:SOP-0033 ; - sh:resultMessage "Less than 1 values on ex2:SOP-0033->ex2:procedureID" ; - sh:resultPath ex2:procedureID ; + sh:focusNode ex2:AT-0033 ; + sh:resultMessage "Less than 1 values on ex2:AT-0033->ex2:techniqueID" ; + sh:resultPath ex2:techniqueID ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:MinCountConstraintComponent ; sh:sourceShape [ - rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + rdfs:comment "This property shape enforces that an instance of an Organization 2 AdaptedTechnique has Organization 2's techniqueID assigned. (Recall that an instance of ex2:AdaptedTechnique is an OWL Class.)"@en ; sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; - sh:path ex2:procedureID ; + sh:path ex2:techniqueID ; ] ; ] , [ a sh:ValidationResult ; - sh:focusNode ex2:SOP-0044 ; - sh:resultMessage "Less than 1 values on ex2:SOP-0044->ex2:procedureID" ; - sh:resultPath ex2:procedureID ; + sh:focusNode ex2:AT-0044 ; + sh:resultMessage "Less than 1 values on ex2:AT-0044->ex2:techniqueID" ; + sh:resultPath ex2:techniqueID ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:MinCountConstraintComponent ; sh:sourceShape [ - rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + rdfs:comment "This property shape enforces that an instance of an Organization 2 AdaptedTechnique has Organization 2's techniqueID assigned. (Recall that an instance of ex2:AdaptedTechnique is an OWL Class.)"@en ; sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; - sh:path ex2:procedureID ; + sh:path ex2:techniqueID ; ] ; ] , [ a sh:ValidationResult ; - sh:focusNode ex2:SOP-0055 ; + sh:focusNode ex2:AT-0055 ; sh:resultMessage "Value is not of Node Kind sh:Literal" ; sh:resultPath uco-action:techniqueID ; sh:resultSeverity sh:Violation ; diff --git a/tests/examples/technique/technique_ontology_XFAIL_validation.ttl b/tests/examples/technique/technique_ontology_XFAIL_validation.ttl index 157f0cd1..1bfca560 100644 --- a/tests/examples/technique/technique_ontology_XFAIL_validation.ttl +++ b/tests/examples/technique/technique_ontology_XFAIL_validation.ttl @@ -28,30 +28,30 @@ ] , [ a sh:ValidationResult ; - sh:focusNode ex2:SOP-0033 ; - sh:resultMessage "Less than 1 values on ex2:SOP-0033->ex2:procedureID" ; - sh:resultPath ex2:procedureID ; + sh:focusNode ex2:AT-0033 ; + sh:resultMessage "Less than 1 values on ex2:AT-0033->ex2:techniqueID" ; + sh:resultPath ex2:techniqueID ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:MinCountConstraintComponent ; sh:sourceShape [ - rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + rdfs:comment "This property shape enforces that an instance of an Organization 2 AdaptedTechnique has Organization 2's techniqueID assigned. (Recall that an instance of ex2:AdaptedTechnique is an OWL Class.)"@en ; sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; - sh:path ex2:procedureID ; + sh:path ex2:techniqueID ; ] ; ] , [ a sh:ValidationResult ; - sh:focusNode ex2:SOP-0044 ; - sh:resultMessage "Less than 1 values on ex2:SOP-0044->ex2:procedureID" ; - sh:resultPath ex2:procedureID ; + sh:focusNode ex2:AT-0044 ; + sh:resultMessage "Less than 1 values on ex2:AT-0044->ex2:techniqueID" ; + sh:resultPath ex2:techniqueID ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:MinCountConstraintComponent ; sh:sourceShape [ - rdfs:comment "This property shape enforces that an instance of an Organization 2 SOP has procedureID assigned. (Recall that an instance of ex2:StandardOperatingProcedure is an OWL Class.)"@en ; + rdfs:comment "This property shape enforces that an instance of an Organization 2 AdaptedTechnique has Organization 2's techniqueID assigned. (Recall that an instance of ex2:AdaptedTechnique is an OWL Class.)"@en ; sh:maxCount "1"^^xsd:integer ; sh:minCount "1"^^xsd:integer ; - sh:path ex2:procedureID ; + sh:path ex2:techniqueID ; ] ; ] , [