正在加载图片...
Y.Li,T.Tan,Y.Zhang,and J.Xue XX:17 Case 1:TAILOR helps filtering out false alarms Case 2:TAILOR helps without ESC Number of SCs:43 77 SCs in total Number of SCs:7 Distributed in programs:PMD.ANTLR (Classified into four cases) Distributed in programs:ANTLR,Avrora,FOP.PMD m设工 min Befcre Before After Precision improved:100% Precision imnproved:15%(avg),7%(min),56%(max) Case 4:TAILOR fails to help Case 3:TAILOR helps with ESC Number of SCs:14 Number of SCs:13 Distributed in programs:ANTLR.FOF Distribufed in programs:FOP,PMD TSUCER TSUICER ma max min 6L min 已e的re TAILOR is useful for Cases 1,2 and 3(82%) TAILOR Aher Precision improved0。 but not for Case 4(18%) Precision improved:46%(avg),41%(min),50%(max) Figure 9 A case study demonstrating how TAILOR enables TSLICER to remove more SC-irrelevant statements based on the SCs deduced from the results reported by a typestate analysis,CLARA [9]. with the variables of interest selected automatically.However,the results in the following cases are excluded:(1)CLARA crashes due to runtime exceptions in the case of Eclipse, JBoss and Tomcat,(2)TSLICER is unscalable for a criterion(within 1 hour),and(3)the size of a thin slice is less than 5(small enough for human consumption).Finally,77 SCs are considered in total,involving 66 errors and 11 program points (like the one in Figure 7)for our debugging and understanding tasks.All these SCs are provided in our artifact. Results and Analysis Figure 9 presents the final results,with all the 77 SCs classified into four cases.In each case,we give the number of SCs included,the names of SC contributing programs,the size ranges of TSLICER's thin slices before and after the SC- irrelevant statements detected by TAILOR are removed,as well as the minimum,maximum and average precision improvements achieved.Note that WALA's traditional slicer is unscalable for any SC(within 1 hour).Below we first analyze each case and then make some remarks. Case 1 There are 43 SCs distributed in two programs,ANTLR and PMD.TSLICER has produced thin slices ranging from 5 to 23 statements,requiring further human analysis efforts. In contrast,TAILOR has produced only zero-sized tailored programs,declaring all the 43 errors as false alarms with respect to the given SCs.Furthermore,as CLARA is sound(with respect to GICFG),all the 43 errors are false alarms for the 43 reported locations. Let us consider a SC from PMD.CLARA reports a "write after close"typestate error for a call to writer.write()at line 33 in class net.sourceforge.pmd.renderers.TextRenderer, together with four two-statement sequences of method calls leading to this potential error loc- ation:line290→line325,line290→line337,1ime292→line325,and line292-→line337 These five calls are distributed in classes net.sourceforge.pmd.PMD and the afore-mentioned class TextRenderer.Given this four-sequence SC ending at line 33,TAILOR recognizes that all these sequences are infeasible since line 33 is not reachable from lines 325 and 337. CLARA reports such false errors as it is partially context-sensitive and intraprocedurally but not interprocedurally flow-sensitive.This is a typical trade-off made by static analyses, which must,for example,reason about complicated typestate or protocol information as well. Otherwise,full context-and flow-sensitivity is unattainable scalably for large programs [9]. Unlike these client analyses,TAILOR reasons about the(un)reachability of a statement towards EC00P2016Y. Li, T. Tan, Y. Zhang, and J. Xue XX:17 Case 1: TAILOR helps filtering out false alarms Number of SCs: Precision improved: Size range of thin slices Before After 0 max min 23 5 Distributed in programs: PMD, ANTLR 43 100% 77 SCs in total (Classified into four cases) TAILOR is useful for Cases 1, 2 and 3 (82%) but not for Case 4 (18%) Case 4: TAILOR fails to help Number of SCs: Precision improved: Before After max min 31 6 Distributed in programs: ANTLR, FOP 14 0% max min 31 6 Case 3: TAILOR helps with ESC Number of SCs: Precision improved: Before After max min 22 9 Distributed in programs: FOP, PMD 13 max min 13 5 46%(avg), 41%(min), 50%(max) Case 2: TAILOR helps without ESC Number of SCs: Before After 12 max min 43 13 Distributed in programs: ANTLR, Avrora, FOP, PMD 7 max min 20 Precision improved: 15%(avg), 7%(min), 56%(max) TAILOR TSLICER TAILOR TSLICER TAILOR TSLICER TAILOR TSLICER Size range of thin slices Size range of thin slices Size range of thin slices Figure 9 A case study demonstrating how Tailor enables TSlicer to remove more SC-irrelevant statements based on the SCs deduced from the results reported by a typestate analysis, Clara [9]. with the variables of interest selected automatically. However, the results in the following cases are excluded: (1) Clara crashes due to runtime exceptions in the case of Eclipse, JBoss and Tomcat, (2) TSlicer is unscalable for a criterion (within 1 hour), and (3) the size of a thin slice is less than 5 (small enough for human consumption). Finally, 77 SCs are considered in total, involving 66 errors and 11 program points (like the one in Figure 7) for our debugging and understanding tasks. All these SCs are provided in our artifact. Results and Analysis Figure 9 presents the final results, with all the 77 SCs classified into four cases. In each case, we give the number of SCs included, the names of SC￾contributing programs, the size ranges of TSlicer’s thin slices before and after the SC￾irrelevant statements detected by Tailor are removed, as well as the minimum, maximum and average precision improvements achieved. Note that Wala’s traditional slicer is unscalable for any SC (within 1 hour). Below we first analyze each case and then make some remarks. Case 1 There are 43 SCs distributed in two programs, ANTLR and PMD. TSlicer has produced thin slices ranging from 5 to 23 statements, requiring further human analysis efforts. In contrast, Tailor has produced only zero-sized tailored programs, declaring all the 43 errors as false alarms with respect to the given SCs. Furthermore, as Clara is sound (with respect to GICFG), all the 43 errors are false alarms for the 43 reported locations. Let us consider a SC from PMD. Clara reports a “write after close” typestate error for a call to writer.write() at line 33 in class net.sourceforge.pmd.renderers.TextRenderer, together with four two-statement sequences of method calls leading to this potential error loc￾ation: line 290 → line 325, line 290 → line 337, line 292 → line 325, and line 292 → line 337. These five calls are distributed in classes net.sourceforge.pmd.PMD and the afore-mentioned class TextRenderer. Given this four-sequence SC ending at line 33, Tailor recognizes that all these sequences are infeasible since line 33 is not reachable from lines 325 and 337. Clara reports such false errors as it is partially context-sensitive and intraprocedurally but not interprocedurally flow-sensitive. This is a typical trade-off made by static analyses, which must, for example, reason about complicated typestate or protocol information as well. Otherwise, full context- and flow-sensitivity is unattainable scalably for large programs [9]. Unlike these client analyses, Tailor reasons about the (un)reachability of a statement towards E COO P 2 0 1 6
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有