-
Notifications
You must be signed in to change notification settings - Fork 27
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
Unify call graphs #40
Conversation
@@ -142,6 +166,8 @@ class CallGraphTests extends PropertiesTest { | |||
} | |||
|
|||
describe("the CTA call graph analysis is executed") { | |||
cgKey = FTACallGraphKey |
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.
Shouldn't this be CTACallGraphKey?
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.
Thanks, will fix immediately.
@@ -65,7 +66,8 @@ trait APIBasedAnalysis extends FPCFAnalysis { | |||
caller.hasSingleDefinedMethod) { | |||
newSeenCallers += ((caller, pc, isDirect)) | |||
|
|||
results ::= handleNewCaller(caller.asDefinedMethod, pc, isDirect) | |||
// FIXME The asInstanceOf obviously won't work once different context types are possible |
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.
Do you want to keep the fixme? Just checking
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.
Yes, this Fixme will be solved in an upcoming pull request that introduces context-sensitive CGs.
import org.opalj.tac.fpcf.properties.TACAI | ||
|
||
/** | ||
* TODO: That state object is currently copy&paste and should be refactored. |
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.
Same as the fixme before: Do you want to leave this in?
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 guess this can be removed now, I think this PR already unifies the respective copies. Thank you.
Unifies the different call graph algorithms to a single base algorithm that uses different
TypeProvider
s to resolve the possible receivers of virtual calls.This enables all call graph modules to fully utilize the precision of the different TypeProviders, including information on allocation sites where available (the reflection module does not use allocation site information in all places possible to avoid excessive complexity, but it uses it in the most important cases).
This pull request also includes preparations to allow for future context-sensitive call graphs by stringing context information along where necessary.