🤖 AI Summary
Existing formula-based fault localization (FBFL) methods for multi-fault C programs struggle to simultaneously ensure cross-failure-test consistency and subset-minimality of diagnoses. To address this, we propose a MaxSAT-based approach that integrates model-based diagnosis (MBD) with multi-observation aggregation. Our method employs static analysis to extract program semantics and constructs a unified diagnostic model covering multiple failing test cases; MaxSAT solving then guarantees that the resulting diagnoses are both subset-minimal and consistent across all failing tests. This work is the first to systematically apply the MBD paradigm to multi-fault localization in C programs, eliminating redundant diagnoses. Evaluated on the TCAS and C-Pack-IPAs benchmarks, our approach achieves higher fault-localization accuracy than BugAssist and SNIPER, while demonstrating significantly improved runtime efficiency.
📝 Abstract
Debugging is one of the most time-consuming and expensive tasks in software development. Several formula-based fault localization (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 with multiple faults. This paper introduces a novel fault localization approach for C programs with multiple faults. CFaults leverages Model-Based Diagnosis (MBD) with multiple observations and aggregates all failing test cases into a unified MaxSAT formula. Consequently, our method guarantees consistency across observations and simplifies the fault localization procedure. Experimental results on two benchmark sets of C programs, TCAS and C-Pack-IPAs, show that CFaults is faster than other FBFL approaches like BugAssist and SNIPER. Moreover, CFaults only generates subset-minimal diagnoses of faulty statements, whereas the other approaches tend to enumerate redundant diagnoses.