Modern programming languages, most notably Rust, offer advanced linguistic constructs for building highly configurable software systems as aggregation of features -- identified by a configuration. However, they pose substantial challenges for program analysis, optimization, and testing, as the combinatorial explosion of configurations often makes exhaustive exploration infeasible. In this manuscript, we present the first compiler-based method for prioritizing configurations. Our approach consists of four main steps: 1. extracting a tailored intermediate representation from the Rust compiler, 2. constructing two complementary graph-based data structures, 3. using centrality measures to rank features, and 4. refining the ranking by considering the extent of code they impact. A fixed number of most relevant configurations are generated based on the achieved feature ranking. The validity of the generated configurations is guaranteed by using a SAT solver that takes a representation of this graph in conjunctive normal form. We formalized this approach and implemented it in a prototype, RustyEx, by instrumenting the Rust compiler. An empirical evaluation on higher-ranked open source Rust projects shows that RustyEx efficiently generates user-specified sets of configurations within bounded resources, while ensuring soundness by construction. The results demonstrate that centrality-guided configuration prioritization enables effective and practical exploration of large configuration spaces, paving the way for future research in configuration-aware analysis and optimization.


翻译:现代编程语言(尤其是Rust)通过将软件系统构建为特征聚合体(由配置项标识)的方式,提供了构建高度可配置系统的高级语言构造。然而,这给程序分析、优化和测试带来了重大挑战,因为配置的组合爆炸通常使得穷举探索不可行。本文首次提出基于编译器的配置优先级排序方法。该方法包含四个主要步骤:1. 从Rust编译器中提取定制化的中间表示;2. 构建两种互补的基于图的数据结构;3. 运用中心性度量对特征进行排序;4. 通过考量特征影响的代码范围来精细化排序结果。基于所得特征排序,可生成固定数量的最相关配置。通过将图结构的合取范式表示输入SAT求解器,可确保生成配置的有效性。我们形式化了该方法,并通过改造Rust编译器在原型系统RustyEx中实现。对高星级开源Rust项目的实证评估表明,RustyEx能够在有限资源内高效生成用户指定规模的配置集合,同时通过构造过程保证正确性。实验结果表明,基于中心性度量的配置优先级排序能够实现对大规模配置空间的有效实践探索,为未来面向配置的分析与优化研究开辟了新路径。

0
下载
关闭预览

相关内容

排序是计算机内经常进行的一种操作,其目的是将一组“无序”的记录序列调整为“有序”的记录序列。分内部排序和外部排序。若整个排序过程不需要访问外存便能完成,则称此类排序问题为内部排序。反之,若参加排序的记录数量很大,整个序列的排序过程不可能在内存中完成,则称此类排序问题为外部排序。内部排序的过程是一个逐步扩大记录的有序序列长度的过程。
端到端语音到语音翻译的优化方法综述
专知会员服务
7+阅读 · 2025年6月10日
基于深度学习和传统打分函数的配体构象优化框架
专知会员服务
14+阅读 · 2023年1月9日
【干货书】引擎顺序: 算法技术机制,353页pdf
专知会员服务
43+阅读 · 2021年7月16日
机器学习组合优化
专知会员服务
110+阅读 · 2021年2月16日
【干货】深入理解自编码器(附代码实现)
推荐算法:Match与Rank模型的交织配合
从0到1
15+阅读 · 2017年12月18日
推荐中的序列化建模:Session-based neural recommendation
机器学习研究会
18+阅读 · 2017年11月5日
神经网络机器翻译原理:LSTM、seq2seq到Zero-Shot
北京思腾合力科技有限公司
11+阅读 · 2017年8月10日
从浅层模型到深度模型:概览机器学习优化算法
机器之心
27+阅读 · 2017年7月9日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员