TL;DR
This paper compares two main approaches for analyzing complex software configurations (Feature Models): direct methods using SAT solvers on raw formulas, and compilation-based methods that first transform the formulas into a more efficient representation (d-DNNF). They find that while compilation has an upfront cost, it significantly speeds up complex reasoning tasks like counting and optimization on large configuration spaces, and they introduce a tool, Winston, to support both approaches.
What Problem Does This Paper Address?
Software Product Lines (SPLs) involve managing a vast number of potential software configurations, each defined by a Feature Model (FM). Analyzing these FMs is crucial for tasks like ensuring a configuration is valid, counting all possible configurations, or finding the "best" configuration based on certain criteria. Traditional methods often translate FMs into Conjunctive Normal Form (CNF) and use SAT solvers. While effective for basic checks (like satisfiability), this approach struggles with more complex queries like counting or finding optimal configurations, especially as the number of features and configurations explodes. The paper aims to systematically compare two main strategies for tackling these complex queries: "direct" approaches that work directly with the CNF, and "compilation-based" approaches that first convert the FM into a more specialized, efficient representation.
Methods
The paper focuses on two primary approaches for reasoning on Feature Models:
- Direct Approach: This method takes the FM, translates it into a propositional representation (specifically, Conjunctive Normal Form or CNF), and then uses specialized solvers directly on this CNF. For finding configurations, it uses SAT solvers iteratively with blocking clauses. For finding optimal configurations, it leverages MaxSAT and Pseudo-Boolean (PB) solvers.
- Compilation-Based Approach: This is a two-step process. First, the FM (represented as CNF) is "compiled" into a more efficient knowledge representation, primarily focusing on d-DNNF (deterministic Decomposable Negation Normal Form) circuits. Second, reasoning queries are performed on this compiled representation. The paper highlights that d-DNNF circuits offer a good trade-off between space and time for many complex queries, making them tractable.
The authors also introduce Winston, a Java-based reasoner that acts as a unified interface, allowing users to perform various analyses using either the direct or compilation-based approach, abstracting away the underlying tool selection.
Datasets
The experiments were conducted on a benchmark of 222 feature models. This dataset includes 218 models from a previous study ([55]) and 4 additional models (eCos, fiasco, Linux, uClinux) from another source ([56]). The models vary in size and complexity, representing diverse domains.
Key Insights and Ideas
- Compilation Pays Off for Complexity: While the initial compilation step for converting an FM into a d-DNNF circuit can be time-consuming, it significantly speeds up subsequent complex reasoning tasks (counting, sampling, optimization) compared to repeatedly querying a direct CNF representation.
- d-DNNF is a Sweet Spot: d-DNNF circuits offer a good balance of expressiveness and tractability for a wide range of reasoning operations, making them suitable for complex analyses that are intractable on raw CNF.
- Direct Approach Excels at Simple Queries: For basic tasks like finding one configuration (satisfiability), the direct approach using SAT solvers is often faster and more efficient, as it avoids the compilation overhead.
- Tool Support is Crucial: The complexity of selecting the right tool and approach for different reasoning tasks is a significant burden. The Winston tool aims to alleviate this by providing a unified interface for both direct and compilation-based methods.
- Linux FM is a Tough Nut to Crack: The Linux FM proved particularly challenging, failing to compile even after extensive computation, highlighting the scalability limits of current compilation techniques for extremely large models.
Key Results
- Counting Configurations: The direct approach had a very low success rate (12%) for counting configurations within a 10-minute timeout, while the compilation-based approach achieved a 99.5% success rate and was significantly faster for the counting operation itself (0.23s mean time vs. 66.0s for direct).
- Pointing Out Configurations: For finding a single configuration (SAT problem), the direct approach was highly successful (98.2% success rate) and very fast (0.01s mean time). For enumerating 10 configurations, it also performed well (97.3% success rate, 0.54s mean time). The compilation-based approach also performed well for these tasks, with success rates around 99.5% and mean times under 0.2s, but these times exclude the initial compilation cost.
- Finding Optimal Configurations (Top-k):
- Top-10 Configurations: The compilation-based approach generally outperformed the direct approach (using MaxHS and Sat4j solvers), especially when considering the compilation time. It achieved higher success rates and was often faster, particularly for larger values of 'l' (a parameter related to the number of solutions considered).
- Top-10 Values: Similar to top-10 configurations, the compilation-based approach demonstrated superior performance and robustness across various objective functions and model sizes, often handling cases where direct methods struggled or failed.
Limitations and Future Work
- Compilation Bottleneck: The primary limitation identified is the upfront cost of the compilation step. For scenarios where only a few simple queries are needed, the compilation overhead might outweigh the benefits.
- Linux FM Compilation Failure: The Linux FM could not be compiled, indicating that current d-DNNF compilers still face scalability challenges for extremely large and complex models.
- Future Work: The authors suggest exploring other knowledge representation languages like MDDGs (Multi-Valued Decision Diagrams) and constraint networks, especially for attributed FMs and domains with non-Boolean variables. They believe these representations could lead to more compact compiled forms and enable handling even larger feature models. They also plan to conduct further experiments, particularly with attributed FMs.
Summary updated