% compiler: GNU Prolog 1.4.2
% file    : all_solut.pl


file_name('/home/diaz/GP/src/src/BipsPl/all_solut.pl').


predicate('$use_all_solut'/0,42,static,private,monofile,built_in,[
    proceed]).


predicate(findall/3,45,static,private,monofile,built_in,[
    put_atom(findall,3),
    execute('$findall'/4)]).


predicate('$findall'/4,48,static,private,monofile,built_in,[
    allocate(5),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    get_variable(y(3),3),
    put_value(y(2),0),
    put_value(y(3),1),
    call('$check_list_arg'/2),
    put_value(y(0),0),
    put_value(y(1),1),
    put_variable(y(4),2),
    put_value(y(3),3),
    call('$store_solutions'/4),
    put_unsafe_value(y(4),0),
    put_integer(0,1),
    put_value(y(2),2),
    deallocate,
    call_c('Pl_Recover_Solutions_2',[boolean],[x(0),x(1),x(2)]),
    proceed]).


predicate(setof/3,56,static,private,monofile,built_in,[
    allocate(3),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    put_value(y(2),0),
    put_atom(setof,1),
    call('$check_list_arg'/2),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    put_atom(setof,3),
    deallocate,
    execute('$bagof'/4)]).


predicate(bagof/3,64,static,private,monofile,built_in,[
    allocate(3),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    put_value(y(2),0),
    put_atom(bagof,1),
    call('$check_list_arg'/2),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    put_atom(bagof,3),
    deallocate,
    execute('$bagof'/4)]).


predicate('$bagof'/4,69,static,private,monofile,built_in,[
    pragma_arity(5),
    get_current_choice(x(4)),
    try_me_else(1),
    allocate(5),
    get_variable(y(0),2),
    get_variable(y(1),3),
    get_variable(x(3),1),
    get_variable(x(2),0),
    put_variable(x(1),0),
    put_variable(y(2),5),
    call_c('Pl_Free_Variables_4',[boolean],[x(2),x(3),x(0),x(5)]),
    cut(x(4)),
    put_structure((-)/2,0),
    unify_local_value(y(2)),
    unify_local_value(x(2)),
    put_variable(y(3),2),
    put_value(y(1),3),
    call('$store_solutions'/4),
    put_value(y(1),0),
    put_integer(3,1),
    call_c('Pl_Set_Bip_Name_2',[],[x(0),x(1)]),
    put_value(y(3),0),
    put_integer(1,1),
    put_variable(y(4),2),
    call_c('Pl_Recover_Solutions_2',[boolean],[x(0),x(1),x(2)]),
    put_value(y(1),0),
    put_value(y(4),1),
    call('$$bagof/4_$aux1'/2),
    put_unsafe_value(y(4),0),
    put_unsafe_value(y(2),1),
    put_value(y(0),2),
    deallocate,
    execute('$group_solutions'/3),

label(1),
    trust_me_else_fail,
    allocate(2),
    get_variable(y(0),2),
    get_variable(y(1),3),
    put_variable(x(1),2),
    call_c('Pl_Recover_Generator_1',[],[x(2)]),
    put_value(y(0),2),
    put_value(y(1),3),
    call('$findall'/4),
    put_value(y(0),0),
    put_nil(1),
    call_c('Pl_Blt_Term_Neq',[fast_call,boolean],[x(0),x(1)]),
    put_value(y(1),0),
    put_value(y(0),1),
    deallocate,
    execute('$$bagof/4_$aux2'/2)]).


predicate('$$bagof/4_$aux2'/2,80,static,private,monofile,local,[
    pragma_arity(3),
    get_current_choice(x(2)),
    try_me_else(1),
    get_atom(bagof,0),
    cut(x(2)),
    proceed,

label(1),
    trust_me_else_fail,
    put_value(x(1),0),
    execute(sort/1)]).


predicate('$$bagof/4_$aux1'/2,69,static,private,monofile,local,[
    pragma_arity(3),
    get_current_choice(x(2)),
    try_me_else(1),
    get_atom(bagof,0),
    cut(x(2)),
    put_value(x(1),0),
    execute(keysort/1),

label(1),
    trust_me_else_fail,
    put_value(x(1),0),
    execute(sort/1)]).


predicate('$store_solutions'/4,92,static,private,monofile,built_in,[
    get_variable(x(4),2),
    get_variable(x(2),0),
    call_c('Pl_Stop_Mark_1',[],[x(4)]),
    put_value(x(1),0),
    put_value(x(3),1),
    execute('$$store_solutions/4_$aux1'/3)]).


predicate('$$store_solutions/4_$aux1'/3,92,static,private,monofile,local,[
    try_me_else(1),
    allocate(1),
    get_variable(y(0),2),
    put_integer(3,2),
    put_atom(true,3),
    call('$call'/4),
    put_value(y(0),0),
    call_c('Pl_Store_Solution_1',[],[x(0)]),
    fail,

label(1),
    trust_me_else_fail,
    proceed]).


predicate('$group_solutions'/3,103,static,private,monofile,built_in,[
    call_c('Pl_Group_Solutions_3',[boolean],[x(0),x(1),x(2)]),
    proceed]).


predicate('$group_solutions_alt'/0,106,static,private,monofile,built_in,[
    call_c('Pl_Group_Solutions_Alt_0',[boolean],[]),
    proceed]).


predicate('$check_list_arg'/2,114,static,private,monofile,built_in,[
    put_integer(3,2),
    call_c('Pl_Set_Bip_Name_2',[],[x(1),x(2)]),
    execute('$check_list_or_partial_list'/1)]).
