Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

rete.c File Reference

Go to the source code of this file.

Data Structures

struct  alpha_mem_struct
struct  beta_memory_node_data_struct
struct  cn_node_data_struct
struct  node_varnames_struct
union  node_varnames_struct::varname_data_union
struct  non_pos_node_data_struct
struct  p_node_data_struct
struct  pos_node_data_struct
struct  posneg_node_data_struct
struct  rete_node_struct
union  rete_node_struct::rete_node_a_union
union  rete_node_struct::rete_node_b_union
struct  rete_test_struct
union  rete_test_struct::rete_test_data_union
struct  right_mem_struct
struct  three_field_varnames_struct
struct  var_location_struct

Typedefs

typedef alpha_mem_struct alpha_mem
typedef right_mem_struct right_mem
typedef unsigned short rete_node_level
typedef var_location_struct var_location
typedef rete_test_struct rete_test
typedef pos_node_data_struct pos_node_data
typedef posneg_node_data_struct posneg_node_data
typedef beta_memory_node_data_struct beta_memory_node_data
typedef cn_node_data_struct cn_node_data
typedef p_node_data_struct p_node_data
typedef non_pos_node_data_struct non_pos_node_data
typedef rete_node_struct rete_node
typedef char varnames
typedef three_field_varnames_struct three_field_varnames
typedef node_varnames_struct node_varnames

Functions

void left_addition_routines (rete_node *node, token *tok, wme *w)
void right_addition_routines (rete_node *node, wme *w)
void remove_token_and_subtree (token *tok)
void null_activation_stats_for_right_activation (rete_node *node)
void null_activation_stats_for_left_activation (rete_node *node)
void print_null_activation_stats ()
void adjust_sharing_factors_from_here_to_top (rete_node *node, int delta)
Symbolfind_goal_for_match_set_change_assertion (ms_change *msc)
Symbolfind_goal_for_match_set_change_retraction (ms_change *msc)
void print_assertion (ms_change *msc)
void print_retraction (ms_change *msc)
bool any_assertions_or_retractions_ready (void)
bool any_i_assertions_or_retractions_ready (void)
bool get_next_assertion (production **prod, struct token_struct **tok, wme **w)
bool get_next_retraction (instantiation **inst)
bool get_next_nil_goal_retraction (instantiation **inst)
unsigned long hash_alpha_mem (void *item, short num_bits)
void add_wme_to_alpha_mem (wme *w, alpha_mem *am)
void remove_wme_from_alpha_mem (right_mem *rm)
alpha_memfind_alpha_mem (Symbol *id, Symbol *attr, Symbol *value, bool acceptable)
alpha_memfind_or_make_alpha_mem (Symbol *id, Symbol *attr, Symbol *value, bool acceptable)
void add_wme_to_aht (hash_table *ht, unsigned long hash_value, wme *w)
void add_wme_to_rete (wme *w)
void remove_wme_from_rete (wme *w)
void remove_ref_to_alpha_mem (alpha_mem *am)
void init_dummy_top_node ()
void remove_node_from_parents_list_of_children (rete_node *node)
void update_node_with_matches_from_above (rete_node *child)
rete_nodenearest_ancestor_with_same_am (rete_node *node, alpha_mem *am)
rete_nodemake_new_mem_node (rete_node *parent, byte node_type, var_location left_hash_loc)
rete_nodemake_new_positive_node (rete_node *parent_mem, byte node_type, alpha_mem *am, rete_test *rt, bool prefer_left_unlinking)
rete_nodesplit_mp_node (rete_node *mp_node)
rete_nodemerge_into_mp_node (rete_node *mem_node)
rete_nodemake_new_mp_node (rete_node *parent, byte node_type, var_location left_hash_loc, alpha_mem *am, rete_test *rt, bool prefer_left_unlinking)
rete_nodemake_new_negative_node (rete_node *parent, byte node_type, var_location left_hash_loc, alpha_mem *am, rete_test *rt)
rete_nodemake_new_cn_node (rete_node *parent, rete_node *bottom_of_subconditions)
rete_nodemake_new_production_node (rete_node *parent, production *new_prod)
void deallocate_rete_test_list (rete_test *rt)
void deallocate_rete_node (rete_node *node)
bool find_var_location (Symbol *var, rete_node_level current_depth, var_location *result)
void bind_variables_in_test (test t, rete_node_level depth, byte field_num, bool dense, list **varlist)
void pop_bindings_and_deallocate_list_of_variables (list *vars)
varnamesadd_var_to_varnames (Symbol *var, varnames *old_varnames)
void deallocate_varnames (varnames *vn)
void deallocate_node_varnames (rete_node *node, rete_node *cutoff, node_varnames *nvn)
varnamesadd_unbound_varnames_in_test (test t, varnames *starting_vn)
node_varnamesmake_nvn_for_posneg_cond (condition *cond, node_varnames *parent_nvn)
node_varnamesget_nvn_for_condition_list (condition *cond_list, node_varnames *parent_nvn)
void init_test_type_conversion_tables (void)
void add_rete_tests_for_test (test t, rete_node_level current_depth, byte field_num, rete_test **rt, Symbol **alpha_constant)
bool single_rete_tests_are_identical (rete_test *rt1, rete_test *rt2)
bool rete_test_lists_are_identical (rete_test *rt1, rete_test *rt2)
bool extract_rete_test_to_hash_with (rete_test **rt, var_location *dest_hash_loc)
rete_nodemake_node_for_positive_cond (condition *cond, rete_node_level current_depth, rete_node *parent)
rete_nodemake_node_for_negative_cond (condition *cond, rete_node_level current_depth, rete_node *parent)
void build_network_for_condition_list (condition *cond_list, rete_node_level depth_of_first_cond, rete_node *parent, rete_node **dest_bottom_node, rete_node_level *dest_bottom_depth, list **dest_vars_bound)
bool same_rhs (action *rhs1, action *rhs2)
void fixup_rhs_value_variable_references (rhs_value *rv, rete_node_level bottom_depth)
void update_max_rhs_unbound_variables (unsigned long num_for_new_production)
byte add_production_to_rete (production *p, condition *lhs_top, instantiation *refracted_inst, bool warn_on_duplicates)
void excise_production_from_rete (production *p)
void add_gensymmed_equality_test (test *t, char first_letter)
Symbolvar_bound_in_reconstructed_conds (condition *cond, byte where_field_num, rete_node_level where_levels_up)
void add_rete_test_list_to_tests (condition *cond, rete_test *rt)
void collect_nots (rete_test *rt, wme *right_wme, condition *cond)
void add_varnames_to_test (varnames *vn, test *t)
void add_hash_info_to_id_test (condition *cond, byte field_num, rete_node_level levels_up)
void rete_node_to_conditions (rete_node *node, node_varnames *nvn, rete_node *cutoff, token *tok, wme *w, condition *conds_for_cutoff_and_up, condition **dest_top_cond, condition **dest_bottom_cond)
rhs_value copy_rhs_value_and_substitute_varnames (rhs_value rv, condition *cond, char first_letter)
actioncopy_action_list_and_substitute_varnames (action *actions, condition *cond)
void p_node_to_conditions_and_nots (rete_node *p_node, token *tok, wme *w, condition **dest_top_cond, condition **dest_bottom_cond, not **dest_nots, action **dest_rhs)
Symbolget_symbol_from_rete_loc (unsigned short levels_up, byte field_num, token *tok, wme *w)
 bool ((*(rete_test_routines[256]))(rete_test *rt, token *left, wme *w))
bool error_rete_test_routine (rete_test *rt, token *left, wme *w)
bool id_is_goal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool id_is_impasse_rete_test_routine (rete_test *rt, token *left, wme *w)
bool disjunction_rete_test_routine (rete_test *rt, token *left, wme *w)
bool constant_equal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool constant_not_equal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool constant_less_rete_test_routine (rete_test *rt, token *left, wme *w)
bool constant_greater_rete_test_routine (rete_test *rt, token *left, wme *w)
bool constant_less_or_equal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool constant_greater_or_equal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool constant_same_type_rete_test_routine (rete_test *rt, token *left, wme *w)
bool variable_equal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool variable_not_equal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool variable_less_rete_test_routine (rete_test *rt, token *left, wme *w)
bool variable_greater_rete_test_routine (rete_test *rt, token *left, wme *w)
bool variable_less_or_equal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool variable_greater_or_equal_rete_test_routine (rete_test *rt, token *left, wme *w)
bool variable_same_type_rete_test_routine (rete_test *rt, token *left, wme *w)
void positive_node_left_addition (rete_node *node, token *new, Symbol *hash_referent)
void unhashed_positive_node_left_addition (rete_node *node, token *new)
void rete_error_left (rete_node *node, token *t, wme *w)
void rete_error_right (rete_node *node, wme *w)
void beta_memory_node_left_addition (rete_node *node, token *tok, wme *w)
void unhashed_beta_memory_node_left_addition (rete_node *node, token *tok, wme *w)
void mp_node_left_addition (rete_node *node, token *tok, wme *w)
void unhashed_mp_node_left_addition (rete_node *node, token *tok, wme *w)
void positive_node_right_addition (rete_node *node, wme *w)
void unhashed_positive_node_right_addition (rete_node *node, wme *w)
void mp_node_right_addition (rete_node *node, wme *w)
void unhashed_mp_node_right_addition (rete_node *node, wme *w)
void negative_node_left_addition (rete_node *node, token *tok, wme *w)
void unhashed_negative_node_left_addition (rete_node *node, token *tok, wme *w)
void negative_node_right_addition (rete_node *node, wme *w)
void unhashed_negative_node_right_addition (rete_node *node, wme *w)
void cn_node_left_addition (rete_node *node, token *tok, wme *w)
void cn_partner_node_left_addition (rete_node *node, token *tok, wme *w)
void p_node_left_addition (rete_node *node, token *tok, wme *w)
void p_node_left_removal (rete_node *node, token *tok, wme *w)
void retesave_one_byte (byte b)
byte reteload_one_byte ()
void retesave_two_bytes (unsigned long w)
unsigned long reteload_two_bytes ()
void retesave_four_bytes (unsigned long w)
unsigned long reteload_four_bytes ()
void retesave_string (char *s)
void reteload_string ()
bool retesave_symbol_and_assign_index (void *item)
void retesave_symbol_table (void)
void reteload_all_symbols (void)
Symbolreteload_symbol_from_index (void)
void reteload_free_symbol_table (void)
bool retesave_alpha_mem_and_assign_index (void *item)
void retesave_alpha_memories (void)
void reteload_alpha_memories (void)
alpha_memreteload_am_from_index (void)
void reteload_free_am_table (void)
void retesave_varnames (varnames *names)
varnamesreteload_varnames (void)
void retesave_node_varnames (node_varnames *nvn, rete_node *node)
node_varnamesreteload_node_varnames (rete_node *node)
void retesave_rhs_value (rhs_value rv)
rhs_value reteload_rhs_value (void)
void retesave_rhs_action (action *a)
actionreteload_rhs_action (void)
void retesave_action_list (action *first_a)
actionreteload_action_list (void)
void retesave_rete_test (rete_test *rt)
rete_testreteload_rete_test (void)
void retesave_rete_test_list (rete_test *first_rt)
rete_testreteload_rete_test_list (void)
void retesave_rete_node_and_children (rete_node *node)
void retesave_children_of_node (rete_node *node)
void reteload_node_and_children (rete_node *parent)
bool save_rete_net (FILE *dest_file)
bool load_rete_net (FILE *source_file)
unsigned long count_rete_tokens_for_production (production *prod)
void get_all_node_count_stats (void)
void print_node_count_statistics (void)
int get_node_count_statistic (const char *node_type_name, const char *column_name, unsigned long *result)
void dummy_matches_node_left_addition (rete_node *node, token *tok, wme *w)
tokenget_all_left_tokens_emerging_from_node (rete_node *node)
void deallocate_token_list (token *t)
void print_whole_token (token *t, wme_trace_type wtt)
long ppmi_aux (rete_node *node, rete_node *cutoff, condition *cond, wme_trace_type wtt, int indent)
MS_tracein_ms_trace (Symbol *sym, MS_trace *trace)
MS_tracein_ms_trace_same_goal (Symbol *sym, MS_trace *trace, Symbol *goal)
void init_rete (void)
void print_match_set (wme_trace_type wtt, ms_trace_type mst)
void print_partial_match_information (rete_node *p_node, wme_trace_type wtt)

