// Path: src/com/juliasoft/beedeedee/factories/Factory.java
// public static interface GarbageCollectionListener {
// 
// 	/**
// 	 * Called when a garbage collection operation is about to start.
// 	 * 
// 	 * @param num the progressive number of the garbage collection operation
// 	 * @param size the number of nodes in the garbage collected table
// 	 * @param free the number of free nodes after the operation
// 	 * @param totalTime the cumulative garbage collection time up to now
// 	 */
// 
// 	public void onStart(int num, int size, int free, long totalTime);
// 
// 	/**
// 	 * Called when a garbage collection operation has been performed.
// 	 * 
// 	 * @param num the progressive number of the garbage collection operation
// 	 * @param size the number of nodes in the garbage collected table
// 	 * @param free the number of free nodes after the operation
// 	 * @param time the time required for the garbage collection
// 	 * @param totalTime the cumulative garbage collection time up to now
// 	 */
// 
// 	public void onStop(int num, int size, int free, long time, long totalTime);
// }
// 
// Path: src/com/juliasoft/beedeedee/factories/Factory.java
// public static interface ResizeListener {
// 
// 	/**
// 	 * Called when a resize operation is about to start.
// 	 * 
// 	 * @param num the progressive number of the resize operation
// 	 * @param oldSize the old size of the table
// 	 * @param newSize the new size of the table
// 	 * @param totalTime the cumulative resize time up to now
// 	 */
// 
// 	public void onStart(int num, int oldSize, int newSize, long totalTime);
// 
// 	/**
// 	 * Called when a resize operation has been performed.
// 	 * 
// 	 * @param num the progressive number of the resize operation
// 	 * @param oldSize the old size of the table
// 	 * @param newSize the new size of the table
// 	 * @param time the time required for the resize
// 	 * @param totalTime the cumulative resize time up to now
// 	 */
// 
// 	public void onStop(int num, int oldSize, int newSize, long time, long totalTime);
// }


import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.IntStream;
import com.juliasoft.beedeedee.factories.Factory.GarbageCollectionListener;
import com.juliasoft.beedeedee.factories.Factory.ResizeListener;
					setVarLowHighHash(newCursor, var(oldCursor), newPositions[low(oldCursor)], newPositions[high(oldCursor)], hashCodeAux(oldCursor));

				newPositions[oldCursor] = newCursor++;
				aliveNodes[oldCursor] = false;
			}
			else
				collected++;

		// change indices of external BDD objects
		factory.updateIndicesOfAllBDDsCreatedSoFar(newPositions);

		synchronized (nextPosLock) {
			nextPos -= collected;
		}

		computationCache.clear();
		restrictCache.clear();
		composeCache.clear();
		replaceCache.clear();
		quantCache.clear();
		equivCache.clear();
		rwlCache.clear();
		squeezeEquivCache.clear();

		return collected;
	}

	protected void setVarLowHighHash(int node, int varNumber, int lowNode, int highNode, int hca) {
		int pos = node * getNodeSize();

// Path: src/com/juliasoft/beedeedee/factories/Factory.java
// public static interface GarbageCollectionListener {
// 
// 	/**
// 	 * Called when a garbage collection operation is about to start.
// 	 * 
// 	 * @param num the progressive number of the garbage collection operation
// 	 * @param size the number of nodes in the garbage collected table
// 	 * @param free the number of free nodes after the operation
// 	 * @param totalTime the cumulative garbage collection time up to now
// 	 */
// 
// 	public void onStart(int num, int size, int free, long totalTime);
// 
// 	/**
// 	 * Called when a garbage collection operation has been performed.
// 	 * 
// 	 * @param num the progressive number of the garbage collection operation
// 	 * @param size the number of nodes in the garbage collected table
// 	 * @param free the number of free nodes after the operation
// 	 * @param time the time required for the garbage collection
// 	 * @param totalTime the cumulative garbage collection time up to now
// 	 */
// 
// 	public void onStop(int num, int size, int free, long time, long totalTime);
// }
// 
// Path: src/com/juliasoft/beedeedee/factories/Factory.java
// public static interface ResizeListener {
// 
// 	/**
// 	 * Called when a resize operation is about to start.
// 	 * 
// 	 * @param num the progressive number of the resize operation
// 	 * @param oldSize the old size of the table
// 	 * @param newSize the new size of the table
// 	 * @param totalTime the cumulative resize time up to now
// 	 */
// 
// 	public void onStart(int num, int oldSize, int newSize, long totalTime);
// 
// 	/**
// 	 * Called when a resize operation has been performed.
// 	 * 
// 	 * @param num the progressive number of the resize operation
// 	 * @param oldSize the old size of the table
// 	 * @param newSize the new size of the table
// 	 * @param time the time required for the resize
// 	 * @param totalTime the cumulative resize time up to now
// 	 */
// 
// 	public void onStop(int num, int oldSize, int newSize, long time, long totalTime);
// }


// Path: src/com/juliasoft/beedeedee/factories/ResizingAndGarbageCollectedUniqueTable.java
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.IntStream;
import com.juliasoft.beedeedee.factories.Factory.GarbageCollectionListener;
import com.juliasoft.beedeedee.factories.Factory.ResizeListener;

					setVarLowHighHash(newCursor, var(oldCursor), newPositions[low(oldCursor)], newPositions[high(oldCursor)], hashCodeAux(oldCursor));

				newPositions[oldCursor] = newCursor++;
				aliveNodes[oldCursor] = false;
			}
			else
				collected++;

		// change indices of external BDD objects
		factory.updateIndicesOfAllBDDsCreatedSoFar(newPositions);

		synchronized (nextPosLock) {
			nextPos -= collected;
		}

		computationCache.clear();
		restrictCache.clear();
		composeCache.clear();
		replaceCache.clear();
		quantCache.clear();
		equivCache.clear();
		rwlCache.clear();
		squeezeEquivCache.clear();

		return collected;
	}

	protected void setVarLowHighHash(int node, int varNumber, int lowNode, int highNode, int hca) {
		int pos = node * getNodeSize();

		ut[pos++] = varNumber;