{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,27]],"date-time":"2026-11-27T19:51:42Z","timestamp":1795809102395,"version":"4.11.3"},"publisher-location":"Cham","reference-count":43,"publisher":"Springer Nature Switzerland","isbn-type":[{"value":"9783031656293","type":"print"},{"value":"9783031656309","type":"electronic"}],"license":[{"start":{"date-parts":[[2024,1,1]],"date-time":"2024-01-01T00:00:00Z","timestamp":1704067200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2024,7,25]],"date-time":"2024-07-25T00:00:00Z","timestamp":1721865600000},"content-version":"vor","delay-in-days":206,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2024]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>Pre-trained Large Language Models (LLMs) are beginning to dominate the discourse around automatic code generation with natural language specifications. In contrast, the best-performing synthesizers in the domain of formal synthesis with precise logical specifications are still based on enumerative algorithms. In this paper, we evaluate the abilities of LLMs to solve formal synthesis benchmarks by carefully crafting a library of prompts for the domain. When one-shot synthesis fails, we propose a novel enumerative synthesis algorithm, which integrates calls to an LLM into a weighted probabilistic search. This allows the synthesizer to provide the LLM with information about the progress of the enumerator, and the LLM to provide the enumerator with syntactic guidance in an iterative loop. We evaluate our techniques on benchmarks from the Syntax-Guided Synthesis (SyGuS) competition. We find that GPT-3.5 as a stand-alone tool for formal synthesis is easily outperformed by state-of-the-art formal synthesis algorithms, but our approach integrating the LLM into an enumerative synthesis algorithm shows significant performance gains over both the LLM and the enumerative synthesizer alone and the winning SyGuS competition tool.<\/jats:p>","DOI":"10.1007\/978-3-031-65630-9_15","type":"book-chapter","created":{"date-parts":[[2024,7,24]],"date-time":"2024-07-24T18:01:56Z","timestamp":1721844116000},"page":"280-301","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":24,"title":["Guiding Enumerative Program Synthesis with\u00a0Large Language Models"],"prefix":"10.1007","author":[{"ORCID":"https:\/\/orcid.org\/0009-0007-4619-3476","authenticated-orcid":false,"given":"Yixuan","family":"Li","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5113-0767","authenticated-orcid":false,"given":"Julian","family":"Parsert","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9032-7661","authenticated-orcid":false,"given":"Elizabeth","family":"Polgreen","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"297","published-online":{"date-parts":[[2024,7,25]]},"reference":[{"key":"15_CR1","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"270","DOI":"10.1007\/978-3-319-96145-3_15","volume-title":"Computer Aided Verification","author":"A Abate","year":"2018","unstructured":"Abate, A., David, C., Kesseli, P., Kroening, D., Polgreen, E.: Counterexample guided inductive synthesis modulo theories. In: Chockler, H., Weissenbacher, G. (eds.) CAV 2018. LNCS, vol. 10981, pp. 270\u2013288. Springer, Cham (2018). https:\/\/doi.org\/10.1007\/978-3-319-96145-3_15"},{"key":"15_CR2","doi-asserted-by":"crossref","unstructured":"Alur, R., et al.: Syntax-guided synthesis. IEEE (2013)","DOI":"10.1109\/FMCAD.2013.6679385"},{"key":"15_CR3","unstructured":"Alur, R., Fisman, D., Singh, R., Udupa, A.: Syntax guided synthesis competition. https:\/\/sygus-org.github.io. Accessed 16 Jan 2024"},{"key":"15_CR4","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"319","DOI":"10.1007\/978-3-662-54577-5_18","volume-title":"Tools and Algorithms for the Construction and Analysis of Systems","author":"R Alur","year":"2017","unstructured":"Alur, R., Radhakrishna, A., Udupa, A.: Scaling enumerative program synthesis via divide and conquer. In: Legay, A., Margaria, T. (eds.) TACAS 2017. LNCS, vol. 10205, pp. 319\u2013336. Springer, Heidelberg (2017). https:\/\/doi.org\/10.1007\/978-3-662-54577-5_18"},{"key":"15_CR5","unstructured":"Austin, J., et al.: Program synthesis with large language models. arXiv preprint arXiv:2108.07732 (2021)"},{"key":"15_CR6","unstructured":"Balog, M., Gaunt, A.L., Brockschmidt, M., Nowozin, S., Tarlow, D.: DeepCoder: learning to write programs. In: ICLR (Poster). OpenReview.net (2017)"},{"key":"15_CR7","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"415","DOI":"10.1007\/978-3-030-99524-9_24","volume-title":"Tools and Algorithms for the Construction and Analysis of Systems","author":"H Barbosa","year":"2022","unstructured":"Barbosa, H., et al.: cvc5: a versatile and industrial-strength SMT solver. In: TACAS 2022. LNCS, vol. 13243, pp. 415\u2013442. Springer, Cham (2022). https:\/\/doi.org\/10.1007\/978-3-030-99524-9_24"},{"key":"15_CR8","doi-asserted-by":"publisher","unstructured":"Barrett, C.W., Sebastiani, R., Seshia, S.A., Tinelli, C.: Satisfiability modulo theories. In: Biere, A., Heule, M., van Maaren, H., Walsh, T. (eds.) Handbook of Satisfiability - Second Edition, Frontiers in Artificial Intelligence and Applications, vol.\u00a0336, pp. 1267\u20131329. IOS Press (2021). https:\/\/doi.org\/10.3233\/FAIA201017","DOI":"10.3233\/FAIA201017"},{"key":"15_CR9","doi-asserted-by":"crossref","unstructured":"Bielik, P., Raychev, V., Vechev, M.T.: PHOG: probabilistic model for code. In: ICML. JMLR Workshop and Conference Proceedings, vol.\u00a048, pp. 2933\u20132942. JMLR.org (2016)","DOI":"10.1145\/2983990.2984041"},{"key":"15_CR10","unstructured":"Brown, T., et al.: Language models are few-shot learners. In: Advances in Neural Information Processing Systems, vol. 33, pp. 1877\u20131901 (2020)"},{"key":"15_CR11","unstructured":"Bubeck, S., et\u00a0al.: Sparks of artificial general intelligence: early experiments with GPT-4. arXiv preprint arXiv:2303.12712 (2023)"},{"key":"15_CR12","unstructured":"Bunel, R., Hausknecht, M., Devlin, J., Singh, R., Kohli, P.: Leveraging grammar and reinforcement learning for neural program synthesis. In: International Conference on Learning Representations (2018)"},{"key":"15_CR13","doi-asserted-by":"crossref","unstructured":"Chasins, S.E., Newcomb, J.L.: Using SyGuS to synthesize reactive motion plans. In: SYNT@CAV. EPTCS, vol.\u00a0229, pp. 3\u201320 (2016)","DOI":"10.4204\/EPTCS.229.3"},{"key":"15_CR14","unstructured":"Chen, M., et\u00a0al.: Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374 (2021)"},{"key":"15_CR15","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"587","DOI":"10.1007\/978-3-030-53291-8_30","volume-title":"Computer Aided Verification","author":"Y Chen","year":"2020","unstructured":"Chen, Y., Wang, C., Bastani, O., Dillig, I., Feng, Yu.: Program synthesis using deduction-guided reinforcement learning. In: Lahiri, S.K., Wang, C. (eds.) CAV 2020. LNCS, vol. 12225, pp. 587\u2013610. Springer, Cham (2020). https:\/\/doi.org\/10.1007\/978-3-030-53291-8_30"},{"key":"15_CR16","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"483","DOI":"10.1007\/978-3-662-48899-7_34","volume-title":"Logic for Programming, Artificial Intelligence, and Reasoning","author":"C David","year":"2015","unstructured":"David, C., Kroening, D., Lewis, M.: Using program synthesis for program analysis. In: Davis, M., Fehnker, A., McIver, A., Voronkov, A. (eds.) LPAR 2015. LNCS, vol. 9450, pp. 483\u2013498. Springer, Heidelberg (2015). https:\/\/doi.org\/10.1007\/978-3-662-48899-7_34"},{"key":"15_CR17","doi-asserted-by":"crossref","unstructured":"Feng, Y., Martins, R., Bastani, O., Dillig, I.: Program synthesis using conflict-driven learning. In: PLDI, pp. 420\u2013435. ACM (2018)","DOI":"10.1145\/3296979.3192382"},{"key":"15_CR18","unstructured":"GitHub, OpenAI: GitHub Copilot (2021)"},{"issue":"2","key":"15_CR19","doi-asserted-by":"publisher","first-page":"100","DOI":"10.1109\/TSSC.1968.300136","volume":"4","author":"PE Hart","year":"1968","unstructured":"Hart, P.E., Nilsson, N.J., Raphael, B.: A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Sci. Cybern. 4(2), 100\u2013107 (1968)","journal-title":"IEEE Trans. Syst. Sci. Cybern."},{"key":"15_CR20","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"386","DOI":"10.1007\/978-3-319-96145-3_21","volume-title":"Computer Aided Verification","author":"Q Hu","year":"2018","unstructured":"Hu, Q., D\u2019Antoni, L.: Syntax-guided synthesis with quantitative syntactic objectives. In: Chockler, H., Weissenbacher, G. (eds.) CAV 2018. LNCS, vol. 10981, pp. 386\u2013403. Springer, Cham (2018). https:\/\/doi.org\/10.1007\/978-3-319-96145-3_21"},{"key":"15_CR21","doi-asserted-by":"crossref","unstructured":"Huang, K., Qiu, X., Shen, P., Wang, Y.: Reconciling enumerative and deductive program synthesis. In: PLDI, pp. 1159\u20131174. ACM (2020)","DOI":"10.1145\/3385412.3386027"},{"key":"15_CR22","doi-asserted-by":"crossref","unstructured":"Jain, N., et al.: Jigsaw: large language models meet program synthesis. In: ICSE, pp. 1219\u20131231. ACM (2022)","DOI":"10.1145\/3510003.3510203"},{"key":"15_CR23","doi-asserted-by":"crossref","unstructured":"Jha, S.K., et al.: Counterexample guided inductive synthesis using large language models and satisfiability solving. In: MILCOM 2023-2023 IEEE Military Communications Conference (MILCOM), pp. 944\u2013949. IEEE (2023)","DOI":"10.1109\/MILCOM58377.2023.10356332"},{"key":"15_CR24","doi-asserted-by":"crossref","unstructured":"Jha, S., Gulwani, S., Seshia, S.A., Tiwari, A.: Oracle-guided component-based program synthesis. In: Proceedings of the 32nd ACM\/IEEE International Conference on Software Engineering-Volume 1, pp. 215\u2013224 (2010)","DOI":"10.1145\/1806799.1806833"},{"key":"15_CR25","doi-asserted-by":"publisher","first-page":"693","DOI":"10.1007\/s00236-017-0294-5","volume":"54","author":"S Jha","year":"2017","unstructured":"Jha, S., Seshia, S.A.: A theory of formal synthesis via inductive learning. Acta Informatica 54, 693\u2013726 (2017)","journal-title":"Acta Informatica"},{"key":"15_CR26","unstructured":"Kamath, A., et al.: Finding inductive loop invariants using large language models (2023)"},{"key":"15_CR27","doi-asserted-by":"crossref","unstructured":"Lee, W., Heo, K., Alur, R., Naik, M.: Accelerating search-based program synthesis using learned probabilistic models. In: PLDI, pp. 436\u2013449. ACM (2018)","DOI":"10.1145\/3296979.3192410"},{"key":"15_CR28","unstructured":"Li, C., et al.: Large language models understand and can be enhanced by emotional stimuli. arXiv preprint arXiv:2307.11760 (2023)"},{"key":"15_CR29","unstructured":"Liang, P., Jordan, M.I., Klein, D.: Learning programs: a hierarchical Bayesian approach. In: ICML, pp. 639\u2013646. Citeseer (2010)"},{"key":"15_CR30","unstructured":"Menon, A., Tamuz, O., Gulwani, S., Lampson, B., Kalai, A.: A machine learning framework for programming by example. In: International Conference on Machine Learning, pp. 187\u2013195. PMLR (2013)"},{"key":"15_CR31","doi-asserted-by":"crossref","unstructured":"Morton, K., Hallahan, W.T., Shum, E., Piskac, R., Santolucito, M.: Grammar filtering for syntax-guided synthesis. In: AAAI, pp. 1611\u20131618. AAAI Press (2020)","DOI":"10.1609\/aaai.v34i02.5522"},{"key":"15_CR32","unstructured":"OpenAI: GPT-4 technical report. arXiv, pp. 2303\u201308774 (2023)"},{"key":"15_CR33","doi-asserted-by":"crossref","unstructured":"Ouyang, S., Zhang, J.M., Harman, M., Wang, M.: LLM is like a box of chocolates: the non-determinism of ChatGPT in code generation. arXiv preprint arXiv:2308.02828 (2023)","DOI":"10.1145\/3697010"},{"key":"15_CR34","doi-asserted-by":"crossref","unstructured":"Parsert, J., Polgreen, E.: Reinforcement learning and data-generation for syntax-guided synthesis. In: AAAI, pp. 10670\u201310678. AAAI Press (2024)","DOI":"10.1609\/aaai.v38i9.28938"},{"key":"15_CR35","doi-asserted-by":"crossref","unstructured":"Pearce, H., Ahmad, B., Tan, B., Dolan-Gavitt, B., Karri, R.: Asleep at the keyboard? Assessing the security of GitHub Copilot\u2019s code contributions. In: 2022 IEEE Symposium on Security and Privacy (SP), pp. 754\u2013768. IEEE (2022)","DOI":"10.1109\/SP46214.2022.9833571"},{"key":"15_CR36","doi-asserted-by":"crossref","unstructured":"Perry, N., Srivastava, M., Kumar, D., Boneh, D.: Do users write more insecure code with AI assistants? In: Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, pp. 2785\u20132799 (2023)","DOI":"10.1145\/3576915.3623157"},{"key":"15_CR37","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"74","DOI":"10.1007\/978-3-030-25543-5_5","volume-title":"Computer Aided Verification","author":"A Reynolds","year":"2019","unstructured":"Reynolds, A., Barbosa, H., N\u00f6tzli, A., Barrett, C., Tinelli, C.: cvc4sy: smart and fast term enumeration for syntax-guided synthesis. In: Dillig, I., Tasiran, S. (eds.) CAV 2019. LNCS, vol. 11562, pp. 74\u201383. Springer, Cham (2019). https:\/\/doi.org\/10.1007\/978-3-030-25543-5_5"},{"key":"15_CR38","unstructured":"Sandoval, G., Pearce, H., Nys, T., Karri, R., Garg, S., Dolan-Gavitt, B.: Lost at C: a user study on the security implications of large language model code assistants. In: 32nd USENIX Security Symposium (USENIX Security 2023), pp. 2205\u20132222. USENIX Association, Anaheim, CA, August 2023"},{"key":"15_CR39","doi-asserted-by":"crossref","unstructured":"Solar-Lezama, A., Tancau, L., Bodik, R., Seshia, S., Saraswat, V.: Combinatorial sketching for finite programs. In: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 404\u2013415 (2006)","DOI":"10.1145\/1168857.1168907"},{"key":"15_CR40","doi-asserted-by":"crossref","unstructured":"Song, C.H., Wu, J., Washington, C., Sadler, B.M., Chao, W.L., Su, Y.: LLM-planner: few-shot grounded planning for embodied agents with large language models. In: Proceedings of the IEEE\/CVF International Conference on Computer Vision, pp. 2998\u20133009 (2023)","DOI":"10.1109\/ICCV51070.2023.00280"},{"key":"15_CR41","doi-asserted-by":"crossref","unstructured":"Sun, C., Sheng, Y., Padon, O., Barrett, C.: Clover: closed-loop verifiable code generation. arXiv preprint arXiv:2310.17807 (2023)","DOI":"10.1007\/978-3-031-65112-0_7"},{"key":"15_CR42","unstructured":"Wei, J., et al.: Chain-of-thought prompting elicits reasoning in large language models. In: NeurIPS (2022)"},{"key":"15_CR43","unstructured":"Wu, H., Barrett, C., Narodytska, N.: Lemur: integrating large language models in automated program verification. arXiv preprint arXiv:2310.04870 (2023)"}],"container-title":["Lecture Notes in Computer Science","Computer Aided Verification"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-031-65630-9_15","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2024,11,24]],"date-time":"2024-11-24T14:47:17Z","timestamp":1732459637000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/978-3-031-65630-9_15"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024]]},"ISBN":["9783031656293","9783031656309"],"references-count":43,"URL":"https:\/\/doi.org\/10.1007\/978-3-031-65630-9_15","relation":{"is-part-of":[{"id-type":"doi","id":"https:\/\/doi.org\/10.1007\/978-3-031-65630-9","asserted-by":"object"}]},"ISSN":["0302-9743","1611-3349"],"issn-type":[{"value":"0302-9743","type":"print"},{"value":"1611-3349","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024]]},"assertion":[{"value":"25 July 2024","order":1,"name":"first_online","label":"First Online","group":{"name":"ChapterHistory","label":"Chapter History"}},{"value":"CAV","order":1,"name":"conference_acronym","label":"Conference Acronym","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"International Conference on Computer Aided Verification","order":2,"name":"conference_name","label":"Conference Name","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Montreal, QC","order":3,"name":"conference_city","label":"Conference City","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Canada","order":4,"name":"conference_country","label":"Conference Country","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"2024","order":5,"name":"conference_year","label":"Conference Year","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"24 July 2024","order":7,"name":"conference_start_date","label":"Conference Start Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"27 July 2024","order":8,"name":"conference_end_date","label":"Conference End Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"36","order":9,"name":"conference_number","label":"Conference Number","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"cav2024","order":10,"name":"conference_id","label":"Conference ID","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"http:\/\/i-cav.org\/2024\/","order":11,"name":"conference_url","label":"Conference URL","group":{"name":"ConferenceInfo","label":"Conference Information"}}]}}