Re: clp problem w/ gnu prolog



% This doesn't work the same.
test2(L) :-
fd_domain(L,1,4),
findall(V1,(for(C1,1,2),nth(C1,L,V1)),As),
findall(V2,(for(C2,3,4),nth(C2,L,V2)),Bs),
fd_all_different(As),
fd_all_different(Bs),
fd_labeling(L).

| ?- length(L,4),test2(L).
L = [1,1,1,1] ?


You get this result because the constraints are on As and Bs, which contain
copies of variables of those in L.

--nf


.