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


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


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


predicate(atom_length/2,30,static,private,built_in,[
    put_atom(atom_length,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Atom_Length_2',[0,1]),
    proceed]).


predicate(atom_concat/3,37,static,private,built_in,[
    put_atom(atom_concat,3),
    put_integer(3,4),
    call_c('Set_Bip_Name_2',[3,4]),
    call_c_test('Atom_Concat_3',[0,1,2]),
    proceed]).


predicate('$atom_concat_alt'/0,41,static,private,built_in,[
    call_c_test('Atom_Concat_Alt_0',[]),
    proceed]).


predicate(sub_atom/5,46,static,private,built_in,[
    put_atom(sub_atom,5),
    put_integer(5,6),
    call_c('Set_Bip_Name_2',[5,6]),
    call_c_test('Sub_Atom_5',[0,1,2,3,4]),
    proceed]).


predicate('$sub_atom_alt'/0,51,static,private,built_in,[
    call_c_test('Sub_Atom_Alt_0',[]),
    proceed]).


predicate(atom_chars/2,57,static,private,built_in,[
    put_atom(atom_chars,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Atom_Chars_2',[0,1]),
    proceed]).


predicate(atom_codes/2,64,static,private,built_in,[
    put_atom(atom_codes,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Atom_Codes_2',[0,1]),
    proceed]).


predicate(number_atom/2,71,static,private,built_in,[
    put_atom(number_atom,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Number_Atom_2',[0,1]),
    proceed]).


predicate(number_chars/2,78,static,private,built_in,[
    put_atom(number_chars,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Number_Chars_2',[0,1]),
    proceed]).


predicate(number_codes/2,85,static,private,built_in,[
    put_atom(number_codes,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Number_Codes_2',[0,1]),
    proceed]).


predicate(char_code/2,92,static,private,built_in,[
    put_atom(char_code,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Char_Code_2',[0,1]),
    proceed]).


predicate(name/2,99,static,private,built_in,[
    put_atom(name,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Name_2',[0,1]),
    proceed]).


predicate(lower_upper/2,106,static,private,built_in,[
    put_atom(lower_upper,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Lower_Upper_2',[0,1]),
    proceed]).


predicate(atom_hash/2,113,static,private,built_in,[
    put_atom(atom_hash,2),
    put_integer(2,3),
    call_c('Set_Bip_Name_2',[2,3]),
    call_c_test('Atom_Hash_2',[0,1]),
    proceed]).


predicate(current_atom/1,120,static,private,built_in,[
    put_atom(current_atom,1),
    put_integer(1,2),
    call_c('Set_Bip_Name_2',[1,2]),
    execute('$current_atom'/1)]).


predicate('$current_atom'/1,125,static,private,built_in,[
    put_integer(1,1),
    call_c_test('Current_Atom_2',[0,1]),
    proceed]).


predicate('$current_atom_any'/1,128,static,private,built_in,[
    put_integer(0,1),
    call_c_test('Current_Atom_2',[0,1]),
    proceed]).


predicate('$current_atom_alt'/0,132,static,private,built_in,[
    call_c_test('Current_Atom_Alt_0',[]),
    proceed]).


predicate(atom_property/2,139,static,private,built_in,[
    allocate(2),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_atom(atom_property,0),
    put_integer(2,1),
    call_c('Set_Bip_Name_2',[0,1]),
    put_value(y(0),0),
    call('$current_atom'/1),
    put_value(y(0),0),
    put_value(y(1),1),
    deallocate,
    execute('$atom_property1'/2)]).


predicate('$atom_property_any'/2,144,static,private,built_in,[
    allocate(2),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_value(y(0),0),
    call('$current_atom_any'/1),
    put_value(y(0),0),
    put_value(y(1),1),
    deallocate,
    execute('$atom_property1'/2)]).


predicate('$atom_property1'/2,151,static,private,built_in,[
    load_cut_level(2),
    allocate(3),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    put_value(y(1),0),
    call('$check_atom_prop'/1),
    cut(y(2)),
    put_value(y(0),0),
    put_variable(x(2),1),
    put_variable(x(3),7),
    put_variable(x(4),8),
    put_variable(x(5),9),
    put_variable(x(6),10),
    call_c('Atom_Property_6',[0,1,7,8,9,10]),
    put_value(y(1),0),
    put_value(y(0),1),
    deallocate,
    execute('$atom_property2'/7)]).


predicate('$check_atom_prop'/1,161,static,private,built_in,[
    try_me_else(1),
    call_c_test('Blt_Var',[0]),
    proceed,

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

label(2),
    switch_on_atom([(prefix_op,9),(infix_op,11),(postfix_op,13),(needs_quotes,15),(needs_scan,17)]),

label(3),
    switch_on_structure([(length/1,5),(hash/1,7)]),

label(4),
    try_me_else(6),

label(5),
    get_structure(length/1,0),
    unify_void(1),
    proceed,

label(6),
    retry_me_else(8),

label(7),
    get_structure(hash/1,0),
    unify_void(1),
    proceed,

label(8),
    retry_me_else(10),

label(9),
    get_atom(prefix_op,0),
    proceed,

label(10),
    retry_me_else(12),

label(11),
    get_atom(infix_op,0),
    proceed,

label(12),
    retry_me_else(14),

label(13),
    get_atom(postfix_op,0),
    proceed,

label(14),
    retry_me_else(16),

label(15),
    get_atom(needs_quotes,0),
    proceed,

label(16),
    trust_me_else_fail,

label(17),
    get_atom(needs_scan,0),
    proceed,

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


predicate('$atom_property2'/7,184,static,private,built_in,[
    switch_on_term(3,1,fail,fail,2),

label(1),
    switch_on_atom([(prefix_op,8),(infix_op,10),(postfix_op,12),(needs_quotes,14),(needs_scan,16)]),

label(2),
    switch_on_structure([(length/1,4),(hash/1,6)]),

label(3),
    try_me_else(5),

label(4),
    get_structure(length/1,0),
    unify_variable(x(0)),
    call_c_test('Atom_Length_2',[1,0]),
    proceed,

label(5),
    retry_me_else(7),

label(6),
    get_structure(hash/1,0),
    unify_variable(x(0)),
    call_c_test('Atom_Hash_2',[1,0]),
    proceed,

label(7),
    retry_me_else(9),

label(8),
    get_atom(prefix_op,0),
    get_integer(1,2),
    proceed,

label(9),
    retry_me_else(11),

label(10),
    get_atom(infix_op,0),
    get_integer(1,3),
    proceed,

label(11),
    retry_me_else(13),

label(12),
    get_atom(postfix_op,0),
    get_integer(1,4),
    proceed,

label(13),
    retry_me_else(15),

label(14),
    get_atom(needs_quotes,0),
    get_integer(1,5),
    proceed,

label(15),
    trust_me_else_fail,

label(16),
    get_atom(needs_scan,0),
    get_integer(1,6),
    proceed]).


predicate(new_atom/1,203,static,private,built_in,[
    allocate(1),
    get_variable(y(0),0),
    put_atom(new_atom,0),
    put_integer(1,1),
    call_c('Set_Bip_Name_2',[0,1]),
    put_integer(0,0),
    put_integer(0,1),
    call('$sys_var_write'/2),
    put_atom(atom_,0),
    put_integer(0,1),
    put_value(y(0),2),
    call_c_test('New_Atom_3',[0,1,2]),
    deallocate,
    proceed]).


predicate(new_atom/2,208,static,private,built_in,[
    allocate(2),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_atom(new_atom,0),
    put_integer(2,1),
    call_c('Set_Bip_Name_2',[0,1]),
    put_integer(0,0),
    put_integer(0,1),
    call('$sys_var_write'/2),
    put_value(y(0),0),
    put_integer(0,1),
    put_value(y(1),2),
    call_c_test('New_Atom_3',[0,1,2]),
    deallocate,
    proceed]).


predicate(new_atom/3,213,static,private,built_in,[
    allocate(3),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    put_atom(new_atom,0),
    put_integer(3,1),
    call_c('Set_Bip_Name_2',[0,1]),
    put_integer(0,0),
    put_integer(1,1),
    call('$sys_var_write'/2),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    call_c_test('New_Atom_3',[0,1,2]),
    deallocate,
    proceed]).
