Explain void model
Description: Explains why the feature model is void (encodes no valid configuration): a minimal set of relationships/cross-tree constraints that is already unsatisfiable (a QuickXPlain minimal conflict), in human-readable form.
Application: Debugs a void feature model (one with no valid configuration) by pointing at a minimal set of relationships and constraints that contradict each other.
Example:
If eCommerce requires Server through a mandatory relationship and a constraint states Server => !eCommerce, those two are returned.
Code Examples
Command line usage
flamapy explain_void_model "path/to/feature/model"
Python easy to use facade usage
from flamapy.interfaces.python.flamapy_feature_model import FLAMAFeatureModel
# Load the feature model
fm = FLAMAFeatureModel("path/to/feature/model")
result = fm.explain_void_model()
print(result)
Python flamapy framework usage
from flamapy.core.discover import DiscoverMetamodels
# Initialize the discover metamodel
dm = DiscoverMetamodels()
# Call the operation. Transformations will be automatically executed
result = dm.use_operation_from_file("PySATExplainVoidModel", "path/to/feature/model")
print(result)
Python flamapy framework ADVANCED usage
from flamapy.core.discover import DiscoverMetamodels
# Initialize the discover metamodel
dm = DiscoverMetamodels()
# Get the fm metamodel representation using the transformation
# required to get to the fm metamodel
feature_model = dm.use_transformation_t2m("path/to/feature/model", 'fm')
# Manually call a M2M transformation to the diagnosis metamodel
sat_model = dm.use_transformation_m2m(feature_model, "pysat_diagnosis")
# Get the operation
operation = dm.get_operation(sat_model, 'PySATExplainVoidModel')
# Execute the operation
operation.execute(sat_model)
# Get and print the result
result = operation.get_result()
print(result)
Facade signature: explain_void_model(self)
Default backend: pysat_diagnosis
Implemented by:
| plugin | exact | scale limit |
|---|---|---|
| pysat_diagnosis_metamodel | yes | — |