Skip to content

Commit a14f348

Browse files
committed
BUG: remove erroneous shortcut in find_or_add
1 parent 334307e commit a14f348

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

dd/cudd_add.pyx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,16 +1605,13 @@ cdef class ADD:
16051605
if level >= high.level:
16061606
raise ValueError(
16071607
level, high.level, 'high.level')
1608-
r: DdRef
16091608
index = self._index_of_var[var]
1610-
if high == self.zero:
1611-
r = low.node
1612-
else:
1613-
r = cuddUniqueInter(
1614-
self.manager, index,
1615-
high.node, low.node)
1616-
if r is NULL:
1617-
raise CouldNotCreateNode()
1609+
1610+
r = cuddUniqueInter(
1611+
self.manager, index,
1612+
high.node, low.node)
1613+
if r is NULL:
1614+
raise CouldNotCreateNode()
16181615
f = wrap(self, r)
16191616
if level > f.level:
16201617
raise AssertionError(
@@ -1636,8 +1633,6 @@ cdef class ADD:
16361633
raise AssertionError('`low is NULL`')
16371634
if high is NULL:
16381635
raise AssertionError('`high is NULL`')
1639-
if high == Cudd_ReadZero(self.manager):
1640-
return low
16411636
r = cuddUniqueInter(
16421637
self.manager, index, high, low)
16431638
if r is NULL:

0 commit comments

Comments
 (0)