PBLInv: Postcondition-based Loop Invariant Learning for C Programs.

Hong Lu,Chengyi Wang,Jiacheng Gui,Hao Huang
DOI: https://doi.org/10.1109/qrs51102.2020.00013
2020-01-01
Abstract:It is challenging to generate loop invariants for programs automatically in the field of software analysis and verification. Loop invariants are the weakened forms of the postconditions for loops. Therefore, we propose PBLInv, a postcondition-based approach to generate loop invariants for C programs with the machine learning method. First, we generate the postcondition for a loop program automatically. Second, we learn classifiers as the updated candidate loop invariants with the Kernel Support Vector Machine (KSVM) method iteratively. PBLInv is evaluated with 60 benchmark programs collected from the recent papers and the 2019 Software Verification Competitions (SV-Comp 2019). The experimental results show that PBLInv is efficient at learning loop invariants for C programs. Compared with five state-of-the-art methods of generating loop invariants, PBLInv not only generates loop invariants for more benchmarks, but also reduces the number of used samples and iterations for learning loop invariants.
What problem does this paper attempt to address?