将基于调用模式语义和正确调用模式语义的程序分析技术应用于Prolog程序的CPM测试。通过调用模式分析获得内部过程被调用和成功调用的条件,利用前者删除不满足调用条件的测试帧,或当删除条件不满足时利用该条件更新测试规格中过程属性的划分准则;利用后者预测CPM测试的结果。该方法可较好地保持程序测试的质量,改善Prolog程序的CPM测试过程。
This paper proposed a method to apply the call patterns semantics and correct call patterns semantics to the CPM testing of Prolog programs. The method could be viewed as an attempt to improve the testing of Prolog programs by the result of program analysis. By analyzing the way in which procedures were used in a program, reduced the number of test frames and therefore the number of test cases generated in CPM testing of a procedure without much decreasing the confidence in the quality of the programs to be tested. Additionally, used the program analysis based on correct call patterns semantics to predict the testing result for test frames.