Variables

bool discard_chunk_varnames = TRUE
char * bnode_type_names [256]
rete_nodenode_to_ignore_for_activation_stats = NIL
byte test_type_to_relational_test_type [256]
byte relational_test_type_to_test_type [256]
listrhs_unbound_vars_for_new_prod
unsigned long num_rhs_unbound_vars_for_new_prod
tc_number rhs_unbound_vars_tc
notnots_found_in_production
long highest_rhs_unboundvar_index
FILE * rete_fs_file
char reteload_string_buf [4 *MAX_LEXEME_LENGTH]
unsigned long current_retesave_symindex
unsigned long reteload_num_syms
Symbol ** reteload_symbol_table
unsigned long current_retesave_amindex
unsigned long reteload_num_ams
alpha_mem ** reteload_am_table
unsigned long actual [256]
unsigned long if_no_merging [256]
unsigned long if_no_sharing [256]
rete_node dummy_matches_node
tokendummy_matches_node_tokens


Typedef Documentation

typedef struct alpha_mem_struct alpha_mem
 

Referenced by add_wme_to_aht(), add_wme_to_alpha_mem(), find_alpha_mem(), find_or_make_alpha_mem(), hash_alpha_mem(), init_rete(), make_new_mp_node(), make_new_negative_node(), make_new_positive_node(), make_node_for_negative_cond(), make_node_for_positive_cond(), mp_node_left_addition(), nearest_ancestor_with_same_am(), negative_node_left_addition(), positive_node_left_addition(), remove_ref_to_alpha_mem(), remove_wme_from_alpha_mem(), remove_wme_from_rete(), rete_node_to_conditions(), reteload_alpha_memories(), reteload_am_from_index(), reteload_node_and_children(), and retesave_alpha_mem_and_assign_index().

typedef struct beta_memory_node_data_struct beta_memory_node_data
 

typedef struct cn_node_data_struct cn_node_data
 

typedef struct node_varnames_struct node_varnames
 

Referenced by deallocate_node_varnames(), get_nvn_for_condition_list(), init_rete(), make_nvn_for_posneg_cond(), rete_node_to_conditions(), reteload_node_varnames(), and retesave_node_varnames().

typedef struct non_pos_node_data_struct non_pos_node_data
 

typedef struct p_node_data_struct p_node_data
 

typedef struct pos_node_data_struct pos_node_data
 

typedef struct posneg_node_data_struct posneg_node_data
 

typedef struct rete_node_struct rete_node
 

Referenced by add_production_to_rete(), add_wme_to_aht(), adjust_sharing_factors_from_here_to_top(), beta_memory_node_left_addition(), build_network_for_condition_list(), cn_node_left_addition(), cn_partner_node_left_addition(), count_rete_tokens_for_production(), deallocate_node_varnames(), deallocate_rete_node(), dummy_matches_node_left_addition(), excise_production_from_rete(), get_all_left_tokens_emerging_from_node(), init_rete(), make_new_cn_node(), make_new_mem_node(), make_new_mp_node(), make_new_negative_node(), make_new_positive_node(), make_new_production_node(), make_node_for_negative_cond(), make_node_for_positive_cond(), merge_into_mp_node(), mp_node_left_addition(), mp_node_right_addition(), nearest_ancestor_with_same_am(), negative_node_left_addition(), negative_node_right_addition(), null_activation_stats_for_left_activation(), null_activation_stats_for_right_activation(), p_node_left_addition(), p_node_left_removal(), p_node_to_conditions_and_nots(), positive_node_left_addition(), positive_node_right_addition(), ppmi_aux(), print_partial_match_information(), remove_node_from_parents_list_of_children(), remove_token_and_subtree(), remove_wme_from_rete(), rete_error_left(), rete_error_right(), rete_node_to_conditions(), reteload_node_and_children(), reteload_node_varnames(), retesave_children_of_node(), retesave_node_varnames(), retesave_rete_node_and_children(), split_mp_node(), unhashed_beta_memory_node_left_addition(), unhashed_mp_node_left_addition(), unhashed_mp_node_right_addition(), unhashed_negative_node_left_addition(), unhashed_negative_node_right_addition(), unhashed_positive_node_left_addition(), unhashed_positive_node_right_addition(), and update_node_with_matches_from_above().

typedef unsigned short rete_node_level
 

Definition at line 231 of file rete.c.

Referenced by add_production_to_rete(), build_network_for_condition_list(), copy_rhs_value_and_substitute_varnames(), find_var_location(), and fixup_rhs_value_variable_references().

typedef struct rete_test_struct rete_test
 

Referenced by add_rete_test_list_to_tests(), add_rete_tests_for_test(), collect_nots(), constant_equal_rete_test_routine(), constant_greater_or_equal_rete_test_routine(), constant_greater_rete_test_routine(), constant_less_or_equal_rete_test_routine(), constant_less_rete_test_routine(), constant_not_equal_rete_test_routine(), constant_same_type_rete_test_routine(), deallocate_rete_test_list(), disjunction_rete_test_routine(), error_rete_test_routine(), extract_rete_test_to_hash_with(), id_is_goal_rete_test_routine(), id_is_impasse_rete_test_routine(), init_rete(), make_new_mp_node(), make_new_negative_node(), make_new_positive_node(), make_node_for_negative_cond(), make_node_for_positive_cond(), mp_node_left_addition(), mp_node_right_addition(), negative_node_left_addition(), negative_node_right_addition(), positive_node_left_addition(), positive_node_right_addition(), rete_test_lists_are_identical(), reteload_node_and_children(), reteload_rete_test(), reteload_rete_test_list(), retesave_rete_test(), retesave_rete_test_list(), single_rete_tests_are_identical(), unhashed_mp_node_left_addition(), unhashed_mp_node_right_addition(), unhashed_negative_node_left_addition(), unhashed_negative_node_right_addition(), unhashed_positive_node_left_addition(), unhashed_positive_node_right_addition(), variable_equal_rete_test_routine(), variable_greater_or_equal_rete_test_routine(), variable_greater_rete_test_routine(), variable_less_or_equal_rete_test_routine(), variable_less_rete_test_routine(), variable_not_equal_rete_test_routine(), and variable_same_type_rete_test_routine().

typedef struct right_mem_struct right_mem
 

Referenced by add_wme_to_alpha_mem(), find_or_make_alpha_mem(), init_rete(), mp_node_left_addition(), negative_node_left_addition(), positive_node_left_addition(), ppmi_aux(), remove_wme_from_alpha_mem(), remove_wme_from_rete(), unhashed_mp_node_left_addition(), unhashed_negative_node_left_addition(), unhashed_positive_node_left_addition(), and update_node_with_matches_from_above().

typedef struct three_field_varnames_struct three_field_varnames
 

typedef struct var_location_struct var_location
 

Referenced by add_rete_tests_for_test(), extract_rete_test_to_hash_with(), find_var_location(), fixup_rhs_value_variable_references(), make_new_mem_node(), make_new_mp_node(), make_new_negative_node(), make_node_for_negative_cond(), make_node_for_positive_cond(), and reteload_node_and_children().

typedef char varnames
 

Definition at line 2105 of file rete.c.

Referenced by add_unbound_varnames_in_test(), add_var_to_varnames(), and reteload_varnames().


Function Documentation

void add_gensymmed_equality_test test t,
char  first_letter
 

Definition at line 3314 of file rete.c.

References add_new_test_to_test(), generate_new_variable(), Symbol, and test.

Referenced by add_rete_test_list_to_tests(), and rete_node_to_conditions().

void add_hash_info_to_id_test condition cond,
byte  field_num,
rete_node_level  levels_up
 

Definition at line 3571 of file rete.c.

References add_new_test_to_test(), byte, condition, condition_struct::data, three_field_tests_struct::id_test, Symbol, test, condition_struct::condition_main_data_union::tests, and var_bound_in_reconstructed_conds().

Referenced by rete_node_to_conditions().

byte add_production_to_rete production p,
condition lhs_top,
instantiation refracted_inst,
bool  warn_on_duplicates
 

Definition at line 3043 of file rete.c.

References action, production_struct::action_list, adjust_sharing_factors_from_here_to_top(), production_struct::already_fired, action_struct::attr, rete_node_struct::b, build_network_for_condition_list(), byte, condition, deallocate_symbol_list_removing_references(), destructively_reverse_list(), discard_chunk_varnames, rete_node_struct::first_child, fixup_rhs_value_variable_references(), get_new_tc_number(), get_nvn_for_condition_list(), ms_change_struct::goal, action_struct::id, symbol_union::id, ms_change_struct::inst, instantiation, production_struct::instantiations, ms_change_struct::level, list, make_new_production_node(), ms_change, identifier_struct::ms_retractions, production_struct::name, action_struct::next, rete_node_struct::next_sibling, rete_node_struct::node_type, num_rhs_unbound_vars_for_new_prod, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, production_struct::p_node, p_node_data_struct::parents_nvn, pop_bindings_and_deallocate_list_of_variables(), action_struct::preference_type, print_with_symbols(), p_node_data_struct::prod, instantiation_struct::prod, production, PRODUCTION_JUST_ADDED_CALLBACK, action_struct::referent, rete_node, rete_node_level, instantiation_struct::rete_token, instantiation_struct::rete_wme, production_struct::rhs_unbound_variables, rhs_unbound_vars_for_new_prod, rhs_unbound_vars_tc, same_rhs(), soar_agent, soar_call_data, soar_invoke_callbacks(), p_node_data_struct::tentative_retractions, action_struct::type, production_struct::type, update_max_rhs_unbound_variables(), update_node_with_matches_from_above(), and action_struct::value.

Referenced by chunk_instantiation(), and parse_production().

void add_rete_test_list_to_tests condition cond,
rete_test rt
 

Definition at line 3390 of file rete.c.

References abort_with_fatal_error(), add_gensymmed_equality_test(), add_new_test_to_test(), three_field_tests_struct::attr_test, byte, complex_test, condition, rete_test_struct::rete_test_data_union::constant_referent, copy_symbol_list_adding_references(), condition_struct::data, rete_test_struct::data, complex_test_struct::data, rete_test_struct::rete_test_data_union::disjunction_list, complex_test_struct::test_info_union::disjunction_list, var_location_struct::field_num, first_letter_from_test(), three_field_tests_struct::id_test, var_location_struct::levels_up, rete_test_struct::next, complex_test_struct::test_info_union::referent, relational_test_type_to_test_type, rete_test, rete_test_struct::right_field_num, Symbol, test, test_includes_equality_test_for_symbol(), condition_struct::condition_main_data_union::tests, complex_test_struct::type, rete_test_struct::type, three_field_tests_struct::value_test, var_bound_in_reconstructed_conds(), and rete_test_struct::rete_test_data_union::variable_referent.

Referenced by rete_node_to_conditions().

void add_rete_tests_for_test test  t,
rete_node_level  current_depth,
byte  field_num,
rete_test **  rt,
Symbol **  alpha_constant
 

Definition at line 2365 of file rete.c.

References abort_with_fatal_error(), byte, complex_test, complex_test_struct::test_info_union::conjunct_list, cons, rete_test_struct::rete_test_data_union::constant_referent, copy_symbol_list_adding_references(), complex_test_struct::data, rete_test_struct::data, complex_test_struct::test_info_union::disjunction_list, var_location_struct::field_num, find_var_location(), cons_struct::first, var_location_struct::levels_up, rete_test_struct::next, print_with_symbols(), complex_test_struct::test_info_union::referent, cons_struct::rest, rete_test, rete_test_struct::right_field_num, Symbol, symbol_to_string(), test, test_type_to_relational_test_type, complex_test_struct::type, rete_test_struct::type, var_location, and rete_test_struct::rete_test_data_union::variable_referent.

Referenced by make_node_for_negative_cond(), and make_node_for_positive_cond().

varnames* add_unbound_varnames_in_test test  t,
varnames starting_vn
 

Definition at line 2198 of file rete.c.

