Code2Inv: A Deep Learning Framework for Program Verification

We propose a general end-to-end deep learning framework Code2Inv, which takes a verification task and a proof checker as input, and automatically learns a valid proof for the verification task by interacting with the given checker. Code2Inv is parameterized with an embedding module and a grammar: the former encodes the verification task into numeric vectors while the latter describes the format of solutions Code2Inv should produce. We demonstrate the flexibility of Code2Inv by means of two small-scale yet expressive instances: a loop invariant synthesizer for C programs, and a Constrained Horn Clause (CHC) solver.

[1]  Shane Legg,et al.  Human-level control through deep reinforcement learning , 2015, Nature.

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

[3]  Alexander Aiken,et al.  From invariant checking to invariant inference using randomized search , 2014, Formal Methods Syst. Des..

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

[5]  Phil Blunsom,et al.  Learning to Transduce with Unbounded Memory , 2015, NIPS.

[6]  Rajeev Alur,et al.  Syntax-guided synthesis , 2013, 2013 Formal Methods in Computer-Aided Design.

[7]  Richard S. Sutton,et al.  Reinforcement Learning: An Introduction , 1998, IEEE Trans. Neural Networks.

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

[9]  Le Song,et al.  Discriminative Embeddings of Latent Variable Models for Structured Data , 2016, ICML.

[10]  Jure Leskovec,et al.  Hierarchical Graph Representation Learning with Differentiable Pooling , 2018, NeurIPS.

[11]  Alex Graves,et al.  Neural Turing Machines , 2014, ArXiv.

[12]  Mukund Raghothaman,et al.  Continuously reasoning about programs using differential Bayesian inference , 2019, PLDI.

[13]  Nikolaj Bjørner,et al.  Horn Clause Solvers for Program Verification , 2015, Fields of Logic and Computation II.

[14]  Samuel S. Schoenholz,et al.  Neural Message Passing for Quantum Chemistry , 2017, ICML.

[15]  Jason Weston,et al.  End-To-End Memory Networks , 2015, NIPS.

[16]  Sagar Chaki,et al.  SMT-based model checking for recursive programs , 2014, Formal Methods in System Design.

[17]  K. McMillan,et al.  Solving Constrained Horn Clauses using Interpolation , 2013 .

[18]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

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

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

[21]  Christopher D. Manning,et al.  Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks , 2015, ACL.

[22]  Sam Blackshear,et al.  Verification modulo versions: towards usable verification , 2014, PLDI.

[23]  Jorge A. Navas,et al.  The SeaHorn Verification Framework , 2015, CAV.

[24]  Richard S. Zemel,et al.  Gated Graph Sequence Neural Networks , 2015, ICLR.

[25]  Yoshua Bengio,et al.  Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling , 2014, ArXiv.

[26]  Rajeev Alur,et al.  Search-based program synthesis , 2018, Commun. ACM.

[27]  Sumit Gulwani,et al.  From program verification to program synthesis , 2010, POPL '10.

[28]  Jürgen Schmidhuber,et al.  Long Short-Term Memory , 1997, Neural Computation.

[29]  Ah Chung Tsoi,et al.  The Graph Neural Network Model , 2009, IEEE Transactions on Neural Networks.

[30]  Yoshua Bengio,et al.  Neural Machine Translation by Jointly Learning to Align and Translate , 2014, ICLR.

[31]  Todd D. Millstein,et al.  Data-driven precondition inference with learned features , 2016, PLDI.

[32]  Jure Leskovec,et al.  How Powerful are Graph Neural Networks? , 2018, ICLR.

[33]  Sumit Gulwani,et al.  Oracle-guided component-based program synthesis , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

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

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

[36]  Peter W. O'Hearn,et al.  Continuous Reasoning: Scaling the impact of formal methods , 2018, LICS.

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

[38]  Arjun Radhakrishna,et al.  Scaling Enumerative Program Synthesis via Divide and Conquer , 2017, TACAS.