in rules/predicate.py [0:0]
def implies(self, other):
if self.name != other.name:
return False
if self.op == other.op and self.val == other.val:
return True
if self.op == ">":
if other.op == ">" or other.op == "!=":
return self.val > other.val
else:
return False
if self.op == "<=":
if other.op == "<=" or other.op == "!=":
return self.val <= other.val
else:
return False
if self.op == "==":
if other.op == ">":
return self.val > other.val
if other.op == "<=":
return self.val <= other.val
return False
if self.op == "!=":
return False
raise Exception("attribute type not supported" + self.op)