References add_var_to_varnames(), complex_test, complex_test_struct::test_info_union::conjunct_list, cons, complex_test_struct::data, cons_struct::first, cons_struct::rest, Symbol, test, complex_test_struct::type, and varnames.

Referenced by make_nvn_for_posneg_cond().

varnames* add_var_to_varnames Symbol var,
varnames old_varnames
 

Definition at line 2128 of file rete.c.

References cons, cons_struct::first, cons_struct::rest, Symbol, and varnames.

Referenced by add_unbound_varnames_in_test().

void add_varnames_to_test varnames vn,
test t
 

Definition at line 3545 of file rete.c.

References add_new_test_to_test(), cons, cons_struct::first, cons_struct::rest, Symbol, and test.

Referenced by rete_node_to_conditions().

void add_wme_to_aht hash_table ht,
unsigned long  hash_value,
wme w
 

Definition at line 1215 of file rete.c.

References add_wme_to_alpha_mem(), alpha_mem, rete_node_struct::b, alpha_mem_struct::beta_nodes, hash_table_struct::buckets, hash_table, hash_table_struct::log2size, masks_for_n_low_order_bits, posneg_node_data_struct::next_from_alpha_mem, alpha_mem_struct::next_in_hash_table, rete_node_struct::node_type, rete_node_struct::rete_node_b_union::posneg, rete_node, right_addition_routines(), and wme.

Referenced by add_wme_to_rete().

void add_wme_to_alpha_mem wme w,
alpha_mem am
 

Definition at line 1097 of file rete.c.

References alpha_mem, right_mem_struct::am, alpha_mem_struct::am_id, wme_struct::id, right_mem, wme_struct::right_mems, alpha_mem_struct::right_mems, right_mem_struct::w, and wme.

Referenced by add_wme_to_aht(), and find_or_make_alpha_mem().

void add_wme_to_rete wme w  ) 
 

Definition at line 1241 of file rete.c.

References wme_struct::acceptable, add_wme_to_aht(), wme_struct::attr, wme_struct::id, wme_struct::right_mems, wme_struct::tokens, wme_struct::value, and wme.

Referenced by do_buffered_wm_changes().

void adjust_sharing_factors_from_here_to_top rete_node node,
int  delta
 

Definition at line 634 of file rete.c.

References rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, rete_node_struct::node_type, rete_node_struct::parent, cn_node_data_struct::partner, rete_node, and rete_node_struct::sharing_factor.

Referenced by add_production_to_rete(), excise_production_from_rete(), and reteload_node_and_children().

bool any_assertions_or_retractions_ready void   ) 
 

Definition at line 823 of file rete.c.

References identifier_struct::higher_goal, symbol_union::id, identifier_struct::ms_i_assertions, identifier_struct::ms_o_assertions, identifier_struct::ms_retractions, and Symbol.

Referenced by determine_highest_active_production_level_in_stack_apply(), and do_one_top_level_phase().

bool any_i_assertions_or_retractions_ready void   ) 
 

Definition at line 868 of file rete.c.

void beta_memory_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4189 of file rete.c.

References rete_node_struct::a, rete_node_struct::b, beta_memory_node_data_struct::first_linked_child, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, rete_node_struct::rete_node_b_union::mem, pos_node_data_struct::next_from_beta_mem, rete_node_struct::node_id, token_struct::parent, rete_node_struct::rete_node_a_union::pos, positive_node_left_addition(), rete_node, Symbol, token, token_struct::w, and wme.

Referenced by init_rete().

void bind_variables_in_test test  t,
rete_node_level  depth,
byte  field_num,
bool  dense,
list **  varlist
 

Definition at line 2027 of file rete.c.

References byte, complex_test, complex_test_struct::test_info_union::conjunct_list, cons, complex_test_struct::data, cons_struct::first, list, cons_struct::rest, Symbol, test, and complex_test_struct::type.

Referenced by build_network_for_condition_list(), get_nvn_for_condition_list(), make_node_for_negative_cond(), make_node_for_positive_cond(), and make_nvn_for_posneg_cond().

bool (*(rete_test_routines[256])  )(rete_test *rt, token *left, wme *w)  ) 
 

void build_network_for_condition_list condition cond_list,
rete_node_level  depth_of_first_cond,
rete_node parent,
rete_node **  dest_bottom_node,
rete_node_level dest_bottom_depth,
list **  dest_vars_bound
 

Definition at line 2806 of file rete.c.

References three_field_tests_struct::attr_test, rete_node_struct::b, bind_variables_in_test(), rete_node_struct::rete_node_b_union::cn, condition, condition_struct::data, rete_node_struct::first_child, three_field_tests_struct::id_test, list, make_new_cn_node(), make_node_for_negative_cond(), make_node_for_positive_cond(), condition_struct::condition_main_data_union::ncc, condition_struct::next, rete_node_struct::next_sibling, rete_node_struct::node_type, rete_node_struct::parent, cn_node_data_struct::partner, pop_bindings_and_deallocate_list_of_variables(), rete_node, rete_node_level, condition_struct::condition_main_data_union::tests, ncc_info_struct::top, condition_struct::type, and three_field_tests_struct::value_test.

Referenced by add_production_to_rete().

void cn_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4878 of file rete.c.

References token_struct::a, rete_node_struct::first_child, token_struct::token_a_union::ht, left_addition_routines(), token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, token_struct::parent, rete_node, token, token_struct::w, and wme.

Referenced by init_rete().

void cn_partner_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4910 of file rete.c.

References token_struct::a, rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, token_struct::first_child, token_struct::token_a_union::ht, token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, token_struct::token_a_union::neg, token_struct::negrm_tokens, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, token_struct::node, rete_node_struct::node_id, token_struct::parent, rete_node_struct::parent, cn_node_data_struct::partner, remove_token_and_subtree(), rete_node, token, token_struct::w, and wme.

Referenced by init_rete().

void collect_nots rete_test rt,
wme right_wme,
condition cond
 

Definition at line 3488 of file rete.c.

References condition, rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, var_location_struct::field_num, var_location_struct::levels_up, not_struct::next, rete_test_struct::next, not, nots_found_in_production, rete_test, rete_test_struct::right_field_num, not_struct::s1, Symbol, rete_test_struct::type, var_bound_in_reconstructed_conds(), rete_test_struct::rete_test_data_union::variable_referent, and wme.

Referenced by rete_node_to_conditions().

bool constant_equal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3941 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test, rete_test_struct::right_field_num, Symbol, token, and wme.

Referenced by init_rete().

bool constant_greater_or_equal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3996 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test, rete_test_struct::right_field_num, Symbol, token, and wme.

Referenced by init_rete().

bool constant_greater_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3974 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test, rete_test_struct::right_field_num, Symbol, token, and wme.

Referenced by init_rete().

bool constant_less_or_equal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3985 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test, rete_test_struct::right_field_num, Symbol, token, and wme.

Referenced by init_rete().

bool constant_less_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3963 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test, rete_test_struct::right_field_num, Symbol, token, and wme.

Referenced by init_rete().

bool constant_not_equal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3952 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test, rete_test_struct::right_field_num, Symbol, token, and wme.

Referenced by init_rete().

bool constant_same_type_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 4007 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test, rete_test_struct::right_field_num, Symbol, token, and wme.

Referenced by init_rete().

action* copy_action_list_and_substitute_varnames action actions,
condition cond
 

Definition at line 3753 of file rete.c.

References action, action_struct::attr, condition, copy_rhs_value_and_substitute_varnames(), first_letter_from_rhs_value(), action_struct::id, action_struct::next, action_struct::preference_type, action_struct::referent, action_struct::support, action_struct::type, and action_struct::value.

Referenced by p_node_to_conditions_and_nots().

rhs_value copy_rhs_value_and_substitute_varnames rhs_value  rv,
condition cond,
char  first_letter
 

Definition at line 3702 of file rete.c.

References byte, condition, cons, cons_struct::first, generate_new_variable(), highest_rhs_unboundvar_index, list, cons_struct::rest, rete_node_level, rhs_value, Symbol, and var_bound_in_reconstructed_conds().

Referenced by copy_action_list_and_substitute_varnames().

unsigned long count_rete_tokens_for_production production prod  ) 
 

Definition at line 6907 of file rete.c.

References rete_node_struct::a, rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, token_struct::next_of_node, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, production_struct::p_node, rete_node_struct::parent, cn_node_data_struct::partner, production, rete_node, token, and non_pos_node_data_struct::tokens.

Referenced by soar_ecPrintMemories(), and soar_Memories().

void deallocate_node_varnames rete_node node,
rete_node cutoff,
node_varnames nvn
 

Definition at line 2167 of file rete.c.

References three_field_varnames_struct::attr_varnames, rete_node_struct::b, node_varnames_struct::varname_data_union::bottom_of_subconditions, rete_node_struct::rete_node_b_union::cn, node_varnames_struct::data, deallocate_varnames(), node_varnames_struct::varname_data_union::fields, three_field_varnames_struct::id_varnames, rete_node_struct::node_type, node_varnames, node_varnames_struct::parent, rete_node_struct::parent, cn_node_data_struct::partner, rete_node, and three_field_varnames_struct::value_varnames.

Referenced by excise_production_from_rete().

void deallocate_rete_node rete_node node  ) 
 

Definition at line 1892 of file rete.c.

References rete_node_struct::a, abort_with_fatal_error(), posneg_node_data_struct::alpha_mem, rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, deallocate_rete_test_list(), rete_node_struct::first_child, merge_into_mp_node(), rete_node_struct::next_sibling, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, rete_node_struct::parent, cn_node_data_struct::partner, rete_node_struct::rete_node_b_union::posneg, remove_node_from_parents_list_of_children(), remove_ref_to_alpha_mem(), remove_token_and_subtree(), rete_node, and non_pos_node_data_struct::tokens.

Referenced by excise_production_from_rete().

void deallocate_rete_test_list rete_test rt  ) 
 

Definition at line 1874 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, deallocate_symbol_list_removing_references(), rete_test_struct::rete_test_data_union::disjunction_list, rete_test_struct::next, rete_test, and rete_test_struct::type.

Referenced by deallocate_rete_node(), extract_rete_test_to_hash_with(), make_node_for_negative_cond(), and make_node_for_positive_cond().

void deallocate_token_list token t  ) 
 

Definition at line 7142 of file rete.c.

References token_struct::next_of_node, and token.

Referenced by ppmi_aux(), and print_partial_match_information().

void deallocate_varnames varnames vn  ) 
 

Definition at line 2151 of file rete.c.

References deallocate_symbol_list_removing_references(), list, and Symbol.

Referenced by deallocate_node_varnames().

bool disjunction_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3927 of file rete.c.

References cons, rete_test_struct::data, rete_test_struct::rete_test_data_union::disjunction_list, cons_struct::first, cons_struct::rest, rete_test, rete_test_struct::right_field_num, Symbol, token, and wme.

Referenced by init_rete().

void dummy_matches_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 7111 of file rete.c.

References dummy_matches_node_tokens, rete_node_struct::parent, rete_node, token, token_struct::w, and wme.

Referenced by init_rete().

bool error_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3896 of file rete.c.

References abort_with_fatal_error(), rete_test, token, and wme.

Referenced by init_rete().

void excise_production_from_rete production p  ) 
 

Definition at line 3235 of file rete.c.

References rete_node_struct::a, adjust_sharing_factors_from_here_to_top(), rete_node_struct::b, deallocate_node_varnames(), deallocate_rete_node(), rete_node_struct::first_child, ms_change, ms_change_struct::next_of_node, rete_node_struct::rete_node_a_union::np, rete_node_struct::rete_node_b_union::p, production_struct::p_node, ms_change_struct::p_node, rete_node_struct::parent, p_node_data_struct::parents_nvn, production, PRODUCTION_JUST_ABOUT_TO_BE_EXCISED_CALLBACK, remove_node_from_parents_list_of_children(), remove_token_and_subtree(), rete_node, soar_agent, soar_call_data, soar_invoke_callbacks(), p_node_data_struct::tentative_retractions, and non_pos_node_data_struct::tokens.

Referenced by excise_production().

bool extract_rete_test_to_hash_with rete_test **  rt,
var_location dest_hash_loc
 

Definition at line 2583 of file rete.c.

References deallocate_rete_test_list(), rete_test_struct::next, rete_test, and var_location.

