diff --git a/flamapy/metamodels/pysat_metamodel/transformations/dimacs_reader.py b/flamapy/metamodels/pysat_metamodel/transformations/dimacs_reader.py index a0cd78a..655d7b0 100644 --- a/flamapy/metamodels/pysat_metamodel/transformations/dimacs_reader.py +++ b/flamapy/metamodels/pysat_metamodel/transformations/dimacs_reader.py @@ -28,13 +28,13 @@ def transform(self) -> PySATModel: else: clauses_lines.append(line) if problem is None: - raise FlamaException(f'Incorrect Dimacs format of {self.path}') + raise FlamaException(f'Incorrect Dimacs format of {self.path}. No problem statement.') problem_list = problem.split() n_features = int(problem_list[2]) n_clauses = int(problem_list[3]) - if n_features != len(features_lines) or n_clauses != len(clauses_lines): - raise FlamaException(f'Incorrect Dimacs format of {self.path}') + if n_clauses != len(clauses_lines): + raise FlamaException(f'Incorrect Dimacs format of {self.path}. Inconsistent number of clauses.') features, variables = self._parse_features_variables(features_lines) sat_model = PySATModel() sat_model.features = features