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
Abstract
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
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 07b01c76-d6bf-4fef-a70f-ee61f861a63dCited by top-tier papers4
- Statfier: Automated Testing of Static Analyzers via Semantic-Preserving Program TransformationsHuaien Zhang, Yu Pei, Junjie Chen, Shin Hwei TanFSE 2023 · 15 citations
- SJFuzz: Seed and Mutator Scheduling for JVM FuzzingMingyuan Wu, Yicheng Ouyang, Minghai Lu, Junjie Chen et al.FSE 2023 · 14 citations
- Clozemaster: Fuzzing Rust Compiler by Harnessing Llms for Infilling Masked Real ProgramsHongyan Gao, Yibiao Yang, Maolin Sun, Jiangchang Wu et al.ICSE 2025 · 6 citations
- Rust-twins: Automatic Rust Compiler Testing through Program Mutation and Dual Macros GenerationWenzhang Yang, Cuifeng Gao, Xiaoyuan Liu, Yuekang Li et al.ASE 2024 · 5 citations
Builds on6
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei et al.CCS 2018 · 753 citations
- Automated conformance testing for JavaScript engines via deep compiler fuzzingGuixin Ye, Zhanyong Tang, Shin Hwei Tan, Songfang Huang et al.PLDI 2021 · 75 citations
- Efficient Compiler Autotuning via Bayesian OptimizationJunjie Chen, Ningxin Xu, Peiqi Chen, Hongyu ZhangICSE 2021 · 73 citations
- History-Driven Test Program Synthesis for JVM TestingYingquan Zhao, Zan Wang, Junjie Chen, Mengdi Liu et al.ICSE 2022 · 51 citations
- Gramatron: effective grammar-aware fuzzingPrashast Srivastava, Mathias PayerISSTA 2021 · 51 citations
Related papers
- GrayC: Greybox Fuzzing of Compilers and Analysers for CKarine Even-Mendoza, Arindam Sharma, Alastair F. Donaldson, Cristian CadarISSTA 2023 · 52 citations
- Fuzzing Class SpecificationsFacundo Molina, Marcelo d'Amorim, Nazareno AguirreICSE 2022 · 25 citations
- AsFuzzer: Differential Testing of Assemblers with Error-Driven Grammar InferenceHyungseok Kim, Soomin Kim, Jungwoo Lee, Sang Kil ChaISSTA 2024 · 2 citations
- Optimization-Aware Test Generation for Deep Learning CompilersQingchao Shen, Zan Wang, Haoyang Ma, Yongqiang Tian et al.ICSE 2026
- Fuzzing MLIR Compilers with Custom Mutation SynthesisBen Limpanukorn, Jiyuan Wang, Hong Jin Kang, Eric Zitong Zhou et al.ICSE 2025 · 3 citations
