期刊文献+

基于域敏感指向分析的区间运算在软件测试中的应用 被引量:3

Application of Interval Arithmetic in Software Testing Based on Field-Sensitive Point-to Analysis
下载PDF
导出
摘要 静态分析由于并不执行源代码,导致无法获取变量在实际运行中的取值,进而对一些和变量取值相关的缺陷检测带来了一定困难.利用符号执行和区间运算技术,虽然可以模拟程序实际执行时变量的可能取值范围,但对于结构体、数组等,由于不能对其成员进行独立描述,导致数据流无法支持域敏感分析,对和其成员变量相关的缺陷的检测难以实现,产生很多漏报.基于域敏感指向分析的区间运算模型,在域敏感指向分析模型的基础上对其进行了改进,将复杂数据类型拆分成独立的成员变量进行分析,并提出一种关联抽象取值集的类型系统,该系统可以保守的描述程序在动态执行时变量的可能取值.结合赋值语句的抽象语法定义,给出了该类型系统在数据流计算时的具体推导算法,并将其应用在缺陷检测系统(DTSGCC和DTSCPP)中.选用DTSCPP作为实验平台,对6个C++开源工程进行了测试,并对其数据进行了统计分析,结果表明该方法可以减少漏报,且测试效率与非域敏感版本相当. Static analysis cannot obtain variable values in actual operation, because it does not execute source codes. It is difficult to detect defects which are related with variable values. Although the technique of symbolic execution and interval arithmetic can imitate the range of variable values in actual execution program, for structures, arrays, etc., their members cannot be described independently. It makes data flow analysis field-insensitive, and generates many false negative. The interval arithmetic model based on field-sensitive point-to analysis improves the classical model by splitting the complex data type into separate variables, and proposes a type system with a set of abstract values. This system can describe the range of variable values conservatively. When calculating the data flow, combined with the abstract syntax definition of assignment statements, we also propose a derivation algorithm to the type, and apply this type system in defect testing system (DTSGCC and DTSCPP). We choose DTSCPP as the experimental platform, six C++ open source projects as test objects. Experimental results prove that our method can efficiently lower the ratio of false negative in the condition of keeping the analysis time constant.
出处 《计算机研究与发展》 EI CSCD 北大核心 2012年第9期1852-1862,共11页 Journal of Computer Research and Development
基金 国家"八六三"高技术研究发展计划基金项目(2009AA012404 2012AA010101)
关键词 静态分析 缺陷检测 域敏感 指向分析 区间运算 static analysis defect detecting field-sensitive point-to analysis interval arithmetic
  • 相关文献

参考文献30

  • 1Dhurjati D, Kowshik S, et al. SAFECode: Enforcing alias analysis for weakly typed languages [J]. ACM SIGPLAN Notices, 2006, 41(6): 144-157.
  • 2Hind M, et al. Interprocedural pointer alias analysis [J]. ACM Trans on Programming Languages and Systems, 1999, 21(4) : 848-894.
  • 3Horwitz S. Precise flow-insensitive may-alias analysis is NP- hard [J]. ACM Trans on Programming Languages and Systems, 1997, 19(1): 1-6.
  • 4Jeannet B," Min6 A. Apron: A library of numerical abstract domains for static analysis[C] //Proc of Computer Aided Verification 21st Int Conf. Berlin: Springer, 2009:661-667.
  • 5Mine A. The octagon abstract domain [J].Higher-Order and Symbolic Computation, 2006,19(1) : 32-]00.
  • 6Pasareanu C S, Visser W. A survey of new trends in symbolic execution for software testing and analysis [J]. International Journal on Software Tools for Technology Transfer, 2009, 11(4): 339-353.
  • 7王雅文,宫云战,肖庆,杨朝红.基于抽象解释的变量值范围分析及应用[J].电子学报,2011,39(2):296-303. 被引量:16
  • 8杨朝红,宫云战,肖庆,王雅文.基于缺陷模式的软件测试中的区间运算应用[J].计算机辅助设计与图形学学报,2008,20(12):1630-1635. 被引量:14
  • 9Pearce D J, Kelly P H J, et al. Efficient field-sensitive pointer analysis of C [J]. ACM Trans on Programming Languages and Systems, 2007, 30(1) : 4-es.
  • 10Steensgaard B. Points-to analysis by type inference of programs with structures and unions [C] //Proc of Compiler Construction 6th Int Conf. Berlin: Springer, 1996:136-]50.

二级参考文献24

共引文献53

同被引文献36

  • 1张卫祥,刘文红,杜会森.基于软件测试与知识发现的软件定量评估方法[J].计算机科学,2012,39(S3):28-30. 被引量:2
  • 2李福川,宋晓秋.软件测试中的新方法——区间代数方法[J].计算机工程与设计,2005,26(10):2576-2578. 被引量:4
  • 3聂长海,徐宝文,史亮.一种新的二水平多因素系统两两组合覆盖测试数据生成算法[J].计算机学报,2006,29(6):841-848. 被引量:21
  • 4史亮,聂长海,徐宝文.基于解空间树的组合测试数据生成[J].计算机学报,2006,29(6):849-857. 被引量:31
  • 5Ramanmoorthy C V, Hos B F, Chen W T. On the au- tomated generation of program test data [J]. IEEE Trans on Software Engineering, 1976, 2(4):293-300.
  • 6De MiUo R A, Offutt A J. Constraint-based automatic test data generation[J]. IEEE Trans on Software En- gineering, 1991, 17(9) :900-911.
  • 7Coward P D. Symbolic execution and testing[J]. In- formation and Software Technology, 1991, 33 (1) : 53-64.
  • 8Zhang J, Wang X. A constraint solver and its applica- tion to path feasibility analysis[J]. International Jour- nal of Software Engineering & Knowledge Engi- neering, 2001, 11(2) : 139-156.
  • 9Miller W, Spooner D L. Automatic generation of floating point test data[J], IEEE Trans on Software Engineering, 1976, 2(3) :223-226.
  • 10Gupta N, Mathur A P, Soffa M L. Automated test data generation using an iterative relaxation methodiC]// Proc of the ACM SIGSOFT Sixth Int Syrnp on the Foundations of Software Engineering. Orlando.. ACM Press, 1998. 231-244.

引证文献3

二级引证文献6

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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