通过编译器的精细特征排名优先配置
Prioritizing Configuration Relevance via Compiler-Based Refined Feature Ranking
AI总结:
本文提出了一种基于编译器的配置优先级方法,通过特征排名和图结构优化,生成高效且可靠的配置集,提升大规模配置空间的探索效率。
摘要:
现代编程语言,尤其是Rust,提供了先进的语言构造,用于构建高度可配置的软件系统,作为特征的聚合——通过配置来识别。然而,它们对程序分析、优化和测试提出了重大挑战,因为配置的指数级增长往往使得穷举探索不可行。在本文中,我们提出了首个基于编译器的方法来优先配置。我们的方法包括四个主要步骤:1. 从Rust编译器中提取定制的中间表示,2. 构建两个互补的基于图的数据结构,3. 使用中心性度量来对特征进行排序,4. 通过考虑它们影响的代码范围来细化排序。根据所获得的特征排序生成固定数量的最相关配置。通过使用将此图表示为合取范式(CNF)的求解器来保证生成配置的有效性。我们通过在Rust编译器中插入代码,将这种方法形式化并实现为原型RustyEx。对排名较高的开源Rust项目进行实证评估表明,RustyEx能够高效地在受限制的资源下生成用户指定的配置集,同时通过构造确保正确性。结果表明,以中心性指导的配置优先级能够有效且实际地探索大规模配置空间,为未来配置感知的分析和优化研究铺平了道路。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。