Proceedings

Revisiting the Evaluation of Deep Learning-Based Compiler Testing

Download BibTeX Cite

Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence. Main Track. Pages 4873-4882.

https://doi.org/10.24963/ijcai.2023/542

Abstract

A high-quality program generator is essential to effective automated compiler testing. Engineering such a program generator is difficult, time-consuming, and specific to the language under testing, thus requiring tremendous efforts from human experts with language-specific domain knowledge. To avoid repeatedly writing program generators for different languages, researchers recently proposed a language-agnostic approach based on deep learning techniques to automatically learn a program generator (referred to as DLG) from existing programs. Evaluations show that DLGs outperform Language-Specific Program Generators (LSGs) in testing compilers.

However, we argue that it is unfair to use LSGs as baselines to evaluate DLGs. LSGs aim to validate compiler optimizations by only generating compilable, well-defined test programs; this restriction inevitably impairs the diversity of the language features used in the generated programs. In contrast, DLGs do not aim to validate the correctness of compiler optimizations, and its generated programs are not guaranteed to be well-defined or even compilable. Therefore, it is not surprising that DLG-generated programs are more diverse in terms of used language features than LSG-generated ones.

This study revisits the evaluation of DLGs, and proposes a new, fair, simple yet strong baseline named Kitten for evaluating DLGs. Given a dataset consisting of human-written programs, instead of using deep learning techniques to learn a program generator, Kitten directly derives new programs by mutating the programs in the dataset. Extensive experiments with more than 1,500 CPU-hours demonstrate that the state-of-the-art DLGs fail to compete against such a simple baseline: 3 v.s. 1,750 hang bugs, 1 v.s. 34 distinct compiler crashes. We believe that DLGs still have a large room for improvement.

  1. [Aho et al., 2006] Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Tech- niques, and Tools (2nd Edition), chapter 2.2.3. ParseTree. Addison Wesley, August 2006.
  2. [Antlr, 2022a] Antlr. Antlr. https://www.antlr.org/, 2022. Online; accessed 26-July-2022. Link
  3. 2022b] Antlr. Antlr grammar. https://github.com/ antlr/grammars-v4, 2022. Online; accessed 26-July-2022. Link
  4. [Aschermann et al., 2019] Cornelius Aschermann, Tom- maso Frassetto, Thorsten Holz, Patrick Jauernig, Ahmad-Reza Sadeghi, and Daniel Teuchert. Nautilus: Fishing for deep bugs with grammars. In NDSS, 2019.
  5. [Bison, 2022] Bison. Bison grammar files. http://web.mit. edu/gnu/doc/html/bison 6.html#SEC34, 2022. Online; ac- cessed 26-July-2022. Link
  6. [Cummins et al., 2018] Chris Cummins, Pavlos Petoumenos, Alastair Murray, and Hugh Leather. Compiler fuzzing through deep learning. In Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2018, page 95-105, New York, NY, USA, 2018. Association for Computing Machinery.
  7. [Developers, 2022] Developers. Github issue for deepfuzz. https://github.com/s3team/DeepFuzz/issues/1, 2022. On- line; accessed 26-July-2022. Link
  8. [Dong et al., 2022] Yiwen Dong, Zheyang Li, Yongqiang Tian, Chengnian Sun, Michael W. Godfrey, and Meiyap- pan Nagappan. Bash in the wild: Language usage, code smells, and bugs. ACM Trans. Softw. Eng. Methodol., apr 2022. Just Accepted.
  9. [IOS, 2005] IOS. ISO/IEC 9899:TC2: Programming Lan- guages-C. https://www.open-std.org/jtc1/sc22/wg14/ www/docs/n1124.pdf, 2005. Link
  10. [Jiang et al., 2020] Bo Jiang, Xiaoyan Wang, W. K. Chan, T. H. Tse, Na Li, Yongfeng Yin, and Zhenyu Zhang. Cuda- smith: A fuzzer for cuda compilers. In 2020 IEEE 44th An- nual Computers, Software, and Applications Conference (COMPSAC), pages 861-871, 2020.
  11. [Klees et al., 2018] George Klees, Andrew Ruef, Benji Cooper, Shiyi Wei, and Michael Hicks. Evaluating fuzz testing. In Proceedings of the 2018 ACM SIGSAC Con- ference on Computer and Communications Security, CCS '18, page 2123-2138, New York, NY, USA, 2018. Associ- ation for Computing Machinery.
  12. [Le et al., 2014] Vu Le, Mehrdad Afshari, and Zhendong Su. Compiler validation via equivalence modulo inputs. In Michael F. P. O'Boyle and Keshav Pingali, editors, ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '14, Edinburgh, United King- dom -June 09 -11, 2014, pages 216-226. ACM, 2014.
  13. [Le et al., 2015] Vu Le, Chengnian Sun, and Zhendong Su. Finding deep compiler bugs via guided stochastic program mutation. In Jonathan Aldrich and Patrick Eugster, ed- itors, Proceedings of the 2015 ACM SIGPLAN Interna- tional Conference on Object-Oriented Programming, Sys- tems, Languages, and Applications, OOPSLA 2015, part of SPLASH 2015, Pittsburgh, PA, USA, October 25-30, 2015, pages 386-399. ACM, 2015.
  14. [Lidbury et al., 2015] Christopher Lidbury, Andrei Lascu, Nathan Chong, and Alastair F. Donaldson. Many-core compiler fuzzing. SIGPLAN Not., 50(6):65-76, jun 2015.
  15. [Liu et al., 2019] Xiao Liu, Xiaoting Li, Rupesh Prajapati, and Dinghao Wu. Deepfuzz: Automatic generation of syn- tax valid c programs for fuzz testing. Proceedings of the AAAI Conference on Artificial Intelligence, 33(01):1044- 1051, Jul. 2019.
  16. [Livinskii et al., 2020] Vsevolod Livinskii, Dmitry Babokin, and John Regehr. Random testing for c and c++ compilers with yarpgen. Proc. ACM Program. Lang., 4(OOPSLA), nov 2020.
  17. [Sun et al., 2016a] Chengnian Sun, Vu Le, and Zhendong Su. Finding compiler bugs via live code mutation. In Pro- ceedings of the 2016 ACM SIGPLAN International Con- ference on Object-Oriented Programming, Systems, Lan- guages, and Applications, OOPSLA 2016, page 849-863, New York, NY, USA, 2016. Association for Computing Machinery.
  18. [Sun et al., 2016b] Chengnian Sun, Vu Le, Qirun Zhang, and Zhendong Su. Toward understanding compiler bugs in gcc and llvm. In Proceedings of the 25th International Sym- posium on Software Testing and Analysis, ISSTA 2016, page 294-305, New York, NY, USA, 2016. Association for Computing Machinery.
  19. [Sun et al., 2018] Chengnian Sun, Yuanbo Li, Qirun Zhang, Tianxiao Gu, and Zhendong Su. Perses: Syntax-guided program reduction. In Proceedings of the 40th In- ternational Conference on Software Engineering, page 361-371. Association for Computing Machinery, 2018.
  20. [Wang et al., 2019] Junjie Wang, Bihuan Chen, Lei Wei, and Yang Liu. Superion: Grammar-aware greybox fuzzing. In 2019 IEEE/ACM 41st International Conference on Soft- ware Engineering (ICSE), pages 724-735. IEEE, 2019.
  21. [Xu et al., 2020a] Haoran Xu, Shuhui Fan, Yongjun Wang, Zhijian Huang, Hongzuo Xu, and Peidai Xie. Tree2tree structural language modeling for compiler fuzzing. In Meikang Qiu, editor, Algorithms and Architectures for Parallel Processing, pages 563-578, Cham, 2020. Springer International Publishing.
  22. [Xu et al., 2020b] Haoran Xu, Yongjun Wang, Shuhui Fan, Peidai Xie, and Aizhi Liu. Dsmith: Compiler fuzzing through generative deep learning model with attention. In 2020 International Joint Conference on Neural Networks (IJCNN), pages 1-9, 2020.
  23. [Yang et al., 2011] Xuejun Yang, Yang Chen, Eric Eide, and John Regehr. Finding and understanding bugs in c compil- ers. In Proceedings of the 32nd ACM SIGPLAN Confer- ence on Programming Language Design and Implementa- tion, PLDI '11, page 283-294, New York, NY, USA, 2011. Association for Computing Machinery.
  24. [Zhang et al., 2022] Zenong Zhang, Zach Patterson, Michael Hicks, and Shiyi Wei. FIXREVERTER: A realistic bug injection methodology for benchmarking fuzz testing. In 31st USENIX Security Symposium (USENIX Security 22), pages 3699-3715, Boston, MA, August 2022. USENIX Association.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards