一句话:提出 EChecker,在增量构建中推断并更新实际依赖,无需全量构建即可高效检测缺失/冗余依赖错误。
增量与并行构建依赖构建脚本的正确性,但脚本常出现缺失依赖(MD)和冗余依赖(RD)错误。现有检测方法依赖清洁构建(clean build),需在干净环境中全量构建软件配置子集,对大型项目耗时可达数小时。本文提出 EChecker,其核心思想是从 C/C++ 预处理指令和新增提交中的 Makefile 变更自动推断并更新实际构建依赖,从而尽可能避免清洁构建。作者选取 12 个不同规模项目、共 240 个提交进行评测,并与当前最优工具比较。结果显示 EChecker 的 F1 分数提升 0.18,检测效率平均提升 85.14 倍(中位数 16.30 倍),且保持有效性。
Incremental and parallel builds performed by build tools such as Make are the heart of modern C/C++ software projects. Their correct and efficient execution depends on build scripts. However, build scripts are prone to errors. The most prevalent errors are missing dependencies (MDs) and redundant dependencies (RDs). The state-of-the-art methods for detecting these errors rely on clean builds (i.e., full builds of a subset of software configurations in a clean environment), which is costly and takes up to a few hours for large-scale projects. To address these challenges, we propose a novel approach called EChecker to detect build dependency errors in the context of incremental builds. The core idea of EChecker is to automatically update actual build dependencies by inferring them from C/C++ pre-processor directives and Makefile changes from new commits, which avoids clean builds when possible. EChecker achieves higher efficiency than the methods that rely on clean builds while maintaining effectiveness. We selected 12 representative projects, with their sizes ranging from small to large, with 240 commits (20 commits for each project), based on which we evaluated the effectiveness and efficiency of EChecker. We compared the evaluation results with a state-of-the-art build dependency error detection tool. The evaluation shows that the F-1 score of EChecker improved by 0.18 over the state-of-the-art method. EChecker increases the build dependency error detection efficiency by an average of 85.14 times (with a median of 16.30 times). The results demonstrate that EChecker can support practitioners in detecting build dependency errors efficiently.
DOI 原文 ·
@inproceedings{paperbot8448,
title = {Detecting Build Dependency Errors in Incremental Builds},
author = {Jun Lyu and Shanshan Li and He Zhang and Yang Zhang and Guoping Rong and Manuel Rigger},
booktitle = {ISSTA},
year = {2024},
doi = {10.1145/3650212.3652105}
}