memory = (( AccumulateMemory )object).betaMemory;
} else {
memory = ( BetaMemory ) object;
}
Iterator it = memory.getLeftTupleMemory().iterator();
for ( LeftTuple leftTuple = (LeftTuple) it.next(); leftTuple != null; leftTuple = (LeftTuple) it.next() ) {
leftTuple.unlinkFromLeftParent();
leftTuple.unlinkFromRightParent();
}
it = memory.getRightTupleMemory().iterator();
for ( RightTuple rightTuple = (RightTuple) it.next(); rightTuple != null; rightTuple = (RightTuple) it.next() ) {
if ( rightTuple.getBlocked() != null ) {
// special case for a not, so unlink left tuple from here, as they aren't in the left memory
for ( LeftTuple leftTuple = (LeftTuple)rightTuple.getBlocked(); leftTuple != null; ) {
LeftTuple temp = leftTuple.getBlockedNext();