Closed ajnelson-nist closed 2 weeks ago
It seems #550 is built on PatternExpression
being an owl:Class
. @sbarnum and/or @Bradichus , do you have input on this issue (562)? Should pattern:patternExpression
be an owl:ObjectProperty
?
I suspect that this bug fix will be a backwards-incompatible change, because a property will need to change its OWL property-class. Thus, I'm putting it on the UCO 2.0.0 track.
PR 566 has been filed to address this issue. The PR includes a test that detects this OWL+SHACL error pattern. Fortunately, the test only reports this one occurrence.
Note: 566 was written not having seen a demonstration of PatternExpression
.
Another note on the implementation in PR # 566 : It includes a new OWL test that UCO 1.x.0 fails, and can't be corrected in a backwards-compatible manner. I've not filed another PR to backport this test to 1.x.0 because, due to a logistical need for SHACL validation (where the ontology T-Box is necessarily mixed into the instance data A-Box), all runs of UCO's SHACL rules would report this error in the ontology, no matter the input data. This feels, to me, like a sufficiently unsatisfactory user experience that we should wait until UCO 2.0.0.
@plbt5 requested in PR 259 on the CASE website that the new OWL shape get a description comment.
@plbt5 , how about:
uco-owl:sh-datatype-objects-shape
sh:description "This shape enforces that the sh:datatype constraining predicate does not bind an OWL class for a literal-valued constraint."@en ;
.
A vote described in the meeting as a Solutions Approval vote was held 2023-11-28, and passed by the attending members.
However, in the email announcement, Jira tracking, and on the GitHub Issue, the pending vote was described to be a Requirements Review vote.
Because the solution is incomplete, I am going to “Split the difference” and consider this to be a passed Requirements Review vote.
The solution can’t be complete until the class being modified receives a demonstration.
The solution from today's call:
pattern:PatternExpression
should be removed/permanently deprecated.LogicalPattern
should be set to xsd:string
.rdfs:range
on patternExpression
should be set to xsd:string
.@plbt5 requested in PR 259 on the CASE website that the new OWL shape get a description comment.
@plbt5 , how about:
uco-owl:sh-datatype-objects-shape sh:description "This shape enforces that the sh:datatype constraining predicate does not bind an OWL class for a literal-valued constraint."@en ; .
@plbt5 , do you have a response to this suggestion?
Did I request documentation? That's so out of character.
On Wed, 1 May 2024, 16:37 Alex Nelson, @.***> wrote:
@plbt5 https://github.com/plbt5 requested in PR 259 on the CASE website https://github.com/casework/casework.github.io/pull/259 that the new OWL shape get a description comment.
@plbt5 https://github.com/plbt5 , how about:
uco-owl:sh-datatype-objects-shape sh:description "This shape enforces that the sh:datatype constraining predicate does not bind an OWL class for a literal-valued @.*** ; .
@plbt5 https://github.com/plbt5 , do you have a response to this suggestion?
— Reply to this email directly, view it on GitHub https://github.com/ucoProject/UCO/issues/562#issuecomment-2088560151, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAWGQOT64ONLRUG7IP5463ZAD42VAVCNFSM6AAAAAA7K2FVE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYGU3DAMJVGE . You are receiving this because you were mentioned.Message ID: @.***>
Agree with suggested comment.
Agree with suggested comment.
Added, thank you.
Bug description
The class
pattern:LogicalPattern
constrains the predicatepattern:patternExpression
to have a "range" ofpattern:PatternExpression
[sic.].https://github.com/ucoProject/UCO/blob/1.2.0/ontology/uco/pattern/pattern.ttl#L20-L35
pattern:patternExpression
(the predicate) is aowl:DatatypeProperty
, so it is expected to have a range of some literal.https://github.com/ucoProject/UCO/blob/1.2.0/ontology/uco/pattern/pattern.ttl#L59-L64
But,
pattern:PatternExpression
(capital P) is aowl:Class
, notrdfs:Datatype
:https://github.com/ucoProject/UCO/blob/1.2.0/ontology/uco/pattern/pattern.ttl#L48-L57
This is an OWL 2 DL error. Classes cannot be datatypes, and datatype properties cannot have class ranges.
I came across this while trying to figure out how to use
pattern:LogicalPattern
to represent a regular expression substitution command,s/foo/bar/g
.To the original drafters of
pattern:Pattern
: How was this supposed to work? Can somebody please provide a demonstration for thats/...
regular expression I gave above, from which we can go back and fixPatternExpression
?Steps to reproduce
Please see snippets above.
Requirements
Requirement 1
UCO's SHACL constraints must remain consistent with OWL design constraints, particularly around object properties versus datatype (literal-value) properties. (This is not a new requirement.)
Requirement 2
pattern:patternExpression
andpattern:PatternExpression
must be mutually consistent with one another. Currently,patternExression
is a datatype property with rangePatternExpression
, butPatternExpression
is aowl:Class
, notrdfs:Datatype
.Risk / Benefit analysis
Benefits
Having
pattern:PatternExpression
established and stable will enable further "downstream" specialization. See e.g. #550 (under draft).Risks
The pattern namespace was not demonstrated before being included in UCO 1.0.0. If a demonstration is not provided, it will be unclear if freshly-chosen design will be satisfactory.
Competencies demonstrated
Competency 1
Pending demonstration
Competency Question 1.1
Pending demonstration
Result 1.1
Pending demonstration
Solution suggestion
pattern:patternExpression
to anowl:ObjectProperty
.pattern:patternExpression
.sh:datatype
attempting to constrain toowl:Class
es.Coordination
develop
for the next release (N/A)develop
state with backwards-compatible implementation merged intodevelop-2.0.0
(N/A)develop-2.0.0
develop
branch updated to track UCO's updateddevelop
branch (N/A)develop-2.0.0
branch updated to track UCO's updateddevelop-2.0.0
branch