Open Access. Powered by Scholars. Published by Universities.®
Physical Sciences and Mathematics Commons™
Open Access. Powered by Scholars. Published by Universities.®
Articles 1 - 3 of 3
Full-Text Articles in Physical Sciences and Mathematics
Learning Likely Invariants To Explain Why A Program Fails, Long H. Pham, Jun Sun, Lyly Tran Thi, Jingyi Wang, Xin Peng
Learning Likely Invariants To Explain Why A Program Fails, Long H. Pham, Jun Sun, Lyly Tran Thi, Jingyi Wang, Xin Peng
Research Collection School Of Computing and Information Systems
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' …
Automatic Loop-Invariant Generation And Refinement Through Selective Sampling, Jiaying Li, Jun Sun, Li Li, Quang Loc Le, Shang-Wei Lin
Automatic Loop-Invariant Generation And Refinement Through Selective Sampling, Jiaying Li, Jun Sun, Li Li, Quang Loc Le, Shang-Wei Lin
Research Collection School Of Computing and Information Systems
Automatic loop-invariant generation is important in program analysis and verification. In this paper, we propose to generate loop-invariants automatically through learning and verification. Given a Hoare triple of a program containing a loop, we start with randomly testing the program, collect program states at run-time and categorize them based on whether they satisfy the invariant to be discovered. Next, classification techniques are employed to generate a candidate loop-invariant automatically. Afterwards, we refine the candidate through selective sampling so as to overcome the lack of sufficient test cases. Only after a candidate invariant cannot be improved further through selective sampling, we …
Assertion Generation Through Active Learning, Long H. Pham, Jun Sun, Jun Sun
Assertion Generation Through Active Learning, Long H. Pham, Jun Sun, Jun Sun
Research Collection School Of Computing and Information Systems
Program assertions are useful for many program analysis tasks. They are however often missing in practice. In this work, we develop a novel approach for generating likely assertions automatically based on active learning. Our target is complex Java programs which cannot be symbolically executed (yet). Our key idea is to generate candidate assertions based on test cases and then apply active learning techniques to iteratively improve them. The experiments show that active learning really helps to improve the generated assertions.