Hi, Consider this: main :- (for(N, 4, 6), fromto(0, Sprev, Scurr, S) do findall(X, (model(N, X, Digits), find(X, Digits)), Sols), eclipse_language:sum(Sols, Si), Scurr is Sprev + Si), writeln(S). My understanding that this is equivalent to the case when model/3 is called outside of findall, because findall undoes all changes: main :- (for(N, 4, 6), fromto(0, Sprev, Scurr, S) do model(N, X, Digits), findall(X, find(X, Digits), Sols), eclipse_language:sum(Sols, Si), Scurr is Sprev + Si), writeln(S). And these two mains give the same results when I use lib(ic) for my models. But results are different when I use lib(gfd). Could it be a bug in lib(gfd) or I missed something? My current ECLiPSe version is 6.1 #174 (x86_64_linux). I've attached the whole program. Sergey.
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:21 CEST