% compiler: GNU Prolog 1.1.6 (Apr 13 2000)
% file    : pretty.pl
% date    : 4 17 2000
% time    : 2:15:52


file_name('C:\\GNU-Prolog\\src\\BipsPl\\pretty.pl').


predicate('$use_pretty'/0,27,static,private,built_in,[
    proceed]).


predicate(portray_clause/1,30,static,private,built_in,[
    try_me_else(1),
    allocate(1),
    get_variable(y(0),0),
    put_value(y(0),0),
    put_integer(1,1),
    call('$portray_clause'/2),
    put_value(y(0),0),
    call_c('Portray_Clause_1',[0]),
    fail,

label(1),
    trust_me_else_fail,
    proceed]).


predicate(portray_clause/2,40,static,private,built_in,[
    try_me_else(1),
    allocate(2),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_value(y(1),0),
    put_integer(2,1),
    call('$portray_clause'/2),
    put_value(y(0),0),
    put_value(y(1),1),
    call_c('Portray_Clause_2',[0,1]),
    fail,

label(1),
    trust_me_else_fail,
    proceed]).


predicate('$portray_clause'/2,50,static,private,built_in,[
    allocate(2),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_atom(portray_clause,0),
    put_value(y(1),1),
    call(set_bip_name/2),
    put_value(y(0),0),
    call('$$portray_clause/2_$aux1'/1),
    put_value(y(0),0),
    call('$$portray_clause/2_$aux2'/1),
    put_value(y(0),0),
    call(name_singleton_vars/1),
    put_value(y(0),0),
    call(numbervars/1),
    put_atom(portray_clause,0),
    put_value(y(1),1),
    deallocate,
    execute(set_bip_name/2)]).


predicate('$$portray_clause/2_$aux2'/1,50,static,private,built_in,[
    load_cut_level(1),
    try_me_else(1),
    call_c_test('Blt_Callable',[0]),
    cut(x(1)),
    proceed,

label(1),
    trust_me_else_fail,
    put_value(x(0),1),
    put_atom(callable,0),
    execute('$pl_err_type'/2)]).


predicate('$$portray_clause/2_$aux1'/1,50,static,private,built_in,[
    load_cut_level(1),
    try_me_else(1),
    call_c_test('Blt_Var',[0]),
    cut(x(1)),
    execute('$pl_err_instantiation'/0),

label(1),
    trust_me_else_fail,
    proceed]).


predicate(name_singleton_vars/1,63,static,private,built_in,[
    put_atom(name_singleton_vars,1),
    put_integer(1,2),
    call_c('Set_Bip_Name_2',[1,2]),
    call_c('Name_Singleton_Vars_1',[0]),
    proceed]).


