{"title":"Random test generators demystified: Differences and potential for compiler reliability","authors":"Yang Wang, Zeyu Lu, Beining Wu, Yibiao Yang, Hongmin Lu, Yuming Zhou","doi":"10.1016/j.scico.2025.103359","DOIUrl":null,"url":null,"abstract":"<div><div>Compiler testing requires diverse programs as inputs. Various random program generators that can produce programs from scratch have been developed for this purpose. However, there is a gap in understanding (1) the differences among the generated programs and (2) how to make better use of these generators. To fill this gap, we selected five C random program generators and conducted the first comprehensive empirical analysis. For generated programs, our study focuses on three key areas: comparing the variations in features from multiple perspectives, analyzing the impact of compiling these programs on open-source compilers, and exploring their application potential in non-traditional testing scenarios. Programs from different generators show distinctive differences in various program features. Each has unique abilities to increase coverage of specific compiler components. Moreover, they can spot inconsistencies in the coverage statistics provided by different compilers, indicating promising application potential. Our study demonstrates that existing generators involve trade-offs in their design, making it challenging for any single implementation to balance efficiency, usability, and diversity for all scenarios. This motivates us to both maximize the potential of current generators and innovate to create more high-quality test programs for modern compiler quality assurance.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"247 ","pages":"Article 103359"},"PeriodicalIF":1.5000,"publicationDate":"2025-07-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Science of Computer Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S016764232500098X","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Compiler testing requires diverse programs as inputs. Various random program generators that can produce programs from scratch have been developed for this purpose. However, there is a gap in understanding (1) the differences among the generated programs and (2) how to make better use of these generators. To fill this gap, we selected five C random program generators and conducted the first comprehensive empirical analysis. For generated programs, our study focuses on three key areas: comparing the variations in features from multiple perspectives, analyzing the impact of compiling these programs on open-source compilers, and exploring their application potential in non-traditional testing scenarios. Programs from different generators show distinctive differences in various program features. Each has unique abilities to increase coverage of specific compiler components. Moreover, they can spot inconsistencies in the coverage statistics provided by different compilers, indicating promising application potential. Our study demonstrates that existing generators involve trade-offs in their design, making it challenging for any single implementation to balance efficiency, usability, and diversity for all scenarios. This motivates us to both maximize the potential of current generators and innovate to create more high-quality test programs for modern compiler quality assurance.
期刊介绍:
Science of Computer Programming is dedicated to the distribution of research results in the areas of software systems development, use and maintenance, including the software aspects of hardware design.
The journal has a wide scope ranging from the many facets of methodological foundations to the details of technical issues andthe aspects of industrial practice.
The subjects of interest to SCP cover the entire spectrum of methods for the entire life cycle of software systems, including
• Requirements, specification, design, validation, verification, coding, testing, maintenance, metrics and renovation of software;
• Design, implementation and evaluation of programming languages;
• Programming environments, development tools, visualisation and animation;
• Management of the development process;
• Human factors in software, software for social interaction, software for social computing;
• Cyber physical systems, and software for the interaction between the physical and the machine;
• Software aspects of infrastructure services, system administration, and network management.