Modern software development reuses code by importing libraries as dependencies. Software projects typically include an average of 36 dependencies, with 80% being transitive, meaning they are dependencies of dependencies. Recent research indicates that only 24.9% of these dependencies are required at runtime, and even within those, many program constructs remain unused, adding unnecessary code to the project. This has led to the development of debloating tools that remove unnecessary dependencies and program constructs while balancing precision by eliminating unused constructs and soundness by preserving all required constructs. To systematically evaluate this trade-off, we developed Deblometer, a micro-benchmark consisting of 59 test cases designed to assess support for various Java language features in debloating tools. Each test case includes a manually curated ground truth specifying necessary and bloated classes, methods, and fields, enabling precise measurement of soundness and precision. Using Deblometer, we evaluated three popular Java debloating tools: Deptrim, JShrink, and ProGuard. Our evaluation reveals that all tools remove required program constructs, which results in changed semantics or execution crashes. In particular, the dynamic class loading feature introduces unsoundness in all evaluated tools. Our comparison shows that Deptrim retains more bloated constructs, while ProGuard removes more required constructs. JShrink's soundness is significantly affected by limited support for annotations, which leads to corrupted debloated artifacts. These soundness issues highlight the need to improve debloating tools to ensure stable and reliable debloated software.


翻译:现代软件开发通过导入库作为依赖项来实现代码复用。软件项目通常平均包含 36 个依赖项,其中 80% 为传递性依赖,即它们是依赖项的依赖项。近期研究表明,这些依赖项中仅有 24.9% 在运行时是必需的,且即使在必需依赖项中,许多程序结构仍未被使用,从而向项目添加了不必要的代码。这推动了去膨胀工具的发展,这些工具通过移除未使用的构造来平衡精确性,并通过保留所有必需构造来确保正确性,从而消除不必要的依赖项和程序结构。为系统评估这种权衡关系,我们开发了 Deblometer——一个包含 59 个测试用例的微基准套件,旨在评估去膨胀工具对 Java 语言特性的支持程度。每个测试用例都包含人工标注的基准真值,明确指定了必需类与冗余类、方法及字段,从而能够精确测量正确性与精确性。使用 Deblometer 我们评估了三种主流 Java 去膨胀工具:Deptrim、JShrink 和 ProGuard。评估结果表明,所有工具都会移除必需的程序构造,导致语义改变或执行崩溃。特别是动态类加载特性在所有被评估工具中都引入了正确性问题。我们的对比显示 Deptrim 保留了更多冗余构造,而 ProGuard 移除了更多必需构造。JShrink 对注解支持的局限性显著影响了其正确性,导致生成损坏的去膨胀产物。这些正确性问题凸显了改进去膨胀工具以确保生成稳定可靠去膨胀软件的必要性。

0
下载
关闭预览

相关内容

这个新版本的工具会议系列恢复了从1989年到2012年的50个会议的传统。工具最初是“面向对象语言和系统的技术”,后来发展到包括软件技术的所有创新方面。今天许多最重要的软件概念都是在这里首次引入的。2019年TOOLS 50+1在俄罗斯喀山附近举行,以同样的创新精神、对所有与软件相关的事物的热情、科学稳健性和行业适用性的结合以及欢迎该领域所有趋势和社区的开放态度,延续了该系列。 官网链接:http://tools2019.innopolis.ru/
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
11+阅读 · 2019年4月15日
VIP会员
相关资讯
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
相关基金
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员