%%%[(1,[(a,0),(b,0),(e,0)]),(2,[(c,0)])]
%%% 'ASP_to_CHR'([(a:-b),a,(b:-a),(c:-b,d),(c:-e,f),d,(e:-f),f],'test_31',all_answer_sets,'no_data')
:- use_module(library(chr)).
:- chr_constraint success/0, failure/0, supported_1/0, supported_2/0, supported_3/0, supported_4/0, supported_5/0, launcher/0, next_it/1, cfc/1, clean_result/0, f/0, e/0, c/0, d/0, a/0, b/0.
success <=> true.
failure <=> fail.
e # passive \ e <=> true.
c # passive \ c <=> true.
a # passive \ a <=> true.
b # passive \ b <=> true.



%% e:-f
propagate_1 @ f==>
   e.

%% b:-a
propagate_2 @ a==>
   b.

%% a:-b
propagate_3 @ b==>
   a.

%% c:-e,f
supported_4 @ f,e==>
   true | 
   supported_4.
unuseful_4 @ c \ supported_4<=>
   success.
propagate_4 @ supported_4<=>
   c.

%% c:-b,d
supported_5 @ d,b==>
   true | 
   supported_5.
unuseful_5 @ c \ supported_5<=>
   success.
propagate_5 @ supported_5<=>
   c.





success @ next_it(_Profondeur) <=> clean_result, chr_show_store(user),  write("--"), nl, fail.

launcher <=> d, f, a, 
   next_it(0).

clean_result <=> true.




