Reputation: 21
Please help me. I want to find all possible combinations of feature by considering the constraints of feature model. as given in figure. Is there any formula or tool for general? Please suggest me any automatic method.
Feature Model:
Upvotes: 2
Views: 797
Reputation: 11
For 'Alternative', calc 2^n (n = number of 'Alternative' items). For 'Or', calc 2^(n-1) (n = number of 'Or' items)
For example, in this feature model, possible combination is, 2^3 + 2^1 = 10
Upvotes: 0
Reputation: 13814
You can try FeatureIDE. You need to create a feature model for figure 1 with the constraints. Then you need to make one configuration without selecting any features. It will show you the number of the available configurations (or combinations as you call it) that can be generated.
Upvotes: 0
Reputation: 345
bro! Are you reading the following paper?
Henard, Christopher, et al. "PLEDGE:a product line editor and test generation tool." International Software Product Line Conference Co-Located Workshops. 2013:126-129.
There are some languages which describe the constraints in feature model. But I think the formulas should be written manually, for example, the cnf
file can be,
c 1 Mobilephone
c 2 Calls
c 3 GPS
...
p cnf 10 X
-1 2 0
-1 3 0
...
Upvotes: 0
Reputation: 147
A general approach would be to transform the Feature Model to a predicate logical formula (using implications, or, xor .. do you need to do that automatically!? I am not sure how difficult it is) and transform it into disjunctive normal form. That is a disjunction of conjunctions - each conjunction stands for a set of solutions; literals that are not mentioned have no impact.
There is scientific work availabel, search for eg "Logic Verification of Product-Line Variant Requirement" or "Using First-Order Logic for Product Line Model Validation"
Upvotes: 0