bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistent result with GnuProlo / Ubuntu 10.04/64 bits


From: Zyx
Subject: Re: Inconsistent result with GnuProlo / Ubuntu 10.04/64 bits
Date: Tue, 27 Jul 2010 07:28:26 -0700 (PDT)


I downloaded the source from gprolog.org and compiled  it. 
No more problem with the new  binary (1.3.1).
I installed the previous version directly with apt (from an Ubuntu
repository), may be it was a 32 bits version and that's the reason of the
problem.




Zyx wrote:
> 
> Hi,
> I've got inconsistent results with gnu Prolog, with a simple nqueens
> program:
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
> queens(N,L):-
>       length(L,N),fd_domain(L,1,N) ,
>       fd_all_different(L),correct(L),
>       fd_labelingff(L).
> 
> correct([]).
> correct([X|L]):-
>       safe_diag_fd(X,L,1),correct(L).
> 
> safe_diag_fd(X,[],_).
> safe_diag_fd(X,[Y|L],D):-
>        Y-X #\= D,
>        X-Y #\= D,
>        D1 is D+1,
>        safe_diag_fd(X,L,D1).
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> For queens(32,L) , I have duplicate values in the list, and sometimes -1
> in the following answers:
> | ?- queens(32,L).
> L =
> [1,3,5,16,15,4,10,7,13,16,22,15,6,17,19,21,8,25,2,16,27,28,9,18,20,14,11,13,10,2,2,12]
> ? 
> yes
> | ?- queens(32,L),sort0(L).
> L =
> [1,2,2,2,3,4,5,6,7,8,9,10,10,11,12,13,13,14,15,15,16,16,16,17,18,19,20,21,22,25,27,28]
> ? ;
> L =
> [-1,1,2,2,3,4,5,6,7,8,9,10,10,11,12,13,13,14,15,15,16,16,16,17,18,19,20,21,22,25,27,28]
> ? ;
> L =
> [-1,1,2,2,3,4,5,6,7,8,9,10,10,11,12,13,13,14,15,15,16,16,16,17,18,19,20,21,22,25,27,28]
> ? 
> 
> I'm running gnuProlog 1.3.0 under Ubuntu 10.04 / 64 bits. Don't seem to
> have the same problem on another computer under Debian Lenny.
> 
> Any suggestion?
> Regards,
> Steve.
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Inconsistent-result-with-GnuProlo---Ubuntu-10.04-64-bits-tp29276860p29276985.html
Sent from the Gnu - Prolog - Bugs mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]