🤖 AI Summary
This work addresses the intractability of program analysis, testing, and optimization in modern languages like Rust due to combinatorial explosion in configuration spaces. To tackle this challenge, the authors propose a compiler-based approach for prioritizing configurations. By instrumenting the Rust compiler to extract intermediate representations, they construct a configuration dependency graph and refine configuration rankings using graph centrality metrics combined with code impact scope. A SAT solver is then employed to generate a high-relevance subset of configurations while preserving their semantic validity. The prototype system, RustyEx, efficiently produces valid configuration subsets of specified sizes on mainstream Rust projects, significantly improving the exploration efficiency of large configuration spaces under resource constraints.
📝 Abstract
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.