ComputingComputer ScienceAlgorithmsArtificial IntelligenceMachine LearningReinforcement LearningReinforcement Learning FoundationsHypothesis SpaceInvariantsLearning From Sparse RewardsLoop InvariantsProgram VerificationPruningSparse Reward DesignSparse Reward Learning
Inferring loop invariants is one of the most challenging problems in program verification. It is highly desired to incorporate machine learning when inferring. This paper presents a Reinforcement Learning (RL) pruning framework to infer loop invariants over a general nonlinear hypothesis space. The key idea is to synergize the RL-based pruning and SMT solving to generate candidate invariants efficiently. To address the sparse reward problem in learning, we design a novel two-dimensional reward mechanism that enables the RL pruner to recognize the capability boundary of SMT solvers and learn the pruning heuristics in a few rounds. We have implemented our approach with Z3 SMT solver in the tool called LIPuS and conducted extensive experiments over the linear and nonlinear benchmarks. Experiment results show that LIPuS can solve the most cases compared to the state-of-the-art loop invariant inference tools such as Code2Inv, ICE-DT, GSpacer, SymInfer, ImplCheck, and Eldarica. Especially, LIPuS outperforms them significantly on nonlinear benchmarks.
26
An axiomatic basis for computer programming
C. A. R. Hoare · Communications of the ACM · 1969 · 3.9K citations · Full text
Systematic design of program analysis frameworks
Patrick Cousot, Radhia Cousot · 1979 · 1.6K citations · Full text
Automatic discovery of linear restraints among variables of a program
Patrick Cousot, Nicolas Halbwachs · 1978 · 1.6K citations