The reliability of real-time embedded software directly determines the reliability of the whole real-time embedded sys- tem, and the effective software testing is an important way to ensure software quality and reliab...The reliability of real-time embedded software directly determines the reliability of the whole real-time embedded sys- tem, and the effective software testing is an important way to ensure software quality and reliability. Based on the analysis of the characteristics of real-time embedded software, the formal method is introduced into the real-time embedded software testing field and the real-time extended finite state machine (RT-EFSM) model is studied firstly. Then, the time zone division method of real-time embedded system is presented and the definition and description methods of time-constrained transition equivalence class (timeCTEC) are presented. Furthermore, the approaches of the testing sequence and test case generation are put forward. Finally, the proposed method is applied to a typical avionics real- time embedded software testing practice and the examples of the timeCTEC, testing sequences and test cases are given. With the analysis of the testing result, the application verification shows that the proposed method can effectively describe the real-time embedded software state transition characteristics and real-time requirements and play the advantages of the formal methods in accuracy, effectiveness and the automation supporting. Combined with the testing platform, the real-time, closed loop and automated simulation testing for real-time embedded software can be realized effectively.展开更多
软件规模和复杂程度的不断提高,为软件质量保障带来了严峻的挑战.软件缺陷定位是一种重要的软件质量保障技术,其中基于频谱的缺陷定位(Spectrum-based Fault Localization,SFL)是应用最为广泛的软件缺陷定位技术,其通过分析语句覆盖信...软件规模和复杂程度的不断提高,为软件质量保障带来了严峻的挑战.软件缺陷定位是一种重要的软件质量保障技术,其中基于频谱的缺陷定位(Spectrum-based Fault Localization,SFL)是应用最为广泛的软件缺陷定位技术,其通过分析语句覆盖信息矩阵计算代码语句的可疑度值,并根据可疑度值定位缺陷所在语句.然而,语句覆盖信息矩阵中存在着严重的数据冗余问题,冗余的数据极大地影响了SFL的缺陷定位性能.以Defects4J数据集中395个程序的语句覆盖信息矩阵为例,在超过一半的语句覆盖信息矩阵中有90%的语句存在与其具有相同覆盖信息的语句.特征选择是常用的数据预处理技术,通过去除冗余和不相关特征来获取原始特征集中有价值的特征子集.因此,我们将语句覆盖信息矩阵作为原始特征集,将冗余覆盖信息约简建模为特征选择问题,提出了一种基于冗余覆盖信息约简的软件缺陷定位方法(Fault Localization based on Redundant coverage information Reduction,FLRR).首先,使用特征选择技术对语句覆盖信息和测试用例执行结果组成的语句覆盖信息矩阵进行约简,得到语句覆盖信息矩阵子集;然后,使用SFL计算语句覆盖信息矩阵子集中语句的可疑度值,并根据可疑度值对语句进行降序排列,以定位缺陷语句.本文使用六种常用的特征选择技术对语句覆盖信息矩阵进行特征选择和约简,以得到语句覆盖信息矩阵子集,并使用四种典型的SFL技术对语句覆盖信息矩阵子集中的语句进行缺陷定位.为评估FLRR的缺陷定位性能,本文使用E_(inspect)@n和MRR(Mean Reciprocal Rank)评价指标在基于Defects4J的数据集上与四种典型的SFL技术进行了对比实验.实验结果表明,FLRR能够有效提升SFL的缺陷定位性能.对于E_(inspect)@n指标,当n=1时,FLRR相比DStar、Ochiai、Barinel和OP2分别多定位到23条、26条、14条和13条缺陷语句,分别增加了69.70%、76.47%、45.16%和38.24%;对于MRR指标,FLRR相比DStar、Ochiai、Barinel和OP2分别提升了20.08%、24.94%、17.45%和19.15%.展开更多
基金supported by the Aviation Science Foundation of China
文摘The reliability of real-time embedded software directly determines the reliability of the whole real-time embedded sys- tem, and the effective software testing is an important way to ensure software quality and reliability. Based on the analysis of the characteristics of real-time embedded software, the formal method is introduced into the real-time embedded software testing field and the real-time extended finite state machine (RT-EFSM) model is studied firstly. Then, the time zone division method of real-time embedded system is presented and the definition and description methods of time-constrained transition equivalence class (timeCTEC) are presented. Furthermore, the approaches of the testing sequence and test case generation are put forward. Finally, the proposed method is applied to a typical avionics real- time embedded software testing practice and the examples of the timeCTEC, testing sequences and test cases are given. With the analysis of the testing result, the application verification shows that the proposed method can effectively describe the real-time embedded software state transition characteristics and real-time requirements and play the advantages of the formal methods in accuracy, effectiveness and the automation supporting. Combined with the testing platform, the real-time, closed loop and automated simulation testing for real-time embedded software can be realized effectively.
文摘软件规模和复杂程度的不断提高,为软件质量保障带来了严峻的挑战.软件缺陷定位是一种重要的软件质量保障技术,其中基于频谱的缺陷定位(Spectrum-based Fault Localization,SFL)是应用最为广泛的软件缺陷定位技术,其通过分析语句覆盖信息矩阵计算代码语句的可疑度值,并根据可疑度值定位缺陷所在语句.然而,语句覆盖信息矩阵中存在着严重的数据冗余问题,冗余的数据极大地影响了SFL的缺陷定位性能.以Defects4J数据集中395个程序的语句覆盖信息矩阵为例,在超过一半的语句覆盖信息矩阵中有90%的语句存在与其具有相同覆盖信息的语句.特征选择是常用的数据预处理技术,通过去除冗余和不相关特征来获取原始特征集中有价值的特征子集.因此,我们将语句覆盖信息矩阵作为原始特征集,将冗余覆盖信息约简建模为特征选择问题,提出了一种基于冗余覆盖信息约简的软件缺陷定位方法(Fault Localization based on Redundant coverage information Reduction,FLRR).首先,使用特征选择技术对语句覆盖信息和测试用例执行结果组成的语句覆盖信息矩阵进行约简,得到语句覆盖信息矩阵子集;然后,使用SFL计算语句覆盖信息矩阵子集中语句的可疑度值,并根据可疑度值对语句进行降序排列,以定位缺陷语句.本文使用六种常用的特征选择技术对语句覆盖信息矩阵进行特征选择和约简,以得到语句覆盖信息矩阵子集,并使用四种典型的SFL技术对语句覆盖信息矩阵子集中的语句进行缺陷定位.为评估FLRR的缺陷定位性能,本文使用E_(inspect)@n和MRR(Mean Reciprocal Rank)评价指标在基于Defects4J的数据集上与四种典型的SFL技术进行了对比实验.实验结果表明,FLRR能够有效提升SFL的缺陷定位性能.对于E_(inspect)@n指标,当n=1时,FLRR相比DStar、Ochiai、Barinel和OP2分别多定位到23条、26条、14条和13条缺陷语句,分别增加了69.70%、76.47%、45.16%和38.24%;对于MRR指标,FLRR相比DStar、Ochiai、Barinel和OP2分别提升了20.08%、24.94%、17.45%和19.15%.