- Title
- Coverage prediction for accelerating compiler testing
- Creator
- Chen, Junjie; Wang, Guancheng; Hao, Dan; Xiong, Yingfei; Zhang, Hongyu; Zhang, Lu; Xie, Bing
- Relation
- IEEE Transactions on Software Engineering Vol. 47, Issue 2, p. 261-278
- Publisher Link
- http://dx.doi.org/10.1109/TSE.2018.2889771
- Publisher
- Institute of Electrical and Electronics Engineers (IEEE)
- Resource Type
- journal article
- Date
- 2021
- Description
- Compilers are one of the most fundamental software systems. Compiler testing is important for assuring the quality of compilers. Due to the crucial role of compilers, they have to be well tested. Therefore, automated compiler testing techniques (those based on randomly generated programs) tend to run a large number of test programs (which are test inputs of compilers). The cost for compilation and execution for these test programs is significant. These techniques can take a long period of testing time to detect a relatively small number of compiler bugs. That may cause many practical problems, e.g., bringing a lot of costs including time costs and financial costs, and delaying the development/release cycle. Recently, some approaches have been proposed to accelerate compiler testing by executing test programs that are more likely to trigger compiler bugs earlier according to some criteria. However, these approaches ignore an important aspect in compiler testing: different test programs may have similar test capabilities (i.e., testing similar functionalities of a compiler, even detecting the same compiler bug), which may largely discount their acceleration effectiveness if the test programs with similar test capabilities are executed all the time. Test coverage is a proper approximation to help distinguish them, but collecting coverage dynamically is infeasible in compiler testing since most test programs are generated on the fly by automatic test-generation tools like Csmith. In this paper, we propose the first method to predict test coverage statically for compilers, and then propose to prioritize test programs by clustering them according to the predicted coverage information. The novel approach to accelerating compiler testing through coverage prediction is called COP (short for COverage Prediction). Our evaluation on GCC and LLVM demonstrates that COP significantly accelerates compiler testing, achieving an average of 51.01 percent speedup in test execution time on an existing dataset including three old release versions of the compilers and achieving an average of 68.74 percent speedup on a new dataset including 12 latest release versions. Moreover, COP outperforms the state-of-the-art acceleration approach significantly by improving 17.16% ~ 82.51%$ speedups in different settings on average.
- Subject
- compiler testing; test prioritization; machine learning
- Identifier
- http://hdl.handle.net/1959.13/1462461
- Identifier
- uon:46475
- Identifier
- ISSN:0098-5589
- Language
- eng
- Reviewed
- Hits: 771
- Visitors: 770
- Downloads: 0
Thumbnail | File | Description | Size | Format |
---|