-
Notifications
You must be signed in to change notification settings - Fork 40
#650: Added link to VarExpression to clarify what "variable" means here #655
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
Merged
+9
−9
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
13bb166
#650: Added link to VarExpression to clarify what "variable" means here
HolgerKnublauch 8ef6833
Merge branch 'gh-pages' into issue-650
HolgerKnublauch 9ba7d4c
Removed link again, and the redundant mention of focusNode, also fixe…
HolgerKnublauch 5b9ee66
Switched from using 'node' to 'term', fixed indentation
HolgerKnublauch 6a53e19
Merge branch 'gh-pages' into issue-650
HolgerKnublauch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
At least:
although this called a "var expression" not "a variable" so that seems to make it:
The definition:
says the blank node is the var expression and is an RDF term.
If you want to keep it as the current design, please keep using "var expression" and then shacl12-rules can define
variable. (There are only two other uses of "variable" in the node expressions doc at the moment.)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.
We don't even need to talk VarExpressions at all here. The key is the term "scope". And scope is defined in SHACL 1.2 core as
So I think we can avoid the term variable in that definition and just refer to mappings in the scope, where the key in the map is the value of shnex:var of the var expression.
I guess the proper fix is then to create a deep link to the scope definition and reference that from node expressions.
Uh oh!
There was an error while loading. Please reload this page.
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.
The map is from a string (taken from
shnex:var) to RDF term.If it is a node (RDF Term), then
is two different scope entries.
If there is no varExpression, how does a node expression work
Something has to define
and that to be an error if "foo" is not in the scope, which is returning an empty list from scope lookup.
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 struggle to parse your response.
are two times the same expression. Why should those be "different scope entries"?
The sentence above the sparql:plus example seems unfinished. What do you mean?
We could change the handling of undefined variables but then how could we distinguish unbound (optional) parameters from those called by accident in a node expression? There is no "null" value here like in JavaScript.
Anyway, I made further adjustments to the PR and believe external documents can refer to the variable
scopeby name when they refer to evalExpr.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.
And what RDF term do they evaluate to? That's necessary because:
(PS better to say "RDF term", not "nodes" which are the existing subject/objects of a graph)
Uh oh!
There was an error while loading. Please reload this page.
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.
Why can't you say that the subject of
[ shnex:var "foo" ]is (as in "describes", "represents" or "denotes", not in the RDF syntax where is a blank node) a variable with name "foo"?After all:
Var expressions are expressions. They yield an RDF term when evaluated.
Here, they are the use of a variable in a role.
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 wanted to avoid the (formal) term variable because it is overloaded and in #650 you complain that there is no formal definition of variable. At this stage I am really not sure what you want here. Would you like to produce a PR or specific suggestion yourself instead of me guessing?
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.
Indeed #650 is a request have a definition or at least an anchor for "variable".
How can rules say "treat
[ shnex:var "foo" ]as a (SPARQL) variable in filter expressions?How can node expressions say "The variable name" in defining
shnex:varwithout the domain being a variable?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.
The anchor is for "var expression" https://w3c.github.io/data-shapes/shacl12-node-expr/#dfn-var-expression and you can then refer to the variable name as
this avoids me having to introduce a formal term for "variable" and other documents can freely redefine it.
If that's acceptable, please still approve this PR because it does some clean up.
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.
Rules will now have to define evaluating node expressions because the input is a variable from earlier in the rule pattern.
Since we aren't defining a common evaluation model anymore, go ahead and merge this.
I'm not an editor of "Node Expression" so I will approve it this once.