Towards AI-Assisted Synthesis of Verified Dafny Methods
Open accessAbstract
Large language models show great promise in many domains, including programming. A promise is easy to make but hard to keep, and language models often fail to keep their promises, generating erroneous code. A promising avenue to keep models honest is to incorporate formal verification: generating programs’ specifications as well as code, so that the code can be proved correct with respect to the specifications. Unfortunately, existing large language models show a severe lack of proficiency in verified programming. In this paper, we demonstrate how to improve two pretrained models’ proficiency in the Dafny verification-aware language. Using 178 problems from the MBPP dataset, we prompt two contemporary models (GPT-4 and PaLM-2) to synthesize Dafny methods. We use three different types of prompts: a direct Contextless prompt; a Signature prompt that includes a method signature and test cases, and a Chain of Thought (CoT) prompt that decomposes the problem into steps and includes retrieval augmentation generated example problems and solutions. Our results show that GPT-4 performs better than PaLM-2 on these tasks, and that both models perform best with the retrieval augmentation generated CoT prompt. GPT-4 was able to generate verified, human-evaluated, Dafny methods for 58% of the problems, however GPT-4 managed only 19% of the problems with the Contextless prompt, and even fewer (10%) for the Signature prompt. We are thus able to contribute 153 verified Dafny solutions to MBPP problems, 50 that we wrote manually and 103 synthesized by GPT-4. Our results demonstrate that the benefits of formal program verification are now within reach of codegenerating large language models. Likewise, program verification systems can benefit from large language models, whether to synthesize code wholesale, to generate specifications, or to act as a “programmer’s verification apprentice”, to construct annotations such as loop invariants which are hard for programmers to write or verification tools to find. Finally, we expect that the approach we have pioneered here — generating candidate solutions that are subsequently formally checked for correctness — should transfer to other domains (e.g., legal arguments, transport signaling, structural engineering) where solutions must be correct, where that correctness must be demonstrated, explained and understood by designers and end-users.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
MBPP-verified contains 78 programs from the original MBPP dataset.
“In particular, MBPP -verified is sourced from (Yang et al., 2024;Misu et al., 2024) and contains 78 programs from the original MBPP dataset (Austin et al., 2021).”
From AlphaVerus: Bootstrapping Formally Verified Code Generation through Self-Improving Translation and Treefinement (2024) · cites this paper as Misu et al., 2024
Section 3.1 identifies the paper’s dataset as derived from MBPP, supporting the claimed MBPP origin. But it calls that dataset MBPP-san-DFY and reports 178 test problems; section 3.2 reports 50 human-written verified problems. Our copy does not identify an MBPP-verified dataset containing 78 programs. (LLM, conf=0.84)
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Proceedings of the 25th international conference on Machine learning - ICML '08
(2008) · doi:10.1145/1390156 · Cited by 6,865 · see citing works
de Moura, L., & Bjørner, N. (2008) · Lecture Notes in Computer Science · doi:10.1007/978-3-540-78800-3_24 · Cited by 6,595 · see citing works
An axiomatic basis for computer programming
Hoare, C. A. R. (1969) · Communications of the ACM · doi:10.1145/363235.363259 · Cited by 4,006 · see citing works
Computing Inter-Rater Reliability for Observational Data: An Overview and Tutorial
Hallgren, K. A. (2012) · Tutorials in Quantitative Methods for Psychology · doi:10.20982/tqmp.08.1.p023 · Cited by 3,884 · see citing works
Meyer, B. (1992) · Computer · doi:10.1109/2.161279 · Cited by 2,162 · see citing works
Klein, G., Elphinstone, K., Heiser, G., Andronick, J., Cock, D., Derrin, P., Elkaduwe, D., Engelhardt, K., Kolanski, R., Norrish, M., et al. (2009) · Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles · doi:10.1145/1629575.1629596 · Cited by 1,633 · see citing works
Formal verification of a realistic compiler
Leroy, X. (2009) · Communications of the ACM · doi:10.1145/1538788.1538814 · Cited by 1,191 · see citing works
Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm
Reynolds, L., & McDonell, K. (2021) · Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems · doi:10.1145/3411763.3451760 · Cited by 952 · cited 1× · see citing works
“Prompt engineering involves a systematic approach of creating prompts that effectively convey the desired downstream task to the pre-trained LLMs [Beurer-Kellner et al. 2023; Reynolds and McDonell 2021].”
Finding and understanding bugs in C compilers
Yang, X., Chen, Y., Eide, E., & Regehr, J. (2011) · Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/1993498.1993532 · Cited by 825 · see citing works
Design Guidelines for Prompt Engineering Text-to-Image Generative Models
Liu, V., & Chilton, L. B. (2022) · CHI Conference on Human Factors in Computing Systems · doi:10.1145/3491102.3501825 · Cited by 639 · cited 1× · see citing works
“It denotes the practice of iteratively crafting prompts for improving the generative power and fitness of purpose of an LLM.”
Mathematical Capabilities of ChatGPT
Frieder, S., Pinchetti, L., Griffiths, R.-R., Salvatori, T., Lukasiewicz, T., Petersen, P., Chevalier, A., & Berner, J. (2023) · Neural Information Processing Systems · doi:10.52202/075280-1205 · Cited by 630 · see citing works
Mathematical Capabilities of ChatGPT
Frieder, S., Pinchetti, L., Chevalier, A., Griffiths, R.-R., Salvatori, T., Lukasiewicz, T., Petersen, P. C., & Berner, J. (2023) · arXiv · doi:10.48550/arxiv.2301.13867 · Cited by 385 · see citing works
An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
Tufano, M., Watson, C., Bavota, G., Penta, M. D., White, M., & Poshyvanyk, D. (2019) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3340544 · Cited by 370 · see citing works
Gulwani, S., Polozov, O., & Singh, R. (2017) · Foundations and Trends® in Programming Languages · doi:10.1561/2500000010 · Cited by 357 · see citing works
Hawblitzel, C., Howell, J., Kapritsos, M., Lorch, J. R., Parno, B. J., Roberts, M. L., Setty, S., & Zill, B. (2015) · ACM SIGOPS Symposium on Operating Systems Principles (SOSP) · doi:10.1145/2815400.2815428 · Cited by 321 · see citing works
A survey on deep learning for software engineering
Yang, Y., Xia, X., Lo, D., & Grundy, J. (2022) · ACM Computing Surveys · doi:10.1145/3505243 · Cited by 223 · see citing works
seL4: From General Purpose to a Proof of Information Flow Enforcement
Murray, T., Matichuk, D., Brassil, M., Gammie, P., Bourke, T., Seefried, S., Lewis, C., Gao, X., & Klein, G. (2013) · 2013 IEEE Symposium on Security and Privacy · doi:10.1109/sp.2013.35 · Cited by 205 · cited 1× · see citing works
“For example, writing the proofs for the seL4 microkernel was an eleven person-year effort of a group of experts [Murray et al. 2013].”
BackgroundUsing pre-trained models to boost code review automation
Tufano, R., Masiero, S., Mastropaolo, A., Pascarella, L., Poshyvanyk, D., & Bavota, G. (2022) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3510003.3510621 · Cited by 182 · see citing works
Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning
Nashid, N., Sintaha, M., & Mesbah, A. (2023) · 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE) · doi:10.1109/icse48619.2023.00205 · Cited by 178 · see citing works
PromptMaker: Prompt-based Prototyping with Large Language Models
Jiang, E., Olson, K., Toh, E., Molina, A., Donsbach, A., Terry, M., & Cai, C. J. (2022) · CHI Conference on Human Factors in Computing Systems Extended Abstracts · doi:10.1145/3491101.3503564 · Cited by 157 · cited 2× · see citing works
“However, recently developed LLMs based approaches, for instance, ASTactic [Yang and Deng 2019], Diva [First and Brun 2022] Thor [Jiang et al. 2022a] and Baldur [First et al. 2023] outperforms these existing tool to synthesis whole or partial proofs and automatically prove theorems employing…”
Applying CodeBERT for Automated Program Repair of Java Simple Bugs
Mashhadi, E., & Hemmati, H. (2021) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr52588.2021.00063 · Cited by 144 · see citing works
A Systematic Literature Review on the Use of Deep Learning in Software Engineering Research
Watson, C., Cooper, N., Palacio, D. N., Moran, K., & Poshyvanyk, D. (2022) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3485275 · Cited by 137 · see citing works
Views on Internal and External Validity in Empirical Software Engineering
Siegmund, J., Siegmund, N., & Apel, S. (2015) · Proceedings/Proceedings - International Conference on Software Engineering · doi:10.1109/icse.2015.24 · Cited by 136 · see citing works
Artificial intelligence hallucinations
Salvagno, M., Taccone, F. S., & Gerli, A. G. (2023) · Critical Care · doi:10.1186/s13054-023-04473-y · Cited by 136 · see citing works
Language Models of Code are Few-Shot Commonsense Learners
Madaan, A., Zhou, S., Alon, U., Yang, Y., & Neubig, G. (2022) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2022.emnlp-main.90 · Cited by 131 · see citing works
Prompting Is Programming: A Query Language for Large Language Models
Beurer-Kellner, L., Fischer, M., & Vechev, M. (2023) · Proceedings of the ACM on Programming Languages · doi:10.1145/3591300 · Cited by 117 · see citing works
Hammer for Coq: Automation for Dependent Type Theory
Czajka, Ł., & Kaliszyk, C. (2018) · Journal of Automated Reasoning · doi:10.1007/s10817-018-9458-4 · Cited by 114 · see citing works
Formal Reasoning About the Security of Amazon Web Services
Cook, B. (2018) · Lecture notes in computer science · doi:10.1007/978-3-319-96145-3_3 · Cited by 106 · see citing works
Chapter 33. Satisfiability Modulo Theories
Barrett, C., Sebastiani, R., Seshia, S. A., & Tinelli, C. (2021) · Frontiers in artificial intelligence and applications · doi:10.3233/faia201017 · Cited by 95 · see citing works
Baldur: Whole-Proof Generation and Repair with Large Language Models
First, E., Rabe, M. N., Ringer, T., & Brun, Y. (2023) · Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3611643.3616243 · Cited by 94 · see citing works
Dang, H., Mecke, L., Lehmann, F., Goller, S., & Buschek, D. (2022) · arXiv · doi:10.48550/arxiv.2209.01390 · Cited by 92 · see citing works
Using Transfer Learning for Code-Related Tasks
Mastropaolo, A., Cooper, N., Palacio, D. N., Scalabrino, S., Poshyvanyk, D., Oliveto, R., & Bavota, G. (2022) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2022.3183297 · Cited by 74 · see citing works
AUGER: automatically generating review comments with pre-training models
Li, L., Li, Y., Jiang, H., Yan, J., Luo, T., Hua, Z., Geng, L., & Zuo, C. (2022) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3540250.3549099 · Cited by 63 · see citing works
Accessible Software Verification with Dafny
Leino, K. R. M. (2017) · IEEE Software · doi:10.1109/ms.2017.4121212 · Cited by 59 · see citing works
The Boogie Verification Debugger (Tool Paper)
Goues, C. L., Leino, K. R. M., & Moskal, M. (2011) · Lecture notes in computer science · doi:10.1007/978-3-642-24690-6_28 · Cited by 55 · see citing works
QED at Large: A Survey of Engineering of Formally Verified Software
Ringer, T., Palmskog, K., Sergey, I., Gligoric, M., & Tatlock, Z. (2019) · Foundations and Trends® in Programming Languages · doi:10.1561/2500000045 · Cited by 52 · see citing works
On Multi-Modal Learning of Editing Source Code
Chakraborty, S., & Ray, B. (2021) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase51524.2021.9678559 · Cited by 50 · see citing works
Generating correctness proofs with neural networks
Sanchez-Stern, A., Alhessi, Y., Saul, L. K., & Lerner, S. (2020) · ACM SIGPLAN International Workshop on Machine Learning and Programming Languages (MAPL) · doi:10.1145/3394450.3397466 · Cited by 49 · see citing works
Truth-O-Meter: Collaborating with LLM in fighting its hallucinations
Galitsky, B. A. (2025) · Elsevier eBooks · doi:10.1016/b978-0-443-29246-0.00004-3 · Cited by 45 · see citing works
TacTok: semantics-aware proof synthesis
First, E., Brun, Y., & Guha, A. (2020) · Proceedings of the ACM on Programming Languages · doi:10.1145/3428299 · Cited by 43 · see citing works
Tufano, M., Deng, S. K., Sundaresan, N., & Svyatkovskiy, A. (2022) · International Conference on Mining Software Repositories (MSR) · doi:10.1145/3524842.3528009 · Cited by 43 · see citing works
Diversity-driven automated formal verification
First, E., & Brun, Y. (2022) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3510003.3510138 · Cited by 35 · see citing works
The Infinite Index: Information Retrieval on Generative Text-To-Image Models
Deckers, N., Fröbe, M., Kiesel, J., Pandolfo, G., Schröder, C., Stein, B., & Potthast, M. (2023) · Conference on Human Information Interaction and Retrieval · doi:10.1145/3576840.3578327 · Cited by 30 · see citing works
Passport: Improving Automated Formal Verification Using Identifiers
Sanchez-Stern, A., First, E., Zhou, T., Kaufman, Z., Brun, Y., & Ringer, T. (2023) · ACM Transactions on Programming Languages and Systems · doi:10.1145/3593374 · Cited by 27 · see citing works
Katana : Dual Slicing Based Context for Learning Bug Fixes
Sintaha, M., Nashid, N., & Mesbah, A. (2023) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3579640 · Cited by 24 · see citing works
Teaching Algorithmic Reasoning via In-context LearningPreprint
Zhou, H., Nova, A., Larochelle, H., Courville, A. C., Neyshabur, B., & Sedghi, H. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2211.09066 · Cited by 24 · see citing works
Dohan, D., Xu, W., Lewkowycz, A., Austin, J., Bieber, D., Lopes, R. G., Wu, Y., Michalewski, H., Saurous, R. A., Sohl-dickstein, J., et al. (2022) · arXiv · doi:10.48550/arxiv.2207.10342 · Cited by 22 · see citing works
Automating Code-Related Tasks Through Transformers: The Impact of Pre-training
Tufano, R., Pascarella, L., & Bavota, G. (2023) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse48619.2023.00203 · Cited by 20 · see citing works
Towards Formally Verified Optimizing Compilation in Flight Control Software
França, R. B., Favre-Félix, D., Leroy, X., Pantel, M., & Souyris, J. (2011) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/oasics.ppes.2011.59 · Cited by 18 · see citing works
Testing Dafny (experience paper)
Irfan, A., Porncharoenwase, S., Rakamarić, Z., Rungta, N., & Torlak, E. (2022) · ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA) · doi:10.1145/3533767.3534382 · Cited by 16 · see citing works
Formal and Executable Semantics of the Ethereum Virtual Machine in Dafny
Cassez, F., Fuller, J., Ghale, M. K., Pearce, D. J., & Quiles, H. M. A. (2023) · Lecture notes in computer science · doi:10.1007/978-3-031-27481-7_32 · Cited by 16 · see citing works
Simple High-Level Code For Cryptographic Arithmetic
Erbsen, A., Philipoom, J., Gross, J. S., Sloan, R., & Chlipala, A. J. (2020) · ACM SIGOPS Operating Systems Review · doi:10.1145/3421473.3421477 · Cited by 15 · see citing works
More Programming Than Programming: Teaching Formal Methods in a Software Engineering Programme
Noble, J., Streader, D., Gariano, I. O., & Samarakoon, M. (2022) · Lecture notes in computer science · doi:10.1007/978-3-031-06773-0_23 · Cited by 14 · see citing works
Self-citation(2021) · ACM eBooks · doi:10.1145/3477355 · Cited by 13 · see citing works
Better Counterexamples for Dafny
Chakarov, A., Fedchin, A., Rakamarić, Z., & Rungta, N. (2022) · Lecture notes in computer science · doi:10.1007/978-3-030-99524-9_23 · Cited by 13 · see citing works
Towards Autoformalization of Mathematics and Code Correctness: Experiments with Elementary Proofs
Cunningham, G., Bunescu, R., & Juedes, D. W. (2022) · Workshop on Mathematical Natural Language Processing (MathNLP) · doi:10.18653/v1/2022.mathnlp-1.4 · Cited by 10 · see citing works
Towards Autoformalization of Mathematics and Code Correctness: Experiments with Elementary Proofs
Cunningham, G., Bunescu, R. C., & Juedes, D. (2023) · arXiv · doi:10.48550/arxiv.2301.02195 · Cited by 10 · see citing works
A Survey in Mathematical Language ProcessingPreprint
Meadows, J., & Freitas, A. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2205.15231 · Cited by 9 · see citing works
Qafny: A Quantum-Program VerifierPreprint
Li, L., Zhu, M., Rance Cleaveland, Y., Nicolellis, A., Lee, Y., Chang, L., & Wu, X. (2022) · arXiv (Cornell University) · doi:10.4230/lipics.ecoop.2024.24 · Cited by 7 · see citing works
Case Studies of Development of Verified Programs with Dafny for Accessibility Assessment
Faria, J. P., & Abreu, R. (2023) · Lecture notes in computer science · doi:10.1007/978-3-031-42441-0_3 · Cited by 6 · see citing works
Flagged first, then by citations
Research works printed but not linked: 33
- Aakanksha Chowdhery et al. 2022. PaLM: Scaling Language Modeling with Pathways. CoRR abs/2204.02311 (2022). · arXiv
- Miltiadis Allamanis, Earl T. Barr, Premkumar T. Devanbu, and Charles Sutton. 2018. A Survey of Machine Learning for Big Code and Naturalness. ACM Comput. Surv. 51, 4 (2018), 81:1-81:37. https://doi.org/10.1145/3212695 · DOI · Paper page
- Jacob Austin, Augustus Odena, Maxwell I. Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie J. Cai, Michael Terry, Quoc V. Le, and Charles Sutton. 2021. Program Synthesis with Large Language Models. CoRR abs/2108.07732 (2021). https://arxiv.org/abs/2108.07732 · arXiv
- Stephen H. Bach, Victor Sanh, Zheng Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht Sharma, Taewoon Kim, M. Saiful Bari, Thibault Févry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-David, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Alan Fries, Maged Saeed AlShaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Dragomir R. Radev, Mike Tian-Jian Jiang, and Alexander M. Rush. 2022. PromptSource: An Integrated Development Environment and Repository for Natural Language Prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, ACL 2022 -System Demonstrations, Dublin, Ireland, May 22-27, 2022, Valerio Basile, Zornitsa Kozareva, and Sanja Stajner (Eds.). Association for Computational Linguistics, 93-104. https://doi.org/10.18653/V1/2022.ACL-DEMO. · DOI · Paper page
- Zekai Chen, Mariann Micsinai Balan, and Kevin Brown. 2023. Boosting Transformers and Language Models for Clinical Prediction in Immunotherapy. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 5: Industry Track), Sunayana Sitaram, Beata Beigman Klebanov, and Jason D Williams (Eds.). Association for Computational Linguistics, Toronto, Canada, 332-340. https://doi.org/10.18653/v1/2023.acl-industry.32 · DOI
- Robert Feldt and Ana Magazinius. 2010. Validity Threats in Empirical Software Engineering Research -An Initial Survey. In Proceedings of the 22nd International Conference on Software Engineering & Knowledge Engineering (SEKE'2010), Redwood City, San Francisco Bay, CA, USA, July 1 -July 3, 2010. Knowledge Systems Institute Graduate School, 374-379.
- Hubert Garavel, Maurice H Ter Beek, and Jaco Van De Pol. 2020. The 2020 expert survey on formal methods. In International Conference on Formal Methods for Industrial Critical Systems. Springer, 3-69.
- Samuel Greengard. 2021. The Internet of Things. MIT press.
- Chris Hawblitzel, Jon Howell, Jacob R. Lorch, Arjun Narayan, Bryan Parno, Danfeng Zhang, and Brian Zill. 2014. Ironclad Apps: End-to-End Security via Automated Full-System Verification. In 11th USENIX Symposium on Operating Systems Design and Implementation, OSDI '14, Broomfield, CO, USA, October 6-8, 2014, Jason Flinn and Hank Levy (Eds.). USENIX Association, 165-181. https://www.usenix.org/conference/osdi14/technical-sessions/presentation/hawblitzel
- Yutai Hou, Hongyuan Dong, Xinghao Wang, Bohan Li, and Wanxiang Che. 2022. MetaPrompting: Learning to Learn Better Prompts. In Proceedings of the 29th International Conference on Computational Linguistics, COLING 2022, Gyeongju, Republic of Korea, October 12-17, 2022,
- Nicoletta Calzolari, Chu-Ren Huang, Hansaem Kim, James Pustejovsky, Leo Wanner, Key-Sun Choi, Pum-Mo Ryu, Hsin-Hsi Chen, Lucia Donatelli, Heng Ji, Sadao Kurohashi, Patrizia Paggio, Nianwen Xue, Seokhwan Kim, Younggyun Hahm, Zhong He, Tony Kyungil Lee, Enrico Santus, Francis Bond, and Seung-Hoon Na (Eds.). International Committee on Computational Linguistics, 3251-3262. https://aclanthology.org/2022.coling-1.287
- Albert Qiaochu Jiang, Wenda Li, Szymon Tworkowski, Konrad Czechowski, Tomasz Odrzygózdz, Piotr Milos, Yuhuai Wu, and Mateja Jamnik. 2022a. Thor: Wielding Hammers to Integrate Language Models and Automated Theorem Provers. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 -December 9, 2022, Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Bel- grave, K. Cho, and A. Oh (Eds.). http://papers.nips.cc/paper_files/paper/2022/hash/377c25312668e48f2e531e2f2c422483- Abstract-Conference.html
- Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, Alex Aiken, and Percy Liang. 2019. SPoC: Search-based Pseudocode to Code. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d'Alché-Buc, Emily B. Fox, and Roman Garnett (Eds.). 11883-11894.
- K. Rustan M. Leino. 2023. Program Proofs. MIT Press.
- K. Rustan M. Leino and Greg Nelson. 1998. An extended static checker for Modula-3. In International Conference on Compiler Construction. Springer, 302-305.
- Patrick S. H. Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, Hugo Larochelle, Marc'Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (Eds.). https://proceedings.neurips.cc/paper/2020/ hash/6b493230205f780e1bc26945df7481e5-Abstract.html
- Liyi Li, Mingwei Zhu, Yi Lee, Le Chang, and Xiaodi Wu. 2022b. Quantum Natural Proof: A New Perspective of Hybrid Quantum-Classical Program Verification. CoRR abs/2211.06411 (2022). https://doi.org/10.48550/arXiv.2211.06411 · DOI
- Yifei Li, Zeqi Lin, Shizhuo Zhang, Qiang Fu, Bei Chen, Jian-Guang Lou, and Weizhu Chen. 2023. Making Language Models Better Reasoners with Step-Aware Verifier. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (Eds.). Association for Computational Linguistics, Toronto, Canada, 5315-5333. https://doi.org/10.18653/v1/2023.acl-long.291 · DOI · Paper page
- Mark Chen et al. 2021. Evaluating Large Language Models Trained on Code. CoRR abs/2107.03374 (2021). https: //arxiv.org/abs/2107.03374 · arXiv
- Nick McKenna, Tianyi Li, Liang Cheng, Mohammad Javad Hosseini, Mark Johnson, and Mark Steedman. 2023. Sources of Hallucination by Large Language Models on Inference Tasks. In Findings of the Association for Computational Linguistics: EMNLP 2023, Singapore, December 6-10, 2023, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, 2758-2774. https://aclanthology.org/2023.findings-emnlp.182
- R.P. Nederpelt, J.H. Geuvers, and R.C. de Vrijer (Eds.). 1994. Selected Papers on Automath. North Holland.
- James Noble. 2024. Learn 'em Dafny. In Dafny Workshop at POPL (London, England). https://popl24.sigplan.org/details/dafny- 2024-papers/11/Learn-em-Dafny James Noble, David Streader, Isaac Oscar Gariano, and Miniruwani Samarakoon. 2022. More Programming Than Program- ming: Teaching Formal Methods in a Software Engineering Programme. In NASA Formal Methods -14th International Symposium, NFM 2022, Pasadena, CA, USA, May 24-27, 2022, Proceedings (Lecture Notes in Computer Science, Vol. 13260),
- OpenAI. 2023a. GPT-4 Technical Report. CoRR abs/2303.08774 (2023). https://doi.org/10.48550/arXiv.2303.08774 · DOI · Paper page
- Shuofei Qiao, Yixin Ou, Ningyu Zhang, Xiang Chen, Yunzhi Yao, Shumin Deng, Chuanqi Tan, Fei Huang, and Huajun Chen. 2023. Reasoning with Language Model Prompting: A Survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, Anna Rogers, Jordan L. Boyd-Graber, and Naoaki Okazaki (Eds.). Association for Computational Linguistics, 5368-5393. https://doi.org/10.18653/V1/2023.ACL-LONG.294 · DOI
- Rohan Anil et al. 2023. PaLM 2 Technical Report. CoRR abs/2305.10403 (2023). · arXiv
- Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950 (2023). · arXiv
- Anthony J Viera, Joanne M Garrett, et al. 2005. Understanding interobserver agreement: the kappa statistic. Fam med 37, 5 (2005), 360-363. https://pubmed.ncbi.nlm.nih.gov/15883903/
- Yue Wang, Hung Le, Akhilesh Gotmare, Nghi D. Q. Bui, Junnan Li, and Steven C. H. Hoi. 2023. CodeT5+: Open Code Large Language Models for Code Understanding and Generation. (2023), 1069-1088. https://aclanthology.org/2023.emnlp- main.
- Y. Wang, W. Wang, S.R. Joty, and S.C.H. Hoi. 2021. CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation. In EMNLP. https://doi.org/10.18653/v1/2021.emnlp-main.685 · DOI · Paper page
- Hillel Wayne. 2018. Temporal Logic. In Practical TLA+. Springer, 97-110.
- Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc V. Le, and Denny Zhou. 2022. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 -December 9, 2022, Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Belgrave, K. Cho, and A. Oh (Eds.). http://papers.nips.cc/paper_files/paper/2022/hash/9d5609613524ecf4f15af0f7b31abca4-Abstract-Conference.html
- Yuhuai Wu, Albert Qiaochu Jiang, Wenda Li, Markus N. Rabe, Charles Staats, Mateja Jamnik, and Christian Szegedy. 2022. Autoformalization with Large Language Models. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 -December 9, 2022, Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Belgrave, K. Cho, and A. Oh (Eds.). http://papers.nips.cc/paper_ files/paper/2022/hash/d0c6bc641a56bebee9d985b937307367-Abstract-Conference.html
- Michihiro Yasunaga and Percy Liang. 2020. Graph-based, Self-Supervised Program Repair from Diagnostic Feedback. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event (Proceedings of Machine Learning Research, Vol. 119). PMLR, 10799-10808. http://proceedings.mlr.press/v119/yasunaga20a.html
Cited by
Sorted by citations
Fine-tuning and prompt engineering for large language models-based code review automation
Pornprasit, C., & Tantithamthavorn, C. K. (2024) · Information and Software Technology · doi:10.1016/j.infsof.2024.107523 · Cited by 128 · see citing works
Clover: Closed-Loop Verifiable Code Generation
Sun, C., Sheng, Y., Padon, O., & Barrett, C. (2024) · Lecture Notes in Computer Science · doi:10.1007/978-3-031-65112-0_7 · Cited by 43 · see citing works
AutoVerus: Automated Proof Generation for Rust Code
Yang, C., Li, X., Misu, M. R. H., Yao, J., Cui, W., Gong, Y., Hawblitzel, C., Lahiri, S., Lorch, J. R., Lu, S., et al. (2025) · Proceedings of the ACM on Programming Languages · doi:10.1145/3763174 · Cited by 20 · see citing works
Self-citationLaurel: Unblocking Automated Verification with Large Language Models
Mugnier, E., Gonzalez, E. A., Polikarpova, N., Jhala, R., & Yuanyuan, Z. (2025) · Proceedings of the ACM on Programming Languages · doi:10.1145/3720499 · Cited by 14 · see citing works
Investigating large language models capabilities for automatic code repair in Python
Omari, S., Basnet, K., & Wardat, M. (2024) · Cluster Computing · doi:10.1007/s10586-024-04490-8 · Cited by 12 · see citing works
Requirements Are All You Need: The Final Frontier for End-User Software Engineering
Robinson, D., Cabrera, C., Gordon, A. D., Lawrence, N. D., & Mennen, L. (2025) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3708524 · Cited by 12 · see citing works
Challenges and Paths Towards AI for Software EngineeringPreprint
Gu, A., Jain, N., Li, W., Shetty, M., Shao, Y., Li, Z., Yang, D., Ellis, K., Sen, K., & Solar-Lezama, A. (2025) · Qeios · doi:10.32388/vv1661 · Cited by 24 · see citing works
Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programming
Chakraborty, S., Ebner, G., Bhat, S., Fakhoury, S., Fatima, S., Lahiri, S. K., & Swamy, N. (2025) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse55347.2025.00002 · Cited by 7 · see citing works
DafnyBench: A Benchmark for Formal Software Verification
Loughridge, C., Sun, Q., Ahrenbach, S., Cassano, F., Sun, C., Sheng, Y., Mudide, A., Misu, M. R. H., Amin, N., & Tegmark, M. (2024) · arXiv · doi:10.48550/arxiv.2406.08467 · Cited by 6 · see citing works
“While this method is more efficient than manual translation, it could potentially skew the distribution of represented problems away from real-world Dafny problems that may be too hard for GPT-4 to verify on its own [10].”
BackgroundMethodInfluentialSelf-citation(2025) · doi:10.1109/llm4code66737.2025.00014 · Cited by 6 · see citing works
3DGen: AI-Assisted Generation of Provably Correct Binary Format Parsers
Fakhoury, S., Kuppe, M. A., Lahiri, S. K., Ramananandro, T., & Swamy, N. (2025) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse55347.2025.00173 · Cited by 12 · see citing works
Zhang, Y., Wen, C., Xu, Z., Liu, D., Cao, J., Liu, Y., Qin, S., & Tian, C. (2026) · Lecture notes in computer science · doi:10.1007/978-3-032-30693-7_6 · Cited by 5 · see citing works
Aggarwal, P., Parno, B., & Welleck, S. (2024) · arXiv · doi:10.48550/arxiv.2412.06176 · Cited by 4 · see citing works
Su, W., Wu, X., & Zhao, Y. (2025) · Knowledge-Based Systems · doi:10.1016/j.knosys.2025.115177 · Cited by 5 · see citing works
Automatic Generation of Loop Invariants in Dafny with Large Language Models
Faria, J. P., Trigo, E., & Abreu, R. (2025) · Lecture notes in computer science · doi:10.1007/978-3-031-87054-5_10 · Cited by 4 · see citing works
VERINA: Benchmarking Verifiable Code Generation
Ye, Z., Yan, Z., He, J., Kasriel, T., Yang, K., & Song, D. (2025) · arXiv · doi:10.48550/arxiv.2505.23135 · Cited by 3 · see citing works
“It draws problems from various sources, including MBPP [18, 24], LiveCodeBench [1], and LeetCode, offering a diverse range of difficulty levels.”
InfluentialA dual perspective review on large language models and code verification
Dolcetti, G., & Iotti, E. (2025) · Frontiers in Computer Science · doi:10.3389/fcomp.2025.1655469 · Cited by 3 · see citing works
FormalSpecCpp: A Dataset of C++ Formal Specifications created using LLMs
Chakraborty, M., Pirkelbauer, P., & Yi, Q. (2025) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr66628.2025.00113 · Cited by 3 · see citing works
Neurosymbolic Modular Refinement Type Inference
Sakkas, G., Sahu, P., Ong, K., & Jhala, R. (2025) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse55347.2025.00090 · Cited by 2 · see citing works
Evaluating the Ability of GPT-4o to Generate Verifiable Specifications in VeriFast
Rego, M., Fan, W., Hu, X., Dod, S., Ni, Z., Xie, D., DiVincenzo, J., & Tan, L. (2025) · 2025 IEEE/ACM Second International Conference on AI Foundation Models and Software Engineering (Forge) · doi:10.1109/forge66646.2025.00035 · Cited by 2 · see citing works
LLM-Assisted Synthesis of High-Assurance C Programs
Mukherjee, P., Lu, M., & Delaware, B. (2025) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase63991.2025.00255 · Cited by 2 · see citing works
Accessible Smart Contracts Verification: Synthesizing Formal Models with Tamed LLMs
Corazza, J., Gavran, I., Moreira, G., & Neider, D. (2025) · IEEE International Conference on Software Testing, Verification and Validation (ICST) · doi:10.1109/icst62969.2025.10989026 · Cited by 1 · see citing works
Specification-Guided Repair of Arithmetic Errors in Dafny Programs Using LLMs
Wu, V., Mendes, A. S., & Abreu, A. (2025) · Lecture notes in computer science · doi:10.1007/978-3-032-10444-1_16 · Cited by 1 · see citing works
Seeking Specifications: The Case for Neuro-Symbolic Specification Synthesis
Granberry, G., Ahrendt, W., & Johansson, M. (2026) · Formal Aspects of Computing · doi:10.1145/3785411 · Cited by 1 · see citing works
Trace: Securing Smart Contract Repository Against Access Control Vulnerability
Chen, C., Bao, L., Lo, D., Wang, Y., Shan, Z., Chen, T., Yin, G., Yu, J., Zheng, Z., & Chen, J. (2026) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2026.3660900 · Cited by 1 · see citing works
DafnyRAG: A Retrieval-Augmented and Verification-Driven Tool for Automated Repair of Dafny Code
Liu, Y., Lu, X., Yu, B., Zhang, H., Chen, C., & Wang, M. (2026) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3832783.3834610 · Cited by 1 · see citing works
AutoReSpec: A Framework for Generating Specification using Large Language Models
Ayon, R. S., & Ahmed, S. (2026) · IEEE/ACM International Conference on AI Foundation Models and Software Engineering (FORGE) · doi:10.1145/3793655.3793731 · Cited by 2 · see citing works
Braberman, V. A., Bonomo, F., Charalambous, Y., Colonna, J. G., Cordeiro, L. C., & de Freitas, R. (2025) · SSRN Electronic Journal · doi:10.2139/ssrn.5624902 · Cited by 1 · see citing works
VerusSeek: Retrieval-Augmented LLM-Based Proof Synthesis for Rust Programs
Zhang, Y., Wen, C., Cao, J., Liu, D., Xu, Z., Liu, Y., & Qin, S. (2026) · Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3832783.3834603
AlgoVeri: An Aligned Benchmark for Verified Code Generation on Classical Algorithms
Zhao, H., Yang, Z., Li, J., He, D., Li, Z., Jin, C., Veeravalli, V. V., Gupta, A., & Arora, S. (2026) · arXiv · doi:10.48550/arxiv.2602.09464
Metamorph: Synthesizing Large Objects from Dafny Specifications
Fedchin, A., Bai, A., & Foster, J. S. (2025) · Proceedings of the ACM on Programming Languages · doi:10.1145/3720448
From Scientific Texts to Verifiable Code: Automating the Process with Transformers
Wang, C., Scazzariello, M., & Chiesa, M. (2025) · International Workshop on Large Language Models for Code (LLM4Code) · doi:10.1109/llm4code66737.2025.00032
PREFACE - A Reinforcement Learning Framework for Code Verification via LLM Prompt Repair
Jha, M., Wan, J., Zhang, H., & Chen, D. (2025) · ACM Great Lakes Symposium on VLSI (GLSVLSI) · doi:10.1145/3716368.3735300
Can Large Language Models Help Students Prove Software Correctness? An Experimental Study with Dafny
Carreira, C., Silva, Á. F., Abreu, A., & Mendes, A. S. (2025) · Lecture notes in computer science · doi:10.1007/978-3-032-10444-1_13
Formalizing Requirements into Dafny Specifications with LLMs
Lu, Y.-H., Zhu, X.-Y., Zhang, W., & Yan, R. (2025) · Lecture notes in computer science · doi:10.1007/978-981-95-4213-0_6
NL2CSP: Towards Automated CSP Code Generation with Large Language Models
Wang, C., Liu, N., Bao, H., Wu, D., Liu, H. P., Yin, J., & Zhu, H. (2025) · IEEE International Conference on Parallel and Distributed Systems (ICPADS) · doi:10.1109/icpads67057.2025.11323031
Integrating Formal Methods and Large Language Models in Computer Engineering Education
Favre, L. M. (2026) · Advances in computational intelligence and robotics book series · doi:10.4018/407444
Assessing the Security of Vibe Coding: Baseline Vs. Security-Oriented Prompts in LLM Code Generation
He, R., Lai, H. Y., Chen, J., & Su, C. (2026) · Lecture notes in computer science · doi:10.1007/978-981-95-9284-5_27
Liu, M., Liu, F., Fang, N., Huang, B., Lv, Q., Li, H., & Lv, Y. (2026) · Communications in computer and information science · doi:10.1007/978-981-92-2973-4_11
VeriLucid: A Verification-aware Data-plane Programming Language
Sonchack, J., Zave, P., & Rexford, J. (2026) · ACM SIGCOMM Conference (SIGCOMM) · doi:10.1145/3789240.3829171
Proofs Promptly: Proof-Oriented Programming with AI Agents (Experience Report)
Ioannidis, E., Swamy, N., Ebner, G., Philipose, M., & Ramananandro, T. (2026) · Proceedings of the ACM on Programming Languages · doi:10.1145/3828709
- Authors
- Misu, M. R. H., Lopes, C. V., Ma, I., & Noble, J.
- Affiliations
- University of California, Irvine (US)
- Australian National University (AU)
- Venue
- Proceedings of the ACM on Software Engineering
- Published
- 2024-07-12
- Volume
- 1
- Issue
- FSE
- Pages
- 812-835
- ISSN
- 2994-970X (ISSN-L)
- OpenAlex
- W4391505367
- Cited by
- 38
- References
- 61
- Citations by year
- 2026: 12 · 2025: 22 · 2024: 4
- FWCI
- 5.63
- Type
- journal article
- Language
- en
- Open access
- green
- arxiv.org
- Locations
- Proceedings of the ACM on software engineering. (publishedVersion)
- arXiv (Cornell University) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Logic, programming, and type systems
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
- Keywords
- Dafny, formal verification, large language models, code generation, GPT-4, PaLM 2, chain-of-thought prompting, retrieval augmentation, program specification, loop invariants, prompt engineering
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review