FM to diagnosis model
This transformation converts a feature model into the diagnosis model used by the conflict,
diagnosis and explanation operations. It builds the same CNF as FM to PySAT, with the
same cnf_method argument (auto by default), and also keeps which clauses come from each
relation and constraint, so that the operations can report conflicts and diagnoses in terms of the
model. Arithmetic, aggregate and string constraints are left out with a UserWarning.
Code Examples
from flamapy.metamodels.fm_metamodel.transformations import UVLReader
from flamapy.metamodels.pysat_diagnosis_metamodel.transformations import FmToDiagPysat
# Load the feature model from a UVL file
feature_model = UVLReader('path/to/feature/model.uvl').transform()
# Transform the feature model into a diagnosis model
diagnosis_model = FmToDiagPysat(feature_model).transform()