Referenced by make_node_for_negative_cond(), and make_node_for_positive_cond().

alpha_mem* find_alpha_mem Symbol id,
Symbol attr,
Symbol value,
bool  acceptable
 

Definition at line 1139 of file rete.c.

References alpha_mem_struct::acceptable, alpha_mem, alpha_mem_struct::attr, hash_table_struct::buckets, hash_table, alpha_mem_struct::id, hash_table_struct::log2size, alpha_mem_struct::next_in_hash_table, Symbol, and alpha_mem_struct::value.

Referenced by find_or_make_alpha_mem().

Symbol* find_goal_for_match_set_change_assertion ms_change msc  ) 
 

Definition at line 724 of file rete.c.

References abort_with_fatal_error(), rete_node_struct::b, goal_stack_level, symbol_union::id, wme_struct::id, identifier_struct::isa_goal, identifier_struct::level, ms_change, production_struct::name, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, token_struct::parent, print_with_symbols(), p_node_data_struct::prod, Symbol, symbol_to_string(), ms_change_struct::tok, token, token_struct::w, ms_change_struct::w, and wme.

Referenced by p_node_left_addition().

Symbol* find_goal_for_match_set_change_retraction ms_change msc  ) 
 

Definition at line 779 of file rete.c.

References ms_change_struct::inst, instantiation_struct::match_goal, ms_change, production_struct::name, print(), print_with_symbols(), instantiation_struct::prod, and Symbol.

Referenced by p_node_left_removal().

alpha_mem* find_or_make_alpha_mem Symbol id,
Symbol attr,
Symbol value,
bool  acceptable
 

Definition at line 1156 of file rete.c.

References alpha_mem_struct::acceptable, add_to_hash_table(), add_wme_to_alpha_mem(), alpha_mem, alpha_mem_struct::am_id, alpha_mem_struct::attr, alpha_mem_struct::beta_nodes, find_alpha_mem(), hash_table, alpha_mem_struct::id, alpha_mem_struct::last_beta_node, right_mem_struct::next_in_am, alpha_mem_struct::next_in_hash_table, alpha_mem_struct::reference_count, wme_struct::rete_next, right_mem, alpha_mem_struct::right_mems, Symbol, alpha_mem_struct::value, right_mem_struct::w, and wme.

Referenced by make_node_for_negative_cond(), make_node_for_positive_cond(), and reteload_alpha_memories().

bool find_var_location Symbol var,
rete_node_level  current_depth,
var_location result
 

Definition at line 2005 of file rete.c.

References byte, var_location_struct::field_num, cons_struct::first, var_location_struct::levels_up, variable_struct::rete_binding_locations, rete_node_level, Symbol, symbol_union::var, and var_location.

Referenced by add_rete_tests_for_test(), and fixup_rhs_value_variable_references().

void fixup_rhs_value_variable_references rhs_value rv,
rete_node_level  bottom_depth
 

Definition at line 2957 of file rete.c.

References cons, variable_struct::current_binding_value, var_location_struct::field_num, find_var_location(), cons_struct::first, var_location_struct::levels_up, num_rhs_unbound_vars_for_new_prod, cons_struct::rest, rete_node_level, rhs_unbound_vars_for_new_prod, rhs_unbound_vars_tc, rhs_value, Symbol, variable_struct::tc_num, symbol_union::var, and var_location.

Referenced by add_production_to_rete().

token* get_all_left_tokens_emerging_from_node rete_node node  ) 
 

Definition at line 7126 of file rete.c.

References dummy_matches_node, dummy_matches_node_tokens, rete_node_struct::first_child, rete_node_struct::next_sibling, rete_node_struct::node_type, rete_node_struct::parent, rete_node, token, and update_node_with_matches_from_above().

Referenced by ppmi_aux(), and print_partial_match_information().

void get_all_node_count_stats void   ) 
 

Definition at line 6950 of file rete.c.

References actual, bnode_type_names, if_no_merging, if_no_sharing, and print().

Referenced by get_node_count_statistic(), and print_node_count_statistics().

bool get_next_assertion production **  prod,
struct token_struct **  tok,
wme **  w
 

Definition at line 875 of file rete.c.

References abort_with_fatal_error(), rete_node_struct::b, ms_change, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, p_node_data_struct::prod, production, p_node_data_struct::tentative_assertions, ms_change_struct::tok, ms_change_struct::w, and wme.

Referenced by retract_instantiation().

bool get_next_nil_goal_retraction instantiation **  inst  ) 
 

Definition at line 1013 of file rete.c.

References rete_node_struct::b, ms_change_struct::inst, instantiation, ms_change, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, and p_node_data_struct::tentative_retractions.

bool get_next_retraction instantiation **  inst  ) 
 

Definition at line 957 of file rete.c.

References rete_node_struct::b, ms_change_struct::inst, instantiation, ms_change, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, and p_node_data_struct::tentative_retractions.

int get_node_count_statistic const char *  node_type_name,
const char *  column_name,
unsigned long result
 

Definition at line 7035 of file rete.c.

References actual, bnode_type_names, get_all_node_count_stats(), if_no_merging, and if_no_sharing.

Referenced by parse_rete_stats().

node_varnames* get_nvn_for_condition_list condition cond_list,
node_varnames parent_nvn
 

Definition at line 2250 of file rete.c.

References three_field_tests_struct::attr_test, bind_variables_in_test(), node_varnames_struct::varname_data_union::bottom_of_subconditions, condition, node_varnames_struct::data, condition_struct::data, three_field_tests_struct::id_test, list, make_nvn_for_posneg_cond(), condition_struct::condition_main_data_union::ncc, condition_struct::next, node_varnames, pop_bindings_and_deallocate_list_of_variables(), condition_struct::condition_main_data_union::tests, ncc_info_struct::top, condition_struct::type, and three_field_tests_struct::value_test.

Referenced by add_production_to_rete().

Symbol* get_symbol_from_rete_loc unsigned short  levels_up,
byte  field_num,
token tok,
wme w
 

Definition at line 3847 of file rete.c.

References wme_struct::attr, byte, wme_struct::id, token_struct::parent, Symbol, token, wme_struct::value, token_struct::w, and wme.

unsigned long hash_alpha_mem void *  item,
short  num_bits
 

Definition at line 1079 of file rete.c.

References alpha_mem, alpha_mem_struct::attr, alpha_mem_struct::id, and alpha_mem_struct::value.

Referenced by init_rete().

bool id_is_goal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3910 of file rete.c.

References symbol_union::id, wme_struct::id, identifier_struct::isa_goal, rete_test, token, and wme.

Referenced by init_rete().

bool id_is_impasse_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 3918 of file rete.c.

References symbol_union::id, wme_struct::id, identifier_struct::isa_impasse, rete_test, token, and wme.

Referenced by init_rete().

MS_trace* in_ms_trace Symbol sym,
MS_trace trace
 

Definition at line 7284 of file rete.c.

References MS_trace, match_set_trace::next, match_set_trace::sym, and Symbol.

Referenced by print_match_set().

MS_trace* in_ms_trace_same_goal Symbol sym,
MS_trace trace,
Symbol goal
 

Definition at line 7295 of file rete.c.

References match_set_trace::goal, MS_trace, match_set_trace::next, match_set_trace::sym, and Symbol.

Referenced by print_match_set().

void init_dummy_top_node  ) 
 

Definition at line 1390 of file rete.c.

References rete_node_struct::a, rete_node_struct::first_child, rete_node_struct::next_sibling, rete_node_struct::rete_node_a_union::np, and non_pos_node_data_struct::tokens.

Referenced by init_rete().

void init_rete void   ) 
 

Definition at line 7315 of file rete.c.

References allocate_memory_and_zerofill(), alpha_mem, beta_memory_node_left_addition(), bnode_type_names, cn_node_left_addition(), cn_partner_node_left_addition(), constant_equal_rete_test_routine(), constant_greater_or_equal_rete_test_routine(), constant_greater_rete_test_routine(), constant_less_or_equal_rete_test_routine(), constant_less_rete_test_routine(), constant_not_equal_rete_test_routine(), constant_same_type_rete_test_routine(), disjunction_rete_test_routine(), dummy_matches_node_left_addition(), error_rete_test_routine(), hash_alpha_mem(), id_is_goal_rete_test_routine(), id_is_impasse_rete_test_routine(), init_dummy_top_node(), init_memory_pool(), init_test_type_conversion_tables(), left_addition_routines(), make_hash_table(), mp_node_left_addition(), mp_node_right_addition(), ms_change, negative_node_left_addition(), negative_node_right_addition(), node_varnames, p_node_left_addition(), positive_node_right_addition(), rete_error_left(), rete_error_right(), rete_node, rete_test, right_addition_routines(), right_mem, Symbol, token, unhashed_beta_memory_node_left_addition(), unhashed_mp_node_left_addition(), unhashed_mp_node_right_addition(), unhashed_negative_node_left_addition(), unhashed_negative_node_right_addition(), unhashed_positive_node_right_addition(), variable_equal_rete_test_routine(), variable_greater_or_equal_rete_test_routine(), variable_greater_rete_test_routine(), variable_less_or_equal_rete_test_routine(), variable_less_rete_test_routine(), variable_not_equal_rete_test_routine(), and variable_same_type_rete_test_routine().

Referenced by init_soar_agent().

void init_test_type_conversion_tables void   ) 
 

Definition at line 2318 of file rete.c.

References relational_test_type_to_test_type, and test_type_to_relational_test_type.

Referenced by init_rete().

void left_addition_routines rete_node node,
token tok,
wme w
 

Referenced by cn_node_left_addition(), init_rete(), mp_node_left_addition(), mp_node_right_addition(), negative_node_left_addition(), positive_node_left_addition(), positive_node_right_addition(), remove_token_and_subtree(), remove_wme_from_rete(), unhashed_mp_node_left_addition(), unhashed_mp_node_right_addition(), unhashed_negative_node_left_addition(), unhashed_positive_node_left_addition(), unhashed_positive_node_right_addition(), and update_node_with_matches_from_above().

bool load_rete_net FILE *  source_file  ) 
 

Definition at line 6841 of file rete.c.

References print(), rete_fs_file, reteload_all_symbols(), reteload_alpha_memories(), reteload_four_bytes(), reteload_free_am_table(), reteload_free_symbol_table(), reteload_node_and_children(), reteload_one_byte(), reteload_string(), and reteload_string_buf.

Referenced by soar_cLoadReteNet().

rete_node* make_new_cn_node rete_node parent,
rete_node bottom_of_subconditions
 

Definition at line 1788 of file rete.c.

References rete_node_struct::a, rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, rete_node_struct::first_child, rete_node_struct::next_sibling, rete_node_struct::node_id, rete_node_struct::rete_node_a_union::np, rete_node_struct::parent, cn_node_data_struct::partner, remove_node_from_parents_list_of_children(), rete_node, non_pos_node_data_struct::tokens, and update_node_with_matches_from_above().

Referenced by build_network_for_condition_list(), and reteload_node_and_children().

rete_node* make_new_mem_node rete_node parent,
byte  node_type,
var_location  left_hash_loc
 

Definition at line 1524 of file rete.c.

References rete_node_struct::a, rete_node_struct::b, byte, var_location_struct::field_num, rete_node_struct::first_child, beta_memory_node_data_struct::first_linked_child, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, var_location_struct::levels_up, rete_node_struct::rete_node_b_union::mem, rete_node_struct::next_sibling, rete_node_struct::node_id, rete_node_struct::rete_node_a_union::np, rete_node_struct::parent, rete_node, non_pos_node_data_struct::tokens, update_node_with_matches_from_above(), and var_location.

Referenced by make_new_mp_node(), and reteload_node_and_children().

rete_node* make_new_mp_node rete_node parent,
byte  node_type,
var_location  left_hash_loc,
alpha_mem am,
rete_test rt,
bool  prefer_left_unlinking
 

Definition at line 1727 of file rete.c.

References alpha_mem, byte, make_new_mem_node(), make_new_positive_node(), merge_into_mp_node(), rete_node, rete_test, and var_location.

Referenced by make_node_for_positive_cond(), and reteload_node_and_children().

rete_node* make_new_negative_node rete_node parent,
byte  node_type,
var_location  left_hash_loc,
alpha_mem am,
rete_test rt
 

Definition at line 1751 of file rete.c.

References rete_node_struct::a, posneg_node_data_struct::alpha_mem, alpha_mem, rete_node_struct::b, byte, var_location_struct::field_num, rete_node_struct::first_child, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, var_location_struct::levels_up, nearest_ancestor_with_same_am(), posneg_node_data_struct::nearest_ancestor_with_same_am, rete_node_struct::next_sibling, rete_node_struct::node_id, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, rete_node_struct::parent, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, non_pos_node_data_struct::tokens, update_node_with_matches_from_above(), and var_location.

Referenced by make_node_for_negative_cond(), and reteload_node_and_children().

rete_node* make_new_positive_node rete_node parent_mem,
byte  node_type,
alpha_mem am,
rete_test rt,
bool  prefer_left_unlinking
 

Definition at line 1553 of file rete.c.

References rete_node_struct::a, posneg_node_data_struct::alpha_mem, alpha_mem, rete_node_struct::b, byte, rete_node_struct::first_child, nearest_ancestor_with_same_am(), posneg_node_data_struct::nearest_ancestor_with_same_am, rete_node_struct::next_sibling, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, rete_node_struct::parent, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, alpha_mem_struct::right_mems, and non_pos_node_data_struct::tokens.

Referenced by make_new_mp_node(), make_node_for_positive_cond(), and reteload_node_and_children().

rete_node* make_new_production_node rete_node parent,
production new_prod
 

Definition at line 1843 of file rete.c.

References rete_node_struct::a, rete_node_struct::b, rete_node_struct::first_child, rete_node_struct::next_sibling, rete_node_struct::rete_node_a_union::np, rete_node_struct::rete_node_b_union::p, production_struct::p_node, rete_node_struct::parent, p_node_data_struct::prod, production, rete_node, p_node_data_struct::tentative_assertions, p_node_data_struct::tentative_retractions, and non_pos_node_data_struct::tokens.

Referenced by add_production_to_rete(), and reteload_node_and_children().

rete_node* make_node_for_negative_cond condition cond,
rete_node_level  current_depth,
rete_node parent
 

Definition at line 2731 of file rete.c.

References add_rete_tests_for_test(), posneg_node_data_struct::alpha_mem, alpha_mem, three_field_tests_struct::attr_test, rete_node_struct::b, bind_variables_in_test(), byte, condition, condition_struct::data, deallocate_rete_test_list(), extract_rete_test_to_hash_with(), var_location_struct::field_num, find_or_make_alpha_mem(), rete_node_struct::first_child, three_field_tests_struct::id_test, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, var_location_struct::levels_up, list, make_new_negative_node(), rete_node_struct::next_sibling, rete_node_struct::node_type, posneg_node_data_struct::other_tests, pop_bindings_and_deallocate_list_of_variables(), rete_node_struct::rete_node_b_union::posneg, remove_ref_to_alpha_mem(), rete_node, rete_test, rete_test_lists_are_identical(), Symbol, condition_struct::test_for_acceptable_preference, condition_struct::condition_main_data_union::tests, three_field_tests_struct::value_test, and var_location.

Referenced by build_network_for_condition_list().

rete_node* make_node_for_positive_cond condition cond,
rete_node_level  current_depth,
rete_node parent
 

Definition at line 2619 of file rete.c.

References add_rete_tests_for_test(), posneg_node_data_struct::alpha_mem, alpha_mem, three_field_tests_struct::attr_test, rete_node_struct::b, bind_variables_in_test(), byte, condition, condition_struct::data, deallocate_rete_test_list(), extract_rete_test_to_hash_with(), var_location_struct::field_num, find_or_make_alpha_mem(), rete_node_struct::first_child, three_field_tests_struct::id_test, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, var_location_struct::levels_up, list, make_new_mp_node(), make_new_positive_node(), rete_node_struct::next_sibling, rete_node_struct::node_type, posneg_node_data_struct::other_tests, pop_bindings_and_deallocate_list_of_variables(), rete_node_struct::rete_node_b_union::posneg, remove_ref_to_alpha_mem(), rete_node, rete_test, rete_test_lists_are_identical(), split_mp_node(), Symbol, condition_struct::test_for_acceptable_preference, condition_struct::condition_main_data_union::tests, three_field_tests_struct::value_test, and var_location.

Referenced by build_network_for_condition_list().

node_varnames* make_nvn_for_posneg_cond condition cond,
node_varnames parent_nvn
 

Definition at line 2223 of file rete.c.

References add_unbound_varnames_in_test(), three_field_tests_struct::attr_test, bind_variables_in_test(), condition, condition_struct::data, node_varnames_struct::data, node_varnames_struct::varname_data_union::fields, three_field_tests_struct::id_test, three_field_varnames_struct::id_varnames, list, node_varnames, pop_bindings_and_deallocate_list_of_variables(), condition_struct::condition_main_data_union::tests, and three_field_tests_struct::value_test.

Referenced by get_nvn_for_condition_list().

rete_node* merge_into_mp_node rete_node mem_node  ) 
 

Definition at line 1660 of file rete.c.

References rete_node_struct::a, abort_with_fatal_error(), rete_node_struct::b, byte, rete_node_struct::first_child, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, token_struct::next_of_node, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, rete_node_struct::parent, rete_node_struct::rete_node_b_union::posneg, remove_node_from_parents_list_of_children(), rete_node, rete_node_struct::sharing_factor, token, and non_pos_node_data_struct::tokens.

Referenced by deallocate_rete_node(), and make_new_mp_node().

void mp_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4339 of file rete.c.

References posneg_node_data_struct::alpha_mem, alpha_mem, right_mem_struct::am, alpha_mem_struct::am_id, rete_node_struct::b, rete_node_struct::first_child, wme_struct::id, left_addition_routines(), rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, rete_test_struct::next, right_mem_struct::next_in_bucket, rete_node_struct::next_sibling, rete_node_struct::node_id, rete_node_struct::node_type, posneg_node_data_struct::other_tests, token_struct::parent, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, right_mem, alpha_mem_struct::right_mems, Symbol, token, right_mem_struct::w, token_struct::w, and wme.

Referenced by init_rete().

void mp_node_right_addition rete_node node,
wme w
 

Definition at line 4553 of file rete.c.

References token_struct::a, rete_node_struct::a, rete_node_struct::b, rete_node_struct::first_child, token_struct::token_a_union::ht, wme_struct::id, left_addition_routines(), rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, rete_node_struct::rete_node_b_union::posneg, token_struct::token_a_union::token_in_hash_table_data_struct::referent, rete_node, rete_test, Symbol, token, non_pos_node_data_struct::tokens, and wme.

Referenced by init_rete().

rete_node* nearest_ancestor_with_same_am rete_node node,
alpha_mem am
 

Definition at line 1505 of file rete.c.

References posneg_node_data_struct::alpha_mem, alpha_mem, rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, rete_node_struct::node_type, rete_node_struct::parent, cn_node_data_struct::partner, rete_node_struct::rete_node_b_union::posneg, and rete_node.

Referenced by make_new_negative_node(), and make_new_positive_node().

void negative_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4645 of file rete.c.

References token_struct::a, posneg_node_data_struct::alpha_mem, alpha_mem, right_mem_struct::am, alpha_mem_struct::am_id, rete_node_struct::b, rete_node_struct::first_child, token_struct::first_child, wme_struct::id, left_addition_routines(), rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, token_struct::token_a_union::neg, rete_test_struct::next, right_mem_struct::next_in_bucket, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, posneg_node_data_struct::other_tests, token_struct::parent, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, right_mem, Symbol, token, wme_struct::tokens, right_mem_struct::w, token_struct::w, and wme.

Referenced by init_rete().

void negative_node_right_addition rete_node node,
wme w
 

Definition at line 4781 of file rete.c.

References token_struct::a, rete_node_struct::b, token_struct::first_child, token_struct::token_a_union::ht, wme_struct::id, token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, token_struct::token_a_union::neg, token_struct::negrm_tokens, rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, token_struct::node, rete_node_struct::node_id, posneg_node_data_struct::other_tests, token_struct::parent, rete_node_struct::rete_node_b_union::posneg, token_struct::token_a_union::token_in_hash_table_data_struct::referent, remove_token_and_subtree(), rete_node, rete_test, Symbol, token, wme_struct::tokens, token_struct::w, and wme.

Referenced by init_rete().

void null_activation_stats_for_left_activation rete_node node  ) 
 

Definition at line 570 of file rete.c.

References posneg_node_data_struct::alpha_mem, rete_node_struct::b, rete_node_struct::node_type, rete_node_struct::rete_node_b_union::posneg, rete_node, and alpha_mem_struct::right_mems.

void null_activation_stats_for_right_activation rete_node node  ) 
 

Definition at line 550 of file rete.c.

References rete_node_struct::a, node_to_ignore_for_activation_stats, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, rete_node_struct::parent, rete_node, and non_pos_node_data_struct::tokens.

void p_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4991 of file rete.c.

References rete_node_struct::a, wme_struct::acceptable, action, production_struct::action_list, production_struct::already_fired, wme_struct::attr, action_struct::attr, rete_node_struct::b, instantiation_struct::bottom_of_instantiated_conditions, condition_struct::bt, byte, condition, production_struct::declared_support, find_goal_for_match_set_change_assertion(), get_symbol_from_rete_loc(), ms_change_struct::goal, action_struct::id, wme_struct::id, symbol_union::id, ms_change_struct::inst, production_struct::interrupt, identifier_struct::isa_goal, identifier_struct::level, ms_change_struct::level, ms_change, identifier_struct::ms_i_assertions, identifier_struct::ms_o_assertions, identifier_struct::ms_retractions, production_struct::name, action_struct::next, token_struct::next_of_node, ms_change_struct::next_of_node, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, production_struct::OPERAND_which_assert_list, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, token_struct::parent, rete_node_struct::parent, action_struct::preference_type, condition_struct::prev, print(), print_with_symbols(), p_node_data_struct::prod, rete_node, instantiation_struct::rete_token, instantiation_struct::rete_wme, rhs_value_to_string(), symbol_to_string(), p_node_data_struct::tentative_assertions, p_node_data_struct::tentative_retractions, ms_change_struct::tok, token, non_pos_node_data_struct::tokens, action_struct::type, production_struct::type, wme_struct::value, ms_change_struct::w, token_struct::w, bt_info_struct::wme, and wme.

Referenced by init_rete().

void p_node_left_removal rete_node node,
token tok,
wme w
 

Definition at line 5413 of file rete.c.

References abort_with_fatal_error(), rete_node_struct::b, find_goal_for_match_set_change_retraction(), ms_change_struct::goal, symbol_union::id, ms_change_struct::inst, instantiation, production_struct::instantiations, production_struct::interrupt, identifier_struct::level, ms_change_struct::level, identifier_struct::link_count, ms_change, identifier_struct::ms_i_assertions, identifier_struct::ms_o_assertions, identifier_struct::ms_retractions, production_struct::name, ms_change_struct::next, instantiation_struct::next, ms_change_struct::next_in_level, ms_change_struct::next_of_node, production_struct::OPERAND_which_assert_list, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, print(), print_with_symbols(), instantiation_struct::prod, p_node_data_struct::prod, rete_node, instantiation_struct::rete_token, instantiation_struct::rete_wme, p_node_data_struct::tentative_assertions, p_node_data_struct::tentative_retractions, ms_change_struct::tok, token, production_struct::type, ms_change_struct::w, and wme.

Referenced by remove_token_and_subtree().

void p_node_to_conditions_and_nots rete_node p_node,
token tok,
wme w,
condition **  dest_top_cond,
condition **  dest_bottom_cond,
not **  dest_nots,
action **  dest_rhs
 

Definition at line 3807 of file rete.c.

References action, production_struct::action_list, rete_node_struct::b, condition, cons, copy_action_list_and_substitute_varnames(), cons_struct::first, highest_rhs_unboundvar_index, not, nots_found_in_production, rete_node_struct::rete_node_b_union::p, rete_node_struct::parent, p_node_data_struct::parents_nvn, p_node_data_struct::prod, production, reset_variable_generator(), cons_struct::rest, rete_node, rete_node_to_conditions(), production_struct::rhs_unbound_variables, Symbol, token, and wme.

