期刊文献+

Source Code Prioritization Using Forward Slicing for Exposing Critical Elements in a Program 被引量:1

Source Code Prioritization Using Forward Slicing for Exposing Critical Elements in a Program
原文传递
导出
摘要 Even after thorough testing, a few bugs still remain in a program with moderate complexity. These residual bugs are randomly distributed throughout the code. We have noticed that bugs in some parts of a program cause frequent and severe failures compared to those in other parts. Then, it is necessary to take a decision about what to test more and what to test less within the testing budget. It is possible to prioritize the methods and classes of an object-oriented program according to their potential to cause failures. For this, we propose a program metric called influence metric to find the influence of a program element on the source code. First, we represent the source code into an intermediate graph called extended system dependence graph. Then, forward slicing is applied on a node of the graph to get the influence of that node. The influence metric for a method m in a program shows the number of statements of the program which directly or indirectly use the result produced by method m. We compute the influence metric for a class c based on the influence metric of all its methods. As influence metric is computed statically, it does not show the expected behavior of a class at run time. It is already known that faults in highly executed parts tend to more failures. Therefore, we have considered operational profile to find the average execution time of a class in a system. Then, classes are prioritized in the source code based on influence metric and average execution time. The priority of an element indicates the potential of the element to cause failures. Once all program elements have been prioritized, the testing effort can be apportioned so that the elements causing frequent failures will be tested thoroughly. We have conducted experiments for two well-known case studies -- Library Management System and Trading Automation System -- and successfully identified critical elements in the source code of each case study. We have also conducted experiments to compare our scheme with a related scheme. The experimental studies justify that our approach is more accurate than the existing ones in exposing critical elements at the implementation level. Even after thorough testing, a few bugs still remain in a program with moderate complexity. These residual bugs are randomly distributed throughout the code. We have noticed that bugs in some parts of a program cause frequent and severe failures compared to those in other parts. Then, it is necessary to take a decision about what to test more and what to test less within the testing budget. It is possible to prioritize the methods and classes of an object-oriented program according to their potential to cause failures. For this, we propose a program metric called influence metric to find the influence of a program element on the source code. First, we represent the source code into an intermediate graph called extended system dependence graph. Then, forward slicing is applied on a node of the graph to get the influence of that node. The influence metric for a method m in a program shows the number of statements of the program which directly or indirectly use the result produced by method m. We compute the influence metric for a class c based on the influence metric of all its methods. As influence metric is computed statically, it does not show the expected behavior of a class at run time. It is already known that faults in highly executed parts tend to more failures. Therefore, we have considered operational profile to find the average execution time of a class in a system. Then, classes are prioritized in the source code based on influence metric and average execution time. The priority of an element indicates the potential of the element to cause failures. Once all program elements have been prioritized, the testing effort can be apportioned so that the elements causing frequent failures will be tested thoroughly. We have conducted experiments for two well-known case studies -- Library Management System and Trading Automation System -- and successfully identified critical elements in the source code of each case study. We have also conducted experiments to compare our scheme with a related scheme. The experimental studies justify that our approach is more accurate than the existing ones in exposing critical elements at the implementation level.
出处 《Journal of Computer Science & Technology》 SCIE EI CSCD 2011年第2期314-327,共14页 计算机科学技术学报(英文版)
基金 supported by grants from the Department of Science and Technology Government of India under SERC Project
关键词 program slice extended system dependence graph influence of a class test priority program slice, extended system dependence graph, influence of a class, test priority
  • 相关文献

参考文献1

共引文献4

同被引文献14

  • 1吕建,马晓星,陶先平,徐锋,胡昊.网构软件的研究与进展[J].中国科学(E辑),2006,36(10):1037-1080. 被引量:101
  • 2OASIS Web Services Business Process Execution Language. Web services business process execution language version 2.0[EB/OL].[2011-12-06]. http://docs.oasis-open.org/wsbpel/2.0/CS01/wsbpel-v2.0-CS01.pdf.
  • 3LI L, CHOU W, GUO W P. Control flow analysis and coverage driven testing for Web services[C] // ICWS '08: Proceedings of the 2008 IEEE International Conference on Web Services. Piscataway: IEEE, 2008: 473-480.
  • 4LI L,CHOU W,GUO W P.An abstract GFSM model for optimal and incremental conformance testing of Web services[C] // ICWS '09: Proceedings of the IEEE International Conference on Web Services. Piscataway: IEEE, 2009: 205-212.
  • 5YUAN YUAN, LI ZHONGJIE, SUN WEI. A graph-search based approach to BPEL4WS test generation[C] // International Conference on Software Engineering Advances. Piscataway: IEEE, 2006: 205-212.
  • 6LARSEN L, HARROLD M J. Slicing object-oriented software[C] // ICSE '96: Proceedings of the 18th International Conference on Software Engineering. Washington, DC: IEEE Computer Society, 2006: 495-505.
  • 7ZHAO JIANJUN, CHENG JINGDE, USHIJIM K. Static slicing of concurrent object-oriented programs[C] // COMPSAC '96: Proceedings of the 20th Conference on Computer Software and Applications. Washington, DC: IEEE Computer Society, 2006: 312-320.
  • 8NANDA M G, CHANDRA S, SARKAR V. Decentralizing execution of composite Web services[C] // OOPSLA '04: Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. New York: ACM, 2004: 170-187.
  • 9FERRANTE J, OTTENSTEIN K J, WARREN J D. The program dependence graph and its use in optimization[J].ACM Transactions on Programming Languages and Systems, 1987, 9(3): 319-349.
  • 10SONG WEI, MA XIAOXING, CHEUNG S C, et al. Refactoring and publishing WS-BPEL processes to obtain more partners[C] // IEEE International Conference on Web Services. Piscataway: IEEE, 2011: 129-136.

引证文献1

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部