Jan Burse
2013-09-19 10:14:56 UTC
Hi,
I am now running for the first time some CLP(FD)
models in Ciao Prolog! gr8. Take the following
little riddle:
% grocery3(-List)
grocery3(X) :-
X = [A,B,C],
X ins 0..642,
A*B*C #= 6420000,
A+B+C #= 642,
A #>= B, B #>= C,
label(X).
And it doesn't produce a solution, but
aborts with the following error:
{ERROR: bound_div - divison_by_0(9999)}
I guess this is a glitch, since the CLP(FD)
libraries of other Prolog systems don't
produce an error, but the solution:
?- grocery3(X).
X = [375, 160, 107] ;
false.
Bye
I am now running for the first time some CLP(FD)
models in Ciao Prolog! gr8. Take the following
little riddle:
% grocery3(-List)
grocery3(X) :-
X = [A,B,C],
X ins 0..642,
A*B*C #= 6420000,
A+B+C #= 642,
A #>= B, B #>= C,
label(X).
And it doesn't produce a solution, but
aborts with the following error:
{ERROR: bound_div - divison_by_0(9999)}
I guess this is a glitch, since the CLP(FD)
libraries of other Prolog systems don't
produce an error, but the solution:
?- grocery3(X).
X = [375, 160, 107] ;
false.
Bye