This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/H/YapOpcodes.h
2002-06-12 16:48:35 +00:00

360 lines
14 KiB
C

/*************************************************************************
* *
* YAP Prolog *
* *
* Yap Prolog was developed at NCCUP - Universidade do Porto *
* *
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
* *
**************************************************************************
* *
* File: YapOpcodes.h *
* Last rev: *
* mods: *
* comments: Central Table with all YAP opcodes *
* *
*************************************************************************/
OPCODE(Ystop ,e),
OPCODE(Nstop ,e),
OPCODE(execute ,l),
OPCODE(call ,sla),
OPCODE(procceed ,e),
OPCODE(allocate ,e),
OPCODE(deallocate ,e),
OPCODE(op_fail ,e),
#ifdef YAPOR
OPCODE(getwork_first_time ,e),
OPCODE(getwork ,ld),
OPCODE(getwork_seq ,ld),
OPCODE(sync ,ld),
#endif /* YAPOR */
#ifdef TABLING
OPCODE(table_try_me_single ,ld),
OPCODE(table_try_me ,ld),
OPCODE(table_retry_me ,ld),
OPCODE(table_trust_me ,ld),
OPCODE(table_new_answer ,s),
OPCODE(table_answer_resolution ,ld),
OPCODE(table_completion ,ld),
OPCODE(trie_do_var ,e),
OPCODE(trie_trust_var ,e),
OPCODE(trie_try_var ,e),
OPCODE(trie_retry_var ,e),
OPCODE(trie_do_val ,e),
OPCODE(trie_trust_val ,e),
OPCODE(trie_try_val ,e),
OPCODE(trie_retry_val ,e),
OPCODE(trie_do_atom ,e),
OPCODE(trie_trust_atom ,e),
OPCODE(trie_try_atom ,e),
OPCODE(trie_retry_atom ,e),
OPCODE(trie_do_list ,e),
OPCODE(trie_trust_list ,e),
OPCODE(trie_try_list ,e),
OPCODE(trie_retry_list ,e),
OPCODE(trie_do_struct ,e),
OPCODE(trie_trust_struct ,e),
OPCODE(trie_try_struct ,e),
OPCODE(trie_retry_struct ,e),
#endif /* TABLING */
OPCODE(try_me ,ld),
OPCODE(retry_me ,ld),
OPCODE(trust_me ,ld),
OPCODE(try_me0 ,ld),
OPCODE(retry_me0 ,ld),
OPCODE(trust_me0 ,ld),
OPCODE(try_me1 ,ld),
OPCODE(retry_me1 ,ld),
OPCODE(trust_me1 ,ld),
OPCODE(try_me2 ,ld),
OPCODE(retry_me2 ,ld),
OPCODE(trust_me2 ,ld),
OPCODE(try_me3 ,ld),
OPCODE(retry_me3 ,ld),
OPCODE(trust_me3 ,ld),
OPCODE(try_me4 ,ld),
OPCODE(retry_me4 ,ld),
OPCODE(trust_me4 ,ld),
OPCODE(try_and_mark ,ld),
OPCODE(retry_and_mark ,ld),
OPCODE(try_c ,lds),
OPCODE(retry_c ,lds),
OPCODE(try_userc ,lds),
OPCODE(retry_userc ,lds),
OPCODE(cut ,e),
OPCODE(get_x_var ,xx),
OPCODE(get_y_var ,yx),
OPCODE(get_x_val ,xx),
OPCODE(get_y_val ,yx),
OPCODE(get_atom ,xc),
OPCODE(get_float ,xc),
OPCODE(get_longint ,xc),
OPCODE(get_bigint ,xc),
OPCODE(get_list ,x),
OPCODE(get_struct ,xf),
OPCODE(unify_x_var ,ox),
OPCODE(unify_y_var ,oy),
OPCODE(unify_x_val ,ox),
OPCODE(unify_y_val ,oy),
OPCODE(unify_atom ,oc),
OPCODE(unify_float ,oc),
OPCODE(unify_longint ,oc),
OPCODE(unify_bigint ,oc),
OPCODE(unify_list ,o),
OPCODE(unify_struct ,of),
OPCODE(put_x_var ,xx),
OPCODE(put_y_var ,yx),
OPCODE(put_x_val ,xx),
OPCODE(put_y_val ,yx),
OPCODE(put_unsafe ,yx),
OPCODE(put_atom ,xc),
OPCODE(put_list ,x),
OPCODE(put_struct ,xf),
OPCODE(write_x_var ,x),
OPCODE(write_y_var ,y),
OPCODE(write_x_val ,x),
OPCODE(write_y_val ,y),
OPCODE(write_atom ,c),
OPCODE(write_list ,e),
OPCODE(write_struct ,f),
OPCODE(pop ,e),
OPCODE(pop_n ,s),
OPCODE(jump ,l),
OPCODE(move_back ,l),
OPCODE(skip ,l),
OPCODE(either ,sla),
OPCODE(or_else ,sla),
#ifdef YAPOR
OPCODE(or_last ,sla),
#else
OPCODE(or_last ,e),
#endif /* YAPOR */
OPCODE(call_cpred ,sla),
OPCODE(call_usercpred ,sla),
OPCODE(call_c_wfail ,sdl),
OPCODE(call_bfunc_xx ,lxx),
OPCODE(call_bfunc_xy ,lxy),
OPCODE(call_bfunc_yx ,lxy),
OPCODE(call_bfunc_yy ,lyy),
OPCODE(cut_t ,e),
OPCODE(cut_e ,e),
OPCODE(try_clause ,ld),
OPCODE(try_in ,l),
OPCODE(retry ,ld),
OPCODE(trust_in ,ldl),
OPCODE(trust ,ld),
OPCODE(retry_first ,ld),
OPCODE(trust_first_in ,ldl),
OPCODE(trust_first ,ld),
OPCODE(retry_tail ,ld),
OPCODE(trust_tail_in ,ldl),
OPCODE(trust_tail ,ld),
OPCODE(retry_head ,ld),
OPCODE(trust_head_in ,ldl),
OPCODE(trust_head ,ld),
OPCODE(jump_if_var ,l),
OPCODE(switch_on_type ,llll),
OPCODE(switch_on_nonv ,lll),
OPCODE(switch_last ,slll),
OPCODE(switch_on_head ,llll),
OPCODE(switch_list_nl ,llll),
OPCODE(switch_list_nl_prefetch ,llll),
OPCODE(switch_nv_list ,lll),
OPCODE(switch_l_list ,slll),
OPCODE(switch_on_cons ,c),
OPCODE(go_on_cons ,cll),
OPCODE(if_cons ,sl),
OPCODE(switch_on_func ,s),
OPCODE(go_on_func ,fll),
OPCODE(if_func ,sl),
OPCODE(if_not_then ,cll),
OPCODE(trust_fail ,e),
OPCODE(index_pred ,e),
OPCODE(save_b_x ,x),
OPCODE(save_b_y ,y),
OPCODE(comit_b_x ,x),
OPCODE(comit_b_y ,y),
OPCODE(undef_p ,e),
OPCODE(spy_pred ,e),
OPCODE(spy_or_trymark ,ld),
OPCODE(unify_void ,o),
OPCODE(write_void ,e),
OPCODE(save_pair_x ,ox),
OPCODE(save_pair_y ,oy),
OPCODE(save_appl_x ,ox),
OPCODE(save_appl_y ,oy),
OPCODE(unify_n_atoms ,osc),
OPCODE(write_n_atoms ,sc),
OPCODE(unify_n_voids ,os),
OPCODE(write_n_voids ,s),
OPCODE(glist_valx ,ss),
OPCODE(glist_valy ,xy),
OPCODE(fcall ,sla),
OPCODE(dexecute ,l),
OPCODE(gl_void_varx ,xx),
OPCODE(gl_void_vary ,xy),
OPCODE(gl_void_valx ,xx),
OPCODE(gl_void_valy ,xy),
OPCODE(unify_x_loc ,ox),
OPCODE(unify_y_loc ,oy),
OPCODE(write_x_loc ,ox),
OPCODE(write_y_loc ,oy),
OPCODE(unify_x_var2 ,oxx),
OPCODE(unify_l_struc ,of),
OPCODE(unify_l_list ,o),
OPCODE(write_l_struc ,f),
OPCODE(write_l_list ,e),
OPCODE(unify_l_x_var ,ox),
OPCODE(unify_l_y_var ,oy),
OPCODE(unify_l_x_val ,ox),
OPCODE(unify_l_y_val ,oy),
OPCODE(unify_l_atom ,oc),
OPCODE(unify_l_float ,oc),
OPCODE(unify_l_longint ,oc),
OPCODE(unify_l_bigint ,oc),
OPCODE(unify_l_void ,o),
OPCODE(unify_l_n_voids ,os),
OPCODE(unify_l_x_loc ,ox),
OPCODE(unify_l_y_loc ,oy),
OPCODE(unify_l_x_var2 ,oxx),
OPCODE(unify_x_var_write ,ox),
OPCODE(unify_y_var_write ,oy),
OPCODE(unify_x_val_write ,ox),
OPCODE(unify_y_val_write ,oy),
OPCODE(unify_atom_write ,oc),
OPCODE(unify_n_atoms_write ,osc),
OPCODE(unify_list_write ,o),
OPCODE(unify_x_var2_write ,oxx),
OPCODE(unify_struct_write ,of),
OPCODE(unify_void_write ,o),
OPCODE(unify_n_voids_write ,os),
OPCODE(unify_x_loc_write ,ox),
OPCODE(unify_y_loc_write ,oy),
OPCODE(unify_l_x_var_write ,ox),
OPCODE(unify_l_y_var_write ,oy),
OPCODE(unify_l_x_val_write ,ox),
OPCODE(unify_l_y_val_write ,oy),
OPCODE(unify_l_atom_write ,oc),
OPCODE(unify_l_void_write ,o),
OPCODE(unify_l_n_voids_write ,os),
OPCODE(unify_l_x_loc_write ,ox),
OPCODE(unify_l_y_loc_write ,oy),
OPCODE(unify_l_x_var2_write ,oxx),
OPCODE(unify_l_list_write ,o),
OPCODE(unify_l_struc_write ,of),
OPCODE(save_pair_x_write ,ox),
OPCODE(save_pair_y_write ,oy),
OPCODE(save_appl_x_write ,ox),
OPCODE(save_appl_y_write ,oy),
OPCODE(enter_profiling ,l),
OPCODE(retry_profiled ,l),
OPCODE(profiled_retry_me ,ld),
OPCODE(profiled_trust_me ,ld),
OPCODE(profiled_retry_and_mark ,ld),
OPCODE(try_logical_pred ,l),
OPCODE(trust_logical_pred ,l),
OPCODE(alloc_for_logical_pred ,EC),
#ifdef SFUNC
OPCODE(get_s_f ,),
OPCODE(put_s_f ,),
OPCODE(unify_s_f ,),
OPCODE(write_s_f ,),
OPCODE(unify_s_xvar ,),
OPCODE(unify_s_yvar ,),
OPCODE(write_s_xvar ,),
OPCODE(write_s_yvar ,),
OPCODE(unify_s_xval ,),
OPCODE(unify_s_yval ,),
OPCODE(write_s_xval ,),
OPCODE(write_s_yval ,),
OPCODE(unify_s_a ,),
OPCODE(write_s_a ,),
OPCODE(get_s_end ,),
OPCODE(put_s_end ,),
OPCODE(unify_s_end ,),
OPCODE(write_s_end ,),
#endif /* SFUNC */
OPCODE(p_atom_x ,x),
OPCODE(p_atom_y ,y),
OPCODE(p_atomic_x ,x),
OPCODE(p_atomic_y ,y),
OPCODE(p_integer_x ,x),
OPCODE(p_integer_y ,y),
OPCODE(p_nonvar_x ,x),
OPCODE(p_nonvar_y ,y),
OPCODE(p_number_x ,x),
OPCODE(p_number_y ,y),
OPCODE(p_var_x ,x),
OPCODE(p_var_y ,y),
OPCODE(p_compound_x ,x),
OPCODE(p_compound_y ,y),
OPCODE(p_float_x ,x),
OPCODE(p_float_y ,y),
OPCODE(p_db_ref_x ,x),
OPCODE(p_db_ref_y ,y),
OPCODE(p_cut_by_x ,x),
OPCODE(p_cut_by_y ,y),
OPCODE(p_primitive_x ,x),
OPCODE(p_primitive_y ,y),
OPCODE(p_equal ,e),
OPCODE(p_dif ,e),
OPCODE(p_eq ,e),
OPCODE(p_functor ,e),
OPCODE(p_plus_vv ,xxx),
OPCODE(p_plus_vc ,xxc),
OPCODE(p_plus_y_vv ,yxx),
OPCODE(p_plus_y_vc ,yxc),
OPCODE(p_minus_vv ,xxx),
OPCODE(p_minus_cv ,xcx),
OPCODE(p_minus_y_vv ,yxx),
OPCODE(p_minus_y_cv ,ycx),
OPCODE(p_times_vv ,xxx),
OPCODE(p_times_vc ,xxc),
OPCODE(p_times_y_vv ,yxx),
OPCODE(p_times_y_vc ,yxc),
OPCODE(p_div_vv ,xxx),
OPCODE(p_div_cv ,xcx),
OPCODE(p_div_vc ,xxc),
OPCODE(p_div_y_vv ,yxx),
OPCODE(p_div_y_cv ,ycx),
OPCODE(p_div_y_vc ,yxc),
OPCODE(p_and_vv ,xxx),
OPCODE(p_and_vc ,xxc),
OPCODE(p_and_y_vv ,yxx),
OPCODE(p_and_y_vc ,yxc),
OPCODE(p_or_vv ,xxx),
OPCODE(p_or_vc ,xxc),
OPCODE(p_or_y_vv ,yxx),
OPCODE(p_or_y_vc ,yxc),
OPCODE(p_sll_vv ,xxx),
OPCODE(p_sll_cv ,xcx),
OPCODE(p_sll_vc ,xxc),
OPCODE(p_sll_y_vv ,yxx),
OPCODE(p_sll_y_cv ,ycx),
OPCODE(p_sll_y_vc ,yxc),
OPCODE(p_slr_vv ,xcx),
OPCODE(p_slr_vc ,xxc),
OPCODE(p_slr_cv ,xcx),
OPCODE(p_slr_y_vv ,yxx),
OPCODE(p_slr_y_vc ,yxc),
OPCODE(p_slr_y_cv ,ycx),
OPCODE(p_arg_vv ,xxx),
OPCODE(p_arg_cv ,xxc),
OPCODE(p_arg_y_vv ,yxx),
OPCODE(p_arg_y_cv ,yxc),
OPCODE(p_func2s_vv ,xxx),
OPCODE(p_func2s_cv ,xcx),
OPCODE(p_func2s_vc ,xxc),
OPCODE(p_func2s_y_vv ,xxx),
OPCODE(p_func2s_y_cv ,xcx),
OPCODE(p_func2s_y_vc ,xxc),
OPCODE(p_func2f_xx ,xxx),
OPCODE(p_func2f_xy ,xyx),
OPCODE(p_func2f_yx ,yxx),
OPCODE(p_func2f_yy ,yyx),
OPCODE(p_execute ,sla),
OPCODE(p_execute_within ,sla),
OPCODE(p_last_execute_within ,sla)