Enhancing Loop-Invariant Synthesis via Reinforcement Learning

Loop-invariant synthesis is the basis of every program verification procedure. Due to its undecidability in general, a tool for invariant synthesis necessarily uses heuristics. Despite the common belief that the design of heuristics is vital for the effective performance of a verifier, little work has been performed toward obtaining the optimal heuristics for each invariant-synthesis tool. Instead, developers have hand-tuned the heuristics of tools. This study demonstrates that we can effectively and automatically learn a good heuristic via reinforcement learning for an invariant synthesizer PCSat. Our experiment shows that PCSat combined with the heuristic learned by reinforcement learning outperforms the state-of-the-art solvers for this task. To the best of our knowledge, this is the first work that investigates learning the heuristics of an invariant synthesis tool.

[1]  Takuya Akiba,et al.  Optuna: A Next-generation Hyperparameter Optimization Framework , 2019, KDD.

[2]  Le Song,et al.  Learning Loop Invariants for Program Verification , 2018, NeurIPS.

[3]  Cezary Kaliszyk,et al.  Deep Network Guided Proof Search , 2017, LPAR.

[4]  Cesare Tinelli,et al.  cvc4sy: Smart and Fast Term Enumeration for Syntax-Guided Synthesis , 2019, CAV.

[5]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[6]  Le Song,et al.  Code2Inv: A Deep Learning Framework for Program Verification , 2020, CAV.

[7]  Michael Leuschel,et al.  Redundant Argument Filtering of Logic Programs , 1996, LOPSTR.

[8]  Sarah M. Loos,et al.  Graph Representations for Higher-Order Logic and Theorem Proving , 2019, AAAI.

[9]  Thomas Wies,et al.  Learning Invariants using Decision Trees , 2015, ArXiv.

[10]  Hiroshi Unno,et al.  Probabilistic Inference for Predicate Constraint Satisfaction , 2020, AAAI.

[11]  Ben J. A. Kröse,et al.  Learning from delayed rewards , 1995, Robotics Auton. Syst..

[12]  Josef Urban,et al.  DeepMath - Deep Sequence Models for Premise Selection , 2016, NIPS.

[13]  Taro Sekiyama,et al.  Automated Proof Synthesis for the Minimal Propositional Logic with Deep Neural Networks , 2018, APLAS.

[14]  P. Ezudheen,et al.  Horn-ICE learning for synthesizing invariants and contracts , 2018, Proc. ACM Program. Lang..

[15]  Chunxiao Li,et al.  Machine Learning-Based Restart Policy for CDCL SAT Solvers , 2018, SAT.

[16]  Dan Roth,et al.  Learning invariants using decision trees and implication counterexamples , 2016, POPL.

[17]  Marcus Hutter,et al.  On Q-learning Convergence for Non-Markov Decision Processes , 2018, IJCAI.

[18]  Cesare Tinelli,et al.  Extending enumerative function synthesis via SMT-driven classification , 2019, 2019 Formal Methods in Computer Aided Design (FMCAD).

[19]  Jian Wang,et al.  Premise Selection for Theorem Proving by Deep Graph Embedding , 2017, NIPS.

[20]  Mitsuru Kusumoto,et al.  Automated Theorem Proving in Intuitionistic Propositional Logic by Deep Reinforcement Learning , 2018, ArXiv.

[21]  Uri Alon,et al.  code2vec: learning distributed representations of code , 2018, Proc. ACM Program. Lang..

[22]  Christof Löding,et al.  ICE: A Robust Framework for Learning Invariants , 2014, CAV.

[23]  Richard Evans,et al.  Can Neural Networks Understand Logical Entailment? , 2018, ICLR.

[24]  Edward A. Lee,et al.  Learning Heuristics for Quantified Boolean Formulas through Reinforcement Learning , 2020, ICLR.

[25]  Suresh Jagannathan,et al.  A data-driven CHC solver , 2018, PLDI.

[26]  David L. Dill,et al.  Learning a SAT Solver from Single-Bit Supervision , 2018, ICLR.

[27]  Glynn Winskel,et al.  The formal semantics of programming languages - an introduction , 1993, Foundation of computing series.

[28]  Eric Koskinen,et al.  Program Verification via Predicate Constraint Satisfiability Modulo Theories , 2020, ArXiv.

[29]  Suman Jana,et al.  CLN2INV: Learning Loop Invariants with Continuous Logic Networks , 2019, ICLR.

[30]  Cezary Kaliszyk,et al.  HolStep: A Machine Learning Dataset for Higher-order Logic Theorem Proving , 2017, ICLR.

[31]  Scott Lundberg,et al.  A Unified Approach to Interpreting Model Predictions , 2017, NIPS.

[32]  Carlos Guestrin,et al.  "Why Should I Trust You?": Explaining the Predictions of Any Classifier , 2016, ArXiv.

[33]  Kate Saenko,et al.  RISE: Randomized Input Sampling for Explanation of Black-box Models , 2018, BMVC.

[34]  Nikolaj Bjørner,et al.  Guiding High-Performance SAT Solvers with Unsat-Core Predictions , 2019, SAT.

[35]  Mislav Balunovic,et al.  Learning to Solve SMT Formulas , 2018, NeurIPS.

[36]  Alvin Cheung,et al.  Summarizing Source Code using a Neural Attention Model , 2016, ACL.

[37]  Sanjit A. Seshia,et al.  Combinatorial sketching for finite programs , 2006, ASPLOS XII.

[38]  Christopher L. Conway,et al.  Cvc4 , 2011, CAV.

[39]  Cezary Kaliszyk,et al.  Reinforcement Learning of Theorem Proving , 2018, NeurIPS.

[40]  Richard S. Sutton,et al.  Reinforcement Learning with Replacing Eligibility Traces , 2005, Machine Learning.

[41]  Alexander Aiken,et al.  A Data Driven Approach for Algebraic Loop Invariants , 2013, ESOP.

[42]  Tao Wang,et al.  Convolutional Neural Networks over Tree Structures for Programming Language Processing , 2014, AAAI.

[43]  Naoki Kobayashi,et al.  ICE-Based Refinement Type Discovery for Higher-Order Functional Programs , 2018, Journal of Automated Reasoning.

[44]  Marc Brockschmidt,et al.  Learning to Represent Programs with Graphs , 2017, ICLR.

[45]  Todd Millstein,et al.  Overfitting in Synthesis: Theory and Practice (Extended Version) , 2019, CAV.