cjdrake / pyeda

Python EDA
BSD 2-Clause "Simplified" License
301 stars 55 forks source link

Bug in Expression.satisfy_one with assumptions #151

Open TheKiviest opened 5 years ago

TheKiviest commented 5 years ago

I call satisfy_one with assumptions for expression which is not in CNF form. Then it calls _backtrack here, receives None because restricted expression is unsatisfiable and crashes at next line.

Something like this would fix the problem:

soln = _backtrack(self.restrict(aupnt))
return None if soln is None else soln.update(aupnt)