#include "extern.h"#include "login.h"#include "copy.h"#include "trees.h"#include "parser.h"#include "print.h"#include "lefun.h"#include "token.h"Go to the source code of this file.
| void append_resid | ( | ptr_psi_term | u, | |
| ptr_psi_term | v | |||
| ) |
| void check_disj | ( | ptr_psi_term | t | ) |
| void check_func | ( | ptr_psi_term | t | ) |
Definition at line 886 of file lefun.c.
References check_func_flag, check_out(), copy(), disjunction, eval, eval_args(), get_one_arg(), iff, push_goal(), push_psi_ptr_value(), RMASK, wl_definition::rule, stack_copy_psi_term(), stack_psi_term(), wl_psi_term::status, such_that, Traceline, TRUE, and wl_psi_term::type.
Referenced by check_out(), deref2_eval(), deref_eval(), and deref_rec_body().
| long check_out | ( | ptr_psi_term | t | ) |
Definition at line 1024 of file lefun.c.
References check_func(), check_func_flag, check_out(), check_type(), deref_ptr, eval_args(), eval_global_var(), FALSE, function, global, heap_pointer, RMASK, TRUE, and type.
| long check_out | ( | ) |
Referenced by check_func(), check_out(), eval_args(), f_check_out(), and i_check_out().
| long check_type | ( | ptr_psi_term | t | ) |
Definition at line 947 of file lefun.c.
References eval_args(), FALSE, fetch_def(), int_ptr, push2_ptr_value(), RMASK, SMASK, and TRUE.
Referenced by check_out().
| void curry | ( | ) |
Definition at line 179 of file lefun.c.
References can_curry, curried, and TRUE.
Referenced by c_add(), c_apply(), c_ascii(), c_bit_and(), c_bit_not(), c_bit_or(), c_call(), c_char(), c_children(), c_combined_name(), c_concatenate(), c_cond(), c_copy_pointer(), c_copy_term(), c_deref_length(), c_diff(), c_diff_address(), c_div(), c_equal(), c_eval(), c_eval_inplace(), c_exist_feature(), c_exists_choice(), c_exp(), c_feature_values(), c_features(), c_floor_ceiling(), c_funct(), c_glb(), c_gt(), c_gtoe(), c_int2string(), c_intdiv(), c_is_function(), c_is_number(), c_is_persistent(), c_is_predicate(), c_is_sort(), c_is_value(), c_isa_main(), c_log(), c_logical_main(), c_lt(), c_ltoe(), c_lub(), c_mod(), c_module_name(), c_mult(), c_nonvar(), c_not(), c_parents(), c_parse(), c_project(), c_psi2string(), c_quote(), c_random(), c_residList(), c_rootsort(), c_same_address(), c_set_choice(), c_shift(), c_split_double(), c_sqrt(), c_string2psi(), c_string_address(), c_string_length(), c_strip(), c_sub(), c_sub_string(), c_such_that(), c_trig(), c_unify_func(), c_var(), c_xor(), and call_primitive().
| void deref2_eval | ( | ptr_psi_term | t | ) |
Definition at line 1251 of file lefun.c.
References check_func(), deref_ptr, eval_global_var(), function, and global.
Referenced by match_attr3().
| void deref2_rec_eval | ( | ptr_psi_term | t | ) |
Definition at line 1272 of file lefun.c.
References deref_ptr, and deref_rec_body().
Referenced by match_attr2(), and merge2().
| long deref_args_eval | ( | ptr_psi_term | t, | |
| long | set | |||
| ) |
Definition at line 1202 of file lefun.c.
References aim, wl_psi_term::attr_list, deref_flag, deref_rec_args_exc(), FALSE, goal_stack, and top.
| long deref_eval | ( | ptr_psi_term | t | ) |
Definition at line 1114 of file lefun.c.
References aim, check_func(), deref_flag, deref_ptr, eval_global_var(), FALSE, function, global, goal_stack, heap_pointer, int_ptr, push_ptr_value(), and TRUE.
Referenced by global_error_check().
| void deref_rec_args | ( | ptr_node | n | ) |
Definition at line 1186 of file lefun.c.
References deref_ptr, deref_rec_args(), and deref_rec_body().
| void deref_rec_args | ( | ) |
Referenced by deref_rec_args(), and deref_rec_body().
| void deref_rec_args_exc | ( | ptr_node | n, | |
| long | set | |||
| ) |
Definition at line 1230 of file lefun.c.
References wl_node::data, deref_ptr, deref_rec_args_exc(), deref_rec_body(), in_set(), wl_node::key, wl_node::left, and wl_node::right.
| void deref_rec_args_exc | ( | ) |
Referenced by deref_args_eval(), and deref_rec_args_exc().
| void deref_rec_body | ( | ptr_psi_term | t | ) |
Definition at line 1162 of file lefun.c.
References check_func(), deref_flag, deref_ptr, deref_rec_args(), deref_rec_body(), eval_global_var(), function, global, heap_pointer, int_ptr, push_ptr_value(), and TRUE.
| void deref_rec_body | ( | ) |
Referenced by deref2_rec_eval(), deref_rec_args(), deref_rec_args_exc(), deref_rec_body(), and deref_rec_eval().
| long deref_rec_eval | ( | ptr_psi_term | t | ) |
Definition at line 1150 of file lefun.c.
References aim, deref_flag, deref_rec_body(), FALSE, and goal_stack.
| void do_currying | ( | ) |
Definition at line 379 of file lefun.c.
References wl_goal::a, wl_goal::b, goal_stack, wl_goal::next, NULL, push_goal(), Traceline, and unify_noeval.
Referenced by eval_aim(), main_prove(), and prove_aim().
| long do_residuation | ( | ) |
Definition at line 333 of file lefun.c.
References wl_goal::a, deref_ptr, FALSE, wl_resid_list::next, wl_resid_list::othervar, print_resid_message(), residuateGoalOnVar(), trace, Traceline, tracing(), TRUE, and wl_resid_list::var.
Referenced by do_residuation_user(), and eval_aim().
| long do_residuation_user | ( | ) |
Definition at line 326 of file lefun.c.
References do_residuation(), goal_stack, and wl_goal::next.
Referenced by main_prove(), and prove_aim().
| long eval_aim | ( | ) |
Definition at line 476 of file lefun.c.
References wl_pair_list::a, wl_goal::a, aim, wl_pair_list::b, wl_goal::b, wl_goal::c, c_rule, can_curry, choice_stack, clear_copy(), curried, deref_ptr, do_currying(), do_residuation(), eval, eval_copy(), eval_cut, FALSE, int_ptr, match, MAX_BUILT_INS, wl_pair_list::next, NULL, push2_ptr_value(), push_choice_point(), push_goal(), quote_copy(), save_resid(), SMASK, STACK, STACK_ALLOC, stack_pointer, wl_psi_term::status, Traceline, TRUE, and unify.
Referenced by main_prove().
| long eval_args | ( | ptr_node | n | ) |
| long eval_args | ( | ) |
Referenced by check_func(), check_out(), check_type(), eval_args(), and i_eval_args().
| void eval_global_var | ( | ptr_psi_term | t | ) |
Definition at line 1318 of file lefun.c.
References wl_stack::a, wl_stack::b, clear_copy(), deref_ptr, eval_copy(), global, wl_stack::next, NULL, psi_term_ptr, push_psi_ptr_value(), STACK, STACK_ALLOC, Traceline, wl_stack::type, and undo_stack.
| void eval_global_var | ( | ) |
Referenced by check_out(), deref2_eval(), deref_eval(), and deref_rec_body().
| long f_check_out | ( | ptr_psi_term | t | ) |
| ptr_psi_term heap_psi_term | ( | long | stat | ) |
Definition at line 85 of file lefun.c.
References wl_psi_term::attr_list, wl_psi_term::coref, FALSE, wl_psi_term::flags, global_time_stamp, HEAP_ALLOC, NULL, QUOTED_TRUE, wl_psi_term::resid, wl_psi_term::status, wl_psi_term::time_stamp, top, wl_psi_term::type, and wl_psi_term::value.
| long i_check_out | ( | ptr_psi_term | t | ) |
Definition at line 1010 of file lefun.c.
References check_func_flag, check_out(), and FALSE.
Referenced by c_cond(), c_eval(), c_eval_disjunction(), c_eval_inplace(), c_get(), c_such_that(), get_bool_value(), get_real_value(), main_prove(), prove_aim(), and unify_real_result().
| long i_eval_args | ( | ptr_node | n | ) |
Definition at line 842 of file lefun.c.
References check_func_flag, eval_args(), and FALSE.
Referenced by clause_aim(), fetch_def(), fetch_def_lazy(), and prove_aim().
| long in_set | ( | char * | str, | |
| long | set | |||
| ) |
| void init_global_vars | ( | ) |
Definition at line 1364 of file lefun.c.
References first_definition, wl_definition::global_value, heap_pointer, wl_definition::next, and NULL.
Referenced by init_system().
| long match_aim | ( | ) |
Definition at line 733 of file lefun.c.
References wl_goal::a, aim, wl_psi_term::attr_list, attr_missing, wl_goal::b, wl_goal::c, can_curry, wl_psi_term::coref, curried, cut, deref_ptr, FALSE, FUNC_ARG, integer, match_attr(), matches(), NULL, overlap_type(), quoted_string, real, REAL, residuate_double(), restore_resid(), save_resid(), sys_bytedata, TRUE, wl_psi_term::type, and wl_psi_term::value.
Referenced by main_prove().
| void match_attr | ( | ptr_node * | u, | |
| ptr_node | v, | |||
| ptr_resid_block | rb | |||
| ) |
Definition at line 713 of file lefun.c.
References match_attr1(), match_attr2(), and match_attr3().
Referenced by match_aim().
| match_attr1 | ( | ptr_node * | u, | |
| ptr_node | v, | |||
| ptr_resid_block | rb | |||
| ) |
Definition at line 573 of file lefun.c.
References attr_missing, featcmp(), wl_node::left, match, NULL, push_goal(), wl_node::right, and TRUE.
Referenced by match_attr(), and match_attr2().
| match_attr2 | ( | ptr_node * | u, | |
| ptr_node | v, | |||
| ptr_resid_block | rb | |||
| ) |
Definition at line 613 of file lefun.c.
References deref2_rec_eval(), featcmp(), wl_node::left, match_attr1(), NULL, and wl_node::right.
Referenced by match_attr().
| match_attr3 | ( | ptr_node * | u, | |
| ptr_node | v, | |||
| ptr_resid_block | rb | |||
| ) |
Definition at line 664 of file lefun.c.
References attr_missing, deref2_eval(), featcmp(), wl_node::left, NULL, wl_node::right, and TRUE.
Referenced by match_attr().
| ptr_psi_term real_stack_psi_term | ( | long | stat, | |
| REAL | thereal | |||
| ) |
Definition at line 60 of file lefun.c.
References wl_psi_term::attr_list, wl_psi_term::coref, FALSE, wl_psi_term::flags, global_time_stamp, heap_alloc(), integer, NULL, QUOTED_TRUE, REAL, real, wl_psi_term::resid, STACK_ALLOC, wl_psi_term::status, wl_psi_term::time_stamp, wl_psi_term::type, and wl_psi_term::value.
| void release_resid | ( | ptr_psi_term | t | ) |
Definition at line 434 of file lefun.c.
References release_resid_main(), and TRUE.
Referenced by c_bk_assign(), c_get_raw(), c_project(), global_unify(), main_prove(), unify_real_result(), and what_next_aim().
| void release_resid_main | ( | ptr_psi_term | t, | |
| long | trailflag | |||
| ) |
Definition at line 404 of file lefun.c.
References wl_goal::a, FALSE, wl_residuation::goal, goal_ptr, goal_stack, int_ptr, wl_residuation::next, wl_goal::next, NULL, wl_goal::pending, push_ptr_value(), resid_ptr, and Traceline.
Referenced by release_resid(), and release_resid_notrail().
| void release_resid_notrail | ( | ptr_psi_term | t | ) |
Definition at line 440 of file lefun.c.
References FALSE, and release_resid_main().
Referenced by c_bk_assign().
| void residuate | ( | ptr_psi_term | t | ) |
Definition at line 135 of file lefun.c.
References wl_resid_list::next, NULL, wl_resid_list::othervar, STACK_ALLOC, and wl_resid_list::var.
Referenced by apply1_internal(), c_apply(), c_ascii(), c_bit_and(), c_bit_or(), c_boolpred(), c_call(), c_char(), c_concatenate(), c_cond(), c_diff(), c_div(), c_equal(), c_floor_ceiling(), c_gt(), c_gtoe(), c_initrandom(), c_int2string(), c_intdiv(), c_isa_subsort(), c_logical_main(), c_lt(), c_ltoe(), c_mod(), c_mult(), c_not(), c_parse(), c_project(), c_random(), c_shift(), c_split_double(), c_string2psi(), c_string_length(), c_sub_string(), c_xor(), call_primitive(), lazy_project_internal(), my_wait_on_feature_internal(), residuate2(), residuate3(), and wait_on_feature_internal().
| void residuate2 | ( | ptr_psi_term | u, | |
| ptr_psi_term | v | |||
| ) |
Definition at line 152 of file lefun.c.
References residuate().
Referenced by c_add(), c_bit_and(), c_bit_not(), c_bit_or(), c_diff(), c_div(), c_equal(), c_exp(), c_gt(), c_gtoe(), c_intdiv(), c_log(), c_lt(), c_ltoe(), c_mod(), c_mult(), c_shift(), c_split_double(), c_sqrt(), c_string_address(), c_sub(), and c_trig().
| void residuate3 | ( | ptr_psi_term | u, | |
| ptr_psi_term | v, | |||
| ptr_psi_term | w | |||
| ) |
Definition at line 164 of file lefun.c.
References residuate().
Referenced by c_add(), c_div(), c_intdiv(), c_mult(), and c_sub().
| void residuate_double | ( | ptr_psi_term | t, | |
| ptr_psi_term | u | |||
| ) |
Definition at line 117 of file lefun.c.
References wl_resid_list::next, wl_resid_list::othervar, STACK_ALLOC, and wl_resid_list::var.
Referenced by match_aim().
| long residuateGoalOnVar | ( | ptr_goal | g, | |
| ptr_psi_term | var, | |||
| ptr_psi_term | othervar | |||
| ) |
Definition at line 194 of file lefun.c.
References code_ptr, def_ptr, Errorline(), FALSE, glb_code(), glb_value(), heap_pointer, int_ptr, NULL, push_ptr_value(), wl_psi_term::resid, resid_ptr, STACK_ALLOC, TRUE, wl_psi_term::type, and wl_psi_term::value.
Referenced by c_mresiduate(), and do_residuation().
| void restore_resid | ( | ptr_resid_block | rb, | |
| ptr_psi_term * | match_date | |||
| ) |
Definition at line 1297 of file lefun.c.
References can_curry, curried, FALSE, and TRUE.
Referenced by main_prove(), and match_aim().
| void save_resid | ( | ptr_resid_block | rb, | |
| ptr_psi_term | match_date | |||
| ) |
Definition at line 1283 of file lefun.c.
References can_curry, and curried.
Referenced by c_freeze_inner(), eval_aim(), and match_aim().
| ptr_psi_term stack_psi_term | ( | long | stat | ) |
Definition at line 37 of file lefun.c.
References wl_psi_term::attr_list, wl_psi_term::coref, FALSE, wl_psi_term::flags, global_time_stamp, NULL, QUOTED_TRUE, wl_psi_term::resid, STACK_ALLOC, wl_psi_term::status, wl_psi_term::time_stamp, top, wl_psi_term::type, and wl_psi_term::value.
long attr_missing [static] |
| long can_curry |
Definition at line 25 of file lefun.c.
Referenced by c_freeze_inner(), curry(), eval_aim(), match_aim(), prove_aim(), restore_resid(), and save_resid().
long check_func_flag [static] |
Definition at line 31 of file lefun.c.
Referenced by check_func(), check_out(), f_check_out(), i_check_out(), and i_eval_args().
| long curried |
Definition at line 24 of file lefun.c.
Referenced by c_freeze_inner(), curry(), eval_aim(), main_prove(), match_aim(), prove_aim(), restore_resid(), and save_resid().
long deref_flag [static] |
Definition at line 1108 of file lefun.c.
Referenced by deref_args_eval(), deref_eval(), deref_rec_body(), and deref_rec_eval().
Definition at line 20 of file lefun.c.
Referenced by backtrack(), c_call(), c_children(), c_cond(), c_diff_address(), c_disj(), c_eval(), c_eval_disjunction(), c_eval_inplace(), c_feature_values(), c_features(), c_freeze_inner(), c_glb(), c_is_function(), c_is_predicate(), c_is_sort(), c_lub(), c_nonvar(), c_parents(), c_rootsort(), c_same_address(), c_strip(), c_such_that(), c_var(), call_once_internal(), check(), init_system(), main_prove(), and prove_aim().
Definition at line 21 of file lefun.c.
Referenced by c_freeze_inner(), check(), main_prove(), and prove_aim().
char vcid[] = "$Id: lefun.c,v 1.4 1995/01/14 00:24:55 duchier Exp $" [static] |
1.5.4