Do not force value in OR-ed clause

When any other variable in Or-ed clause is not known, we can not force the
value of the variable.

issue9092
review272941002
This commit is contained in:
Cédric Krier committed 2020-03-06 23:14:24 +01:00
1 parent 2b851db71f
commit 47737200fa
1 file changed
+2 -3
+2 -3
View File
@@ -370,9 +370,8 @@ class Or(And):
def inverse(self, symbol, context):
result = []
known_variables = set(context.keys())
if (symbol not in self.variables
and not known_variables >= self.variables):
# In this case we don't know anything about this OR part, we
if not known_variables >= (self.variables - {symbol}):
# In this case we don't know enough about this OR part, we
# consider it to be True (because people will have the constraint
# on this part later).
return True