Boosting Compiler Testing via Compiler Optimization Exploration

编译程序 计算机科学 过程间优化 优化编译器 编译器正确性 编译器构造 循环优化 死码消除 程序设计语言 程序优化 并行计算 软件质量保证 代码覆盖率 软件 软件质量 代码生成 软件开发 操作系统 冗余代码 钥匙(锁)
作者
Junjie Chen,Chenyao Suo
出处
期刊:ACM Transactions on Software Engineering and Methodology [Association for Computing Machinery]
卷期号:31 (4): 1-33 被引量:24
标识
DOI:10.1145/3508362
摘要

Compilers are a kind of important software, and similar to the quality assurance of other software, compiler testing is one of the most widely-used ways of guaranteeing their quality. Compiler bugs tend to occur in compiler optimizations. Detecting optimization bugs needs to consider two main factors: (1) the optimization flags controlling the accessability of the compiler buggy code should be turned on; and (2) the test program should be able to trigger the buggy code. However, existing compiler testing approaches only consider the latter to generate effective test programs, but just run them under several pre-defined optimization levels (e.g., -O0 , -O1 , -O2 , -O3 , -Os in GCC). To better understand the influence of compiler optimizations on compiler testing, we conduct the first empirical study, and find that (1) all the bugs detected under the widely-used optimization levels are also detected under the explored optimization settings (we call a combination of optimization flags turned on for compilation an optimization setting ), while 83.54% of bugs are only detected under the latter; (2) there exist both inhibition effect and promotion effect among optimization flags for compiler testing, indicating the necessity and challenges of considering the factor of compiler optimizations in compiler testing. We then propose the first approach, called COTest , by considering both factors to test compilers. Specifically, COTest first adopts machine-learning (the XGBoost algorithm) to model the relationship between test programs and optimization settings, to predict the bug-triggering probability of a test program under an optimization setting. Then, it designs a diversity augmentation strategy to select a set of diverse candidate optimization settings for prediction for a test program. Finally, Top-K optimization settings are selected for compiler testing according to the predicted bug-triggering probabilities. Then, it designs a diversity augmentation strategy to select a set of diverse candidate optimization settings for prediction for a test program. Finally, Top-K optimization settings are selected for compiler testing according to the predicted bug-triggering probabilities. The experiments on GCC and LLVM demonstrate its effectiveness, especially COTest detects 17 previously unknown bugs, 11 of which have been fixed or confirmed by developers.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
刚刚
科研通AI6.1应助聪明帅哥采纳,获得10
2秒前
2秒前
zzy发布了新的文献求助10
2秒前
量子星尘发布了新的文献求助10
3秒前
sga完成签到,获得积分10
3秒前
CrispyClam发布了新的文献求助10
4秒前
5秒前
akui完成签到,获得积分10
5秒前
6秒前
7秒前
小科完成签到,获得积分10
7秒前
7秒前
向绿真完成签到,获得积分10
8秒前
8秒前
ZZyy发布了新的文献求助10
8秒前
9秒前
9秒前
BowieHuang应助飘零枫叶采纳,获得10
10秒前
摸鱼大王完成签到,获得积分10
10秒前
向绿真发布了新的文献求助30
11秒前
深情安青应助Rjj采纳,获得10
11秒前
量子星尘发布了新的文献求助10
12秒前
仙女爷爷发布了新的文献求助10
12秒前
13秒前
赘婿应助博古书生采纳,获得20
14秒前
王一完成签到 ,获得积分10
14秒前
Summering666完成签到,获得积分10
14秒前
14秒前
14秒前
苗条平萱发布了新的文献求助10
14秒前
深情安青应助hh采纳,获得10
15秒前
15秒前
15秒前
16秒前
桐桐应助Islay50ppm采纳,获得10
18秒前
19秒前
FashionBoy应助XLL小绿绿采纳,获得10
19秒前
19秒前
19秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Introduction to strong mixing conditions volume 1-3 5000
Agyptische Geschichte der 21.30. Dynastie 3000
„Semitische Wissenschaften“? 1510
从k到英国情人 1500
Cummings Otolaryngology Head and Neck Surgery 8th Edition 800
Real World Research, 5th Edition 800
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 计算机科学 有机化学 物理 生物化学 纳米技术 复合材料 内科学 化学工程 人工智能 催化作用 遗传学 数学 基因 量子力学 物理化学
热门帖子
关注 科研通微信公众号,转发送积分 5760635
求助须知:如何正确求助?哪些是违规求助? 5525448
关于积分的说明 15397980
捐赠科研通 4897422
什么是DOI,文献DOI怎么找? 2634176
邀请新用户注册赠送积分活动 1582268
关于科研通互助平台的介绍 1537637