You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently facing a challenge while generating a call graph for a JavaScript file using WALA (the T.J. Watson Libraries for Analysis). In the generated call graph, I observe the inclusion of certain nodes that do not correspond to call sites, and these nodes do not have any callees associated with them.
Is there a way to filter out or exclude these non-call-site nodes from the call graph? These nodes, which do not represent function invocations, are adding unnecessary complexity to the call graph and do not serve any purpose for my analysis. I am looking for advice on how to adjust the settings or modify WALA to prevent these nodes from being included in the call graph. Any recommendations or insights on this matter would be highly appreciated.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered:
flyboss
changed the title
Unnecessary Nodes in Javascript Call Graph
Clarification Needed on Nodes in JavaScript Call Graph Using Field-Based Algorithm
Mar 22, 2024
Hi @flyboss very sorry for my slow response. These call edges correspond to the array and object allocation occurring at line 1 and line 2 respectively. You might be right that in these cases, technically no functions are called (I'd have to read the ECMAScript spec carefully to be sure). I think what's going on is that for uniformity, WALA models these literal expressions in its IR as calls to new Array and new Object. If you specifically want to filter out such calls corresponding to literals, my best suggestion would be to look for the Object and Array constructor methods as the target in the call graph, and then check the corresponding source location to see if it's a literal. Is that helpful? Sorry again for the delayed response.
Issue Description:
I am currently facing a challenge while generating a call graph for a JavaScript file using WALA (the T.J. Watson Libraries for Analysis). In the generated call graph, I observe the inclusion of certain nodes that do not correspond to call sites, and these nodes do not have any callees associated with them.
Test JavaScript Code:
Java code
Output using field-based(OPTIMISTIC_WORKLIST) Algorithm:
Inquiry:
Is there a way to filter out or exclude these non-call-site nodes from the call graph? These nodes, which do not represent function invocations, are adding unnecessary complexity to the call graph and do not serve any purpose for my analysis. I am looking for advice on how to adjust the settings or modify WALA to prevent these nodes from being included in the call graph. Any recommendations or insights on this matter would be highly appreciated.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: