Re: bug in ECLiPSe 4.1.0

From: Warwick Harvey <wh_at_icparc.ic.ac.uk>
Date: Thu 15 Nov 2001 12:36:07 AM GMT
Message-ID: <20011115003606.B21055@tempest.icparc.ic.ac.uk>
Hi Tony,

On Wed, Nov 14, 2001 at 06:03:19PM -0600, Tony Kusalik wrote:
> the following bug exists in ECLiPSe 4.1.0.  I was wondering if it
> persists in later versions of ECLiPSe.
> 
> [eclipse 1]: use_module( library( fd ) ).
>   . 
>   .
>   . 
> 
> [eclipse 2]: 420 #= N * 210.
> 
> N = 2
> yes.
> [eclipse 3]: 440 #= N * 220.
> 
> no (more) solution.
> [eclipse 4]:

Yes, it does.  The problem is integer overflow: 220 times the default FD
bounds overlows a 32-bit integer.  I believe this kind of problem occurs
with most finite domain solvers (though that's no excuse :).  One
work-around would be to apply some reasonable bounds to N before doing the
calculation.  Another solution may be to use the new IC library (a hybrid
finite domain / floating point interval solver):

Version 5.2 #10, Tue Jun 26 02:14 2001
[eclipse 1]: lib(ic).
...
[eclipse 2]: 420 #= N * 210.

N = 2
Yes (0.00s cpu)
[eclipse 3]: 440 #= N * 220.

N = 2
Yes (0.00s cpu)
[eclipse 4]:

Unfortunately, even in the upcoming 5.3 release (due before the end of the
month), IC is not a complete replacement for FD, since the global
constraints have not been ported yet.  But it's getting close, and may be
sufficient for your needs.

Note that we have no plans to fix any bugs in FD (unless the fix is
trivial), since once IC is complete we plan to phase the FD library out.

Cheers,
Warwick
Received on Thu Nov 15 00:38:00 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:11 PM GMT GMT