Invariant Based Fault Localization by Analyzing Error Propagation
Wang TianTian,Wang KeChao,Su XiaoHong,Zhang Lei
DOI: https://doi.org/10.1016/j.future.2018.12.016
2019-01-01
Abstract:Software intelligence is gradually becoming an interdisciplinary field with cognitive science and other disciplines. Especially in the mission-critical areas, whether the behavior of intelligent software conforms to expectations is a crucial issue. Program invariant based fault localization methods can obtain the desired behavior of the program by learning the execution information of successful test cases, and localize bugs by detecting invariant violations, which helps developers understand the cause of the failure and improve the quality of the software. This paper studies the problems of the existing methods, such as the limitation of the invariant definition, the lack of analysis on the impact of test cases and the error propagation, and tires to reduce the false negatives and false positives of invariant violation detection. First, the definition of the program invariants is enriched to localize more types of bugs. Then, the optimization strategies of reducing false positives and false negatives are studied. On the Siemens benchmark, we carried out incremental experimental analysis of the optimization strategies. The experimental results have shown that compared with the simple value range invariant based method, after performing the optimization strategies, the NScore value was increased by 75.2%, which means that our method can effectively localize more kinds of bugs. When reviewing the same percentage of code, the ratio of localized buggy versions of our method is significantly higher than that of the spectra-based methods. When reviewing 1% of the code with the worst effectiveness, the ratio of localized buggy versions of our method is about 0.6, and the ratio value of the spectra-based method is about 0.2.