Skip to content

Commit

Permalink
fix: solving bug in metrics operation due to name change. Also improv…
Browse files Browse the repository at this point in the history
…e the filter
  • Loading branch information
jagalindo committed Jul 18, 2024
1 parent f15156d commit 5452a2b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flamapy/metamodels/pysat_metamodel/operations/pysat_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def calculate_metamodel_metrics(self, model: VariabilityModel) -> list[dict[str,
return [method() for method in metric_methods]

@metric_method
def valid(self) -> dict[str, Any]:
"""A feature model is valid if it represents at least one configuration."""
def satisfiable(self) -> dict[str, Any]:
"""A feature model is satisfiable if it represents at least one configuration."""
if self.model is None:
raise FlamaException('Model not initialized.')
name = "Valid (not void)"
_valid = sat_operations.PySATValid().execute(self.model).get_result()
result = self.construct_result(name=name, doc=self.valid.__doc__, result=_valid)
name = "Satisfiable"
_satisfiable = sat_operations.PySATSatisfiable().execute(self.model).get_result()
result = self.construct_result(name=name, doc=self.satisfiable.__doc__, result=_satisfiable)
return result

@metric_method
Expand Down Expand Up @@ -154,7 +154,7 @@ def configurations(self) -> dict[str, Any]:
if self.model is None:
raise FlamaException('Model not initialized.')
name = "Configurations"
_configurations = sat_operations.PySATProducts().execute(self.model).get_result()
_configurations = sat_operations.PySATConfigurations().execute(self.model).get_result()
result = self.construct_result(name=name,
doc=self.configurations.__doc__,
result=_configurations,
Expand Down

0 comments on commit 5452a2b

Please sign in to comment.