Skip to main content

Encodings for Enumeration-Based Program Synthesis

  • Conference paper
  • First Online:
Principles and Practice of Constraint Programming (CP 2019)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 11802))

Abstract

Program synthesis is the problem of finding a program that satisfies a given specification. Most program synthesizers are based on enumerating program candidates that satisfy the specification. Recently, several new tools for program synthesis have been proposed where Satisfiability Modulo Theories (SMT) solvers are used to prune the search space by discarding programs that do not satisfy the specification.

The size of current tree-based SMT encodings for program synthesis grows exponentially with the size of the program. In this paper, a new compact line-based encoding is proposed that allows a faster enumeration of the program space. Experimental results on a large set of query synthesis problem instances show that using the new encoding results in a more effective tool that is able to synthesize larger programs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    This corresponds to exercise 5.2.1 from a classic textbook on databases [13].

References

  1. OutSystems (2019). https://www.outsystems.com. Accessed 15 July 2019

  2. Balog, M., Gaunt, A.L., Brockschmidt, M., Nowozin, S., Tarlow, D.: Deepcoder: learning to write programs. In: Proceedings International Conference on Learning Representations. OpenReview (2017)

    Google Scholar 

  3. Chandra, K., Bodík, R.: Bonsai: synthesis-based reasoning for type systems. PACM Program. Lang. 2(POPL), 1–34 (2018)

    Google Scholar 

  4. Chen, J., Martins, R., Chen, Y., Feng, Y., Dillig, I.: Trinity: an extensible synthesis framework for data science. PVLDB 12(12), 1914–1917 (2019)

    Google Scholar 

  5. de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24

    Chapter  Google Scholar 

  6. Feng, Y., Martins, R., Bastani, O., Dillig, I.: Program synthesis using conflict-driven learning. In: Proceedings Conference on Programming Language Design and Implementation, pp. 420–435. ACM (2018)

    Article  Google Scholar 

  7. Feng, Y., Martins, R., Van Geffen, J., Dillig, I., Chaudhuri, S.: Component-based synthesis of table consolidation and transformation tasks from examples. In: Proceedings Conference on Programming Language Design and Implementation, pp. 422–436. ACM (2017)

    Google Scholar 

  8. Feng, Y., Martins, R., Wang, Y., Dillig, I., Reps, T.: Component-Based Synthesis for Complex APIs. In: Proceedings Symposium on Principles of Programming Languages, pp. 599–612. ACM (2017)

    Google Scholar 

  9. Feser, J.K., Chaudhuri, S., Dillig, I.: Synthesizing data structure transformations from input-output examples. In: Proceedings Conference on Programming Language Design and Implementation, pp. 229–239. ACM (2015)

    Google Scholar 

  10. Gulwani, S.: Automating string processing in spreadsheets using input-output examples. In: Proceedings Symposium on Principles of Programming Languages, pp. 317–330. ACM (2011)

    Google Scholar 

  11. Gulwani, S., Jha, S., Tiwari, A., Venkatesan, R.: Synthesis of loop-free programs. In: Proceedings Conference on Programming Language Design and Implementation, pp. 62–73. ACM (2011)

    Google Scholar 

  12. Jha, S., Gulwani, S., Seshia, S.A., Tiwari, A.: Oracle-guided component-based program synthesis. In: Proceedings International Conference on Software Engineering, pp. 215–224. ACM (2010)

    Google Scholar 

  13. Ramakrishnan, R., Gehrke, J.: Database management systems. McGraw Hill, New York (2000)

    MATH  Google Scholar 

  14. Raychev, V., Vechev, M., Yahav, E.: Code completion with statistical language models. In: Proceedings Conference on Programming Language Design and Implementation, pp. 419–428. ACM (2014)

    Google Scholar 

  15. Singh, R., Gulwani, S.: Transforming spreadsheet data types using examples. In: Proceedings Symposium on Principles of Programming Languagesm, pp. 343–356. ACM (2016)

    Article  Google Scholar 

  16. Tiwari, A., Gascón, A., Dutertre, B.: Program synthesis using dual interpretation. In: Felty, A.P., Middeldorp, A. (eds.) CADE 2015. LNCS (LNAI), vol. 9195, pp. 482–497. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21401-6_33

    Chapter  Google Scholar 

  17. Tran, Q.T., Chan, C., Parthasarathy, S.: Query by output. In: Proceedings International Conference on Management of Data, pp. 535–548. ACM (2009)

    Google Scholar 

  18. Wang, C., Cheung, A., Bodik, R.: Synthesizing highly expressive SQL queries from input-output examples. In: Proceedings Conference on Programming Language Design and Implementation, pp. 452–466. ACM (2017)

    Article  Google Scholar 

  19. Yaghmazadeh, N., Wang, Y., Dillig, I., Dillig, T.: SQLizer: query synthesis from natural language. In: Proceedings International Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 63:1–63:26. ACM (2017)

    Article  Google Scholar 

  20. Zhang, S., Sun, Y.: Automatically synthesizing SQL queries from input-output examples. In: Proceedings International Conference on Automated Software Engineering, pp. 224–234. IEEE (2013)

    Google Scholar 

Download references

Acknowledgments

This work was supported by national funds through FCT with references UID/CEC/50021/2019, PTDC/CCI-COM/31198/2017 and DSAIPA/AI/0044/2018, and by NSF award #1762363 and the CMU-Portugal program with reference CMU/AIR/0022/2017.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ruben Martins .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Orvalho, P., Terra-Neves, M., Ventura, M., Martins, R., Manquinho, V. (2019). Encodings for Enumeration-Based Program Synthesis. In: Schiex, T., de Givry, S. (eds) Principles and Practice of Constraint Programming. CP 2019. Lecture Notes in Computer Science(), vol 11802. Springer, Cham. https://doi.org/10.1007/978-3-030-30048-7_34

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-30048-7_34

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-30047-0

  • Online ISBN: 978-3-030-30048-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics