{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,16]],"date-time":"2026-11-16T18:57:57Z","timestamp":1794855477744,"version":"4.9.1"},"publisher-location":"Cham","reference-count":45,"publisher":"Springer Nature Switzerland","isbn-type":[{"value":"9783032401205","type":"print"},{"value":"9783032401212","type":"electronic"}],"license":[{"start":{"date-parts":[[2026,10,17]],"date-time":"2026-10-17T00:00:00Z","timestamp":1792195200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2026,10,17]],"date-time":"2026-10-17T00:00:00Z","timestamp":1792195200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2027]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>The growing reliance on software in safety-critical systems demands strong guarantees of functional correctness. Formal methods address this need by providing proofs as evidence of correctness. Among these, Correctness-by-Construction (CbC) ensures functional correctness through the incremental application of refinement rules while providing early feedback on the program correctness. However, its practical adoption is limited by the required manual effort. Among others, writing concrete program code is left to the developer. In recent years, large language models (LLMs) have demonstrated strong capabilities in code generation from both natural language and formal inputs. Therefore, we explore the use of LLMs to automatically generate code in the context of CbC to make the approach more applicable. We evaluate LLM-based program synthesis using four LLMs and a prompt tailored to CbC on a dataset of 57 specifications drawn from existing CbC case studies, each consisting of a precondition and a postcondition describing the desired behavior. We assess the generated code with respect to correctness and reproducibility across multiple runs. In addition, we compare the results to classically synthesized code, as it can currently be generated in CbC. Our evaluation shows that all considered LLMs outperform the current synthesis approach. Among them, Claude achieves the best performance, reaching 80.70% correct results.<\/jats:p>","DOI":"10.1007\/978-3-032-40121-2_14","type":"book-chapter","created":{"date-parts":[[2026,10,17]],"date-time":"2026-10-17T08:01:02Z","timestamp":1792224062000},"page":"277-299","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["LLM-Based Program Synthesis in\u00a0Correctness-by-Construction Engineering"],"prefix":"10.1007","author":[{"ORCID":"https:\/\/orcid.org\/0009-0008-9022-859X","authenticated-orcid":false,"given":"Maximilian","family":"Kodetzki","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-9315-2769","authenticated-orcid":false,"given":"Hannah","family":"Grimm","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-4399-6242","authenticated-orcid":false,"given":"Fynn","family":"Demmler","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7153-761X","authenticated-orcid":false,"given":"Ina","family":"Schaefer","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"297","published-online":{"date-parts":[[2026,10,17]]},"reference":[{"key":"14_CR1","doi-asserted-by":"publisher","unstructured":"Abate, A., David, C., Kesseli, P., Kroening, D., Polgreen, E.: Counterexample guided inductive synthesis modulo theories. In: Computer Aided Verification. Springer International Publishing, Cham (2018). https:\/\/doi.org\/10.1007\/978-3-319-96145-3_15","DOI":"10.1007\/978-3-319-96145-3_15"},{"key":"14_CR2","doi-asserted-by":"publisher","unstructured":"Ahrendt, W., Beckert, B., Bubel, R., H\u00e4hnle, R., Schmitt, P.H., Ulbrich, M. (eds.): Deductive Software Verification \u2013 The KeY Book, Lecture Notes in Computer Science, vol. 10001. Springer International Publishing, Cham (2016). https:\/\/doi.org\/10.1007\/978-3-319-49812-6","DOI":"10.1007\/978-3-319-49812-6"},{"key":"14_CR3","doi-asserted-by":"publisher","unstructured":"Alur, R., et al.: Syntax-guided synthesis. In: 2013 Formal Methods in Computer-Aided Design (2013). https:\/\/doi.org\/10.1109\/FMCAD.2013.6679385","DOI":"10.1109\/FMCAD.2013.6679385"},{"key":"14_CR4","unstructured":"Anthropic: Claude (2026). https:\/\/www.anthropic.com"},{"key":"14_CR5","doi-asserted-by":"publisher","unstructured":"Azaria, A., Mitchell, T.: The internal state of an LLM knows when it\u2019s lying. In: Findings of the Association for Computational Linguistics: EMNLP 2023, Association for Computational Linguistics, Singapore (2023). https:\/\/doi.org\/10.18653\/v1\/2023.findings-emnlp.68","DOI":"10.18653\/v1\/2023.findings-emnlp.68"},{"key":"14_CR6","doi-asserted-by":"publisher","unstructured":"Back, R.J., Wright, J.: Refinement Calculus. Springer, New York, NY (1998). https:\/\/doi.org\/10.1007\/978-1-4612-1674-2","DOI":"10.1007\/978-1-4612-1674-2"},{"key":"14_CR7","doi-asserted-by":"publisher","unstructured":"Barbosa, H., et\u00a0al.: cvc5: A versatile and industrial-strength SMT solver. In: Tools and Algorithms for the Construction and Analysis of Systems. Springer International Publishing, Cham (2022). https:\/\/doi.org\/10.1007\/978-3-030-99524-9_24","DOI":"10.1007\/978-3-030-99524-9_24"},{"key":"14_CR8","doi-asserted-by":"publisher","unstructured":"Bordis, T., Cleophas, L., Kittelmann, A., Runge, T., Schaefer, I., Watson, B.W.: Re-CorC-ing KeY: Correct-by-construction software development based on KeY. In: The Logic of Software. A Tasting Menu of Formal Methods: Essays Dedicated to Reiner H\u00e4hnle on the Occasion of His 60th Birthday. Springer International Publishing, Cham (2022). https:\/\/doi.org\/10.1007\/978-3-031-08166-8_5","DOI":"10.1007\/978-3-031-08166-8_5"},{"key":"14_CR9","doi-asserted-by":"publisher","unstructured":"Bordis, T., Kodetzki, M., Runge, T., Schaefer, I.: VarCorC: Developing object-oriented software product lines using correctness-by-construction. In: Software Engineering and Formal Methods. SEFM 2022 Collocated Workshops. Springer International Publishing, Cham (2023). https:\/\/doi.org\/10.1007\/978-3-031-26236-4_13","DOI":"10.1007\/978-3-031-26236-4_13"},{"key":"14_CR10","doi-asserted-by":"publisher","unstructured":"Bordis, T., Kodetzki, M., Schaefer, I.: From concept to reality: leveraging correctness-by-construction for better algorithm design. Computer 57(7) (2024). https:\/\/doi.org\/10.1109\/MC.2024.3390948","DOI":"10.1109\/MC.2024.3390948"},{"key":"14_CR11","doi-asserted-by":"publisher","unstructured":"Bordis, T., Runge, T., Schultz, D., Schaefer, I.: Family-based and product-based development of correct-by-construction software product lines. J. Comput. Lang. 70 (2022). https:\/\/doi.org\/10.1016\/j.cola.2022.101119","DOI":"10.1016\/j.cola.2022.101119"},{"key":"14_CR12","doi-asserted-by":"publisher","unstructured":"Bursuc, S., et\u00a0al.: A benchmark for vericoding: formally verified program synthesis (2025). https:\/\/doi.org\/10.48550\/arXiv.2509.22908","DOI":"10.48550\/arXiv.2509.22908"},{"key":"14_CR13","doi-asserted-by":"publisher","unstructured":"Cai, Y., et al.: Automated program refinement: guide and verify code large language model with refinement calculus. Proc. ACM Programm. Lang. 9 (2025). https:\/\/doi.org\/10.1145\/3704905","DOI":"10.1145\/3704905"},{"key":"14_CR14","doi-asserted-by":"publisher","unstructured":"Cai, Y., et\u00a0al.: Towards Large Language Model Aided Program Refinement (2024). https:\/\/doi.org\/10.48550\/arXiv.2406.18616","DOI":"10.48550\/arXiv.2406.18616"},{"key":"14_CR15","doi-asserted-by":"publisher","unstructured":"Clarke, E., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-Guided Abstraction Refinement. In: Computer Aided Verification. Springer, Berlin, Heidelberg (2000). https:\/\/doi.org\/10.1007\/10722167_15","DOI":"10.1007\/10722167_15"},{"key":"14_CR16","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"54","DOI":"10.1007\/BFb0058022","volume-title":"Foundations of Software Technology and Theoretical Computer Science","author":"EM Clarke","year":"1997","unstructured":"Clarke, E.M.: Model checking. In: Ramesh, S., Sivakumar, G. (eds.) FSTTCS 1997. LNCS, vol. 1346, pp. 54\u201356. Springer, Heidelberg (1997). https:\/\/doi.org\/10.1007\/BFb0058022"},{"key":"14_CR17","doi-asserted-by":"publisher","unstructured":"Clarke, E., Gupta, A., Strichman, O.: SAT-based counterexample-guided abstraction refinement. IEEE Trans. Comput.-Aided Design Integr. Circ. Syst. 23(7) (2004). https:\/\/doi.org\/10.1109\/TCAD.2004.829807","DOI":"10.1109\/TCAD.2004.829807"},{"key":"14_CR18","doi-asserted-by":"publisher","unstructured":"Dijkstra, E.W.: Guarded commands, nondeterminacy and formal derivation of programs. Commun. ACM 18(8) (1975). https:\/\/doi.org\/10.1145\/360933.360975","DOI":"10.1145\/360933.360975"},{"key":"14_CR19","unstructured":"Dijkstra, E.W.: A discipline of programming, Prentice-Hall (1976)"},{"key":"14_CR20","doi-asserted-by":"publisher","unstructured":"Garavel, H., Ter\u00a0Beek, M.H., Van De\u00a0Pol, J.: The 2020 expert survey on formal methods. In: Formal Methods for Industrial Critical Systems, vol. 12327. Springer International Publishing, Cham (2020). https:\/\/doi.org\/10.1007\/978-3-030-58298-2_1","DOI":"10.1007\/978-3-030-58298-2_1"},{"key":"14_CR21","unstructured":"GitHub, I.: GitHub Copilot (2026), https:\/\/github.com\/features\/copilot"},{"key":"14_CR22","unstructured":"Google: Gemini (2026). https:\/\/gemini.google.com\/"},{"key":"14_CR23","doi-asserted-by":"publisher","unstructured":"Gulwani, S., Polozov, O., Singh, R.: Program Synthesis. Found. Trends Programm. Lang. 4(1-2) (2017). https:\/\/doi.org\/10.1561\/2500000010","DOI":"10.1561\/2500000010"},{"key":"14_CR24","doi-asserted-by":"publisher","unstructured":"Jhala, R., Majumdar, R.: Software model checking. ACM Comput. Surv.41(4) (2009). https:\/\/doi.org\/10.1145\/1592434.1592438","DOI":"10.1145\/1592434.1592438"},{"key":"14_CR25","doi-asserted-by":"publisher","unstructured":"Kitzelmann, E.: Inductive Programming: A Survey of Program Synthesis Techniques. In: Approaches and Applications of Inductive Programming. Springer, Berlin, Heidelberg (2010). https:\/\/doi.org\/10.1007\/978-3-642-11931-6_3","DOI":"10.1007\/978-3-642-11931-6_3"},{"key":"14_CR26","doi-asserted-by":"publisher","unstructured":"Kodetzki, M., Bastron, M., Flaschentr\u00e4ger, M., Grimm, H., Payne, C., Sharfeddin, J.: KIT-TVA: WebCorC 1.2. Zenodo (2026). https:\/\/doi.org\/10.5281\/ZENODO.20181249","DOI":"10.5281\/ZENODO.20181249"},{"key":"14_CR27","doi-asserted-by":"publisher","unstructured":"Kodetzki, M., Bordis, T., Kirsten, M., Schaefer, I.: Towards AI-assisted correctness-by-construction software development. In: Leveraging Applications of Formal Methods, Verification and Validation. Software Engineering Methodologies. Springer Nature Switzerland, Cham (2024). https:\/\/doi.org\/10.1007\/978-3-031-75387-9_14","DOI":"10.1007\/978-3-031-75387-9_14"},{"key":"14_CR28","doi-asserted-by":"publisher","unstructured":"Kodetzki, M., Grimm, H., Demmler, F., Schaefer, I.: Evaluation Data and Pipeline. Zenodo (2026). https:\/\/doi.org\/10.5281\/ZENODO.20181120","DOI":"10.5281\/ZENODO.20181120"},{"key":"14_CR29","doi-asserted-by":"publisher","unstructured":"Kourie, D.G., Watson, B.W.: The Correctness-by-Construction Approach to Programming. Springer Berlin Heidelberg, Berlin, Heidelberg (2012). https:\/\/doi.org\/10.1007\/978-3-642-27919-5","DOI":"10.1007\/978-3-642-27919-5"},{"key":"14_CR30","doi-asserted-by":"publisher","unstructured":"Manna, Z., Waldinger, R.: A deductive approach to program synthesis. ACM Trans. Programm. Lang. Syst. 2(1) (1980). https:\/\/doi.org\/10.1145\/357084.357090","DOI":"10.1145\/357084.357090"},{"key":"14_CR31","doi-asserted-by":"crossref","unstructured":"Manna, Z., Waldinger, R.: Fundamentals of Deductive Program Synthesis (1992)","DOI":"10.21236\/ADA236001"},{"key":"14_CR32","doi-asserted-by":"publisher","unstructured":"Misu, M.R.H., Lopes, C.V., Ma, I., Noble, J.: Towards AI-assisted synthesis of verified Dafny methods. Proc. ACM on Softw. Eng. 1(FSE) (2024). https:\/\/doi.org\/10.1145\/3643763","DOI":"10.1145\/3643763"},{"key":"14_CR33","volume-title":"Programming from Specifications","author":"C Morgan","year":"1990","unstructured":"Morgan, C.: Programming from Specifications. Prentice-Hall Inc, USA (Apr (1990)"},{"key":"14_CR34","unstructured":"Neumann, D.: Program Synthesis from Formal Specifications for Correctness-by-Construction in CorC (2024)"},{"key":"14_CR35","doi-asserted-by":"publisher","unstructured":"OpenAI: GPT-4 Technical Report (2024). https:\/\/doi.org\/10.48550\/arXiv.2303.08774","DOI":"10.48550\/arXiv.2303.08774"},{"key":"14_CR36","unstructured":"OpenAI: GPT-5 (2026). https:\/\/openai.com"},{"key":"14_CR37","doi-asserted-by":"publisher","unstructured":"Osera, P.M.: Constraint-based type-directed program synthesis. In: Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development. ACM, Berlin Germany (2019). https:\/\/doi.org\/10.1145\/3331554.3342608","DOI":"10.1145\/3331554.3342608"},{"key":"14_CR38","doi-asserted-by":"publisher","unstructured":"Polozov, O., Gulwani, S.: FlashMeta: a framework for inductive program synthesis. In: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, Pittsburgh PA USA (2015). https:\/\/doi.org\/10.1145\/2814270.2814310","DOI":"10.1145\/2814270.2814310"},{"key":"14_CR39","doi-asserted-by":"publisher","unstructured":"Runge, T., Schaefer, I., Cleophas, L., Th\u00fcm, T., Kourie, D., Watson, B.W.: Tool support for correctness-by-construction. In: Fundamental Approaches to Software Engineering, vol. 11424. Springer International Publishing, Cham (2019). https:\/\/doi.org\/10.1007\/978-3-030-16722-6_2","DOI":"10.1007\/978-3-030-16722-6_2"},{"key":"14_CR40","doi-asserted-by":"publisher","unstructured":"Runge, T., Th\u00fcm, T., Cleophas, L., Schaefer, I., Watson, B.W.: Comparing correctness-by-construction with post-hoc verification\u2014a qualitative user study. In: Formal Methods. FM 2019 International Workshops, vol. 12233. Springer International Publishing, Cham (2020). https:\/\/doi.org\/10.1007\/978-3-030-54997-8_25","DOI":"10.1007\/978-3-030-54997-8_25"},{"key":"14_CR41","doi-asserted-by":"publisher","unstructured":"Scholz, W., Th\u00fcm, T., Apel, S., Lengauer, C.: Automatic detection of feature interactions using the Java modeling language: an experience report. In: Proceedings of the 15th International Software Product Line Conference, Volume 2. ACM, Munich Germany (2011). https:\/\/doi.org\/10.1145\/2019136.2019144","DOI":"10.1145\/2019136.2019144"},{"key":"14_CR42","doi-asserted-by":"publisher","unstructured":"Valmari, A.: The state explosion problem. In: Lectures on Petri Nets I: Basic Models: Advances in Petri Nets. Springer, Berlin, Heidelberg (1998). https:\/\/doi.org\/10.1007\/3-540-65306-6_21","DOI":"10.1007\/3-540-65306-6_21"},{"key":"14_CR43","unstructured":"XAI: Grok (2026). https:\/\/www.grok.com"},{"key":"14_CR44","doi-asserted-by":"publisher","unstructured":"Zhang, B., Liang, P., Zhou, X., Ahmad, A., Waseem, M.: Practices and Challenges of Using GitHub Copilot: An Empirical Study. Computing Research Repository (CoRR) (2023). https:\/\/doi.org\/10.18293\/SEKE2023-077","DOI":"10.18293\/SEKE2023-077"},{"key":"14_CR45","doi-asserted-by":"publisher","unstructured":"Zhou, Y., et al.: Large Language Models Are Human-Level Prompt Engineers (2023). https:\/\/doi.org\/10.48550\/arXiv.2211.01910","DOI":"10.48550\/arXiv.2211.01910"}],"container-title":["Lecture Notes in Computer Science","Leveraging Applications of Formal Methods, Verification and Validation. X-by-Construction Meets Intersymbolic AI"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-032-40121-2_14","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,10,17]],"date-time":"2026-10-17T08:01:06Z","timestamp":1792224066000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/chapter\/10.1007\/978-3-032-40121-2_14"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,10,17]]},"ISBN":["9783032401205","9783032401212"],"references-count":45,"URL":"https:\/\/doi.org\/10.1007\/978-3-032-40121-2_14","relation":{"is-part-of":[{"id-type":"doi","id":"https:\/\/doi.org\/10.1007\/978-3-032-40121-2","asserted-by":"object"}]},"ISSN":["0302-9743","1611-3349"],"issn-type":[{"value":"0302-9743","type":"print"},{"value":"1611-3349","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,10,17]]},"assertion":[{"value":"17 October 2026","order":1,"name":"first_online","label":"First Online","group":{"name":"ChapterHistory","label":"Chapter History"}},{"value":"ISoLA","order":1,"name":"conference_acronym","label":"Conference Acronym","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"International Symposium on Leveraging Applications of Formal Methods","order":2,"name":"conference_name","label":"Conference Name","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Kos","order":3,"name":"conference_city","label":"Conference City","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Greece","order":4,"name":"conference_country","label":"Conference Country","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"2026","order":5,"name":"conference_year","label":"Conference Year","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"24 October 2026","order":7,"name":"conference_start_date","label":"Conference Start Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"28 October 2026","order":8,"name":"conference_end_date","label":"Conference End Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"13","order":9,"name":"conference_number","label":"Conference Number","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"isola2026","order":10,"name":"conference_id","label":"Conference ID","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"https:\/\/2026-isola.isola-conference.org\/","order":11,"name":"conference_url","label":"Conference URL","group":{"name":"ConferenceInfo","label":"Conference Information"}}]}}