Syntax-guided synthesis
2013, 2013 Formal Methods in Computer-Aided Design
https://doi.org/10.1109/FMCAD.2013.6679385Abstract
The classical formulation of the program-synthesis problem is to find a program that meets a correctness specification given as a logical formula. Recent work on program synthesis and program optimization illustrates many potential benefits of allowing the user to supplement the logical specification with a syntactic template that constrains the space of allowed implementations. Our goal is to identify the core computational problem common to these proposals in a logical framework. The input to the syntax-guided synthesis problem (SyGuS) consists of a background theory, a semantic correctness specification for the desired program given by a logical formula, and a syntactic set of candidate implementations given by a grammar. The computational problem then is to find an implementation from the set of candidate expressions so that it satisfies the specification in the given theory. We describe three different instantiations of the counterexample guided -inductive-synthesis (CEGIS) strategy for solving the synthesis problem, report on prototype implementations, and present experimental results on an initial set of benchmarks.
References (27)
- C. Barrett, R. Sebastiani, S. A. Seshia, and C. Tinelli, "Satisfiability modulo theories," in Handbook of Satisfiability, 2009, vol. 4, ch. 8.
- L. M. de Moura and N. Bjørner, "Satisfiability modulo theories: Intro- duction and applications," Commun. ACM, vol. 54, no. 9, 2011.
- Z. Manna and R. Waldinger, "A deductive approach to program synthe- sis," ACM TOPLAS, vol. 2, no. 1, pp. 90-121, 1980.
- A. Solar-Lezama, R. Rabbah, R. Bodík, and K. Ebcioglu, "Programming by sketching for bit-streaming programs," in PLDI, 2005.
- S. Gulwani, S. Jha, A. Tiwari, and R. Venkatesan, "Synthesis of loop- free programs," SIGPLAN Not., vol. 46, pp. 62-73, June 2011.
- S. Gulwani, W. R. Harris, and R. Singh, "Spreadsheet data manipulation using examples," Commun. ACM, vol. 55, no. 8, pp. 97-105, 2012.
- S. Jha, S. Gulwani, S. A. Seshia, and A. Tiwari, "Oracle-guided component-based program synthesis," in ICSE, 2010, pp. 215-224.
- A. Udupa, A. Raghavan, J. V. Deshmukh, S. Mador-Haim, M. M. Martin, and R. Alur, "TRANSIT: Specifying Protocols with Concolic Snippets," in PLDI, 2013, pp. 287-296.
- S. Srivastava, S. Gulwani, and J. S. Foster, "From program verification to program synthesis," in POPL, 2010, pp. 313-326.
- V. Kuncak, M. Mayer, R. Piskac, and P. Suter, "Software synthesis procedures," Commun. ACM, vol. 55, no. 2, pp. 103-111, 2012.
- E. Schkufza, R. Sharma, and A. Aiken, "Stochastic superoptimization," in ASPLOS, 2013, pp. 305-316.
- M. Colón, S. Sankaranarayanan, and H. Sipma, "Linear invariant gener- ation using non-linear constraint solving," in CAV, 2003, pp. 420-432.
- A. Rybalchenko, "Constraint solving for program verification: Theory and practice by example," in CAV, 2010, pp. 57-71.
- R. Sharma, S. Gupta, B. Hariharan, A. Aiken, P. Liang, and A. V. Nori, "A data driven approach for algebraic loop invariants," in ESOP, 2013, pp. 574-592.
- N. Bjørner, K. L. McMillan, and A. Rybalchenko, "On solving univer- sally quantified Horn clauses," in SAS, 2013, pp. 105-125.
- A. Solar-Lezama, L. Tancau, R. Bodík, S. A. Seshia, and V. Saraswat, "Combinatorial sketching for finite programs," in ASPLOS, 2006.
- E. M. Gold, "Language identification in the limit," Information and Control, vol. 10, no. 5, pp. 447-474, 1967.
- P. D. Summers, "A methodology for LISP program construction from examples," J. ACM, vol. 24, no. 1, pp. 161-175, 1977.
- E. Y. Shapiro, Algorithmic Program Debugging. Cambridge, MA, USA: MIT Press, 1983.
- D. Angluin and C. H. Smith, "Inductive inference: Theory and methods," ACM Computing Surveys, vol. 15, pp. 237-269, Sep. 1983.
- T. M. Mitchell, Machine Learning. McGraw-Hill, 1997.
- S. A. Seshia, "Sciduction: Combining induction, deduction, and structure for verification and synthesis," in DAC, 2012, pp. 356-365.
- D. Angluin, "Queries and concept learning," Machine Learning, vol. 2, pp. 319-342, 1988.
- A. Solar-Lezama, "Program synthesis by sketching," Ph.D. dissertation, University of California, Berkeley, 2008.
- E. M. Clarke, O. Grumberg, S. Jha, Y. Lu, and H. Veith, "Counterexample-guided abstraction refinement for symbolic model checking," J. ACM, vol. 50, no. 5, pp. 752-794, 2003.
- B. McKenzie, "Generating strings at random from a context free grammar," 1997.
- H. S. Warren, Hacker's Delight. Boston, MA, USA: Addison-Wesley Longman Publishing Co., Inc., 2002.