void pop_bindings_and_deallocate_list_of_variables list vars  ) 
 

Definition at line 2061 of file rete.c.

References cons, cons_struct::first, list, and cons_struct::rest.

Referenced by add_production_to_rete(), build_network_for_condition_list(), get_nvn_for_condition_list(), make_node_for_negative_cond(), make_node_for_positive_cond(), and make_nvn_for_posneg_cond().

void positive_node_left_addition rete_node node,
token new,
Symbol hash_referent
 

Definition at line 4256 of file rete.c.

References posneg_node_data_struct::alpha_mem, alpha_mem, right_mem_struct::am, alpha_mem_struct::am_id, rete_node_struct::b, rete_node_struct::first_child, wme_struct::id, left_addition_routines(), rete_test_struct::next, right_mem_struct::next_in_bucket, rete_node_struct::next_sibling, rete_node_struct::node_type, posneg_node_data_struct::other_tests, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, right_mem, alpha_mem_struct::right_mems, Symbol, token, and right_mem_struct::w.

Referenced by beta_memory_node_left_addition().

void positive_node_right_addition rete_node node,
wme w
 

Definition at line 4467 of file rete.c.

References token_struct::a, rete_node_struct::a, rete_node_struct::b, rete_node_struct::first_child, token_struct::token_a_union::ht, wme_struct::id, left_addition_routines(), rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, rete_node_struct::parent, rete_node_struct::rete_node_b_union::posneg, token_struct::token_a_union::token_in_hash_table_data_struct::referent, rete_node, rete_test, Symbol, token, non_pos_node_data_struct::tokens, and wme.

Referenced by init_rete().

long ppmi_aux rete_node node,
rete_node cutoff,
condition cond,
wme_trace_type  wtt,
int  indent
 

Definition at line 7191 of file rete.c.

References posneg_node_data_struct::alpha_mem, rete_node_struct::b, ncc_info_struct::bottom, rete_node_struct::rete_node_b_union::cn, condition, condition_struct::data, deallocate_token_list(), get_all_left_tokens_emerging_from_node(), condition_struct::condition_main_data_union::ncc, right_mem_struct::next_in_am, token_struct::next_of_node, cn_node_data_struct::partner, rete_node_struct::rete_node_b_union::posneg, condition_struct::prev, print(), print_condition(), print_spaces(), print_whole_token(), print_wme(), rete_node, right_mem, alpha_mem_struct::right_mems, wme_struct::timetag, token, condition_struct::type, right_mem_struct::w, and wme_trace_type.

Referenced by print_partial_match_information().

void print_assertion ms_change msc  ) 
 

Definition at line 803 of file rete.c.

References rete_node_struct::b, ms_change, production_struct::name, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, print(), print_with_symbols(), and p_node_data_struct::prod.

Referenced by highest_active_goal_apply(), and highest_active_goal_propose().

void print_match_set wme_trace_type  wtt,
ms_trace_type  mst
 

Definition at line 7413 of file rete.c.

References allocate_memory(), rete_node_struct::b, match_set_trace::count, free_memory(), ms_change_struct::goal, match_set_trace::goal, in_ms_trace(), in_ms_trace_same_goal(), ms_change_struct::inst, ms_change, MS_trace, ms_trace_type, production_struct::name, ms_change_struct::next, match_set_trace::next, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, token_struct::parent, print(), print_instantiation_with_wmes(), print_whole_token(), print_with_symbols(), p_node_data_struct::prod, instantiation_struct::prod, match_set_trace::sym, ms_change_struct::tok, token, token_struct::w, ms_change_struct::w, and wme_trace_type.

Referenced by soar_ecPrintMatchSet().

void print_node_count_statistics void   ) 
 

Definition at line 6987 of file rete.c.

References actual, bnode_type_names, get_all_node_count_stats(), if_no_merging, if_no_sharing, and print().

Referenced by soar_ecPrintReteStatistics().

void print_null_activation_stats void   ) 
 

Definition at line 590 of file rete.c.

References print().

Referenced by soar_ecPrintReteStatistics().

void print_partial_match_information rete_node p_node,
wme_trace_type  wtt
 

Definition at line 7629 of file rete.c.

References condition, deallocate_condition_list(), deallocate_token_list(), get_all_left_tokens_emerging_from_node(), token_struct::next_of_node, p_node_to_conditions_and_nots(), rete_node_struct::parent, ppmi_aux(), print(), print_whole_token(), rete_node, token, and wme_trace_type.

void print_retraction ms_change msc  ) 
 

Definition at line 812 of file rete.c.

References rete_node_struct::b, ms_change, production_struct::name, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, print(), print_with_symbols(), and p_node_data_struct::prod.

Referenced by highest_active_goal_apply(), and highest_active_goal_propose().

void print_whole_token token t,
wme_trace_type  wtt
 

Definition at line 7153 of file rete.c.

References token_struct::parent, print(), print_wme(), wme_struct::timetag, token, token_struct::w, and wme_trace_type.

Referenced by ppmi_aux(), print_match_set(), and print_partial_match_information().

void remove_node_from_parents_list_of_children rete_node node  ) 
 

Definition at line 1422 of file rete.c.

References rete_node_struct::first_child, rete_node_struct::next_sibling, rete_node_struct::parent, and rete_node.

Referenced by deallocate_rete_node(), excise_production_from_rete(), make_new_cn_node(), merge_into_mp_node(), and split_mp_node().

void remove_ref_to_alpha_mem alpha_mem am  ) 
 

Definition at line 1346 of file rete.c.

References alpha_mem_struct::acceptable, alpha_mem, alpha_mem_struct::attr, hash_table, alpha_mem_struct::id, alpha_mem_struct::reference_count, remove_from_hash_table(), remove_wme_from_alpha_mem(), alpha_mem_struct::right_mems, and alpha_mem_struct::value.

Referenced by deallocate_rete_node(), make_node_for_negative_cond(), make_node_for_positive_cond(), and reteload_free_am_table().

void remove_token_and_subtree token tok  ) 
 

Definition at line 5624 of file rete.c.

References token_struct::a, rete_node_struct::a, abort_with_fatal_error(), rete_node_struct::b, byte, rete_node_struct::first_child, token_struct::first_child, beta_memory_node_data_struct::first_linked_child, token_struct::token_a_union::ht, left_addition_routines(), token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, rete_node_struct::rete_node_b_union::mem, token_struct::token_a_union::neg, token_struct::negrm_tokens, pos_node_data_struct::next_from_beta_mem, token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::next_negrm, rete_node_struct::next_sibling, token_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, p_node_left_removal(), token_struct::parent, rete_node_struct::rete_node_a_union::pos, token_struct::token_a_union::token_in_hash_table_data_struct::referent, rete_node, token, wme_struct::tokens, non_pos_node_data_struct::tokens, and token_struct::w.

Referenced by cn_partner_node_left_addition(), deallocate_rete_node(), excise_production_from_rete(), negative_node_right_addition(), remove_wme_from_rete(), and unhashed_negative_node_right_addition().

void remove_wme_from_alpha_mem right_mem rm  ) 
 

Definition at line 1117 of file rete.c.

References alpha_mem, right_mem_struct::am, alpha_mem_struct::am_id, wme_struct::id, right_mem, wme_struct::right_mems, alpha_mem_struct::right_mems, right_mem_struct::w, and wme.

Referenced by remove_ref_to_alpha_mem(), and remove_wme_from_rete().

void remove_wme_from_rete wme w  ) 
 

Definition at line 1280 of file rete.c.

References token_struct::a, alpha_mem, right_mem_struct::am, rete_node_struct::b, alpha_mem_struct::beta_nodes, rete_node_struct::first_child, left_addition_routines(), token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, token_struct::token_a_union::neg, token_struct::negrm_tokens, posneg_node_data_struct::next_from_alpha_mem, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_type, token_struct::parent, rete_node_struct::rete_node_b_union::posneg, remove_token_and_subtree(), remove_wme_from_alpha_mem(), rete_node, right_mem, wme_struct::right_mems, alpha_mem_struct::right_mems, token, wme_struct::tokens, and wme.

Referenced by do_buffered_wm_changes().

void rete_error_left rete_node node,
token t,
wme w
 

Definition at line 4166 of file rete.c.

References abort_with_fatal_error(), rete_node_struct::node_type, rete_node, token, and wme.

Referenced by init_rete().

void rete_error_right rete_node node,
wme w
 

Definition at line 4178 of file rete.c.

References abort_with_fatal_error(), rete_node_struct::node_type, rete_node, and wme.

Referenced by init_rete().

void rete_node_to_conditions rete_node node,
node_varnames nvn,
rete_node cutoff,
token tok,
wme w,
condition conds_for_cutoff_and_up,
condition **  dest_top_cond,
condition **  dest_bottom_cond
 

Definition at line 3600 of file rete.c.

References alpha_mem_struct::acceptable, wme_struct::acceptable, add_gensymmed_equality_test(), add_hash_info_to_id_test(), add_rete_test_list_to_tests(), add_varnames_to_test(), posneg_node_data_struct::alpha_mem, alpha_mem, alpha_mem_struct::attr, wme_struct::attr, three_field_varnames_struct::attr_varnames, rete_node_struct::b, node_varnames_struct::varname_data_union::bottom_of_subconditions, rete_node_struct::rete_node_b_union::cn, collect_nots(), condition, node_varnames_struct::data, node_varnames_struct::varname_data_union::fields, first_letter_from_test(), alpha_mem_struct::id, wme_struct::id, three_field_varnames_struct::id_varnames, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, condition_struct::next, rete_node_struct::node_type, node_varnames, posneg_node_data_struct::other_tests, rete_node_struct::parent, token_struct::parent, node_varnames_struct::parent, cn_node_data_struct::partner, rete_node_struct::rete_node_b_union::posneg, condition_struct::prev, rete_node, test_includes_equality_test_for_symbol(), token, condition_struct::type, alpha_mem_struct::value, wme_struct::value, three_field_varnames_struct::value_varnames, token_struct::w, and wme.

Referenced by p_node_to_conditions_and_nots().

bool rete_test_lists_are_identical rete_test rt1,
rete_test rt2
 

Definition at line 2561 of file rete.c.

References rete_test_struct::next, rete_test, and single_rete_tests_are_identical().

Referenced by make_node_for_negative_cond(), and make_node_for_positive_cond().

action* reteload_action_list void   ) 
 

Definition at line 6390 of file rete.c.

References action, action_struct::next, reteload_four_bytes(), and reteload_rhs_action().

Referenced by reteload_node_and_children().

void reteload_all_symbols void   ) 
 

Definition at line 5950 of file rete.c.

References allocate_memory(), make_float_constant(), make_int_constant(), make_sym_constant(), make_variable(), reteload_four_bytes(), reteload_num_syms, reteload_string(), reteload_string_buf, reteload_symbol_table, and Symbol.

Referenced by load_rete_net().

void reteload_alpha_memories void   ) 
 

Definition at line 6072 of file rete.c.

References allocate_memory(), alpha_mem, find_or_make_alpha_mem(), reteload_am_table, reteload_four_bytes(), reteload_num_ams, reteload_one_byte(), reteload_symbol_from_index(), and Symbol.

Referenced by load_rete_net().

alpha_mem* reteload_am_from_index void   ) 
 

Definition at line 6090 of file rete.c.

References abort_with_fatal_error(), alpha_mem, reteload_am_table, reteload_four_bytes(), and reteload_num_ams.

Referenced by reteload_node_and_children().

unsigned long reteload_four_bytes  ) 
 

Definition at line 5852 of file rete.c.

References reteload_one_byte().

Referenced by load_rete_net(), reteload_action_list(), reteload_all_symbols(), reteload_alpha_memories(), reteload_am_from_index(), reteload_node_and_children(), reteload_rhs_value(), reteload_symbol_from_index(), and reteload_varnames().

void reteload_free_am_table void   ) 
 

Definition at line 6104 of file rete.c.

References free_memory(), remove_ref_to_alpha_mem(), reteload_am_table, and reteload_num_ams.

Referenced by load_rete_net().

void reteload_free_symbol_table void   ) 
 

Definition at line 6007 of file rete.c.

References free_memory(), reteload_num_syms, and reteload_symbol_table.

Referenced by load_rete_net().

