From Syntactic to Semantic Spectra for Fault Localization
Open Access
- 5 July 2026
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1272-1276
Abstract
Fault localization identifies program locations responsible for observed failures. Existing techniques often rely on structural proxies to correlate failures with execution behavior. Such proxies collapse when failures arise from violations of semantic intent, such as numeric invariants, value relations, and state or temporal consistency, without altering execution structure. In this paper, we propose SemLoc, a fault localization framework based on semantic spectra anchored to program structures. The key essence is that semantic properties can be inferred and explicitly indexed to program structure. SemLoc first infers domain-specific constraints from code, indexes them across functions, blocks, and dataflows, and evaluates them at runtime to identify violated invariants. It then applies counterfactual verification to refine localization by pruning inferred constraints that are incorrect or incomplete. Our preliminary results indicate that SemLoc reduces the candidate faulty lines by 74.4%, corresponding to 5.2× reduction compared with spectrum-based fault localization and 6.2× reduction compared with delta debugging, while matching the ground-truth faulty locations on all evaluated subjects. The investigation of semantic spectra indexed to program structure naturally generalizes to future spectra based on data characteristics, value distributions, or learned representations.Keywords
Funding Information
- NSF (CCF-2426161)
- NSF (CCF-2226448)
- NSF (CCF-2512416)
This publication has 17 references indexed in Scilit:
- Simple Fault Localization Using Execution Traces2025
- An Empirical Study on Common Bugs in Deep Learning Compilers2021
- A Survey on Software Fault LocalizationIEEE Transactions on Software Engineering, 2016
- Metallaxis‐FL: mutation‐based fault localizationSoftware Testing, Verification and Reliability, 2013
- A practical evaluation of spectrum-based fault localizationJournal of Systems and Software, 2009
- Localizing Software Faults Simultaneously2009
- Software Fault Localization Using N-gram AnalysisLecture Notes in Computer Science, 2008
- The Daikon system for dynamic detection of likely invariantsScience of Computer Programming, 2007
- Failure proximity2006
- Yesterday, my Program Worked. Today, it Does Not. Why?1999