C工程中的非四则运算在所有数值运算中出现的比例为23%.在使用搜索技术进行测试用例生成时,非四则运算的求解效率很低,因为非四则运算没有对应的区间运算法则以提高搜索效率.为此,提出一种等价变换方法,将非四则运算分解为多个四则运算,再应用四则运算的区间运算来提高整体的求解效率.实验表明,此方法能提高非四则运算的测试用例生成效率.
Non-elementary arithmetics accounts for 23% in all numerical calculations in C projects. To solve non-elementary arithmetics is inefficient in fact when search technology is used for test input generation. Because the non-elementary arithmetics does not have corresponding interval arithmetic rules to improve the search efficiency. Amethod of equivalent transformation was proposed to decompose non-elementary arithmetics into elementary arithmetics. The interval arithmetic of elementary arithmetics can be used thereafter. Experiments show that the test cases of non-elementary arithmetics can be effectively generated by the proposed method.