%%%[]
%%% 'ASP_to_CHR'([(bot:-not(a)),(bot:-not(e),not(f)),(bot:-not(a),not(b))],'test_13',all_answer_sets,'no_data')
:- use_module(library(chr)).
:- chr_constraint success/0, failure/0, supported_1/0, exclusion_1/0, supported_2/0, exclusion_2/0, supported_3/0, exclusion_3/0, launcher/0, next_it/1, cfc/1, clean_result/0, b/0, out_b/0, f/0, out_f/0, e/0, out_e/0, a/0, out_a/0.
success <=> true.
failure <=> fail.

b,out_b <=> fail.
f,out_f <=> fail.
e,out_e <=> fail.
a,out_a <=> fail.


%% bot:-not(a)
apply_constraint_1 @ supported_1,out_a<=>
   failure.
blocked_1 @ a \ supported_1<=>
   success.
necessity_1 @ supported_1<=>
   exclusion_1.
clean_exclusion_1 @ a \ exclusion_1<=>
   success.

%% bot:-not(e),not(f)
apply_constraint_2 @ supported_2,out_f,out_e<=>
   failure.
blocked_2 @ e \ supported_2<=>
   success.
blocked_2 @ f \ supported_2<=>
   success.
necessity_2 @ supported_2<=>
   exclusion_2.
clean_exclusion_2 @ e \ exclusion_2<=>
   success.
clean_exclusion_2 @ f \ exclusion_2<=>
   success.

%% bot:-not(a),not(b)
apply_constraint_3 @ supported_3,out_b,out_a<=>
   failure.
blocked_3 @ a \ supported_3<=>
   success.
blocked_3 @ b \ supported_3<=>
   success.
necessity_3 @ supported_3<=>
   exclusion_3.
clean_exclusion_3 @ a \ exclusion_3<=>
   success.
clean_exclusion_3 @ b \ exclusion_3<=>
   success.




next_it(_Profondeur), exclusion_1# passive <=> fail.
next_it(_Profondeur), exclusion_2# passive <=> fail.
next_it(_Profondeur), exclusion_3# passive <=> fail.

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

launcher <=> supported_1,supported_2,supported_3,
   next_it(0).

clean_result, out_b # passive <=> clean_result.
clean_result, out_f # passive <=> clean_result.
clean_result, out_e # passive <=> clean_result.
clean_result, out_a # passive <=> clean_result.
clean_result <=> true.




