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
{{ message }}
Repository navigation
Questions about Tai-e's APIs and implementations of callgraphs #175
I currently noticed that CallGraph provides two different APIs with the same default implementation, CallGraph.getCalleesOfM() and CallGraph.getSuccsOf():
The getSuccsOf seems straightforward to me, but the getCalleesOfM takes me a while to realize its meaning.
My question: Is this a deliberate design choice? What is the rationale behind this?
Mutable vs Immutable
The callgraphs seem to be mutable by design, i.e., by allowing adding nodes and edges to the callgraphs. This makes several callgraph related operations inefficient, such as querying the successors and predecessors of a node, where caching the results might be difficult.
However, many applications do not actually modify the callgraph (e.g., traversing the callgraphs when computing SCCs). Is there any chance that Tai-e will introduce ImmutableCallGraph or something like that?
CallGraph provides another interface with identical functionality, likely because getCalleesOfM has more specific semantics. BTW, obviously, one of the two can simply call the other to reuse code.
Is there any chance that Tai-e will introduce ImmutableCallGraph or something like that?
I agree, maybe this is an opportunity to bring it up.
Activity
zhangt2333 commentedon Jul 21, 2025
These two methods come from different interfaces:
CallGraph provides another interface with identical functionality, likely because
getCalleesOfMhas more specific semantics. BTW, obviously, one of the two can simply call the other to reuse code.I agree, maybe this is an opportunity to bring it up.