You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The variation points of a feature model are those features that may require to make a choice (i.e., select a variant) to form a valid configuration.
This operation returns all possible variation points and the variants of each variation point represented in the feature model.
I've got already implemented this operation in FM Metamodel following the Flamapy architecture. I will upload it if this operation is interesting for community and the Flamapy team agrees.
Usages of this operation: Horcas et al. ConfWS 2021
Here an snippet of code:
def variation_points(feature_model: FeatureModel) -> dict[Feature, list[Feature]]:
vps: dict[Feature, list[Feature]] = dict()
features = [feature_model.root]
while features:
feature = features.pop()
variants = []
for relation in feature.get_relations():
if not relation.is_mandatory():
variants.extend(relation.children)
if variants:
vps[feature] = variants
features.extend(feature.get_children())
return vps
The text was updated successfully, but these errors were encountered:
The variation points of a feature model are those features that may require to make a choice (i.e., select a variant) to form a valid configuration.
This operation returns all possible variation points and the variants of each variation point represented in the feature model.
I've got already implemented this operation in FM Metamodel following the Flamapy architecture. I will upload it if this operation is interesting for community and the Flamapy team agrees.
Usages of this operation: Horcas et al. ConfWS 2021
Here an snippet of code:
The text was updated successfully, but these errors were encountered: