Counterexample-Guided Quantifier Instantiation for Synthesis in SMT

We introduce the first program synthesis engine implemented inside an SMT solver. We present an approach that extracts solution functions from unsatisfiability proofs of the negated form of synthesis conjectures. We also discuss novel counterexample-guided techniques for quantifier instantiation that we use to make finding such proofs practically feasible. A particularly important class of specifications are single-invocation properties, for which we present a dedicated algorithm. To support syntax restrictions on generated solutions, our approach can transform a solution found without restrictions into the desired syntactic form. As an alternative, we show how to use evaluation function axioms to embed syntactic restrictions into constraints over algebraic datatypes, and then use an algebraic datatype decision procedure to drive synthesis. Our experimental evaluation on syntax-guided synthesis benchmarks shows that our implementation in the CVC4 SMT solver is competitive with state-of-the-art tools for synthesis. Open image in new window

[1]  Cesare Tinelli,et al.  Introducing StarExec: a Cross-Community Infrastructure for Logic Solving , 2014, COMPARE.

[2]  Zohar Manna,et al.  A Deductive Approach to Program Synthesis , 1979, TOPL.

[3]  Rajeev Alur,et al.  TRANSIT: specifying protocols with concolic snippets , 2013, PLDI.

[4]  Nikolaj Bjørner,et al.  Efficient E-Matching for SMT Solvers , 2007, CADE.

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

[6]  C. Cordell Green,et al.  Application of Theorem Proving to Problem Solving , 1969, IJCAI.

[7]  Viktor Kuncak,et al.  Towards Complete Reasoning about Axiomatic Specifications , 2011, VMCAI.

[8]  Viktor Kuncak,et al.  Symbolic Resource Bound Inference for Functional Programs , 2014, CAV.

[9]  Ruzica Piskac,et al.  Functional synthesis for linear arithmetic and sets , 2011, International Journal on Software Tools for Technology Transfer.

[10]  Ruzica Piskac,et al.  Software synthesis procedures , 2012, Commun. ACM.

[11]  Cesare Tinelli,et al.  An Abstract Decision Procedure for a Theory of Inductive Data Types , 2007, J. Satisf. Boolean Model. Comput..

[12]  Ruzica Piskac,et al.  Complete functional synthesis , 2010, PLDI '10.

[13]  C. Tinelli,et al.  Finite model finding in satisfiability modulo theories , 2013 .

[14]  Nikolaj Bjørner,et al.  Linear Quantifier Elimination as an Abstract Decision Procedure , 2010, IJCAR.

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

[16]  Leonardo Mendonça de Moura,et al.  Complete Instantiation for Quantified Formulas in Satisfiabiliby Modulo Theories , 2009, CAV.

[17]  Armando Solar-Lezama,et al.  Program sketching , 2012, International Journal on Software Tools for Technology Transfer.

[18]  Mukund Raghothaman,et al.  Language to Specify Syntax-Guided Synthesis Problems , 2014, ArXiv.

[19]  Viktor Kuncak,et al.  Synthesis modulo recursive functions , 2013, OOPSLA.

[20]  Viktor Kuncak,et al.  On Counterexample Guided Quantifier Instantiation for Synthesis in CVC4 , 2015, ArXiv.

[21]  Sumit Gulwani,et al.  Template-based program verification and program synthesis , 2013, International Journal on Software Tools for Technology Transfer.

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

[23]  David Monniaux,et al.  Quantifier Elimination by Lazy Model Enumeration , 2010, CAV.

[24]  Leonid Ryzhyk,et al.  User-Guided Device Driver Synthesis , 2014, OSDI.

[25]  Rajeev Alur,et al.  Synthesizing Finite-State Protocols from Scenarios and Requirements , 2014, Haifa Verification Conference.

[26]  Patrick Cousot,et al.  Proving Program Invariance and Termination by Parametric Abstraction, Lagrangian Relaxation and Semidefinite Programming , 2005, VMCAI.

[27]  David Detlefs,et al.  Simplify: a theorem prover for program checking , 2005, JACM.

[28]  Albert Oliveras,et al.  6 Years of SMT-COMP , 2012, Journal of Automated Reasoning.

[29]  Cesare Tinelli,et al.  Finding conflicting instances of quantified formulas in SMT , 2014, 2014 Formal Methods in Computer-Aided Design (FMCAD).

[30]  Cesare Tinelli,et al.  Quantifier Instantiation Techniques for Finite Model Finding in SMT , 2013, CADE.