-
Notifications
You must be signed in to change notification settings - Fork 40
refactor: rename union/minus node expressions to join/remove in node … #636
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
base: gh-pages
Are you sure you want to change the base?
Conversation
… to node expressions
… node expressions
…e expressions spec
|
"concatentation" is used in the definition. Various text stil uses "union":
and
and
Example 10 has
The text on duplicates is unclear - it seems to read as they may occur but also that a system that eliminates them is also correct. Is it order preserving? Also - shnex:remove - is it order preserving?
that could be read as one-for-one or a remove contained list. A list "1 1 1 2 2" removing "1 1" - could be "1 2 2", or "1 1 2 2" legal or "1 2 1" with different readings. |
|
Suggestion: make the names "list*" (including similar operations). This gives more freedom to what the specific operation name is:
The handling of order preserving needs to be made clear - or text to say it does not matter (i.e. it's a multiset/bag). This is in other places as well -- shnex:intersection (what is the intersection of "1 1 1 2 2 1" and "1 1"? the text can be read several ways including as "subsection" or keep original (LHS) cardinality) |
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
… and documentation
|
Here's the summary of how I tried to address @afs 's comments: 1. “Join” → “Concat” terminology and semanticsIn
2. Expanded examples and evaluation tracesIntersection Expressions section:
Remove Expressions section:
3. FlatMap Expressions: clarified semantics and richer exampleThe Advanced Sequence Operations / FlatMap Expressions section was significantly reworked:
4. Minor formatting tweaks
5. Vocabulary updates for concat vs joinIn
In
|
HolgerKnublauch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good starting point. It will be easier to drill into details once this is merged into main and we have individual sub-issues compared to this mega thread. I have not myself looked into all details but will do so once I do the implementation and test cases.
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> Co-authored-by: Holger Knublauch <holger@topquadrant.com>
can I just merge this in now and we will tackle any issues with subissues afterwards, if necessary? |
|
Yes, that's ok. |
This is a revision of the now closed PR here: #526 (comment)
Closes #484
This pull request implements comprehensive changes to address Issue #484 regarding sequence processing naming inconsistencies in SHACL Node Expressions. The changes align the vocabulary and documentation with the sequence-based nature of node expression processing while maintaining backward compatibility through deprecation notices.
Problem Statement
SHACL Node Expressions are fundamentally sequence-based but were using set-style operation names, creating confusion:
unionandminussuggested set semantics despite working on ordered sequencespathproperty conflicted conceptually with constraintsh:pathSolution
1. Vocabulary Renaming for Sequence Semantics
Renamed Operations:
shnex:union→shnex:join- Emphasizes sequence concatenation with order preservationshnex:minus→shnex:remove- Clearer operation name for sequence subtractionshnex:path→shnex:pathValues- Distinguishes from constraintsh:path(needs to align with Rename shnex:path to shnex:pathValues and change its shnex:nodes to shnex:focusNode #514 )Deprecation Strategy:
shacl.ttlwith deprecation notices forsh:unionandsh:minus2. Advanced Sequence Operations
New Operations Added:
shnex:flatMap- Applies expression to each input node and flattens resultsshnex:findFirst- Returns first node conforming to a given shapeshnex:matchAll- Returns true if all nodes conform to a given shapeFiles Modified
Vocabulary Files
shacl12-vocabularies/shnex.ttlshacl12-vocabularies/shacl.ttlsh:unionandsh:minusDocumentation
shacl12-node-expr/index.htmlNew Advanced Operations: