diff --git a/congress/datalog/unify.py b/congress/datalog/unify.py index 519c1d0ca..a455a93ea 100644 --- a/congress/datalog/unify.py +++ b/congress/datalog/unify.py @@ -63,6 +63,9 @@ class BiUnifier(object): def __eq__(self, other): return self.value == other.value and self.unifer == other.unifier + def __ne__(self, other): + return not self.__eq__(other) + def __repr__(self): return "Value(value={}, unifier={})".format( repr(self.value), repr(self.unifier)) @@ -79,6 +82,9 @@ class BiUnifier(object): def __eq__(self, other): return self.var == other.var and self.unifier == other.unifier + def __ne__(self, other): + return not self.__eq__(other) + def __init__(self, dictionary=None): # each value is a Value self.contents = {} @@ -165,6 +171,9 @@ class BiUnifier(object): def __eq__(self, other): return self.contents == other.contents + def __ne__(self, other): + return not self.__eq__(other) + def binding_str(binding): """Handles string conversion of either dictionary or Unifier."""