diff --git a/learning/observationtable.py b/learning/observationtable.py index 2fc9db604016c80c2cc05c83c7d9f2b0efa9bbaa..86df935842aec557ecfe51713212b94b924fc85c 100644 --- a/learning/observationtable.py +++ b/learning/observationtable.py @@ -290,7 +290,10 @@ class Table: # priority to hMinus suffixes return newSuffixes else: - return self._isNotReducible(chaos=True) + # If the table is complete, no need to check hPlus (hPlus == hMinus) + if self.getObservableTraces() != set(): + return self._isNotReducible(chaos=True) + return set() def _isNotReducible(self, chaos=False): # function used for filtering rows, we want only those which @@ -428,7 +431,11 @@ class Table: # priority to hMinus suffixes return newSuffixes else: - return self._isNotConsistent(chaos=True) + # If the table is complete, no need to check hPlus (hPlus == hMinus) + if self.getObservableTraces() != set(): + return self._isNotConsistent(chaos=True) + return set() + def _isNotConsistent(self, chaos=False): # get all combinations of rows in S, with repetitions for hPlus