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

Unify call graphs #40

Merged
merged 3 commits into from
Oct 13, 2021
Merged

Unify call graphs #40

merged 3 commits into from
Oct 13, 2021

Conversation

errt
Copy link
Collaborator

@errt errt commented Sep 10, 2021

Unifies the different call graph algorithms to a single base algorithm that uses different TypeProviders 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.

@@ -142,6 +166,8 @@ class CallGraphTests extends PropertiesTest {
}

describe("the CTA call graph analysis is executed") {
cgKey = FTACallGraphKey
Copy link
Collaborator

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?

Copy link
Collaborator Author

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
Copy link
Collaborator

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

Copy link
Collaborator Author

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.
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

@errt errt requested a review from TorunR October 11, 2021 14:08
@errt errt merged commit 48dc216 into develop Oct 13, 2021
@errt errt mentioned this pull request Nov 26, 2021
@errt errt deleted the feature/unify-cgs branch January 23, 2023 14:39
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