Re: [eclipse-clp-users] Abort error

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Tue, 15 Nov 2016 15:44:35 +0000
On 14/11/16 02:30, Shrirang Edgaonkar wrote:
> The error occurs only on 32 bit clp version.
>
>     Hi,
>
>     Following is the problem.
>     :-lib(ic).
>     solve(A):-
>     A :: 0 .. 2147483650, A #\= 2147483648.
>
>     It aborts with following error.
>     Abort
>
>     out of range in -(2147483648) + A{ 0 .. 2147483650} #\= 0
>
>     Kindly let me know the reason for the error.

As you may have suspected, the ic library has a bug here that limits
the constant in the disequality constraint to the machine's word size.

You can work around by writing this as

     suspend:(A #\= 2147483648)


As a more general observation: you will never get any kind of
efficiency if you are using discrete domains of this size.
You really need to rethink your problem modelling.


-- Joachim
Received on Tue Nov 15 2016 - 16:11:27 CET

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST