摘要
程序定义域的确定有利于指导测试用例的选取 .虽然程序规范规定了输入变量的定义域 ,但程序实现本身也定义了其定义域 ,如果二者不能完全重合 ,那么某些软件故障就可诊断出来 .文中提出了一种基于数据流分析的程序定义域自动确定方法 .通过对源程序进行数据流分析和相关性分析 ,求取输入变量的定义域 ;采用程序抽取技术 ,将与输入变量无关的语句和函数剔除 ,简化了源程序 ,提高了分析效率 ;采用动态模拟技术 ,实现了特殊情形下输入变量定义域的确定 .实验证明 ,该方法是行之有效的 .
The determination of program's input domain is helpful to select test data. The implementation of a program defines the domain of input variables, though the specification of the program also specifies the domain. However, if they are not coincided with each other exactly, some software faults can be detected. Using the techniques of data flow analysis and relevance analysis on given program the domain can automatically be identified. The program slicing method is employed to delete those statements and functions that are not related to input variables, so that the given program is simplified and analyzing efficiency is improved. The domain of input variables can be obtained under some particular circumstances by using dynamic simulation strategy. A lot of experimental results show that the proposed approach is efficient.
出处
《计算机辅助设计与图形学学报》
EI
CSCD
北大核心
2001年第8期762-768,共7页
Journal of Computer-Aided Design & Computer Graphics
基金
国家自然科学基金 (6973 3 0 10 )资助