- Solved the TERM_Hidden issue for the keys in termMguSubTerm. Yields

cleaner behaviour for MguSubterm.
This commit is contained in:
ccremers 2004-08-20 15:09:49 +00:00
parent d7e49028c1
commit 98bff1e5e2

View File

@ -23,6 +23,8 @@
*/
int mgu_match = 0;
extern Term TERM_Hidden;
void
showSubst (Term t)
{
@ -309,8 +311,12 @@ termMguSubTerm (Term t1, Term t2, int (*iterator) (),
Termlist keylist_new;
Term newkey;
keylist_new = termlistShallow (keylist);
newkey = inverseKey (inverses, t2->right.key);
// We can never produce the TERM_Hidden key, thus, this is not a valid iteration.
if (!isTermEqual (newkey, TERM_Hidden))
{
keylist_new = termlistShallow (keylist);
keylist_new = termlistAdd (keylist_new, newkey);
// Recurse
@ -319,6 +325,7 @@ termMguSubTerm (Term t1, Term t2, int (*iterator) (),
keylist_new);
termlistDelete (keylist_new);
}
termDelete (newkey);
}
}