Skip to content
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

Refactor Callgraph #669

Merged
merged 5 commits into from
Aug 17, 2024
Merged

Refactor Callgraph #669

merged 5 commits into from
Aug 17, 2024

Conversation

alexroan
Copy link
Contributor

@alexroan alexroan commented Aug 16, 2024

1. Direction Naming

  • "Forward" & "Downstream" are now "Inward"
  • "Backward" & "Upstream" are now "Outward".

Rationale: mimic debugging terminology.
When developers use a debugger to navigate the call stack, they "Step Into" and "Step Out" of function calls.

2. "Investigator" Keyword Removed

The "Investigator" keyword doesn't quite fit here in the detector context. It feels more like the structure that I'm going to send something (currently called Trackers) into to find information.

As a Detector Developer, I want to create a CallGraph from an ASTNode, and delve inward (or outward) to check for certain conditions that are present themselves further into the stack.

3. Directory Structure

Moved everything related to callgraphs inside the graph folder.

@alexroan alexroan marked this pull request as ready for review August 16, 2024 14:23
@TilakMaddy
Copy link
Collaborator

Looks really nice! I l liked it :) Please merge

@TilakMaddy
Copy link
Collaborator

Follow up:
(after merging this)

I will adjust all the open PRs as well to reflect these new names

TilakMaddy
TilakMaddy previously approved these changes Aug 16, 2024
@TilakMaddy
Copy link
Collaborator

Some changes I have made:

  • There was a method called investigate as well which I renamed to accept (to stay consistent)
  • Re-export to graph namespace so it's easier for detector modules to use it
  • for_specific_nodes -> from_many_nodes

@TilakMaddy TilakMaddy self-requested a review August 17, 2024 07:06
@alexroan alexroan merged commit 87d8c5b into dev Aug 17, 2024
12 checks passed
TilakMaddy added a commit that referenced this pull request Aug 19, 2024
Co-authored-by: TilakMaddy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants