Re:

From: Warwick Harvey <wh_at_icparc.ic.ac.uk>
Date: Thu 10 May 2001 03:18:50 PM GMT
Message-ID: <3AFAB15A.53E2F519@icparc.ic.ac.uk>
Hi Eric,

Yes, this is a bug in the compiler (which is currently being completely
rewritten, in part to make it more maintainable --- currently it's very
difficult to fix these kinds of bugs).  To work around the problem, the
trick is to insert a `true' before the cut in the 4th clause (see
below).  This turns off various optimisations, including the buggy one
causing your problem.

Cheers,
Warwick

> :- lib(fd).
> 
> list([_|_]).
> 
> agrege_prefs(_, [], C, C) :- !.
> agrege_prefs(A, C, [], [[A|C]]) :-
>  atom(A), !.
> agrege_prefs(A, C, [], [[M|C]]) :-
>  list(A), !, fd:(M::A).
> agrege_prefs(U, New, [[U|Old]|Rest], [[U|All]|Rest]) :-
   true,	% Avoid compiler bug
>  !,
>  append(New, Old, All).
> agrege_prefs(U, New, [X|Rest], [X|Next]) :-
>  agrege_prefs(U, New, Rest, Next).
Received on Thu May 10 16:18:52 2001

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