-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pattern:PatternExpression is erroneously encoded as a datatype and class #562
Comments
It seems #550 is built on |
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. |
This test is spelled as a "Negative" constraint to avoid attempting to hard-code a list of the recognized OWL "built-in" datatypes alongside custom RDFS datatypes (such as UCO's vocabulary namespace members). The anonymous node shape design pattern is documented in PR 564, commit 77cd47d. This patch is known to fail CI at the moment because it catches the error described in 562, but does not resolve that situation. This patch is provided now to prevent this implementation error pattern from arising in the future. References: * #562 * 77cd47d Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
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 |
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
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:
|
No effects were observed on Make-managed files. References: * #562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
@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
<casework/casework.github.io#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
<#562 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAWGQOT64ONLRUG7IP5463ZAD42VAVCNFSM6AAAAAA7K2FVE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYGU3DAMJVGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Agree with suggested comment. |
No effects were observed on Make-managed files. References: * #562 Acked-by: Paul Brandt <paul@brandt.name> Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Added, thank you. |
References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#562 * ucoProject/UCO#586 * ucoProject/UCO#590 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#562 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#562 * ucoProject/UCO#586 * ucoProject/UCO#590 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#562 * ucoProject/UCO#586 * ucoProject/UCO#590 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
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
branchThe text was updated successfully, but these errors were encountered: