In order to solve the problem that model-based diagnosis (MBD) methods are time-consuming when observations are uncertain due to sensor failures or other factors. This paper mainly focuses on software fault detection and proposes the Bucket Sort for Diagnoses (BSD) method to solve the problem of MBD with uncertain observation.The BSD method reduces the program spectrum using maximum satisfiability, and then uses bucket sorting to determine the priority of diagnosis. Diagnosis based on feasible observations with fewer faulty sensors have higher priority. Within every bucket, the Spectrum-Based Fault Localization (SBFL) method is used to calculate the suspicion of the components, and the algorithm finally return an ordered diagnosis set. For 350 sets of test instances, the experimental results show that the number of faults identified by the BSD algorithm under the TOP-1 metric is increased by 3.91 times and 7.56 times compared with MstLikeDiag and Incremental-O2D, 6.15 times and 4.79 times under the TOP-5 metric, and 6.43 times and 4.13 times under the TOP-10 metric. Meanwhile, the average efficiency of the BSD method is 92.1 times and 106.5 times than that of the MstLikeDiag and Incremental-O2D methods for 350 test instances.
直接方法不需要经过碰集的二次处理,就可以得到极小诊断。随着SAT(Satisfiability)和MaxSAT(Maximum satisfiability)[6]求解器技术不断成熟,直接求解的一种主流方法是将MBD问题转换成SAT(MaxSAT)问题进行求解[7-14]。MBD问题的新趋势是使用多观测来求解诊断。Ignatiev等[11]提出了HSD(Implicit hitting set dualization)算法,利用诊断和冲突之间的关系求解多观测的诊断。Zhou等[12]在此基础上提出了IHSD(Improved implicit hitting set dualization)算法,首次在基于多观测的模型诊断问题中使用统治组件的概念。Zhou等[13]还进一步提出了D-CMMO(Dominated-based compacted nodel with nultiple observations)算法,根据电路的结构压缩子句数目,在3个故障模型上优于原有算法。
程序频谱可用矩阵 M 表示, M 是一个m×(n+1)的矩阵,m表示测试向量的数量,n表示程序实体的数量。表1为由3个测试向量和2个程序实体(组件)构成的程序频谱 M1。其中 M1(t1,c1)=1表示测试用例t1覆盖了组件c1。 M1(t1,c2)=0表示t1测试用例不能覆盖c2。 M1(t1,e)=1表示预期结果和实际结果不一致, M1(t2,e)=0表示预期结果和实际结果一致。
Ou yang Dan-tong, LiuYang, SongJin-cai, et al.Fault diagnosis method based on test set reordering combined with structural features[J]. Chinese Journal of Electronics, 2022, 50(1): 63-71.
Dan-tongOu-Yang, XuBin, DongBo-wen, et al.Hybrid test point set reduction method based on test point quality[J]. Chinese Journal of Electronics, 2023, 51(6): 1552-1561.
[6]
FengWen-quan, DuMin, ZhaoQi, et al.A method of combining HSSE-tree and binary label to compute all minimal hitting sets[C]∥2011 Fourth International Symposium on Computational Intelligence and Design, Hangzhou, China, 2011, 2: 23-26.
[7]
ZhaoXiang-fu, Ou yang Dan-tong. A method of combining SE-tree to compute all minimal hitting sets[J]. Progress in Natural Science, 2006, 16(2): 169-174.
[8]
CaiShao-wei, LeiZhen-dong. Old techniques in new ways: clause weighting, unit propagation and hybridization for maximum satisfiability[J]. Artificial Intelligence, 2020, 287: 103354.
[9]
SmithA, VenerisA, AliM F, et al.Fault diagnosis and logic debugging using Boolean satisfiability[J]. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2005, 24(10): 1606-1621.
[10]
FeldmanA B, ProvanG, de KleerJ, et al.Solving model-based diagnosis problems with Max-SAT solvers and vice versa[C]∥21st International Workshop on the Principles of Diagnosis (DX'10), Portland, USA, 2010: 1-8.
[11]
Marques-SilvaJ, JanotaM, IgnatievA, et al.Efficient model based diagnosis with maximum satisfiability[C]∥Association for the Advancement of Artificial Intelligence (AAAI), Austin, USA, 2015: 1966-1972.
[12]
LiuMeng, Ou yang Dan-tong, CaiShao-wei, et al. Efficient zonal diagnosis with maximum satisfiability[J]. Science China Information Sciences, 2018, 61: 1-14.
[13]
IgnatievA, MorgadoA, WeissenbacherG, et al.Model-based diagnosis with multiple observations[C]∥IJCAI, Macao, China, 2019: 1108-1115.
[14]
ZhouHui-si, Ou yang Dan-tong, ZhangLi-ming, et al.Model-based diagnosis with improved implicit hitting set dualization[J]. Applied Intelligence, 2022, 52(2): 2111-2118.
[15]
ZhouHui-si, Ou yang Dan-tong, ZhaoXiang-fu, et al.Two compacted models for efficient model-based diagnosis[C]∥Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, Canada, 2022, 36(4): 3885-3893.
ZhouHui-si, Ou yang Dan-tong, TianXin-liang, et al.A novel encoding for model-based diagnosis[J]. Journal of Computer Research and Development, 2023, 60(1): 95-102.
[18]
RobinsonB, ErnstM D, PerkinsJ H, et al. Scaling up automated test generation: automatically generating maintainable regression unit tests for programs[C]∥2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011), Lawrence, USA, 2011: 23-32.
LampertiG, ZanellaM. Monitoring of active systems with stratified uncertain observations[J]. IEEE Transactions on Systems,Man, and Cybernetics—Part A: Systems and Humans, 2010, 41(2): 356-369.
[21]
ChristopherC J, CordierM O, GrastienA. Critical observations in a diagnostic problem[C]∥53rd IEEE Conference on Decision and Control, Los Angeles, USA, 2014: 382-387.
[22]
SternR, KalechM, RogovS, et al.How many diagnoses do we need?[J]. Artificial Intelligence, 2017, 248: 26-45.
Ou yang Dan-tong, SunRui, TianXin-liang, et al.Set blocking-based approach to sensor selection in uncertain systems[J]. Journal of Jilin University (Engineering and Technology Edition), 2023, 53(2):547-554.
[25]
CazesD, KalechM. Model-based diagnosis with uncertain observations[C]∥Proceedings of the AAAI Conference on Artificial Intelligence, New York, USA, 2020, 34(3): 2766-2773.
[26]
CazesD, KalechM. Model-based diagnosis with uncertain observations[J]. International Journal of Intelligent Systems, 2021, 36(7): 3259-3292.
[27]
ZakariA, LeeS P, AbreuR, et al.Multiple fault localization of software programs: a systematic literature review[J]. Information and Software Technology, 2020, 124: 106312.
[28]
AbreuR, ZoeteweijP, Van GemundA J C. On the accuracy of spectrum-based fault localization[C]∥Testing: academic and industrial conference practice and research techniques-MUTATION, Windsor, UK, 2007: 89-98.
[29]
ZhouHui-si, Ou yang Dan-tong, ZhangLi-ming. Efficient static compaction of test patterns using partial MaxSAT[J].Tsinghua Science and Technology, 2020, 26(1): 1-8.
Ou yang Dan-tong, SunRui, TianXin-liang, et al.A method for solving the isolation set of minimum fault detection in a dynamic system based on the partial maximum satisfiability problem[J]. Journal of Jilin University (Engineering and Technology Edition), 2023, 53(4): 1163-1173.
[32]
IgnatievA, MorgadoA, Marques-SilvaJ. RC2: an efficient Max-SATSolver[J]. Journal on Satisfiability, Boolean Modeling and Computation, 2019, 11(1): 53-64.