147:6 Tian Tan,Yue Li,Xiaoxing Ma,Chang Xu,and Yannis Smaragdakis 3obj 2obj 1type 2obj 2type 2type 9 CI 9 CI S1 S2 S3 Unity Fig.2.An example for illustrating the idea of Unity.S1,S2 and S3 are three input selective context-sensitivity approaches.The four squares show the selected context-sensitivity information for the same program P (i.e.,which methods of P should be analyzed by what context-sensitivity variants)yielded by the three input selective approaches(S1,S2 and S3)and Unity respectively.For example,the square of S1 means:the S1 approach determines that the methods enclosed in the green circle will be analyzed by 2obj while the remaining methods of P will be analyzed context-insensitively(i.e.,CI). heavier context elements and longer context lengths,if possible.This counterintuitive proposal is based on the following insight. Insight.Analyzing more methods context-sensitively may not incur an efficiency decline(some- times it may even accelerate an analysis as more false data flows are pruned away),as long as the right methods are chosen.Avoiding scalability-threat methods is essential [Li et al.2020; Smaragdakis et al.2014],but the net number of methods analyzed context-sensitively is not. As described in Section 2,each of the existing selective context-sensitivity approaches(henceforth, just "selective approaches")has its own insight (e.g.,based on expert experience,parameterized heuristics,principled program patterns,etc.)to identify which methods are more likely useful for improving precision while not incurring much efficiency cost,when analyzed context-sensitively. Limited by the effectiveness of each insight,every approach may miss a collection of methods which are truly precision-useful and efficiency-friendly;however,this problem can be alleviated when combining more selective approaches to identify more target methods.As a result,we propose to simultaneously and context-sensitively analyze all the methods identified by a set of selective approaches,S.Although now possibly many more methods need to be analyzed context-sensitively, we still have a chance to obtain an analysis that is scalable even if we analyze them together,as each of these extra methods is determined as not a scalability threat by at least one approach in S.Hence,although it is hard to give one principle to accurately decide which methods,say M,are precision-useful but not scalability-threatening,our proposal naturally takes advantages of the insights of different selective approaches for identifying M from different perspectives. We illustrate the key idea of Unity in Figure 2.Assume we have three selective approaches S1,S2,and S3.Figure 2 depicts the selected context-sensitivity information determined by each approach for the same program P.For instance,after analyzing P,S1 reports that the set of methods in the green circle(in S1 of Figure 2)should be analyzed by 2obj and the remaining methods(the gray part in S1)need to be analyzed context-insensitively(CI).Similarly,we have the results for S2 and S3 in Figure 2,and in the case of S3,three context-sensitivity variants,3obj,2obj and 1type are selected for different sets of methods. What does Unity produce given the above three approaches and their selected context-sensitivity information?Briefly,Unity finds out the most precise configuration by reassigning context-sensitivity variants to the methods which are reported to be analyzed context-sensitively by at least two input approaches.For example,among the overlapped methods reported by S1 and S3,from the point Proc.ACM Program.Lang.,Vol.5.No.OOPSLA,Article 147.Publication date:October 2021.147:6 Tian Tan, Yue Li, Xiaoxing Ma, Chang Xu, and Yannis Smaragdakis 2obj 2type 1type 2obj 3obj CI 2obj CI 1type 2obj 3obj CI 2type CI S1 S2 S3 Unity Fig. 2. An example for illustrating the idea of Unity. S1, S2 and S3 are three input selective context-sensitivity approaches. The four squares show the selected context-sensitivity information for the same program P (i.e., which methods of P should be analyzed by what context-sensitivity variants) yielded by the three input selective approaches (S1, S2 and S3) and Unity respectively. For example, the square of S1 means: the S1 approach determines that the methods enclosed in the green circle will be analyzed by 2obj while the remaining methods of P will be analyzed context-insensitively (i.e., CI). heavier context elements and longer context lengths, if possible. This counterintuitive proposal is based on the following insight. Insight. Analyzing more methods context-sensitively may not incur an efficiency decline (sometimes it may even accelerate an analysis as more false data flows are pruned away), as long as the right methods are chosen. Avoiding scalability-threat methods is essential [Li et al. 2020; Smaragdakis et al. 2014], but the net number of methods analyzed context-sensitively is not. As described in Section 2, each of the existing selective context-sensitivity approaches (henceforth, just łselective approachesž) has its own insight (e.g., based on expert experience, parameterized heuristics, principled program patterns, etc.) to identify which methods are more likely useful for improving precision while not incurring much efficiency cost, when analyzed context-sensitively. Limited by the effectiveness of each insight, every approach may miss a collection of methods which are truly precision-useful and efficiency-friendly; however, this problem can be alleviated when combining more selective approaches to identify more target methods. As a result, we propose to simultaneously and context-sensitively analyze all the methods identified by a set of selective approaches, 𝑆. Although now possibly many more methods need to be analyzed context-sensitively, we still have a chance to obtain an analysis that is scalable even if we analyze them together, as each of these extra methods is determined as not a scalability threat by at least one approach in 𝑆. Hence, although it is hard to give one principle to accurately decide which methods, say M, are precision-useful but not scalability-threatening, our proposal naturally takes advantages of the insights of different selective approaches for identifying M from different perspectives. We illustrate the key idea of Unity in Figure 2. Assume we have three selective approaches S1, S2, and S3. Figure 2 depicts the selected context-sensitivity information determined by each approach for the same program P. For instance, after analyzing P, S1 reports that the set of methods in the green circle (in S1 of Figure 2) should be analyzed by 2obj and the remaining methods (the gray part in S1) need to be analyzed context-insensitively (CI). Similarly, we have the results for S2 and S3 in Figure 2, and in the case of S3, three context-sensitivity variants, 3obj, 2obj and 1type are selected for different sets of methods. What does Unity produce given the above three approaches and their selected context-sensitivity information? Briefly, Unity finds out the most precise configuration by reassigning context-sensitivity variants to the methods which are reported to be analyzed context-sensitively by at least two input approaches. For example, among the overlapped methods reported by S1 and S3, from the point Proc. ACM Program. Lang., Vol. 5, No. OOPSLA, Article 147. Publication date: October 2021