Skip to content

JS: Omit uninteresting nodes from path explanations#1036

Merged
xiemaisi merged 2 commits into
github:rc/1.20from
asger-semmle:hide-implicit-ssa-defs
Mar 6, 2019
Merged

JS: Omit uninteresting nodes from path explanations#1036
xiemaisi merged 2 commits into
github:rc/1.20from
asger-semmle:hide-implicit-ssa-defs

Conversation

@asger-semmle

Copy link
Copy Markdown
Contributor

Hides nodes from the path explanation that aren't interesting. This includes:

  • Phi nodes, refinements, variable capture nodes.
  • Intermediate nodes in a +-based concatenation tree.

Evaluation underway.

@asger-semmle asger-semmle added JS WIP This is a work-in-progress, do not merge yet! labels Mar 4, 2019
@asger-semmle asger-semmle requested a review from a team as a code owner March 4, 2019 16:02
ghost
ghost previously requested changes Mar 5, 2019

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it will produce better paths.
We may want to refine the isHidden predicate later when we have more experience with inspecting paths.

Can we have some explicit tests for this feature?
The expected output of all existing path-problem tests need an update once we are satisfied with the implementation.

query predicate nodes(PathNode nd) { any() }
query predicate nodes(PathNode nd) {
not nd.isHidden() or
nd instanceof SourcePathNode or

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edge case: the SourcePathNode character is independent of the path. So you may display a hidden SourcePathNode in the middle of your path. I suppose we can live with that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with that.

@asger-semmle

Copy link
Copy Markdown
Contributor Author

Evaluation looks okay. After conferring with @xiemaisi I'll turn this into a 1.20 hotfix.

@asger-semmle asger-semmle force-pushed the hide-implicit-ssa-defs branch from d0f284a to 50a77ea Compare March 6, 2019 08:41
@asger-semmle asger-semmle requested a review from a team as a code owner March 6, 2019 08:41
@asger-semmle asger-semmle changed the base branch from master to rc/1.20 March 6, 2019 08:42
@asger-semmle asger-semmle removed the request for review from a team March 6, 2019 08:42
@asger-semmle asger-semmle added this to the 1.20 milestone Mar 6, 2019
@asger-semmle

Copy link
Copy Markdown
Contributor Author

Can we have some explicit tests for this feature?

Writing a test for this feels like copy/pasting the implementation into a test to check they are the same. The updated output from every path-problem is not enough?

@asger-semmle asger-semmle removed the WIP This is a work-in-progress, do not merge yet! label Mar 6, 2019
@xiemaisi xiemaisi dismissed ghost ’s stale review March 6, 2019 13:29

Comments addressed.

@xiemaisi xiemaisi merged commit 48c0949 into github:rc/1.20 Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants