arXiv:2512.02898cs.SEcs.AI2025-12

用统一模型诊断多故障,提升代码与电路的定位精度与效率

Model-Based Diagnosis with Multiple Observations: A Unified Approach for C Software and Boolean Circuits

  • 将多个失败测试整合为最大可满足性公式,实现跨测试一致性诊断
  • 在C程序上比现有方法更快,且仅生成最小冗余诊断结果
  • 适合需精准定位多故障的软件与硬件开发者使用

调试是软件开发和电路设计中耗时最长、成本最高的任务之一。尽管已有多种基于公式的故障定位(FBFL)方法,但它们无法保证在所有失败测试下产生一致的诊断结果,或会产生非最小冗余的诊断,尤其在存在多个故障时表现不佳。本文提出CFaults,一种针对含多故障的C程序与布尔电路的新型故障定位工具。该方法采用基于模型的诊断(MBD)框架,结合多观测数据,将所有失败测试用例合并为一个统一的最大可满足性(MaxSAT)公式。由此确保诊断结果在不同观测间的一致性,并简化定位流程。在三个基准集上的实验表明:在两个C程序基准集TCAS和C-Pack-IPAs上,CFaults比BugAssist、SNIPER和HSD等方法更快速地定位故障;在布尔电路基准集ISCAS85上,虽然整体速度略慢于HSD,但仅未能定位6%的电路,仍具竞争力。此外,CFaults始终输出最小化子集的诊断结果,而其他方法常产生冗余诊断(如BugAssist和SNIPER)。

原文摘要 · Abstract (English)

Debugging is one of the most time-consuming and expensive tasks in software development and circuit design. Several formula-based fault localisation (FBFL) methods have been proposed, but they fail to guarantee a set of diagnoses across all failing tests or may produce redundant diagnoses that are not subset-minimal, particularly for programs/circuits with multiple faults. This paper introduces CFaults, a novel fault localisation tool for C software and Boolean circuits with multiple faults. CFaults leverages Model-Based Diagnosis (MBD) with multiple observations and aggregates all failing test cases into a unified Maximum Satisfiability (MaxSAT) formula. Consequently, our method guarantees consistency across observations and simplifies the fault localisation procedure. Experimental results on three benchmark sets, two of C programs, TCAS and C-Pack-IPAs, and one of Boolean circuits, ISCAS85, show that CFaults is faster at localising faults in C software than other FBFL approaches such as BugAssist, SNIPER, and HSD. On the ISCAS85 benchmark, CFaults is generally slower than HSD; however, it localises faults in only 6% fewer circuits, demonstrating that it remains competitive in this domain. Furthermore, CFaults produces only subset-minimal diagnoses of faulty statements, whereas the other approaches tend to enumerate redundant diagnoses (e.g., BugAssist and SNIPER).

故障定位模型诊断C语言布尔电路

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。