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


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


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


predicate(write/1,35,static,private,built_in,[
    put_atom(write,1),
    put_integer(1,2),
    call_c('Set_Bip_Name_2',[1,2]),
    call_c('Write_1',[0]),
    proceed]).


predicate(write/2,39,static,private,built_in,[
    put_atom(write,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c('Write_2',[0,1]),
    proceed]).


predicate(writeq/1,46,static,private,built_in,[
    put_atom(writeq,1),
    put_integer(1,2),
    call_c('Set_Bip_Name_2',[1,2]),
    call_c('Writeq_1',[0]),
    proceed]).


predicate(writeq/2,50,static,private,built_in,[
    put_atom(writeq,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c('Writeq_2',[0,1]),
    proceed]).


predicate(write_canonical/1,57,static,private,built_in,[
    put_atom(write_canonical,1),
    put_integer(1,2),
    call_c('Set_Bip_Name_2',[1,2]),
    call_c('Write_Canonical_1',[0]),
    proceed]).


predicate(write_canonical/2,61,static,private,built_in,[
    put_atom(write_canonical,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c('Write_Canonical_2',[0,1]),
    proceed]).


predicate(display/1,68,static,private,built_in,[
    put_atom(display,1),
    put_integer(1,2),
    call_c('Set_Bip_Name_2',[1,2]),
    call_c('Display_1',[0]),
    proceed]).


predicate(display/2,72,static,private,built_in,[
    put_atom(display,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c('Display_2',[0,1]),
    proceed]).


predicate(write_term/2,96,static,private,built_in,[
    allocate(2),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_atom(write_term,0),
    put_integer(2,1),
    call_c('Set_Bip_Name_2',[0,1]),
    call('$set_write_defaults'/0),
    put_value(y(1),0),
    call('$get_write_options'/1),
    put_value(y(0),0),
    call_c('Write_Term_1',[0]),
    deallocate,
    proceed]).


predicate(write_term/3,103,static,private,built_in,[
    allocate(3),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    put_atom(write_term,0),
    put_integer(3,1),
    call_c('Set_Bip_Name_2',[0,1]),
    call('$set_write_defaults'/0),
    put_value(y(2),0),
    call('$get_write_options'/1),
    put_value(y(0),0),
    put_value(y(1),1),
    call_c('Write_Term_2',[0,1]),
    deallocate,
    proceed]).


predicate('$set_write_defaults'/0,112,static,private,built_in,[
    allocate(0),
    put_integer(0,0),
    put_integer(12,1),
    call('$sys_var_write'/2),
    put_integer(1,0),
    put_integer(-1,1),
    deallocate,
    execute('$sys_var_write'/2)]).


predicate('$get_write_options'/1,119,static,private,built_in,[
    allocate(1),
    get_variable(y(0),0),
    put_value(y(0),0),
    call('$check_list'/1),
    put_value(y(0),0),
    deallocate,
    execute('$get_write_options1'/1)]).


predicate('$get_write_options1'/1,124,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_write_options2'/1),
    cut(y(1)),
    put_value(y(0),0),
    deallocate,
    execute('$get_write_options1'/1)]).


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

label(1),
    retry_me_else(17),
    switch_on_term(3,fail,fail,fail,2),

label(2),
    switch_on_structure([(quoted/1,4),(ignore_ops/1,6),(numbervars/1,8),(namevars/1,10),(space_args/1,12),(portrayed/1,14),(max_depth/1,16)]),

label(3),
    try_me_else(5),

label(4),
    get_structure(quoted/1,0),
    unify_variable(x(0)),
    call_c_test('Blt_Non_Var',[0]),
    execute('$$get_write_options2/1_$aux1'/1),

label(5),
    retry_me_else(7),

label(6),
    get_structure(ignore_ops/1,0),
    unify_variable(x(0)),
    call_c_test('Blt_Non_Var',[0]),
    execute('$$get_write_options2/1_$aux2'/1),

label(7),
    retry_me_else(9),

label(8),
    get_structure(numbervars/1,0),
    unify_variable(x(0)),
    call_c_test('Blt_Non_Var',[0]),
    execute('$$get_write_options2/1_$aux3'/1),

label(9),
    retry_me_else(11),

label(10),
    get_structure(namevars/1,0),
    unify_variable(x(0)),
    call_c_test('Blt_Non_Var',[0]),
    execute('$$get_write_options2/1_$aux4'/1),

label(11),
    retry_me_else(13),

label(12),
    get_structure(space_args/1,0),
    unify_variable(x(0)),
    call_c_test('Blt_Non_Var',[0]),
    execute('$$get_write_options2/1_$aux5'/1),

label(13),
    retry_me_else(15),

label(14),
    get_structure(portrayed/1,0),
    unify_variable(x(0)),
    call_c_test('Blt_Non_Var',[0]),
    execute('$$get_write_options2/1_$aux6'/1),

label(15),
    trust_me_else_fail,

label(16),
    get_structure(max_depth/1,0),
    unify_variable(x(1)),
    call_c_test('Blt_Integer',[1]),
    put_integer(1,0),
    execute('$sys_var_write'/2),

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


predicate('$$get_write_options2/1_$aux6'/1,166,static,private,built_in,[
    switch_on_term(2,1,fail,fail,fail),

label(1),
    switch_on_atom([(false,3),(true,5)]),

label(2),
    try_me_else(4),

label(3),
    get_atom(false,0),
    put_integer(0,0),
    put_integer(5,1),
    execute('$sys_var_reset_bit'/2),

label(4),
    trust_me_else_fail,

label(5),
    get_atom(true,0),
    put_integer(0,0),
    put_integer(5,1),
    execute('$sys_var_set_bit'/2)]).


predicate('$$get_write_options2/1_$aux5'/1,160,static,private,built_in,[
    switch_on_term(2,1,fail,fail,fail),

label(1),
    switch_on_atom([(false,3),(true,5)]),

label(2),
    try_me_else(4),

label(3),
    get_atom(false,0),
    put_integer(0,0),
    put_integer(4,1),
    execute('$sys_var_reset_bit'/2),

label(4),
    trust_me_else_fail,

label(5),
    get_atom(true,0),
    put_integer(0,0),
    put_integer(4,1),
    execute('$sys_var_set_bit'/2)]).


predicate('$$get_write_options2/1_$aux4'/1,154,static,private,built_in,[
    switch_on_term(2,1,fail,fail,fail),

label(1),
    switch_on_atom([(false,3),(true,5)]),

label(2),
    try_me_else(4),

label(3),
    get_atom(false,0),
    put_integer(0,0),
    put_integer(3,1),
    execute('$sys_var_reset_bit'/2),

label(4),
    trust_me_else_fail,

label(5),
    get_atom(true,0),
    put_integer(0,0),
    put_integer(3,1),
    execute('$sys_var_set_bit'/2)]).


predicate('$$get_write_options2/1_$aux3'/1,148,static,private,built_in,[
    switch_on_term(2,1,fail,fail,fail),

label(1),
    switch_on_atom([(false,3),(true,5)]),

label(2),
    try_me_else(4),

label(3),
    get_atom(false,0),
    put_integer(0,0),
    put_integer(2,1),
    execute('$sys_var_reset_bit'/2),

label(4),
    trust_me_else_fail,

label(5),
    get_atom(true,0),
    put_integer(0,0),
    put_integer(2,1),
    execute('$sys_var_set_bit'/2)]).


predicate('$$get_write_options2/1_$aux2'/1,142,static,private,built_in,[
    switch_on_term(2,1,fail,fail,fail),

label(1),
    switch_on_atom([(false,3),(true,5)]),

label(2),
    try_me_else(4),

label(3),
    get_atom(false,0),
    put_integer(0,0),
    put_integer(1,1),
    execute('$sys_var_reset_bit'/2),

label(4),
    trust_me_else_fail,

label(5),
    get_atom(true,0),
    put_integer(0,0),
    put_integer(1,1),
    execute('$sys_var_set_bit'/2)]).


predicate('$$get_write_options2/1_$aux1'/1,136,static,private,built_in,[
    switch_on_term(2,1,fail,fail,fail),

label(1),
    switch_on_atom([(false,3),(true,5)]),

label(2),
    try_me_else(4),

label(3),
    get_atom(false,0),
    put_integer(0,0),
    put_integer(0,1),
    execute('$sys_var_reset_bit'/2),

label(4),
    trust_me_else_fail,

label(5),
    get_atom(true,0),
    put_integer(0,0),
    put_integer(0,1),
    execute('$sys_var_set_bit'/2)]).


predicate(nl/0,182,static,private,built_in,[
    put_atom(nl,0),
    put_integer(0,1),
    call_c('Set_Bip_Name_2',[0,1]),
    call_c('Nl_0',[]),
    proceed]).


predicate(nl/1,186,static,private,built_in,[
    put_atom(nl,1),
    put_integer(1,2),
    call_c('Set_Bip_Name_2',[1,2]),
    call_c('Nl_1',[0]),
    proceed]).
