pyeda
pyeda copied to clipboard
Some simple functions can't be satisfied ?
Very often I get :
In [137]: fa[1]
Out[137]: Or(And(x, q), w)
In [138]: with ~q,~w : print("00> %s" % fa[1].satisfy_one())
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-138-b3b11b8a9e9c> in <module>()
----> 1 with ~q,~w : print("00> %s" % fa[1].satisfy_one())
/usr/local/lib/python3.6/dist-packages/pyeda/boolalg/expr.py in satisfy_one(self)
743 aupnt = _assume2point()
744 soln = _backtrack(self.restrict(aupnt))
--> 745 soln.update(aupnt)
746 return soln
747 else:
AttributeError: 'NoneType' object has no attribute 'update'
In [139]: fa[5]
Out[139]: Xor(Or(x, q), w)
In [140]: with ~q,~w : print("00> %s" % fa[5].satisfy_one())
00> {x: 1, w: 0, q: 0}