[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FD Solver - incorrect behaviour
From: |
Stephen Meyles |
Subject: |
FD Solver - incorrect behaviour |
Date: |
Tue, 03 Feb 2004 11:19:52 -0800 |
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
- FD Solver - incorrect behaviour,
Stephen Meyles <=