-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Data flow: Account for hidden subpath wrappers
#15734
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
Conversation
126e550 to
ad21ea7
Compare
ad21ea7 to
593ccf2
Compare
593ccf2 to
543cbfc
Compare
543cbfc to
f533ae9
Compare
f533ae9 to
2aa0cda
Compare
| --- | ||
| category: minorAnalysis | ||
| --- | ||
| * Path explanations now include flow that goes through callbacks passed into library functions. For example, if `map` is library function, then in `result = map(xs, x => x + 1)` we will now include the step from `x` to `x + 1` in the path explanation, instead og going directly from `xs` to `result`. Note that this change does not affect actual query results, but only how path explanations are computed. |
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.
| * Path explanations now include flow that goes through callbacks passed into library functions. For example, if `map` is library function, then in `result = map(xs, x => x + 1)` we will now include the step from `x` to `x + 1` in the path explanation, instead og going directly from `xs` to `result`. Note that this change does not affect actual query results, but only how path explanations are computed. | |
| * Path explanations now include flow that goes through callbacks passed into library functions. For example, if `map` is a library function, then in `result = map(xs, x => x + 1)` we will now include the step from `x` to `x + 1` in the path explanation, instead of going directly from `xs` to `result`. Note that this change does not affect actual query results, but only how path explanations are computed. |
| private PathNodeImpl localStepFromHidden(PathNodeImpl n) { | ||
| n = localStep(result) and | ||
| result.isHidden() |
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.
From the name I'd expect that n was hidden, not that the order was swapped.
| private PathNodeImpl localStepFromHidden(PathNodeImpl n) { | |
| n = localStep(result) and | |
| result.isHidden() | |
| private PathNodeImpl localStepFromHidden(PathNodeImpl n) { | |
| result = localStep(n) and | |
| n.isHidden() |
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.
Or maybe just change the predicate name:
| private PathNodeImpl localStepFromHidden(PathNodeImpl n) { | |
| n = localStep(result) and | |
| result.isHidden() | |
| private PathNodeImpl revLocalStepToHidden(PathNodeImpl n) { | |
| n = localStep(result) and | |
| result.isHidden() |
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.
Or maybe that should be revLocalStepFromHidden. I guess that depends on whether you read it as rev applying to all of the rest or just to localStep.
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 the code would be clearer if both of these relations were using named columns instead of the result column and were both in the forward direction, i.e. localStepFromHidden(n1, n2) and localStepToHidden(n1, n2)`. This would add a few lines and name a few more intermediate nodes in the usages below, but I think that's a readability win.
aschackmull
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 readability can be improved a bit, but otherwise LGTM.
c8d3e64 to
7a3b8eb
Compare
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
aschackmull
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.
LGTM


Previously, we would not get
subpathscomputed for hidden wrappers, such as when flow passes through a callback passed into a library method with a flow summary:This PR changes that to allow for an arbitrary number of hidden intermediate wrappers, and also takes into account that argument/out/parameter nodes may be hidden (we previously only took into account that return nodes could be hidden).