Disable ReflectionAllocationsAnalysis for TypeBasedPointsTo key#367
Disable ReflectionAllocationsAnalysis for TypeBasedPointsTo key#367johannesduesing wants to merge 2 commits into
Conversation
|
Looks good to me. I wonder whether we should rename the ReflectionAllocationsAnalysisScheduler to be compatible with getModuleFQN though. |
|
I think that's fair, i can implement that. However i'm just now wondering: The |
|
None of the type-based points-to analyses (including 1-0-CFA) can use the allocation information. Though we could check whether it is useful to extend the analysis to provide type-based points-to sets for these. |
|
Maybe we need two analyses then, with the correct one being loaded via |
|
Our points-to analyses are flexible enough to handle such cases with one analysis (and two schedulers), but I'm not sure whether such an analysis is any useful for type-based points-to analysis or not. |
As mentioned in #357 the
ReflectionAllocationsAnalysisSchedulershould not be executed with theTypeBasedPointsToCallGraphKey, but it should be run for all other implementations ofPointsToCallGraphKey. This PR proposes one possible solution for the issue - i am however open for discussion, there are many ways this could be realized.This PR moves the
ReflectionAllocationsAnalysisSchedulerinto a separate configuration section, which is not loaded by thePointsToCallGraphKeytrait, but instead by the new and more specifictrait AllocationSiteBasedPointsToCallGraphKey extends PointsToCallGraphKey. TheTypeBasedPointsToCallGraphKeyonly implementsPointsToCallGraphKey, so the incompatible analysis is not loaded. I made all other direct children ofPointsToCallGraphKeyinherit fromAllocationSiteBasedPointsToCallGraphKeyinstead, so they all still load the desired analysis.