Testing the Compiler for a New-Born Programming Language: An Industrial Case Study (Experience Paper)
Yingquan Zhao, Junjie Chen, Ruifeng Fu, Haojie Ye, Zan Wang
摘要
Due to the critical role of compilers, many compiler testing techniques have been proposed, two most notable categories among which are grammar-based and metamorphic-based techniques. All of them have been extensively studied for testing mature compilers. However, it is typical to develop a new compiler for a new-born programming language in practice. In this scenario, the existing techniques are hardly applicable due to some major reasons: (1) no reference compilers to support differential testing, (2) lack of program analysis tools to support most of metamorphic-based compiler testing, (3) substantial implementation effort incurred by different programming language features. Hence, it is unknown how the existing techniques perform in this new scenario. In this work, we conduct the first exploration (i.e., an industrial case study) to investigate the performance of the existing techniques in this new scenario with substantial adaptations. We adapted grammar-based compiler testing to this scenario by synthesizing new test programs based on code snippets and using compilation crash as test oracle due to the lack of reference compilers for differential testing. We also adapted metamorphic-based compiler testing to this scenario by constructing equivalent test programs under any inputs to relieve the dependence on program analysis tools. We call the adapted techniques SynFuzz and Meta-Fuzz, respectively. We evaluated both SynFuzz and MetaFuzz on two versions of a new compiler for a new-born programming language in a global IT company. By comparing with the testing practice adopted by the testing team and the general fuzzer (AFL), SynFuzz can detect more bugs during the same testing time, and both SynFuzz and
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- SJFuzz: Seed and Mutator Scheduling for JVM Fuzzing 引用了 History-Driven Test Program Synthesis for JVM Testing
- SJFuzz: Seed and Mutator Scheduling for JVM Fuzzing 引用了 Evaluating Fuzz Testing
- Rust-twins: Automatic Rust Compiler Testing through Program Mutation and Dual Macros Generation 引用了 History-Driven Test Program Synthesis for JVM Testing
- Automated conformance testing for JavaScript engines via deep compiler fuzzing 引用了 Evaluating Fuzz Testing
- History-Driven Test Program Synthesis for JVM Testing 引用了 Efficient Compiler Autotuning via Bayesian Optimization
- Gramatron: effective grammar-aware fuzzing 引用了 Evaluating Fuzz Testing
引用它的顶会 Paper4
- Statfier: Automated Testing of Static Analyzers via Semantic-Preserving Program TransformationsHuaien Zhang, Yu Pei, Junjie Chen, Shin Hwei TanFSE 2023 · 15 次引用
- SJFuzz: Seed and Mutator Scheduling for JVM FuzzingMingyuan Wu, Yicheng Ouyang, Minghai Lu, Junjie Chen 等FSE 2023 · 14 次引用
- Clozemaster: Fuzzing Rust Compiler by Harnessing Llms for Infilling Masked Real ProgramsHongyan Gao, Yibiao Yang, Maolin Sun, Jiangchang Wu 等ICSE 2025 · 6 次引用
- Rust-twins: Automatic Rust Compiler Testing through Program Mutation and Dual Macros GenerationWenzhang Yang, Cuifeng Gao, Xiaoyuan Liu, Yuekang Li 等ASE 2024 · 5 次引用
它引用的 Paper6
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei 等CCS 2018 · 753 次引用
- Automated conformance testing for JavaScript engines via deep compiler fuzzingGuixin Ye, Zhanyong Tang, Shin Hwei Tan, Songfang Huang 等PLDI 2021 · 75 次引用
- Efficient Compiler Autotuning via Bayesian OptimizationJunjie Chen, Ningxin Xu, Peiqi Chen, Hongyu ZhangICSE 2021 · 73 次引用
- History-Driven Test Program Synthesis for JVM TestingYingquan Zhao, Zan Wang, Junjie Chen, Mengdi Liu 等ICSE 2022 · 51 次引用
- Gramatron: effective grammar-aware fuzzingPrashast Srivastava, Mathias PayerISSTA 2021 · 51 次引用
相关 Paper
- GrayC: Greybox Fuzzing of Compilers and Analysers for CKarine Even-Mendoza, Arindam Sharma, Alastair F. Donaldson, Cristian CadarISSTA 2023 · 52 次引用
- Fuzzing Class SpecificationsFacundo Molina, Marcelo d'Amorim, Nazareno AguirreICSE 2022 · 25 次引用
- Optimization-Aware Test Generation for Deep Learning CompilersQingchao Shen, Zan Wang, Haoyang Ma, Yongqiang Tian 等ICSE 2026
- Fuzzing MLIR Compilers with Custom Mutation SynthesisBen Limpanukorn, Jiyuan Wang, Hong Jin Kang, Eric Zitong Zhou 等ICSE 2025 · 3 次引用
- AsFuzzer: Differential Testing of Assemblers with Error-Driven Grammar InferenceHyungseok Kim, Soomin Kim, Jungwoo Lee, Sang Kil ChaISSTA 2024 · 2 次引用