void reteload_node_and_children rete_node parent  ) 
 

Definition at line 6675 of file rete.c.

References abort_with_fatal_error(), production_struct::action_list, adjust_sharing_factors_from_here_to_top(), alpha_mem, byte, production_struct::declared_support, destructively_reverse_list(), production_struct::documentation, var_location_struct::field_num, production_struct::filename, production_struct::firing_count, production_struct::instantiations, var_location_struct::levels_up, list, make_memory_block_for_string(), make_new_cn_node(), make_new_mem_node(), make_new_mp_node(), make_new_negative_node(), make_new_positive_node(), make_new_production_node(), production_struct::name, production_struct::p_node, sym_constant_struct::production, production, PRODUCTION_JUST_ADDED_CALLBACK, production_struct::reference_count, alpha_mem_struct::reference_count, rete_node, rete_test, reteload_action_list(), reteload_am_from_index(), reteload_four_bytes(), reteload_node_varnames(), reteload_one_byte(), reteload_rete_test_list(), reteload_string(), reteload_string_buf, reteload_symbol_from_index(), reteload_two_bytes(), production_struct::rhs_unbound_variables, symbol_union::sc, soar_agent, soar_call_data, soar_invoke_callbacks(), Symbol, production_struct::trace_firings, production_struct::type, update_max_rhs_unbound_variables(), update_node_with_matches_from_above(), and var_location.

Referenced by load_rete_net().

node_varnames* reteload_node_varnames rete_node node  ) 
 

Definition at line 6193 of file rete.c.

References three_field_varnames_struct::attr_varnames, rete_node_struct::b, node_varnames_struct::varname_data_union::bottom_of_subconditions, rete_node_struct::rete_node_b_union::cn, node_varnames_struct::data, node_varnames_struct::varname_data_union::fields, three_field_varnames_struct::id_varnames, rete_node_struct::node_type, node_varnames, node_varnames_struct::parent, rete_node_struct::parent, cn_node_data_struct::partner, rete_node, reteload_varnames(), and three_field_varnames_struct::value_varnames.

Referenced by reteload_node_and_children().

byte reteload_one_byte  ) 
 

Definition at line 5825 of file rete.c.

References byte, and rete_fs_file.

Referenced by load_rete_net(), reteload_alpha_memories(), reteload_four_bytes(), reteload_node_and_children(), reteload_rete_test(), reteload_rhs_action(), reteload_rhs_value(), reteload_string(), reteload_two_bytes(), and reteload_varnames().

rete_test* reteload_rete_test void   ) 
 

Definition at line 6449 of file rete.c.

References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, destructively_reverse_list(), rete_test_struct::rete_test_data_union::disjunction_list, var_location_struct::field_num, var_location_struct::levels_up, list, rete_test, reteload_one_byte(), reteload_symbol_from_index(), reteload_two_bytes(), rete_test_struct::right_field_num, Symbol, rete_test_struct::type, and rete_test_struct::rete_test_data_union::variable_referent.

Referenced by reteload_rete_test_list().

rete_test* reteload_rete_test_list void   ) 
 

Definition at line 6490 of file rete.c.

References rete_test_struct::next, rete_test, reteload_rete_test(), and reteload_two_bytes().

Referenced by reteload_node_and_children().

action* reteload_rhs_action void   ) 
 

Definition at line 6354 of file rete.c.

References action, action_struct::attr, action_struct::id, action_struct::preference_type, action_struct::referent, reteload_one_byte(), reteload_rhs_value(), action_struct::support, action_struct::type, and action_struct::value.

Referenced by reteload_action_list().

rhs_value reteload_rhs_value void   ) 
 

Definition at line 6261 of file rete.c.

References abort_with_fatal_error(), byte, destructively_reverse_list(), list, lookup_rhs_function(), print_with_symbols(), reteload_four_bytes(), reteload_one_byte(), reteload_symbol_from_index(), reteload_two_bytes(), rhs_function, rhs_value, Symbol, symbol_to_string(), and update_max_rhs_unbound_variables().

Referenced by reteload_rhs_action().

void reteload_string  ) 
 

Definition at line 5881 of file rete.c.

References reteload_one_byte(), and reteload_string_buf.

Referenced by load_rete_net(), reteload_all_symbols(), and reteload_node_and_children().

Symbol* reteload_symbol_from_index void   ) 
 

Definition at line 5990 of file rete.c.

References abort_with_fatal_error(), reteload_four_bytes(), reteload_num_syms, reteload_symbol_table, and Symbol.

Referenced by reteload_alpha_memories(), reteload_node_and_children(), reteload_rete_test(), reteload_rhs_value(), and reteload_varnames().

unsigned long reteload_two_bytes  ) 
 

Definition at line 5836 of file rete.c.

References reteload_one_byte().

Referenced by reteload_node_and_children(), reteload_rete_test(), reteload_rete_test_list(), and reteload_rhs_value().

varnames* reteload_varnames void   ) 
 

Definition at line 6149 of file rete.c.

References destructively_reverse_list(), list, reteload_four_bytes(), reteload_one_byte(), reteload_symbol_from_index(), Symbol, and varnames.

Referenced by reteload_node_varnames().

void retesave_action_list action first_a  ) 
 

Definition at line 6379 of file rete.c.

References action, retesave_four_bytes(), and retesave_rhs_action().

Referenced by retesave_rete_node_and_children().

bool retesave_alpha_mem_and_assign_index void *  item  ) 
 

Definition at line 6045 of file rete.c.

References alpha_mem_struct::acceptable, alpha_mem, alpha_mem_struct::attr, byte, current_retesave_amindex, alpha_mem_struct::id, alpha_mem_struct::retesave_amindex, retesave_four_bytes(), retesave_one_byte(), and alpha_mem_struct::value.

Referenced by retesave_alpha_memories().

void retesave_alpha_memories void   ) 
 

Definition at line 6059 of file rete.c.

References current_retesave_amindex, do_for_all_items_in_hash_table(), retesave_alpha_mem_and_assign_index(), and retesave_four_bytes().

Referenced by save_rete_net().

void retesave_children_of_node rete_node node  ) 
 

Definition at line 6562 of file rete.c.

References rete_node_struct::first_child, rete_node_struct::next_sibling, rete_node, retesave_four_bytes(), and retesave_rete_node_and_children().

Referenced by retesave_rete_node_and_children(), and save_rete_net().

void retesave_four_bytes unsigned long  w  ) 
 

Definition at line 5844 of file rete.c.

References byte, and retesave_one_byte().

Referenced by retesave_action_list(), retesave_alpha_mem_and_assign_index(), retesave_alpha_memories(), retesave_children_of_node(), retesave_rete_node_and_children(), retesave_rete_test(), retesave_rhs_value(), retesave_symbol_table(), and retesave_varnames().

void retesave_node_varnames node_varnames nvn,
rete_node node
 

Definition at line 6175 of file rete.c.

References three_field_varnames_struct::attr_varnames, rete_node_struct::b, node_varnames_struct::varname_data_union::bottom_of_subconditions, rete_node_struct::rete_node_b_union::cn, node_varnames_struct::data, node_varnames_struct::varname_data_union::fields, three_field_varnames_struct::id_varnames, rete_node_struct::node_type, node_varnames, node_varnames_struct::parent, rete_node_struct::parent, cn_node_data_struct::partner, rete_node, retesave_varnames(), and three_field_varnames_struct::value_varnames.

Referenced by retesave_rete_node_and_children().

void retesave_one_byte byte  b  ) 
 

Definition at line 5820 of file rete.c.

References byte, and rete_fs_file.

Referenced by retesave_alpha_mem_and_assign_index(), retesave_four_bytes(), retesave_rete_node_and_children(), retesave_rete_test(), retesave_rhs_action(), retesave_rhs_value(), retesave_string(), retesave_two_bytes(), retesave_varnames(), and save_rete_net().

void retesave_rete_node_and_children rete_node node  ) 
 

Definition at line 6579 of file rete.c.

References rete_node_struct::a, abort_with_fatal_error(), production_struct::action_list, posneg_node_data_struct::alpha_mem, rete_node_struct::b, byte, rete_node_struct::rete_node_b_union::cn, cons, production_struct::declared_support, production_struct::documentation, non_pos_node_data_struct::is_left_unlinked, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, production_struct::name, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, rete_node_struct::rete_node_b_union::p, rete_node_struct::parent, p_node_data_struct::parents_nvn, cn_node_data_struct::partner, rete_node_struct::rete_node_b_union::posneg, p_node_data_struct::prod, production, rete_node, retesave_action_list(), alpha_mem_struct::retesave_amindex, retesave_children_of_node(), retesave_four_bytes(), retesave_node_varnames(), retesave_one_byte(), retesave_rete_test_list(), retesave_string(), retesave_two_bytes(), production_struct::rhs_unbound_variables, Symbol, and production_struct::type.

Referenced by retesave_children_of_node().

void retesave_rete_test rete_test rt  ) 
 

Definition at line 6429 of file rete.c.

References cons, rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test_struct::rete_test_data_union::disjunction_list, var_location_struct::field_num, var_location_struct::levels_up, rete_test, retesave_four_bytes(), retesave_one_byte(), retesave_two_bytes(), rete_test_struct::right_field_num, Symbol, rete_test_struct::type, and rete_test_struct::rete_test_data_union::variable_referent.

Referenced by retesave_rete_test_list().

void retesave_rete_test_list rete_test first_rt  ) 
 

Definition at line 6479 of file rete.c.

References rete_test, retesave_rete_test(), and retesave_two_bytes().

Referenced by retesave_rete_node_and_children().

void retesave_rhs_action action a  ) 
 

Definition at line 6338 of file rete.c.

References action, action_struct::attr, action_struct::id, action_struct::preference_type, action_struct::referent, retesave_one_byte(), retesave_rhs_value(), action_struct::support, action_struct::type, and action_struct::value.

Referenced by retesave_action_list().

void retesave_rhs_value rhs_value  rv  ) 
 

Definition at line 6231 of file rete.c.

References byte, cons, cons_struct::first, cons_struct::rest, retesave_four_bytes(), retesave_one_byte(), retesave_two_bytes(), rhs_function, rhs_value, and Symbol.

Referenced by retesave_rhs_action().

void retesave_string char *  s  ) 
 

Definition at line 5872 of file rete.c.

References retesave_one_byte().

Referenced by retesave_rete_node_and_children(), retesave_symbol_and_assign_index(), and save_rete_net().

bool retesave_symbol_and_assign_index void *  item  ) 
 

Definition at line 5924 of file rete.c.

References current_retesave_symindex, retesave_string(), Symbol, and symbol_to_string().

Referenced by retesave_symbol_table().

void retesave_symbol_table void   ) 
 

Definition at line 5935 of file rete.c.

References current_retesave_symindex, do_for_all_items_in_hash_table(), retesave_four_bytes(), and retesave_symbol_and_assign_index().

Referenced by save_rete_net().

void retesave_two_bytes unsigned long  w  ) 
 

Definition at line 5830 of file rete.c.

References byte, and retesave_one_byte().

Referenced by retesave_rete_node_and_children(), retesave_rete_test(), retesave_rete_test_list(), and retesave_rhs_value().

void retesave_varnames varnames names  ) 
 

Definition at line 6128 of file rete.c.

References list, retesave_four_bytes(), retesave_one_byte(), and Symbol.

Referenced by retesave_node_varnames().

void right_addition_routines rete_node node,
wme w
 

Referenced by add_wme_to_aht(), init_rete(), and update_node_with_matches_from_above().

bool same_rhs action rhs1,
action rhs2
 

Definition at line 2890 of file rete.c.

References action, action_struct::attr, action_struct::id, action_struct::next, action_struct::preference_type, action_struct::referent, action_struct::type, and action_struct::value.

Referenced by add_production_to_rete().

bool save_rete_net FILE *  dest_file  ) 
 

Definition at line 6822 of file rete.c.

References print(), rete_fs_file, retesave_alpha_memories(), retesave_children_of_node(), retesave_one_byte(), retesave_string(), and retesave_symbol_table().

Referenced by soar_cSaveReteNet().

bool single_rete_tests_are_identical rete_test rt1,
rete_test rt2
 

Definition at line 2517 of file rete.c.

