Hello, I would like to know if it is possible to stop the execution of labeling ? here is an example : :-lib(fd). domaine(V):- V=[A,B], A::0..5, B::0..5, labeling(V). sol(V):- V=[A,B], A::0..5, B::0..5, A#>=4, B#<=5, labeling(V). test1(X,LSol):-findall(V,sol(V),LSol), domaine(X), member(X,LSol). test1(X,L) returns me : [4,0], [4,1], ..., [5,5] for X because of, I suppose, the labeling. So I would like the predicate to stop when it detects that X is not a member of LSol (for example : member(X,LSol) when domaine(X) returns [0,0]) I try the following : test2(X,LSol):-findall(V,sol(V),LSol), domaine(X), ((not(member(X,LSol))-> write(X),abort). but I use Java and java doesn't take the control. Thanks for your suggestions. Olivier _________________________________________________________________ Téléchargez MSN Explorer gratuitement à l'adresse http://explorer.msn.fr/intl.aspReceived on Thu Nov 08 14:26:31 2001
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:11 PM GMT GMT