{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,13]],"date-time":"2026-11-13T17:50:38Z","timestamp":1794592238071,"version":"4.9.1"},"reference-count":43,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2025,10,9]]},"abstract":"<jats:p>Testing compilers with AI models, especially large language models (LLMs), has shown great promise. However, current approaches struggle with two key problems: The generated programs for testing compilers are often too simple, and extensive testing with the LLMs is computationally expensive. In this paper, we propose a novel compiler testing framework that decouples the testing process into two distinct phases: an offline phase and an online phase. In the offline phase, we use LLMs to generate a collection of small but feature-rich code pieces. In the online phase, we reuse these code pieces by strategically combining them to build high-quality and valid test programs, which are then used to test compilers.<\/jats:p>\n                  <jats:p>\n                    We implement this idea in a tool,\n                    <jats:monospace>LegoFuzz<\/jats:monospace>\n                    , for testing C compilers. The results are striking: we found 66 bugs in GCC and LLVM, the most widely used C compilers. Almost half of the bugs are miscompilation bugs, which are serious and hard-to-find bugs that none of the existing LLM-based tools could find. We believe this efficient design opens up new possibilities for using AI models in software testing beyond just C compilers.\n                  <\/jats:p>","DOI":"10.1145\/3763079","type":"journal-article","created":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T08:49:50Z","timestamp":1759999790000},"page":"815-841","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":10,"title":["Interleaving Large Language Models for Compiler Testing"],"prefix":"10.1145","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0009-0004-4837-6696","authenticated-orcid":false,"given":"Yunbo","family":"Ni","sequence":"first","affiliation":[{"name":"The Chinese University of Hong Kong, Shatin, Hong Kong"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7556-3615","authenticated-orcid":false,"given":"Shaohua","family":"Li","sequence":"additional","affiliation":[{"name":"The Chinese University of Hong Kong, Shatin, Hong Kong"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,10,9]]},"reference":[{"key":"e_1_3_1_2_2","doi-asserted-by":"publisher","unstructured":"Domenico Amalfitano Nicola Amatucci Anna Rita Fasolino Porfirio Tramontana Emily Kowalczyk and Atif M. Memon. 2015. Exploiting the saturation effect in automatic random testing of Android applications. In Proceedings of the Second ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft \u201815). 33\u201343. doi:10.1109\/MobileSoft.2015.11","DOI":"10.1109\/MobileSoft.2015.11"},{"key":"e_1_3_1_3_2","doi-asserted-by":"publisher","unstructured":"Tom B. Brown Benjamin Mann Nick Ryder Melanie Subbiah Jared Kaplan Prafulla Dhariwal Arvind Neelakantan Pranav Shyam Girish Sastry Amanda Askell Sandhini Agarwal Ariel Herbert-Voss Gretchen Krueger Tom Henighan Rewon Child Aditya Ramesh Daniel M. Ziegler Jeffrey Wu Clemens Winter Christopher Hesse Mark Chen Eric Sigler Mateusz Litwin Scott Gray Benjamin Chess Jack Clark Christopher Berner Sam McCandlish Alec Radford Ilya Sutskever and Dario Amodei. 2020. Language models are few-shot learners. In Proceedings of the 34th International Conference on Neural Information Processing Systems (NIPS \u201820). Article 159. doi:10.18653\/v1\/2022.emnlp-main.90","DOI":"10.18653\/v1\/2022.emnlp-main.90"},{"key":"e_1_3_1_4_2","doi-asserted-by":"publisher","DOI":"10.1145\/3363562"},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","unstructured":"Yuting Chen Ting Su Chengnian Sun Zhendong Su and Jianjun Zhao. 2016. Coverage-directed differential testing of JVM implementations. In proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI\u2019 16). 85\u201399. doi:10.1145\/2980983.2908095","DOI":"10.1145\/2980983.2908095"},{"key":"e_1_3_1_6_2","unstructured":"CompCert. 2025. The CompCert project. https:\/\/compcert.org\/Accessed:2025-07-17."},{"key":"e_1_3_1_7_2","unstructured":"CppRference. 2025. C Language: Undefined Behavior. https:\/\/en.cppreference.com\/w\/c\/language\/behavior Accessed: 2025-03-17."},{"key":"e_1_3_1_8_2","unstructured":"Csmith-project. 2025. C-Reduce a C and C++ program reducer. https:\/\/github.com\/csmith-project\/creduce Accessed: 2025-02-22."},{"key":"e_1_3_1_9_2","doi-asserted-by":"publisher","unstructured":"Anderson Faustino da Silva Bruno Conde Kind Jos\u00e9 Wesley de Souza Magalh\u00e3es Jer\u00f4nimo Nunes Rocha Breno Campos Ferreira Guimar\u00e3es and Fernando Magno Quint\u0101o Pereira. 2021. AnghaBench: A Suite with One Million Compilable C Benchmarks for Code-Size Reduction. In Proceedings of the 2021 IEEE\/ACM International Symposium on Code Generation and Optimization (CGO \u201821). 378\u2013390. doi:10.1109\/CGO51591.2021.9370322","DOI":"10.1109\/CGO51591.2021.9370322"},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","unstructured":"Yinlin Deng Chunqiu Steven Xia Chenyuan Yang Shizhuo Dylan Zhang Shujing Yang and Lingming Zhang. 2024. Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries. In Proceedings of the IEEE\/ACM 46th International Conference on Software Engineering (ICSE \u201824). Article 70. doi:10.1145\/3597503.3623343","DOI":"10.1145\/3597503.3623343"},{"key":"e_1_3_1_11_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-022-10146-1"},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","unstructured":"Karine Even-Mendoza Arindam Sharma Alastair F. Donaldson and Cristian Cadar. 2023. GrayC: Greybox Fuzzing of Compilers and Analysers for C. In Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA \u201823). 1219-1231. doi:10.1145\/3597926.3598130","DOI":"10.1145\/3597926.3598130"},{"key":"e_1_3_1_13_2","unstructured":"Fastos. 2025. Fastsocket: a highly scalable socket and its underlying networking implementation of Linux kernel. https:\/\/github.com\/fastos\/fastsocket Accessed: 2025-03-17."},{"key":"e_1_3_1_14_2","unstructured":"GNU GCC. 2025. Passes and Files of the Compiler. https:\/\/gcc.gnu.org\/onlinedocs\/gccint\/Passes.html."},{"key":"e_1_3_1_15_2","unstructured":"Christian Holler Kim Herzig and Andreas Zeller. 2012. Fuzzing with code fragments. In Proceedings of the 21st USENIX Conference on Security Symposium (Security\u201912). 38."},{"key":"e_1_3_1_16_2","unstructured":"Juyong Jiang Fan Wang Jiasi Shen Sungju Kim and Sunghun Kim. 2024. A Survey on Large Language Models for Code Generation. arXiv:2406.00515[cs.CL] https:\/\/arxiv.org\/abs\/2406.00515"},{"key":"e_1_3_1_17_2","doi-asserted-by":"publisher","unstructured":"Vu Le Mehrdad Afshari and Zhendong Su. 2014. Compiler validation via equivalence modulo inputs. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDV 14). 216-226. doi:10.1145\/2666356.2594334","DOI":"10.1145\/2666356.2594334"},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","unstructured":"Vu Le Chengnian Sun and Zhendong Su. 2015. Finding deep compiler bugs via guided stochastic program mutation. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming Systems Languages and Applications (OOPSLA\u2019 15). 386-399. doi:10.1145\/2858965.2814319","DOI":"10.1145\/2858965.2814319"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","unstructured":"Shaohua Li and Zhendong Su. 2024. UBFuzz: Finding Bugs in Sanitizer Implementations. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems Volume 1 (ASPLOS \u201824). 435\u2013449. doi:10.1145\/3617232.3624874","DOI":"10.1145\/3617232.3624874"},{"key":"e_1_3_1_20_2","doi-asserted-by":"publisher","unstructured":"Shaohua Li Theodoros Theodoridis and Zhendong Su. 2024. Boosting Compiler Testing by Injecting Real-World Code. Proc. ACM Program. Lang. 8 PLDI Article 156 (2024). doi:10.1145\/3656386","DOI":"10.1145\/3656386"},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","unstructured":"Christopher Lidbury Andrei Lascu Nathan Chong and Alastair F Donaldson. 2015. Many-core compiler fuzzing. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI \u201815). 65\u201376. doi:10.1145\/2813885.2737986","DOI":"10.1145\/2813885.2737986"},{"key":"e_1_3_1_22_2","doi-asserted-by":"publisher","unstructured":"Vsevolod Livinskii Dmitry Babokin and John Regehr. 2020. Random testing for C and C++ compilers with YARPGen. Proc. ACM Program. Lang. 4 OOPSLA Article 196 (2020). doi:10.1145\/3428264","DOI":"10.1145\/3428264"},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","unstructured":"Vsevolod Livinskii Dmitry Babokin and John Regehr. 2023. Fuzzing Loop Optimizations in Compilers for C++ and Data-Parallel Languages. Proc. ACM Program. Lang. 7 PLDI Article 181 (2023). doi:10.1145\/3591295","DOI":"10.1145\/3591295"},{"key":"e_1_3_1_24_2","unstructured":"LLVM. 2025. LLVM\u2019s Analysis and Transform Passes. https:\/\/llvm.org\/docs\/Passes.html."},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","unstructured":"Robin Morisset Pankaj Pawan and Francesco Zappa Nardelli. 2013. Compiler testing via a theory of sound optimisations in the C11\/C++11 memory model. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI \u201813). 187\u2013196. doi:10.1145\/2491956.2491967","DOI":"10.1145\/2491956.2491967"},{"key":"e_1_3_1_26_2","unstructured":"Eriko Nagai Hironobu Awazu Nagisa Ishiura and Naoya Takeda. 2012. Random testing of C compilers targeting arithmetic optimization. In Workshop on Synthesis And System Integration of Mixed Information Technologies (SASIMI 2012). 48\u201353. https:\/\/api.semanticscholar.org\/CorpusID:16947207"},{"key":"e_1_3_1_27_2","doi-asserted-by":"publisher","DOI":"10.2197\/ipsjtsldm.7.91"},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","unstructured":"Yunbo Ni. 2025. Artifact for LegoFuzz \u2013 Interleaving Large Language Models for Compiler Testing. doi:10.5281\/zenodo.15761520","DOI":"10.5281\/zenodo.15761520"},{"key":"e_1_3_1_29_2","unstructured":"OpenAI. 2025. OpenAI API Reference: max_completion_tokens. https:\/\/platform.openai.com\/docs\/api-reference\/runs\/createRun#runs-createrun-max_completion_tokens Accessed: 2025-03-19."},{"key":"e_1_3_1_30_2","unstructured":"OpenRouter. 2025. GPT-3.5 Turbo. https:\/\/openrouter.ai\/openai\/gpt-3.5-turbo Accessed: 2025-03-12."},{"key":"e_1_3_1_31_2","unstructured":"OpenRouter. 2025. Qwen2.5 Coder 32B Instruct. https:\/\/openrouter.ai\/qwen\/qwen-2.5-coder-32b-instruct Accessed: 2025-03-12."},{"key":"e_1_3_1_32_2","doi-asserted-by":"publisher","unstructured":"Kosta Serebryany. 2016. Continuous Fuzzing with libFuzzer and AddressSanitizer. In 2016 IEEE Cybersecurity Development (SecDev). 157\u2013157. doi:10.1109\/SecDev.2016.043","DOI":"10.1109\/SecDev.2016.043"},{"key":"e_1_3_1_33_2","unstructured":"Kostya Serebryany. 2016. Sanitize Fuzz and Harden Your C++ Code."},{"key":"e_1_3_1_34_2","doi-asserted-by":"publisher","unstructured":"Chengnian Sun Vu Le and Zhendong Su. 2016. Finding compiler bugs via live code mutation. In Proceedings of the 2016 ACM SIGPLAN international conference on object-oriented programming systems languages and applications (OOPSLA\u2019 16). 849\u2013863. doi:10.1145\/3022671.2984038","DOI":"10.1145\/3022671.2984038"},{"key":"e_1_3_1_35_2","doi-asserted-by":"publisher","unstructured":"Haoxin Tu Jiang He Xiaochen Li Zhilei Ren Zhide Zhou and Lingxiao Jiang. 2022. Remgen: Remanufacturing a Random Program Generator for Compiler Testing. In 2022 IEEE 33rd International Symposium on Software Reliability Engineering (ISSRE \u201822). 529\u2013540. doi:10.1109\/ISSRE55969.2022.00057","DOI":"10.1109\/ISSRE55969.2022.00057"},{"key":"e_1_3_1_36_2","unstructured":"Rui Ueyama. 2025. 8cc: A Tiny C Compiler. https:\/\/github.com\/rui314\/8cc Accessed: 2025-02-17."},{"key":"e_1_3_1_37_2","unstructured":"Krister Walfridsson. 2025. smtgcc: Some experiments with SMT solvers and GIMPLE IR. https:\/\/github.com\/kristerw\/smtgcc\/ Accessed: 2025-03-13."},{"key":"e_1_3_1_38_2","doi-asserted-by":"crossref","unstructured":"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 Proceedings of the 36th International Conference on Neural Information Processing Systems (NeurIPS \u201822). Article 1800.","DOI":"10.52202\/068431-1800"},{"key":"e_1_3_1_39_2","doi-asserted-by":"publisher","unstructured":"Chunqiu Steven Xia Matteo Paltenghi Jia Le Tian Michael Pradel and Lingming Zhang. 2024. Fuzz4all: Universal fuzzing with large language models. In Proceedings of the IEEE\/ACM 46th International Conference on Software Engineering (ICSE \u201824). 1\u201313. doi:10.1145\/3597503.3639121","DOI":"10.1145\/3597503.3639121"},{"key":"e_1_3_1_40_2","doi-asserted-by":"publisher","unstructured":"Chenyuan Yang Yinlin Deng Runyu Lu Jiayi Yao Jiawei Liu Reyhaneh Jabbarvand and Lingming Zhang. 2024. WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models. Proc. ACM Program. Lang. 8 OOPSLA2 Article 296 (2024). doi:10.1145\/3689736","DOI":"10.1145\/3689736"},{"key":"e_1_3_1_41_2","doi-asserted-by":"publisher","unstructured":"Xuejun Yang Yang Chen Eric Eide and John Regehr. 2011. Finding and understanding bugs in C compilers. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI \u201811). 283\u2013294. doi:10.1145\/1993498.1993532","DOI":"10.1145\/1993498.1993532"},{"key":"e_1_3_1_42_2","doi-asserted-by":"publisher","unstructured":"Qirun Zhang Chengnian Sun and Zhendong Su. 2017. Skeletal program enumeration for rigorous compiler testing. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI \u201817). 347\u2013361. doi:10.1145\/3140587.3062379","DOI":"10.1145\/3140587.3062379"},{"key":"e_1_3_1_43_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2020.110884"},{"key":"e_1_3_1_44_2","doi-asserted-by":"publisher","DOI":"10.1145\/3512345"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3763079","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T10:07:39Z","timestamp":1784196459000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3763079"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,10,9]]},"references-count":43,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2025,10,9]]}},"alternative-id":["10.1145\/3763079"],"URL":"https:\/\/doi.org\/10.1145\/3763079","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,10,9]]},"assertion":[{"value":"2025-03-25","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-08-12","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-10-09","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}