diff --git a/src/translate/constraints.py b/src/translate/constraints.py index ed13be64a2..c5a80b59dc 100644 --- a/src/translate/constraints.py +++ b/src/translate/constraints.py @@ -163,7 +163,8 @@ def inequality_disjunction_ok(ineq_disj, representative): # inequality disjunction there is an inequality where the two terms # are in different equivalence classes. representative = combined.get_representative() - if any(representative.get(s,s)[0] != "?" for s in self.not_constant): + if any(representative.get(s, s)[0] != "?" + for s in self.not_constant): continue for ineq_disjunction in self.ineq_disjunctions: if not inequality_disjunction_ok(ineq_disjunction, diff --git a/src/translate/invariant_finder.py b/src/translate/invariant_finder.py index 14993849a1..d771233ac0 100755 --- a/src/translate/invariant_finder.py +++ b/src/translate/invariant_finder.py @@ -129,7 +129,7 @@ def useful_groups(invariants, initial_facts): inv_vars = [f"?@v{i}" for i in range(invariant.arity())] parameters_tuple = tuple((var, parameters[var]) for var in inv_vars) - + parameters_tuple = tuple(sorted(x for x in parameters.items())) group_key = (invariant, parameters_tuple) if group_key not in nonempty_groups: