Learning Likely Invariants to Explain Why a Program Fails
Jun Sun, Long H. Pham, Lyly Tran Thi, Jingyi Wang, Xin, Peng

TL;DR
This paper introduces a novel method for automatically generating likely invariants to help programmers understand why a program fails, using active learning and bug localization techniques.
Contribution
It applies invariant learning to bug explanation and proposes a new approach to handle limited test cases in practice.
Findings
Generated invariants often correlate with actual bug fixes.
Method effectively identifies predicates explaining bug causes.
Applicable to real-world bugs.
Abstract
Debugging is difficult. Recent studies show that automatic bug localization techniques have limited usefulness. One of the reasons is that programmers typically have to understand why the program fails before fixing it. In this work, we aim to help programmers understand a bug by automatically generating likely invariants which are violated in the failed tests. Given a program with an initial assertion and at least one test case failing the assertion, we first generate random test cases, identify potential bug locations through bug localization, and then generate program state mutation based on active learning techniques to identify a predicate "explaining" the cause of the bug. The predicate is a classifier for the passed test cases and failed test cases. Our main contribution is the application of invariant learning for bug explanation, as well as a novel approach to overcome the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
