[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
discrepancy between platforms
From: |
Timothy Perrigo |
Subject: |
discrepancy between platforms |
Date: |
Wed, 9 Feb 2005 14:52:49 -0600 |
Using gprolog version 1.2.16 on Mac OS X 10.3.7 (gcc version 3.3), the
following program fails to return a solution
sendmore([S,E,N,D], [M,O,R,E], [M,O,N,E,Y]) :-
fd_domain([S,E,N,D,M,O,R,Y], 0, 9),
fd_all_different([S,E,N,D,M,O,R,Y]),
S #\= 0,
M #\= 0,
Send #= 1000*S + 100*E + 10*N + D,
More #= 1000*M + 100*O + 10*R + E,
Money #= 10000*M + 1000*O + 100*N + 10*E + Y,
Send + More #= Money,
fd_labeling([S,E,N,D,M,O,R,Y]).
test(A, B, C) :-
statistics(runtime,_),
sendmore(A,B,C), statistics(runtime,[_,Y]),
write('time : '), write(Y), nl.
| ?- test(A,B,C).
no
| ?-
The same program runs successfully on a windows machine, however. A
trace revealed that the call to fd_labelling fails (same behavior with
fd_labellingff). Am I missing something, or is there a problem with
the OS X version?
Tim
- discrepancy between platforms,
Timothy Perrigo <=