Python facade
Easy to use python facade
Using Python as a scripting language can be highly convenient for developing scripts and integrating our analysis into other processes. However, learning a framework as complex as flamapy can initially seem overwhelming. To alleviate this, flamapy provides a straightforward method for executing the most common operations in Python.
After installing flamapy we can use the tool as easy as
from flamapy.interfaces.python.flamapy_feature_model import FLAMAFeatureModel
# Load the feature model
fm = FLAMAFeatureModel("path/to/feature/model")
# Pass backend="sat" | "bdd" | "z3" to choose the analysis plugin (use "sat" to force pysat in WASM environments)
result = fm.satisfiable()
print(result)
Every operation that more than one plugin implements accepts backend=: a plugin name, or
"auto" to let the query planner pick the cheapest plugin that can handle the model. After a
call, fm.last_result tells which plugin ran it. See
Choosing the backend (query planner).
As you might notice, this interface is heavily inspired in the way FAMILIAR worked in the java 6 years
Supported operations
You can find a comprehensive list of the supported operations for the command line and code snipets if you want to run them:
- All Feature Bounds
- Atomic Sets
- Attribute Optimization
- Average Branching Factor
- Backbone
- Commonality
- Configuration conflict
- Configuration repair
- Configurations
- Number of Configurations
- Configurations With N Features
- Conflict
- Core Features
- Count Leafs
- Coverage
- Covering array
- Dead Features
- Diagnosis
- Estimated number of configurations
- Explain dead feature
- Explain false optional
- Explain void model
- False Optional Features
- Feature Ancestors
- Feature Bounds
- Feature explanation
- Feature Inclusion Probability
- Filter
- Generate Random Attribute
- Generate random feature model
- Homogeneity
- Language Level
- Leaf Features
- Max Depth
- Metrics
- Minimal corrections
- Minimum configuration
- Product distribution
- Pure Optional Features
- Sample reduction
- Sampling
- Satisfiable
- Satisfiable Configuration
- T-wise sampling
- Unique Features
- Variability
- Variant Features
- Variation Points