FD Solver - incorrect behaviour

Stephen Meyles <[email protected]>
Newsgroups gmane.comp.gnu.prolog.bugs
Organization BCIT
Message-ID <1075835991.13291.8.camel@tiger>
The following seems to be a bug with the FD solver:

bug(L) :-
	L=[P1,P2,P3,P4,P6,P7,P8,P9],
	fd_domain(L,[2,3,5,7]),
%	uncomment the following line and this works correctly
%	P2#=7,
	P4 * (100 * P3 + 10 * P2 + P1 )
		#= 1000 * P9 + 100 * P8 + 10 * P7 + P6.

With P2 constrained to [2,3,5,7], the predicate returns no.  With it
further constrained to 7 alone, it correctly returns the variable list
suitably constrained.

RH9 Linux (x86, glibc 2.3)
gprolog v1.2.16 (stable) and v1.2.18 (unstable)

Regards

Stephen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.