[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with looping in GETHASH-EQUAL
- To: JERRYB at MIT-AI, BUG-LISPM at MIT-AI
- Subject: Problem with looping in GETHASH-EQUAL
- From: David L. Andre <DLA at MIT-AI>
- Date: Sun ,20 Dec 81 20:50:00 EDT
This problem was introduced when the kludge was added to make
REMHASH-EQUAL store -1's in the previously used slots of
EQUAL-HASH-TABLES. What was happening was that the entire hash table
was filling with -1s, and GETHASH-EQUAL was looping looking for a slot
I (and RG) fixed the problem thus: We made REMHASH-EQUAL smart about
-1s, and now it will store a NIL if possible. Also, it will change
any other -1s to NILs directly below it. Note that in a worst-case (but
extremely unlikely) scenario, the hash table could still fill up with
-1s, so GETHASH-EQUAL now punts if it has searched through the whole table.
PUT/SWAPHASH-EQUAL don't have that problem.
Anyone with better solutions is welcome to implement them.