Table of Contents
Fetching ...

Prioritizing Configuration Relevance via Compiler-Based Refined Feature Ranking

Federico Bruzzone, Walter Cazzola, Luca Favini

TL;DR

This paper tackles the infeasibility of exhaustively exploring highly configurable software by introducing RustyEx, a compiler-based method to prioritize configurations. It instruments the Rust compiler to extract a unified intermediate representation (UIR), builds a weighted feature dependency graph and an atom dependency tree, applies centrality measures to rank features, and refines rankings by estimating code impact, ultimately generating a small set of valid, high-impact configurations via a CNF-formatted SAT solve. The approach is formalized and implemented, and evaluated on 40 open-source Rust projects, showing soundness by construction, strong scalability, and modest resource usage. The work enables efficient, configuration-aware analysis and optimization, with broad implications for testing, performance profiling, and regression analysis in highly configurable systems, and generalizes to other languages with native variability support.

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.

Prioritizing Configuration Relevance via Compiler-Based Refined Feature Ranking

TL;DR

This paper tackles the infeasibility of exhaustively exploring highly configurable software by introducing RustyEx, a compiler-based method to prioritize configurations. It instruments the Rust compiler to extract a unified intermediate representation (UIR), builds a weighted feature dependency graph and an atom dependency tree, applies centrality measures to rank features, and refines rankings by estimating code impact, ultimately generating a small set of valid, high-impact configurations via a CNF-formatted SAT solve. The approach is formalized and implemented, and evaluated on 40 open-source Rust projects, showing soundness by construction, strong scalability, and modest resource usage. The work enables efficient, configuration-aware analysis and optimization, with broad implications for testing, performance profiling, and regression analysis in highly configurable systems, and generalizes to other languages with native variability support.

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.
Paper Structure (21 sections, 16 equations, 4 figures, 1 algorithm)

This paper contains 21 sections, 16 equations, 4 figures, 1 algorithm.

Figures (4)

  • Figure 1: The phases of RustyEx (inspired from Li21b)
  • Figure 2: RustyEx process demonstrated on two scenarios
  • Figure 3: Correlation between lines of code (x-axis), execution time (s) , and peak memory usage (MB) .
  • Figure 4: Delta between the number of declared features and the number of detected feature.