摘要
Random test case generation is a challenging subject in compiler testing. Due to the structured and strict nature of the languages required for compiler inputs, using randomization techniques for hunting bugs in compiler implementation represents a big challenge that requires trading off correctness and generation biases against fuzzing techniques for broader exploratory randomization. This paper shares the technology and the practical industry experience on two random testing frameworks developed for the Hardware Description Language (HDL) compiler of Jasper® App, a production formal verification software applied in Electronic Design Automation (EDA) industry. The two frameworks impact distinct parts of the compiler stack and provide different features and strengths for randomization: SystemVerilog Generator script, which creates random and formally provable HDL code, and Fuzz HDL Testing, a fuzzing solution applying LLVM’s libFuzzer to explore random textual inputs.
摘要译文
在编译器测试中,随机测试用例的生成是一个具有挑战性的课题。 由于编译器输入所需语言的结构化和严格性,使用随机化技术来查找编译器实现中的bug代表了一大挑战,需要权衡正确性和生成偏差与模糊技术,以获得更广泛的探索性随机化。 本文分享了针对Jasper® App的硬件描述语言(HDL)编译器开发的两个随机测试框架的技术和实际行业经验,Jasper® App是一种应用于电子设计自动化(EDA)行业的生产正式验证软件。 这两个框架影响了编译器堆栈的不同部分,并为随机化提供了不同的特性和优势:SystemVerilog Generator脚本(创建随机且形式可证明的HDL代码)和Fuzz HDL Testing(一种应用LLVM的libFuzzer来探索随机文本输入的模糊解决方案)。
Mirlaine Crepalde[1];Augusto Mafra[1];Lucas Cavalini[1];Lucas Martins[1];Guilherme Amorim[1];Pedro Henrique Santos[1];Fabiano Peixoto[1]. Automatic Test Case Generation for Jasper App HDL Compiler: An Industry Experience[C]//CC '25: Proceedings of the 34th ACM SIGPLAN International Conference on Compiler Construction, Las Vegas NV USA, March 1 - 2, 2025, US: ACM, 2025: 25 - 34