ALPHAPROG: Reinforcement Generation of Valid Programs for Compiler Fuzzing
Abstract
Fuzzing is a widely-used testing technique to assure software robustness. However, automatic generation of high-quality test suites is challenging, especially for software that takes in highly-structured inputs, such as the compilers. Compiler fuzzing remains difficult as generating tons of syntactically and semantically valid programs is not trivial. Most previous methods either depend on human-crafted grammars or heuristics to learn partial language patterns. They both suffer from the completeness issue that is a classic puzzle in software testing. To mitigate the problem, we propose a knowledge-guided reinforcement learning-based approach to generating valid programs for compiler fuzzing. We first design a naive learning model which evolves with the sequential mutation rewards provided by a target compiler we test. By iterating the training cycle, the model learns to generate valid programs that can improve the testing efficacy as well. We implement the proposed method into a tool called ALPHAPROG. We analyze the framework with four different reward functions and our study reveal the effectiveness of ALPHAPROG for compiler testing. We also reported two important bugs for a compiler production that were confirmed and addressed by the project owner, which further demonstrates ALPHAPROG's applied value in practice.
Cite
Text
Li et al. "ALPHAPROG: Reinforcement Generation of Valid Programs for Compiler Fuzzing." AAAI Conference on Artificial Intelligence, 2022. doi:10.1609/AAAI.V36I11.21527Markdown
[Li et al. "ALPHAPROG: Reinforcement Generation of Valid Programs for Compiler Fuzzing." AAAI Conference on Artificial Intelligence, 2022.](https://mlanthology.org/aaai/2022/li2022aaai-alphaprog/) doi:10.1609/AAAI.V36I11.21527BibTeX
@inproceedings{li2022aaai-alphaprog,
title = {{ALPHAPROG: Reinforcement Generation of Valid Programs for Compiler Fuzzing}},
author = {Li, Xiaoting and Liu, Xiao and Chen, Lingwei and Prajapati, Rupesh and Wu, Dinghao},
booktitle = {AAAI Conference on Artificial Intelligence},
year = {2022},
pages = {12559-12565},
doi = {10.1609/AAAI.V36I11.21527},
url = {https://mlanthology.org/aaai/2022/li2022aaai-alphaprog/}
}