Hello all,
I know that Gprolog does not handle negative intergers.
However, someone could tell me why gprolog rejects vilently this :
?- fd_domain(I,1,4), fd_element(I,[12, 5, -7,9], X).
Fatal Error: Segmentation Violation
Ok, she does not like my -7.
But with :
X #= -1.
I get just (gently)
no.
PS : the original resuest was :
?- fd_domain([S1, S2], 1, 7), S1 #=S2 +X, fd_domain(I,1,4),
fd_element(I,[-1,-2,1,2], X), fd_labeling([S1,S2]).
I'm trying to get S1 and S2 (2 days of a week) being two consecutive
days or with a difference of 2 .
An elegant way to this in gprolog (a short one is wellcome : I'm trying
to illustratre CLP power in an introduction).
Thanks.
Alex
--
Aleksander S. Saidi
Maître de Conférences
Ecole Centrale de Lyon
Département Mathématiques-Informatique
Mél : [EMAIL PROTECTED]
Tél : 04.72.18.65.30, Fax : 04.78.33.16.15
begin:vcard
fn:A-S Saidi
n:A-S Saidi;A-S
org:Ecole Centrale de Lyon;LIRIS- UMR 5205 CNRS
email;internet:[EMAIL PROTECTED]
title;quoted-printable:Ma=C3=AEtre de Conf=C3=A9rences
tel;work:04 72 18 65 30
tel;fax:04 78 33 16 15
x-mozilla-html:TRUE
version:2.1
end:vcard
_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog