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


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


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


predicate(print/1,45,static,private,monofile,built_in,[
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[print,1]),
    call_c('Pl_Print_1',[],[x(0)]),
    proceed]).


predicate(print/2,49,static,private,monofile,built_in,[
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[print,2]),
    call_c('Pl_Print_2',[],[x(0),x(1)]),
    proceed]).


predicate('$try_portray'/1,56,static,private,monofile,built_in,[
    try_me_else(1),
    allocate(1),
    get_variable(y(0),0),
    put_structure((/)/2,0),
    unify_atom(portray),
    unify_integer(1),
    call('$current_predicate'/1),
    put_atom('$portray_ok',0),
    put_integer(0,1),
    call_c('Pl_Blt_G_Assign',[fast_call],[x(0),x(1)]),
    put_structure(format/3,0),
    unify_atom(top_level_output),
    unify_atom('exception from portray/1: ~q~n'),
    unify_list,
    unify_variable(x(1)),
    unify_nil,
    put_structure((',')/2,2),
    unify_value(x(0)),
    unify_atom(fail),
    put_structure(portray/1,3),
    unify_local_value(y(0)),
    put_structure((',')/2,0),
    unify_value(x(3)),
    unify_atom(!),
    put_atom(portray,3),
    put_integer(1,4),
    put_atom(false,5),
    call('$catch'/6),
    put_atom('$portray_ok',0),
    put_integer(1,1),
    call_c('Pl_Blt_G_Assign',[fast_call],[x(0),x(1)]),
    fail,

label(1),
    trust_me_else_fail,
    put_atom('$portray_ok',0),
    put_integer(1,1),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(1)]),
    proceed]).


predicate(get_print_stream/1,69,static,private,monofile,built_in,[
    allocate(1),
    call_c('Pl_Set_Bip_Name_Untagged_2',[by_value],[get_print_stream,1]),
    put_variable(y(0),1),
    call('$check_stream_or_var'/2),
    put_unsafe_value(y(0),0),
    deallocate,
    call_c('Pl_Get_Print_Stm_1',[],[x(0)]),
    proceed]).