References abort_with_fatal_error(), cons, rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test_struct::rete_test_data_union::disjunction_list, cons_struct::first, cons_struct::rest, rete_test, rete_test_struct::right_field_num, rete_test_struct::type, and rete_test_struct::rete_test_data_union::variable_referent.

Referenced by rete_test_lists_are_identical().

rete_node* split_mp_node rete_node mp_node  ) 
 

Definition at line 1594 of file rete.c.

References token_struct::a, rete_node_struct::a, rete_node_struct::b, byte, rete_node_struct::first_child, beta_memory_node_data_struct::first_linked_child, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, rete_node_struct::rete_node_b_union::mem, token_struct::next_of_node, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, rete_node_struct::parent, rete_node_struct::rete_node_b_union::posneg, remove_node_from_parents_list_of_children(), rete_node, rete_node_struct::sharing_factor, token, and non_pos_node_data_struct::tokens.

Referenced by make_node_for_positive_cond().

void unhashed_beta_memory_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4230 of file rete.c.

References rete_node_struct::a, rete_node_struct::b, beta_memory_node_data_struct::first_linked_child, rete_node_struct::rete_node_b_union::mem, pos_node_data_struct::next_from_beta_mem, rete_node_struct::node_id, rete_node_struct::rete_node_a_union::pos, rete_node, token, unhashed_positive_node_left_addition(), and wme.

Referenced by init_rete().

void unhashed_mp_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4416 of file rete.c.

References posneg_node_data_struct::alpha_mem, rete_node_struct::b, rete_node_struct::first_child, left_addition_routines(), rete_test_struct::next, right_mem_struct::next_in_am, rete_node_struct::next_sibling, rete_node_struct::node_id, rete_node_struct::node_type, posneg_node_data_struct::other_tests, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, right_mem, alpha_mem_struct::right_mems, token, right_mem_struct::w, and wme.

Referenced by init_rete().

void unhashed_mp_node_right_addition rete_node node,
wme w
 

Definition at line 4598 of file rete.c.

References token_struct::a, rete_node_struct::a, rete_node_struct::b, rete_node_struct::first_child, token_struct::token_a_union::ht, left_addition_routines(), rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, token, non_pos_node_data_struct::tokens, and wme.

Referenced by init_rete().

void unhashed_negative_node_left_addition rete_node node,
token tok,
wme w
 

Definition at line 4724 of file rete.c.

References token_struct::a, posneg_node_data_struct::alpha_mem, rete_node_struct::b, rete_node_struct::first_child, token_struct::first_child, left_addition_routines(), token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, token_struct::token_a_union::neg, rete_test_struct::next, right_mem_struct::next_in_am, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, posneg_node_data_struct::other_tests, token_struct::parent, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, right_mem, alpha_mem_struct::right_mems, token, wme_struct::tokens, token_struct::w, right_mem_struct::w, and wme.

Referenced by init_rete().

void unhashed_negative_node_right_addition rete_node node,
wme w
 

Definition at line 4827 of file rete.c.

References token_struct::a, rete_node_struct::b, token_struct::first_child, token_struct::token_a_union::ht, token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, token_struct::token_a_union::neg, token_struct::negrm_tokens, rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, token_struct::node, rete_node_struct::node_id, posneg_node_data_struct::other_tests, token_struct::parent, rete_node_struct::rete_node_b_union::posneg, remove_token_and_subtree(), rete_node, rete_test, token, wme_struct::tokens, token_struct::w, and wme.

Referenced by init_rete().

void unhashed_positive_node_left_addition rete_node node,
token new
 

Definition at line 4302 of file rete.c.

References posneg_node_data_struct::alpha_mem, rete_node_struct::b, rete_node_struct::first_child, left_addition_routines(), rete_test_struct::next, right_mem_struct::next_in_am, rete_node_struct::next_sibling, rete_node_struct::node_type, posneg_node_data_struct::other_tests, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, right_mem, alpha_mem_struct::right_mems, token, and right_mem_struct::w.

Referenced by unhashed_beta_memory_node_left_addition().

void unhashed_positive_node_right_addition rete_node node,
wme w
 

Definition at line 4512 of file rete.c.

References token_struct::a, rete_node_struct::a, rete_node_struct::b, rete_node_struct::first_child, token_struct::token_a_union::ht, left_addition_routines(), rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, rete_node_struct::parent, rete_node_struct::rete_node_b_union::posneg, rete_node, rete_test, token, non_pos_node_data_struct::tokens, and wme.

Referenced by init_rete().

void update_max_rhs_unbound_variables unsigned long  num_for_new_production  ) 
 

Definition at line 3007 of file rete.c.

References allocate_memory_and_zerofill(), free_memory(), and Symbol.

Referenced by add_production_to_rete(), reteload_node_and_children(), and reteload_rhs_value().

void update_node_with_matches_from_above rete_node child  ) 
 

Definition at line 1444 of file rete.c.

References rete_node_struct::a, abort_with_fatal_error(), rete_node_struct::first_child, left_addition_routines(), token_struct::negrm_tokens, right_mem_struct::next_in_am, token_struct::next_of_node, rete_node_struct::next_sibling, node_to_ignore_for_activation_stats, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, rete_node_struct::parent, rete_node, right_addition_routines(), right_mem, token, non_pos_node_data_struct::tokens, and right_mem_struct::w.

Referenced by add_production_to_rete(), get_all_left_tokens_emerging_from_node(), make_new_cn_node(), make_new_mem_node(), make_new_negative_node(), and reteload_node_and_children().

Symbol* var_bound_in_reconstructed_conds condition cond,
byte  where_field_num,
rete_node_level  where_levels_up
 

Definition at line 3339 of file rete.c.

References abort_with_fatal_error(), three_field_tests_struct::attr_test, byte, complex_test, condition, complex_test_struct::test_info_union::conjunct_list, cons, complex_test_struct::data, condition_struct::data, cons_struct::first, three_field_tests_struct::id_test, condition_struct::prev, cons_struct::rest, Symbol, test, condition_struct::condition_main_data_union::tests, complex_test_struct::type, and three_field_tests_struct::value_test.

Referenced by add_hash_info_to_id_test(), add_rete_test_list_to_tests(), collect_nots(), and copy_rhs_value_and_substitute_varnames().

bool variable_equal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 4018 of file rete.c.

References rete_test_struct::data, var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test, rete_test_struct::right_field_num, Symbol, token, rete_test_struct::rete_test_data_union::variable_referent, token_struct::w, and wme.

Referenced by init_rete().

bool variable_greater_or_equal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 4118 of file rete.c.

References rete_test_struct::data, var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test, rete_test_struct::right_field_num, Symbol, token, rete_test_struct::rete_test_data_union::variable_referent, token_struct::w, and wme.

Referenced by init_rete().

bool variable_greater_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 4078 of file rete.c.

References rete_test_struct::data, var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test, rete_test_struct::right_field_num, Symbol, token, rete_test_struct::rete_test_data_union::variable_referent, token_struct::w, and wme.

Referenced by init_rete().

bool variable_less_or_equal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 4098 of file rete.c.

References rete_test_struct::data, var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test, rete_test_struct::right_field_num, Symbol, token, rete_test_struct::rete_test_data_union::variable_referent, token_struct::w, and wme.

Referenced by init_rete().

bool variable_less_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 4058 of file rete.c.

References rete_test_struct::data, var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test, rete_test_struct::right_field_num, Symbol, token, rete_test_struct::rete_test_data_union::variable_referent, token_struct::w, and wme.

Referenced by init_rete().

bool variable_not_equal_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 4038 of file rete.c.

References rete_test_struct::data, var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test, rete_test_struct::right_field_num, Symbol, token, rete_test_struct::rete_test_data_union::variable_referent, token_struct::w, and wme.

Referenced by init_rete().

bool variable_same_type_rete_test_routine rete_test rt,
token left,
wme w
 

Definition at line 4138 of file rete.c.

References rete_test_struct::data, var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test, rete_test_struct::right_field_num, Symbol, token, rete_test_struct::rete_test_data_union::variable_referent, token_struct::w, and wme.

Referenced by init_rete().


Variable Documentation

unsigned long actual[256]
 

Definition at line 6948 of file rete.c.

Referenced by get_all_node_count_stats(), get_node_count_statistic(), and print_node_count_statistics().

char* bnode_type_names[256]
 

Definition at line 292 of file rete.c.

Referenced by get_all_node_count_stats(), get_node_count_statistic(), init_rete(), and print_node_count_statistics().

unsigned long current_retesave_amindex
 

Definition at line 6041 of file rete.c.

Referenced by retesave_alpha_mem_and_assign_index(), and retesave_alpha_memories().

unsigned long current_retesave_symindex
 

Definition at line 5920 of file rete.c.

Referenced by retesave_symbol_and_assign_index(), and retesave_symbol_table().

bool discard_chunk_varnames = TRUE
 

Definition at line 121 of file rete.c.

Referenced by add_production_to_rete().

rete_node dummy_matches_node
 

Definition at line 7108 of file rete.c.

Referenced by get_all_left_tokens_emerging_from_node().

token* dummy_matches_node_tokens
 

Definition at line 7109 of file rete.c.

Referenced by dummy_matches_node_left_addition(), and get_all_left_tokens_emerging_from_node().

long highest_rhs_unboundvar_index
 

Definition at line 3700 of file rete.c.

Referenced by copy_rhs_value_and_substitute_varnames(), and p_node_to_conditions_and_nots().

unsigned long if_no_merging[256]
 

Definition at line 6948 of file rete.c.

Referenced by get_all_node_count_stats(), get_node_count_statistic(), and print_node_count_statistics().

unsigned long if_no_sharing[256]
 

Definition at line 6948 of file rete.c.

Referenced by get_all_node_count_stats(), get_node_count_statistic(), and print_node_count_statistics().

rete_node* node_to_ignore_for_activation_stats = NIL
 

Definition at line 546 of file rete.c.

Referenced by null_activation_stats_for_right_activation(), and update_node_with_matches_from_above().

not* nots_found_in_production
 

Definition at line 3486 of file rete.c.

Referenced by collect_nots(), and p_node_to_conditions_and_nots().

unsigned long num_rhs_unbound_vars_for_new_prod
 

Definition at line 2952 of file rete.c.

Referenced by add_production_to_rete(), and fixup_rhs_value_variable_references().

byte relational_test_type_to_test_type[256]
 

Definition at line 2311 of file rete.c.

Referenced by add_rete_test_list_to_tests(), and init_test_type_conversion_tables().

FILE* rete_fs_file
 

Definition at line 5809 of file rete.c.

Referenced by load_rete_net(), reteload_one_byte(), retesave_one_byte(), and save_rete_net().

alpha_mem** reteload_am_table
 

Definition at line 6043 of file rete.c.

Referenced by reteload_alpha_memories(), reteload_am_from_index(), and reteload_free_am_table().

unsigned long reteload_num_ams
 

Definition at line 6042 of file rete.c.

Referenced by reteload_alpha_memories(), reteload_am_from_index(), and reteload_free_am_table().

unsigned long reteload_num_syms
 

Definition at line 5921 of file rete.c.

Referenced by reteload_all_symbols(), reteload_free_symbol_table(), and reteload_symbol_from_index().

char reteload_string_buf[4 * MAX_LEXEME_LENGTH]
 

Definition at line 5870 of file rete.c.

Referenced by load_rete_net(), reteload_all_symbols(), reteload_node_and_children(), and reteload_string().

Symbol** reteload_symbol_table
 

Definition at line 5922 of file rete.c.

Referenced by reteload_all_symbols(), reteload_free_symbol_table(), and reteload_symbol_from_index().

list* rhs_unbound_vars_for_new_prod
 

Definition at line 2949 of file rete.c.

Referenced by add_production_to_rete(), and fixup_rhs_value_variable_references().

tc_number rhs_unbound_vars_tc
 

Definition at line 2955 of file rete.c.

Referenced by add_production_to_rete(), and fixup_rhs_value_variable_references().

byte test_type_to_relational_test_type[256]
 

Definition at line 2310 of file rete.c.

Referenced by add_rete_tests_for_test(), and init_test_type_conversion_tables().


Generated on Thu Dec 11 13:00:29 2003 for Soar Kernel by doxygen 1.3.5