predicate(name_query_vars/2,70,static,private,built_in,[
    put_atom(name_query_vars,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Name_Query_Vars_2',[0,1]),
    proceed]).


predicate(bind_variables/2,79,static,private,built_in,[
    allocate(5),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_atom(bind_variables,0),
    put_integer(2,1),
    call_c('Set_Bip_Name_2',[0,1]),
    call('$set_bind_variables_defaults'/0),
    put_value(y(1),0),
    put_variable(y(2),1),
    put_variable(y(3),2),
    put_variable(y(4),3),
    call('$get_bind_variables_options'/4),
    put_value(y(0),0),
    put_unsafe_value(y(2),1),
    put_unsafe_value(y(3),2),
    put_unsafe_value(y(4),3),
    deallocate,
    execute('$bind_variables'/4)]).


predicate('$bind_variables'/4,86,static,private,built_in,[
    call_c_test('Bind_Variables_4',[0,1,2,3]),
    proceed]).


predicate('$set_bind_variables_defaults'/0,92,static,private,built_in,[
    put_integer(0,0),
    put_integer(0,1),
    execute('$sys_var_write'/2)]).


predicate('$get_bind_variables_options'/4,98,static,private,built_in,[
    allocate(4),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    get_variable(y(3),3),
    put_value(y(0),0),
    call('$check_list'/1),
    put_atom('$bind_exclude',0),
    put_nil(1),
    call_c_test('Blt_G_Link',[0,1]),
    put_atom('$bind_from',0),
    put_integer(0,1),
    call_c_test('Blt_G_Link',[0,1]),
    put_atom('$bind_next',0),
    put_void(1),
    call_c_test('Blt_G_Link',[0,1]),
    put_value(y(0),0),
    call('$get_bind_variables_options1'/1),
    put_atom('$bind_exclude',0),
    put_value(y(1),1),
    call_c_test('Blt_G_Read',[0,1]),
    put_atom('$bind_from',0),
    put_value(y(2),1),
    call_c_test('Blt_G_Read',[0,1]),
    put_atom('$bind_next',0),
    put_value(y(3),1),
    call_c_test('Blt_G_Read',[0,1]),
    deallocate,
    proceed]).


predicate('$get_bind_variables_options1'/1,109,static,private,built_in,[
    load_cut_level(1),
    switch_on_term(1,2,fail,4,fail),

label(1),
    try_me_else(3),

label(2),
    get_nil(0),
    proceed,

label(3),
    trust_me_else_fail,

label(4),
    allocate(2),
    get_list(0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_variable(y(1),1),
    call('$get_bind_variables_options2'/1),
    cut(y(1)),
    put_value(y(0),0),
    deallocate,
    execute('$get_bind_variables_options1'/1)]).


predicate('$get_bind_variables_options2'/1,117,static,private,built_in,[
    try_me_else(1),
    call_c_test('Blt_Var',[0]),
    execute('$pl_err_instantiation'/0),

label(1),
    retry_me_else(14),
    switch_on_term(4,2,fail,fail,3),

label(2),
    switch_on_atom([(numbervars,11),(namevars,13)]),

label(3),
    switch_on_structure([(exclude/1,5),(from/1,7),(next/1,9)]),

label(4),
    try_me_else(6),

label(5),
    get_structure(exclude/1,0),
    unify_variable(x(1)),
    put_atom('$bind_exclude',0),
    call_c_test('Blt_G_Link',[0,1]),
    proceed,

label(6),
    retry_me_else(8),

label(7),
    get_structure(from/1,0),
    unify_variable(x(1)),
    put_atom('$bind_from',0),
    call_c_test('Blt_G_Link',[0,1]),
    proceed,

label(8),
    retry_me_else(10),

label(9),
    get_structure(next/1,0),
    unify_variable(x(1)),
    put_atom('$bind_next',0),
    call_c_test('Blt_G_Link',[0,1]),
    proceed,

label(10),
    retry_me_else(12),

label(11),
    get_atom(numbervars,0),
    put_integer(0,0),
    put_integer(0,1),
    execute('$sys_var_write'/2),

label(12),
    trust_me_else_fail,

label(13),
    get_atom(namevars,0),
    put_integer(0,0),
    put_integer(1,1),
    execute('$sys_var_write'/2),

label(14),
    trust_me_else_fail,
    put_value(x(0),1),
    put_atom(var_binding_option,0),
    execute('$pl_err_domain'/2)]).


predicate(numbervars/1,142,static,private,built_in,[
    allocate(1),
    get_variable(y(0),0),
    put_atom(numbervars,0),
    put_integer(1,1),
    call_c('Set_Bip_Name_2',[0,1]),
    call('$set_bind_variables_defaults'/0),
    put_value(y(0),0),
    put_nil(1),
    put_integer(0,2),
    put_void(3),
    deallocate,
    execute('$bind_variables'/4)]).


predicate(numbervars/3,148,static,private,built_in,[
    allocate(3),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    put_atom(numbervars,0),
    put_integer(3,1),
    call_c('Set_Bip_Name_2',[0,1]),
    call('$set_bind_variables_defaults'/0),
    put_value(y(0),0),
    put_nil(1),
    put_value(y(1),2),
    put_value(y(2),3),
    deallocate,
    execute('$bind_variables'/4)]).
