UWN
UWN
It seems to be less resource consuming to put `'$term_attributed_variables'(Term, Vs),` into the findall/3, this reclaims the space for `Vs`.
``` copy_term(Term, Copy, Gs) :- can_be(list, Gs), findall(Term-Rs, term_residual_goals(Term,Rs), [Copy-Gs]). term_residual_goals(Term,Rs) :- '$term_attributed_variables'(Term, Vs), phrase(gather_residual_goals(Vs), Rs), '$delete_all_attributes'(Term). % isn't Vs better?
What about the deeper question, whether or not `findall/3` should copy attributes at all. So far, SICStus never copies constraints and for those who need it, `copy_term/3` was provided. That...
Here is an even odder phenomenon: ``` ?- [user]. q("abcdefghijklmnopqrstuvwxyz"). q(E+t):-q(E). ?- q(L). L = "abcdefghijklmnopqrs ..." ; L = "abcdefghijklmnopqr ..."+t % does this make sense? And all below...
Just a general remark: I do not test GNU any further for its clpfd-extension as this issue here is not fixed.
An error for `0/0` does not make sense. Other systems just fixed this as SICStus [withdrew 4.3.4](http://www.complang.tuwien.ac.at/ulrich/sicstus-prolog/), and SWI (at [that time](http://www.complang.tuwien.ac.at/ulrich/swi-prolog/item3addendumORIG)) alike.
UWN_blocking
I hate this, it seems to be undefined.
(Maybe it is possible to define a meaning for it. But in any case, existing implementations uncover here the loop behind)
SICStus: ``` | ?- S=[[S|B]|A],Tbis=[S|B],T=[[T|A]|B],Tbis==T. S = [[[[...|B]|A]|B]|A], Tbis = [[[[...|A]|B]|A]|B], T = [[[[...|A]|B]|A]|B] ? yes | ?- S=[[S|B]|A],Tbis=[S|B],T=[[T|A]|B],term_variables(T,TVs),term_variables(Tbis,TbisVs). S = [[[[...|B]|A]|B]|A], Tbis = [[[[...|A]|B]|A]|B], T = [[[[...|A]|B]|A]|B], TVs =...