正在加载图片...
Precision-Guided Context Sensitivity for Pointer Analysis 141:17 method m.This case is rare,since it is unusual in Java programs to modify some field of an object by calling methods such as m.In Java,such modification is usually done with a call as in the last line of the example. 4.1.2 How Fast Is ZIPPER-Guided Pointer Analysis Compared with a Conventional Analysis?The analysis times for ZIPPER-guided pointer analysis and 2obj are shown in the third column in Table 1. On average,ZIPPER-guided pointer analysis achieves 3.4X speedup compared with 2obj.The best case is program xalan where 2obj spends about 17 minutes while ZIPPER-guided analysis finishes running in well under 2 minutes(9.2X speedup).The worst case is program bloat where 2obj spends 52 minutes while ZIPPER-guided analysis is 7 minutes faster(1.2X speedup). Recall that the goal of ZIPPER is not simply to speed up context-sensitive pointer analysis,but to do so while retaining its precision.All methods considered precision-critical are analyzed context- sensitively with the ZIPPER approach,even though context-insensitive analysis might be faster. This explains the bloat case:despite not seeing much efficiency improvement,high precision (98.8%)has been successfully maintained. ZIPPER-2obj*for bloat.The strict precision-guided design of ZIPPER can be relaxed for better efficiency if some heuristics are considered.That is,among the precision-critical methods identified by ZIPPER,some of them can be further excluded by keeping only the highly-precision-critical methods which may cause a significant precision loss if not analyzed context-sensitively.As a proof-of-concept,to identify these highly-precision-critical methods,we simply modify ZIPPER by adding one more heuristic and apply the modified ZIPPER(named zipper-2obj*in Table 1)to analyze bloat as described below. The added heuristic is that we do not consider basic flow tracking from an IN method unless the flowing-in objects have a large number of different types(for this proof-of-concept experiment, we set the number to 50).As a result,the modified ZIPPER(zipper-2obj*)reports only 14%of the methods as highly-precision-critical(in comparison,the original ZIPPER reports 40%of the methods as precision-critical),and the achieved efficiency and precision is shown in the last row of Table 1 The speedup now becomes 60.2X,which is much faster than the original 1.2X;however,as explained above,precision is accordingly hurt:95.5%of the precision is preserved,which is less than the 98.8%achieved by the original ZIPPER(zipper-2obj). This extra experiment demonstrates that heuristic approaches can be developed on top of ZIPPER via its construction of precision flow graphs.How to make other precision and efficiency trade-offs by leveraging ZIPPER is not the focus of this paper;however,it may be interesting to explore further in future work. Note that,as ZIPPER only reports on average 38%of the methods in a program as precision- critical(see Section 4.3.1),most methods are analyzed context-insensitively,which results in memory savings compared to a conventional context-sensitive pointer analysis.Thus,ZIPPER is expected to be even more beneficial for memory-constrained analysis environments. 4.1.3 What Is the Overhead of Running ZIPPER?As shown earlier,in Figure 6,the overhead of ZIPPER consists of:(1)running a context-insensitive pointer analysis(ci)as ZIPPER's pre-analysis and(2)running ZIPPER itself which identifies the precision-critical methods.The analysis time of ci is given in Table 1.On average,ci costs 52 seconds for each program. Table 2(last row)shows the performance of ZIPPER itself:the average analysis time of ZIPPER is just 32 seconds per input program.Table 2 also lists some related metrics about program size (the number of classes)and elements of ZIPPER's reasoning,i.e.,the number of nodes and edges of the object flow graph(OFG)per program,and the average number of nodes and edges of the Proc.ACM Program.Lang.,Vol.2,No.OOPSLA,Article 141.Publication date:November 2018.Precision-Guided Context Sensitivity for Pointer Analysis 141:17 method m. This case is rare, since it is unusual in Java programs to modify some field of an object by calling methods such as m. In Java, such modification is usually done with a call as in the last line of the example. 4.1.2 How Fast Is Zipper-Guided Pointer Analysis Compared with a Conventional Analysis? The analysis times for Zipper-guided pointer analysis and 2obj are shown in the third column in Table 1. On average, Zipper-guided pointer analysis achieves 3.4X speedup compared with 2obj. The best case is program xalan where 2obj spends about 17 minutes while Zipper-guided analysis finishes running in well under 2 minutes (9.2X speedup). The worst case is program bloat where 2obj spends 52 minutes while Zipper-guided analysis is 7 minutes faster (1.2X speedup). Recall that the goal of Zipper is not simply to speed up context-sensitive pointer analysis, but to do so while retaining its precision. All methods considered precision-critical are analyzed context￾sensitively with the Zipper approach, even though context-insensitive analysis might be faster. This explains the bloat case: despite not seeing much efficiency improvement, high precision (98.8%) has been successfully maintained. Zipper-2obj* for bloat. The strict precision-guided design of Zipper can be relaxed for better efficiency if some heuristics are considered. That is, among the precision-critical methods identified by Zipper, some of them can be further excluded by keeping only the highly-precision-critical methods which may cause a significant precision loss if not analyzed context-sensitively. As a proof-of-concept, to identify these highly-precision-critical methods, we simply modify Zipper by adding one more heuristic and apply the modified Zipper (named zipper-2obj* in Table 1) to analyze bloat as described below. The added heuristic is that we do not consider basic flow tracking from an In method unless the flowing-in objects have a large number of different types (for this proof-of-concept experiment, we set the number to 50). As a result, the modified Zipper (zipper-2obj*) reports only 14% of the methods as highly-precision-critical (in comparison, the original Zipper reports 40% of the methods as precision-critical), and the achieved efficiency and precision is shown in the last row of Table 1. The speedup now becomes 60.2X, which is much faster than the original 1.2X; however, as explained above, precision is accordingly hurt: 95.5% of the precision is preserved, which is less than the 98.8% achieved by the original Zipper (zipper-2obj). This extra experiment demonstrates that heuristic approaches can be developed on top of Zipper via its construction of precision flow graphs. How to make other precision and efficiency trade-offs by leveraging Zipper is not the focus of this paper; however, it may be interesting to explore further in future work. Note that, as Zipper only reports on average 38% of the methods in a program as precision￾critical (see Section 4.3.1), most methods are analyzed context-insensitively, which results in memory savings compared to a conventional context-sensitive pointer analysis. Thus, Zipper is expected to be even more beneficial for memory-constrained analysis environments. 4.1.3 What Is the Overhead of Running Zipper? As shown earlier, in Figure 6, the overhead of Zipper consists of: (1) running a context-insensitive pointer analysis (ci) as Zipper’s pre-analysis and (2) running Zipper itself which identifies the precision-critical methods. The analysis time of ci is given in Table 1. On average, ci costs 52 seconds for each program. Table 2 (last row) shows the performance of Zipper itself: the average analysis time of Zipper is just 32 seconds per input program. Table 2 also lists some related metrics about program size (the number of classes) and elements of Zipper’s reasoning, i.e., the number of nodes and edges of the object flow graph (OFG) per program, and the average number of nodes and edges of the Proc. ACM Program. Lang., Vol. 2, No. OOPSLA, Article 141. Publication date: November 2018
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有