Beispiel #1
0
 def _eval_apply(self, expr, pred):
     pred_args = [pred.rcall(arg) for arg in expr.args]
     # Technically this is xor, but if one term in the disjunction is true,
     # it is not possible for the remainder to be true, so regular or is
     # fine in this case.
     res = OR(*[AND(pred_args[i], *[~lit for lit in pred_args[:i] +
         pred_args[i+1:]]) for i in range(len(pred_args))])
     return res
Beispiel #2
0
 def _eval_apply(self, expr, pred):
     return OR(*[pred.rcall(arg) for arg in expr.args])