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


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


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


predicate(asserta/1,45,static,private,monofile,built_in,[
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[asserta,1]),
    put_integer(1,1),
    put_integer(1,2),
    put_atom('',3),
    execute('$assert'/4)]).


predicate(assertz/1,52,static,private,monofile,built_in,[
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[assertz,1]),
    put_integer(0,1),
    put_integer(1,2),
    put_atom('',3),
    execute('$assert'/4)]).


predicate('$assert'/4,59,static,private,monofile,built_in,[
    try_me_else(1),
    allocate(6),
    get_variable(y(0),1),
    get_variable(y(1),2),
    get_variable(y(2),3),
    put_variable(y(3),1),
    put_variable(y(4),2),
    call('$get_head_and_body'/3),
    put_value(y(4),0),
    put_atom(none,1),
    put_variable(y(5),2),
    call('$term_to_goal'/3),
    put_unsafe_value(y(3),0),
    put_unsafe_value(y(5),1),
    put_value(y(0),2),
    put_value(y(1),3),
    put_value(y(2),4),
    call_c('Pl_Assert_5',[],[x(0),x(1),x(2),x(3),x(4)]),
    fail,

label(1),
    trust_me_else_fail,
    proceed]).


predicate(retract/1,70,static,private,monofile,built_in,[
    allocate(2),
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[retract,1]),
    put_variable(y(0),1),
    put_variable(y(1),2),
    call('$get_head_and_body'/3),
    put_unsafe_value(y(0),0),
    put_unsafe_value(y(1),1),
    deallocate,
    execute('$retract'/2)]).


predicate('$retract'/2,76,static,private,monofile,built_in,[
    call_c('Pl_Retract_2',[boolean],[x(0),x(1)]),
    proceed]).


predicate(retractall/1,82,static,private,monofile,built_in,[
    pragma_arity(2),
    get_current_choice(x(1)),
    try_me_else(1),
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[retractall,1]),
    call_c('Pl_Retractall_If_Empty_Head_1',[boolean],[x(0)]),
    cut(x(1)),
    proceed,

label(1),
    retry_me_else(2),
    allocate(0),
    put_void(1),
    call('$retract'/2),
    fail,

label(2),
    trust_me_else_fail,
    proceed]).


predicate('$retract_last_found'/0,95,static,private,monofile,built_in,[
    call_c('Pl_Retract_Last_Found_0',[],[]),
    proceed]).


predicate(clause/2,100,static,private,monofile,built_in,[
    allocate(2),
    get_variable(y(0),0),
    get_variable(y(1),1),
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[clause,2]),
    put_value(y(0),0),
    call('$check_head'/1),
    put_value(y(0),0),
    put_value(y(1),1),
    put_integer(0,2),
    deallocate,
    execute('$clause'/3)]).


predicate('$clause'/3,106,static,private,monofile,built_in,[
    call_c('Pl_Clause_3',[boolean],[x(0),x(1),x(2)]),
    proceed]).


predicate('$instance_for_setarg'/2,112,static,private,monofile,built_in,[
    put_integer(0,2),
    call_c('Pl_Clause_3',[boolean],[x(0),x(1),x(2)]),
    proceed]).


predicate('$setarg_in_last_found'/2,115,static,private,monofile,built_in,[
    call_c('Pl_Setarg_Of_Last_Found_2',[],[x(0),x(1)]),
    proceed]).


predicate(abolish/1,120,static,private,monofile,built_in,[
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[abolish,1]),
    call_c('Pl_Abolish_1',[],[x(0)]),
    proceed]).


predicate('$remove_predicate'/2,127,static,private,monofile,built_in,[
    call_c('Pl_Remove_Predicate_2',[],[x(0),x(1)]),
    proceed]).


predicate('$scan_dyn_test_alt'/0,133,static,private,monofile,built_in,[
    call_c('Pl_Scan_Dynamic_Pred_Alt_0',[boolean],[]),
    proceed]).


predicate('$scan_dyn_jump_alt'/0,136,static,private,monofile,built_in,[
    call_c('Pl_Scan_Dynamic_Pred_Alt_0',[jump],[]),
    proceed]).
