Soar Kernel
9.3.2 08-06-12
|
#include <portability.h>
#include <stdlib.h>
#include "rete.h"
#include "kernel.h"
#include "mem.h"
#include "wmem.h"
#include "gdatastructs.h"
#include "explain.h"
#include "symtab.h"
#include "agent.h"
#include "print.h"
#include "production.h"
#include "init_soar.h"
#include "instantiations.h"
#include "rhsfun.h"
#include "lexer.h"
#include "xml.h"
#include "soar_TraceNames.h"
#include "reinforcement_learning.h"
#include "episodic_memory.h"
#include "semantic_memory.h"
#include "utilities.h"
#include "assert.h"
#include <sstream>
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 | match_set_trace |
struct | node_varnames_struct |
struct | non_pos_node_data_struct |
struct | p_node_data_struct |
struct | pos_node_data_struct |
struct | posneg_node_data_struct |
union | rete_node_struct::rete_node_a_union |
union | rete_node_struct::rete_node_b_union |
struct | rete_node_struct |
union | rete_test_struct::rete_test_data_union |
struct | rete_test_struct |
struct | right_mem_struct |
struct | three_field_varnames_struct |
struct | var_location_struct |
union | node_varnames_struct::varname_data_union |
Typedefs | |
typedef struct alpha_mem_struct | alpha_mem |
typedef struct beta_memory_node_data_struct | beta_memory_node_data |
typedef struct cn_node_data_struct | cn_node_data |
typedef struct match_set_trace | MS_trace |
typedef struct node_varnames_struct | 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 |
typedef unsigned short | rete_node_level |
typedef struct rete_test_struct | rete_test |
typedef struct right_mem_struct | right_mem |
typedef struct three_field_varnames_struct | three_field_varnames |
typedef struct var_location_struct | var_location |
typedef char | varnames |
Variables | |
const char * | bnode_type_names [256] |
byte | relational_test_type_to_test_type [256] |
FILE * | rete_fs_file |
Bool | rete_net_64 |
char | reteload_string_buf [4 *(1000+5)] |
byte | test_type_to_relational_test_type [256] |
#define activation_entry_sanity_check | ( | ) | {} |
Definition at line 757 of file rete.cpp.
Referenced by beta_memory_node_left_addition(), cn_node_left_addition(), cn_partner_node_left_addition(), mp_node_left_addition(), mp_node_right_addition(), negative_node_left_addition(), negative_node_right_addition(), p_node_left_addition(), p_node_left_removal(), positive_node_left_addition(), positive_node_right_addition(), 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(), and unhashed_positive_node_right_addition().
#define activation_exit_sanity_check | ( | ) | {} |
Definition at line 758 of file rete.cpp.
Referenced by beta_memory_node_left_addition(), cn_node_left_addition(), cn_partner_node_left_addition(), mp_node_left_addition(), mp_node_right_addition(), negative_node_left_addition(), negative_node_right_addition(), p_node_left_addition(), p_node_left_removal(), positive_node_left_addition(), positive_node_right_addition(), 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(), and unhashed_positive_node_right_addition().
#define adjust_sharing_factors_from_here_to_top | ( | node, | |
delta | |||
) | {} |
Definition at line 879 of file rete.cpp.
Referenced by add_production_to_rete(), excise_production_from_rete(), and reteload_node_and_children().
#define CN_BNODE 0x42 |
Definition at line 329 of file rete.cpp.
Referenced by build_network_for_condition_list(), count_rete_tokens_for_production(), deallocate_node_varnames(), deallocate_rete_node(), init_bnode_type_names(), init_left_and_right_addition_routines(), make_new_cn_node(), nearest_ancestor_with_same_am(), remove_token_and_subtree(), rete_node_to_conditions(), reteload_node_varnames(), retesave_children_of_node(), retesave_node_varnames(), and retesave_rete_node_and_children().
#define CN_PARTNER_BNODE 0x43 |
Definition at line 330 of file rete.cpp.
Referenced by init_bnode_type_names(), init_left_and_right_addition_routines(), make_new_cn_node(), remove_token_and_subtree(), reteload_node_and_children(), and retesave_rete_node_and_children().
#define CONSTANT_RELATIONAL_RETE_TEST 0x00 |
Definition at line 217 of file rete.cpp.
Referenced by add_rete_tests_for_test(), collect_nots(), init_rete(), test_is_constant_relational_test(), and test_is_not_equal_test().
#define discard_chunk_varnames TRUE |
Definition at line 120 of file rete.cpp.
Referenced by add_production_to_rete().
#define DISJUNCTION_RETE_TEST 0x20 |
Definition at line 219 of file rete.cpp.
Referenced by add_rete_test_list_to_tests(), add_rete_tests_for_test(), deallocate_rete_test_list(), init_rete(), reteload_rete_test(), retesave_rete_test(), and single_rete_tests_are_identical().
#define DUMMY_MATCHES_BNODE 0x41 |
Definition at line 328 of file rete.cpp.
Referenced by get_all_left_tokens_emerging_from_node(), get_all_node_count_stats(), init_bnode_type_names(), and init_left_and_right_addition_routines().
#define DUMMY_TOP_BNODE 0x40 |
Definition at line 327 of file rete.cpp.
Referenced by init_bnode_type_names(), init_dummy_top_node(), nearest_ancestor_with_same_am(), p_node_left_addition(), reteload_node_varnames(), retesave_node_varnames(), and update_node_with_matches_from_above().
#define EQUAL_TEST_TYPE 254 |
Definition at line 2935 of file rete.cpp.
Referenced by add_rete_test_list_to_tests(), and init_test_type_conversion_tables().
#define ertr error_rete_test_routine |
#define I_LIST 1 /* values for prod->OPERAND_which_assert_list */ |
Definition at line 411 of file rete.cpp.
Referenced by p_node_left_addition(), and p_node_left_removal().
#define ID_IS_GOAL_RETE_TEST 0x30 |
Definition at line 220 of file rete.cpp.
Referenced by add_rete_test_list_to_tests(), add_rete_tests_for_test(), init_rete(), and single_rete_tests_are_identical().
#define ID_IS_IMPASSE_RETE_TEST 0x31 |
Definition at line 221 of file rete.cpp.
Referenced by add_rete_test_list_to_tests(), add_rete_tests_for_test(), init_rete(), and single_rete_tests_are_identical().
#define init_sharing_stats_for_new_node | ( | node | ) | {} |
Definition at line 877 of file rete.cpp.
Referenced by init_new_rete_node_with_type().
#define LEFT_HT_MASK (LEFT_HT_SIZE - 1) |
Definition at line 654 of file rete.cpp.
Referenced by insert_token_into_left_ht(), and left_ht_bucket().
#define LEFT_HT_SIZE (1 << LOG2_LEFT_HT_SIZE) |
Definition at line 651 of file rete.cpp.
Referenced by init_rete().
#define MATCH_COUNT_STRING_BUFFER_SIZE 20 |
Referenced by ppmi_aux().
#define MEMORY_BNODE 0x03 |
Definition at line 320 of file rete.cpp.
Referenced by get_all_node_count_stats(), init_bnode_type_names(), init_left_and_right_addition_routines(), make_new_mp_node(), make_node_for_positive_cond(), merge_into_mp_node(), remove_token_and_subtree(), reteload_node_and_children(), retesave_rete_node_and_children(), and split_mp_node().
#define MP_BNODE 0x07 |
Definition at line 322 of file rete.cpp.
Referenced by get_all_node_count_stats(), init_bnode_type_names(), init_left_and_right_addition_routines(), make_new_mp_node(), make_node_for_positive_cond(), merge_into_mp_node(), remove_token_and_subtree(), remove_wme_from_rete(), rete_node_to_conditions(), reteload_node_and_children(), retesave_rete_node_and_children(), and split_mp_node().
#define NEGATIVE_BNODE 0x09 |
Definition at line 326 of file rete.cpp.
Referenced by init_bnode_type_names(), init_left_and_right_addition_routines(), make_node_for_negative_cond(), remove_token_and_subtree(), rete_node_to_conditions(), reteload_node_and_children(), and retesave_rete_node_and_children().
#define null_activation_stats_for_left_activation | ( | node | ) | {} |
Definition at line 820 of file rete.cpp.
Referenced by left_node_activation().
#define null_activation_stats_for_right_activation | ( | node | ) | {} |
Definition at line 819 of file rete.cpp.
Referenced by right_node_activation().
#define numcmp | ( | x, | |
y | |||
) | (((x) < (y)) ? -1 : (((x) > (y)) ? 1 : 0)) |
Definition at line 4653 of file rete.cpp.
Referenced by compare_symbols().
#define O_LIST 0 /* moved here from soarkernel.h. only used in rete.cpp */ |
Definition at line 410 of file rete.cpp.
Referenced by p_node_left_addition(), and p_node_left_removal().
#define P_BNODE 0x44 |
Definition at line 331 of file rete.cpp.
Referenced by add_production_to_rete(), deallocate_rete_node(), init_bnode_type_names(), init_left_and_right_addition_routines(), make_new_production_node(), remove_token_and_subtree(), reteload_node_and_children(), and retesave_rete_node_and_children().
#define POSITIVE_BNODE 0x15 |
Definition at line 324 of file rete.cpp.
Referenced by count_rete_tokens_for_production(), get_all_node_count_stats(), init_bnode_type_names(), init_left_and_right_addition_routines(), make_new_mp_node(), make_node_for_positive_cond(), remove_wme_from_rete(), rete_node_to_conditions(), reteload_node_and_children(), retesave_rete_node_and_children(), and split_mp_node().
#define RELATIONAL_EQUAL_RETE_TEST 0x00 |
Definition at line 237 of file rete.cpp.
Referenced by add_rete_tests_for_test(), extract_rete_test_to_hash_with(), init_rete(), and init_test_type_conversion_tables().
#define RELATIONAL_GREATER_OR_EQUAL_RETE_TEST 0x05 |
Definition at line 242 of file rete.cpp.
Referenced by init_rete(), and init_test_type_conversion_tables().
#define RELATIONAL_GREATER_RETE_TEST 0x03 |
Definition at line 240 of file rete.cpp.
Referenced by init_rete(), and init_test_type_conversion_tables().
#define RELATIONAL_LESS_OR_EQUAL_RETE_TEST 0x04 |
Definition at line 241 of file rete.cpp.
Referenced by init_rete(), and init_test_type_conversion_tables().
#define RELATIONAL_LESS_RETE_TEST 0x02 |
Definition at line 239 of file rete.cpp.
Referenced by init_rete(), and init_test_type_conversion_tables().
#define RELATIONAL_NOT_EQUAL_RETE_TEST 0x01 |
Definition at line 238 of file rete.cpp.
Referenced by collect_nots(), init_rete(), init_test_type_conversion_tables(), and test_is_not_equal_test().
#define RELATIONAL_SAME_TYPE_RETE_TEST 0x06 |
Definition at line 243 of file rete.cpp.
Referenced by init_rete(), and init_test_type_conversion_tables().
#define relink_to_left_mem | ( | node | ) |
Definition at line 566 of file rete.cpp.
Referenced by make_new_positive_node(), positive_node_right_addition(), split_mp_node(), and unhashed_positive_node_right_addition().
#define RIGHT_HT_MASK (RIGHT_HT_SIZE - 1) |
Definition at line 655 of file rete.cpp.
Referenced by add_wme_to_alpha_mem(), remove_wme_from_alpha_mem(), and right_ht_bucket().
#define RIGHT_HT_SIZE (1 << LOG2_RIGHT_HT_SIZE) |
Definition at line 652 of file rete.cpp.
Referenced by init_rete().
#define set_sharing_factor | ( | node, | |
sf | |||
) | {} |
Definition at line 878 of file rete.cpp.
Referenced by merge_into_mp_node(), split_mp_node(), and update_stats_for_destroying_node().
#define token_added | ( | node | ) | {} |
Definition at line 911 of file rete.cpp.
Referenced by beta_memory_node_left_addition(), cn_node_left_addition(), cn_partner_node_left_addition(), mp_node_left_addition(), negative_node_left_addition(), p_node_left_addition(), unhashed_beta_memory_node_left_addition(), unhashed_mp_node_left_addition(), and unhashed_negative_node_left_addition().
#define UNHASHED_MEMORY_BNODE 0x02 |
Definition at line 319 of file rete.cpp.
Referenced by get_all_node_count_stats(), init_bnode_type_names(), init_left_and_right_addition_routines(), make_new_mp_node(), make_node_for_positive_cond(), remove_token_and_subtree(), reteload_node_and_children(), retesave_rete_node_and_children(), and split_mp_node().
#define UNHASHED_MP_BNODE 0x06 |
Definition at line 321 of file rete.cpp.
Referenced by get_all_node_count_stats(), init_bnode_type_names(), init_left_and_right_addition_routines(), make_node_for_positive_cond(), merge_into_mp_node(), remove_token_and_subtree(), remove_wme_from_rete(), reteload_node_and_children(), and retesave_rete_node_and_children().
#define UNHASHED_NEGATIVE_BNODE 0x08 |
Definition at line 325 of file rete.cpp.
Referenced by init_bnode_type_names(), init_left_and_right_addition_routines(), make_node_for_negative_cond(), remove_token_and_subtree(), reteload_node_and_children(), and retesave_rete_node_and_children().
#define UNHASHED_POSITIVE_BNODE 0x14 |
Definition at line 323 of file rete.cpp.
Referenced by count_rete_tokens_for_production(), get_all_node_count_stats(), init_bnode_type_names(), init_left_and_right_addition_routines(), make_new_mp_node(), make_node_for_positive_cond(), remove_wme_from_rete(), reteload_node_and_children(), retesave_rete_node_and_children(), and split_mp_node().
#define unlink_from_left_mem | ( | node | ) |
Definition at line 574 of file rete.cpp.
Referenced by deallocate_rete_node(), make_new_positive_node(), positive_node_left_addition(), remove_wme_from_rete(), split_mp_node(), and unhashed_positive_node_left_addition().
#define unlink_from_right_mem | ( | node | ) |
Definition at line 531 of file rete.cpp.
Referenced by deallocate_rete_node(), make_new_negative_node(), make_new_positive_node(), mp_node_right_addition(), positive_node_right_addition(), remove_token_and_subtree(), unhashed_mp_node_right_addition(), and unhashed_positive_node_right_addition().
#define VARIABLE_RELATIONAL_RETE_TEST 0x10 |
Definition at line 218 of file rete.cpp.
Referenced by add_rete_tests_for_test(), collect_nots(), extract_rete_test_to_hash_with(), init_rete(), test_is_not_equal_test(), and test_is_variable_relational_test().
#define XML_CONDITION_LIST_TEMP_SIZE 10000 |
Definition at line 8390 of file rete.cpp.
Referenced by xml_condition_list().
typedef struct alpha_mem_struct alpha_mem |
typedef struct beta_memory_node_data_struct beta_memory_node_data |
typedef struct cn_node_data_struct cn_node_data |
typedef struct match_set_trace MS_trace |
typedef struct node_varnames_struct 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 |
typedef unsigned short rete_node_level |
typedef struct rete_test_struct rete_test |
typedef struct right_mem_struct right_mem |
typedef struct three_field_varnames_struct three_field_varnames |
typedef struct var_location_struct var_location |
|
inline |
Definition at line 1691 of file rete.cpp.
References _epmem_remove_wme(), slot_struct::acceptable_preference_wmes, identifier_struct::epmem_id, agent_struct::epmem_id_removes, EPMEM_NODEID_BAD, identifier_struct::epmem_valid, agent_struct::epmem_validation, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, identifier_struct::impasse_wmes, identifier_struct::input_wmes, wme_struct::next, slot_struct::next, NIL, identifier_struct::slots, and slot_struct::wmes.
Referenced by remove_wme_from_rete().
Definition at line 1626 of file rete.cpp.
References agent_struct::epmem_edge_removals, wme_struct::epmem_id, identifier_struct::epmem_id, agent_struct::epmem_id_ref_counts, agent_struct::epmem_id_removes, agent_struct::epmem_id_replacement, agent_struct::epmem_node_removals, EPMEM_NODEID_BAD, wme_struct::epmem_valid, identifier_struct::epmem_valid, agent_struct::epmem_validation, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, identifier_struct::level, NIL, identifier_struct::smem_lti, agent_struct::top_state, and wme_struct::value.
Referenced by _epmem_process_ids(), and remove_wme_from_rete().
Definition at line 4003 of file rete.cpp.
References add_new_test_to_test(), generate_new_variable(), make_equality_test(), and symbol_remove_ref().
Referenced by add_rete_test_list_to_tests(), and rete_node_to_conditions().
void add_hash_info_to_id_test | ( | agent * | thisAgent, |
condition * | cond, | ||
byte | field_num, | ||
rete_node_level | levels_up | ||
) |
Definition at line 4257 of file rete.cpp.
References add_new_test_to_test(), condition_struct::data, three_field_tests_struct::id_test, make_equality_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 | ( | agent * | thisAgent, |
production * | p, | ||
condition * | lhs_top, | ||
instantiation * | refracted_inst, | ||
Bool | warn_on_duplicates, | ||
Bool | ignore_rhs | ||
) |
Definition at line 3709 of file rete.cpp.
References 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(), CHUNK_PRODUCTION_TYPE, rl_param_container::chunk_stop, deallocate_symbol_list_removing_references(), destructively_reverse_list(), discard_chunk_varnames, agent_struct::dummy_top_node, DUPLICATE_PRODUCTION, rete_node_struct::first_child, fixup_rhs_value_variable_references(), get_new_tc_number(), get_nvn_for_condition_list(), soar_module::constant_param< T >::get_value(), ms_change_struct::goal, action_struct::id, symbol_union::id, insert_at_head_of_dll, ms_change_struct::inst, production_struct::instantiations, ms_change_struct::level, MAKE_ACTION, make_new_production_node(), agent_struct::ms_change_pool, agent_struct::ms_retractions, identifier_struct::ms_retractions, production_struct::name, action_struct::next, rete_node_struct::next_sibling, NIL, agent_struct::nil_goal_retractions, NO_REFRACTED_INST, rete_node_struct::node_type, soar_module::on, rete_node_struct::rete_node_b_union::p, P_BNODE, ms_change_struct::p_node, production_struct::p_node, p_node_data_struct::parents_nvn, pop_bindings_and_deallocate_list_of_variables(), preference_is_binary(), action_struct::preference_type, print_with_symbols(), instantiation_struct::prod, p_node_data_struct::prod, PRODUCTION_JUST_ADDED_CALLBACK, action_struct::referent, REFRACTED_INST_DID_NOT_MATCH, REFRACTED_INST_MATCHED, remove_from_dll, instantiation_struct::rete_token, instantiation_struct::rete_wme, production_struct::rhs_unbound_variables, agent_struct::rl_params, same_rhs(), soar_invoke_callbacks(), symbol_to_string(), p_node_data_struct::tentative_retractions, TRUE, production_struct::type, action_struct::type, update_max_rhs_unbound_variables(), update_node_with_matches_from_above(), action_struct::value, and xml_generate_warning().
Referenced by chunk_instantiation(), parse_production(), and rl_build_template_instantiation().
Definition at line 4071 of file rete.cpp.
References abort_with_fatal_error(), add_gensymmed_equality_test(), add_new_test_to_test(), three_field_tests_struct::attr_test, BUFFER_MSG_SIZE, agent_struct::complex_test_pool, rete_test_struct::rete_test_data_union::constant_referent, copy_symbol_list_adding_references(), rete_test_struct::data, complex_test_struct::data, condition_struct::data, rete_test_struct::rete_test_data_union::disjunction_list, complex_test_struct::test_info_union::disjunction_list, DISJUNCTION_RETE_TEST, DISJUNCTION_TEST, EQUAL_TEST_TYPE, var_location_struct::field_num, first_letter_from_test(), GOAL_ID_TEST, ID_IS_GOAL_RETE_TEST, ID_IS_IMPASSE_RETE_TEST, three_field_tests_struct::id_test, IMPASSE_ID_TEST, kind_of_relational_test(), var_location_struct::levels_up, make_equality_test_without_adding_reference(), make_test_from_complex_test(), rete_test_struct::next, NIL, complex_test_struct::test_info_union::referent, relational_test_type_to_test_type, rete_test_struct::right_field_num, symbol_add_ref(), test_includes_equality_test_for_symbol(), test_is_constant_relational_test(), test_is_variable_relational_test(), condition_struct::condition_main_data_union::tests, rete_test_struct::type, complex_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 | ( | agent * | thisAgent, |
test | t, | ||
rete_node_level | current_depth, | ||
byte | field_num, | ||
rete_test ** | rt, | ||
Symbol ** | alpha_constant | ||
) |
Definition at line 2984 of file rete.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, rete_test_struct::rete_test_data_union::constant_referent, CONSTANT_RELATIONAL_RETE_TEST, copy_symbol_list_adding_references(), 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, DISJUNCTION_RETE_TEST, DISJUNCTION_TEST, var_location_struct::field_num, find_var_location(), cons_struct::first, GOAL_ID_TEST, GREATER_OR_EQUAL_TEST, GREATER_TEST, ID_IS_GOAL_RETE_TEST, ID_IS_IMPASSE_RETE_TEST, IMPASSE_ID_TEST, LESS_OR_EQUAL_TEST, LESS_TEST, var_location_struct::levels_up, rete_test_struct::next, NIL, NOT_EQUAL_TEST, print_with_symbols(), complex_test_struct::test_info_union::referent, referent_of_equality_test(), RELATIONAL_EQUAL_RETE_TEST, cons_struct::rest, agent_struct::rete_test_pool, rete_test_struct::right_field_num, SAME_TYPE_TEST, symbol_add_ref(), symbol_to_string(), test_is_blank_or_equality_test(), test_is_blank_test(), test_type_to_relational_test_type, TRUE, rete_test_struct::type, complex_test_struct::type, rete_test_struct::rete_test_data_union::variable_referent, VARIABLE_RELATIONAL_RETE_TEST, and VARIABLE_SYMBOL_TYPE.
Referenced by make_node_for_negative_cond(), and make_node_for_positive_cond().
Definition at line 2750 of file rete.cpp.
References add_var_to_varnames(), complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, cons_struct::first, NIL, referent_of_equality_test(), cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_test(), complex_test_struct::type, var_is_bound(), and VARIABLE_SYMBOL_TYPE.
Referenced by make_nvn_for_posneg_cond().
Definition at line 2680 of file rete.cpp.
References allocate_cons(), cons_struct::first, NIL, one_var_to_varnames(), cons_struct::rest, symbol_add_ref(), var_list_to_varnames(), varnames_is_one_var(), varnames_to_one_var(), and varnames_to_var_list().
Referenced by add_unbound_varnames_in_test().
Definition at line 4233 of file rete.cpp.
References add_new_test_to_test(), cons_struct::first, make_equality_test(), NIL, cons_struct::rest, varnames_is_one_var(), varnames_to_one_var(), and varnames_to_var_list().
Referenced by rete_node_to_conditions().
void add_wme_to_aht | ( | agent * | thisAgent, |
hash_table * | ht, | ||
uint32_t | hash_value, | ||
wme * | w | ||
) |
Definition at line 1526 of file rete.cpp.
References add_wme_to_alpha_mem(), rete_node_struct::b, alpha_mem_struct::beta_nodes, hash_table_struct::buckets, 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, NIL, rete_node_struct::node_type, rete_node_struct::rete_node_b_union::posneg, right_addition_routines(), and wme_matches_alpha_mem().
Referenced by add_wme_to_rete().
Definition at line 1412 of file rete.cpp.
References right_mem_struct::am, alpha_mem_struct::am_id, wme_struct::id, insert_at_head_of_dll, agent_struct::right_ht, RIGHT_HT_MASK, agent_struct::right_mem_pool, wme_struct::right_mems, alpha_mem_struct::right_mems, uint32_t(), and right_mem_struct::w.
Referenced by add_wme_to_aht(), and find_or_make_alpha_mem().
Definition at line 1556 of file rete.cpp.
References wme_struct::acceptable, add_wme_to_aht(), agent_struct::all_wmes_in_rete, agent_struct::alpha_hash_tables, wme_struct::attr, soar_module::connected, agent_struct::epmem_db, wme_struct::epmem_id, identifier_struct::epmem_id, agent_struct::epmem_id_ref_counts, EPMEM_NODEID_BAD, wme_struct::epmem_valid, identifier_struct::epmem_valid, agent_struct::epmem_validation, agent_struct::epmem_wme_adds, soar_module::status_object< T >::get_status(), soar_module::constant_param< T >::get_value(), wme_struct::id, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, insert_at_head_of_dll, smem_param_container::mirroring, NIL, agent_struct::num_wmes_in_rete, soar_module::on, wme_struct::right_mems, agent_struct::smem_changed_ids, smem_enabled(), agent_struct::smem_ignore_changes, identifier_struct::smem_lti, agent_struct::smem_params, symbol_add_ref(), wme_struct::tokens, uint32_t(), wme_struct::value, and xor_op().
Referenced by do_buffered_wm_changes().
Definition at line 1373 of file rete.cpp.
References masks_for_n_low_order_bits.
Referenced by find_alpha_mem(), and hash_alpha_mem().
Definition at line 1097 of file rete.cpp.
References agent_struct::bottom_goal, FALSE, identifier_struct::higher_goal, symbol_union::id, identifier_struct::ms_i_assertions, identifier_struct::ms_o_assertions, identifier_struct::ms_retractions, agent_struct::nil_goal_retractions, and TRUE.
Referenced by determine_highest_active_production_level_in_stack_apply().
Definition at line 1129 of file rete.cpp.
References agent_struct::ms_i_assertions, and agent_struct::ms_retractions.
Definition at line 4957 of file rete.cpp.
References token_struct::a, rete_node_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, field_from_wme(), beta_memory_node_data_struct::first_linked_child, token_struct::token_a_union::ht, insert_token_into_left_ht(), rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, left_node_activation(), rete_node_struct::rete_node_b_union::mem, new_left_token(), pos_node_data_struct::next_from_beta_mem, NIL, rete_node_struct::node_id, token_struct::parent, rete_node_struct::rete_node_a_union::pos, positive_node_left_addition(), token_struct::token_a_union::token_in_hash_table_data_struct::referent, token_added, agent_struct::token_pool, TRUE, uint32_t(), and token_struct::w.
Referenced by init_left_and_right_addition_routines().
void bind_variables_in_test | ( | agent * | thisAgent, |
test | t, | ||
rete_node_level | depth, | ||
byte | field_num, | ||
Bool | dense, | ||
list ** | varlist | ||
) |
Definition at line 2557 of file rete.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, cons_struct::first, NIL, push(), push_var_binding(), referent_of_equality_test(), cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_test(), complex_test_struct::type, var_is_bound(), and VARIABLE_SYMBOL_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().
Definition at line 348 of file rete.cpp.
Referenced by deallocate_rete_node(), real_parent_node(), and update_node_with_matches_from_above().
Definition at line 345 of file rete.cpp.
Referenced by p_node_left_addition(), rete_node_to_conditions(), and update_node_with_matches_from_above().
Definition at line 347 of file rete.cpp.
Referenced by deallocate_rete_node(), and nearest_ancestor_with_same_am().
void build_network_for_condition_list | ( | agent * | thisAgent, |
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 3448 of file rete.cpp.
References three_field_tests_struct::attr_test, rete_node_struct::b, bind_variables_in_test(), rete_node_struct::rete_node_b_union::cn, CN_BNODE, CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, rete_node_struct::first_child, three_field_tests_struct::id_test, make_new_cn_node(), make_node_for_negative_cond(), make_node_for_positive_cond(), condition_struct::condition_main_data_union::ncc, NEGATIVE_CONDITION, condition_struct::next, rete_node_struct::next_sibling, NIL, rete_node_struct::node_type, rete_node_struct::parent, node_varnames_struct::parent, cn_node_data_struct::partner, pop_bindings_and_deallocate_list_of_variables(), POSITIVE_CONDITION, condition_struct::condition_main_data_union::tests, ncc_info_struct::top, TRUE, condition_struct::type, and three_field_tests_struct::value_test.
Referenced by add_production_to_rete().
Definition at line 5608 of file rete.cpp.
References token_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::first_child, token_struct::token_a_union::ht, insert_token_into_left_ht(), left_addition_routines(), left_ht_bucket(), left_node_activation(), token_struct::negrm_tokens, new_left_token(), token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, token_struct::parent, token_added, agent_struct::token_pool, TRUE, uint32_t(), and token_struct::w.
Referenced by init_left_and_right_addition_routines().
Definition at line 5638 of file rete.cpp.
References token_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, token_struct::first_child, token_struct::token_a_union::ht, insert_at_head_of_dll, insert_token_into_left_ht(), left_ht_bucket(), left_node_activation(), 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, new_left_token(), token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, NIL, token_struct::node, rete_node_struct::node_id, token_struct::parent, rete_node_struct::parent, cn_node_data_struct::partner, real_parent_node(), remove_token_and_subtree(), token_added, agent_struct::token_pool, TRUE, uint32_t(), and token_struct::w.
Referenced by init_left_and_right_addition_routines().
void collect_nots | ( | agent * | thisAgent, |
rete_test * | rt, | ||
wme * | right_wme, | ||
condition * | cond, | ||
not_struct *& | nots_found_in_production | ||
) |
Definition at line 4175 of file rete.cpp.
References rete_test_struct::rete_test_data_union::constant_referent, CONSTANT_RELATIONAL_RETE_TEST, rete_test_struct::data, field_from_wme(), var_location_struct::field_num, IDENTIFIER_SYMBOL_TYPE, var_location_struct::levels_up, not_struct::next, rete_test_struct::next, NIL, agent_struct::not_pool, RELATIONAL_NOT_EQUAL_RETE_TEST, rete_test_struct::right_field_num, not_struct::s1, not_struct::s2, symbol_add_ref(), test_is_not_equal_test(), rete_test_struct::type, var_bound_in_reconstructed_conds(), rete_test_struct::rete_test_data_union::variable_referent, and VARIABLE_RELATIONAL_RETE_TEST.
Referenced by rete_node_to_conditions().
Definition at line 4658 of file rete.cpp.
References symbol_union::fc, FLOAT_CONSTANT_SYMBOL_TYPE, symbol_union::ic, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, INT_CONSTANT_SYMBOL_TYPE, sym_constant_struct::name, identifier_struct::name_letter, identifier_struct::name_number, numcmp, symbol_union::sc, SYM_CONSTANT_SYMBOL_TYPE, int_constant_struct::value, and float_constant_struct::value.
Referenced by constant_greater_or_equal_rete_test_routine(), constant_greater_rete_test_routine(), constant_less_or_equal_rete_test_routine(), constant_less_rete_test_routine(), variable_greater_or_equal_rete_test_routine(), variable_greater_rete_test_routine(), variable_less_or_equal_rete_test_routine(), and variable_less_rete_test_routine().
Definition at line 4733 of file rete.cpp.
References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, field_from_wme(), and rete_test_struct::right_field_num.
Referenced by init_rete().
Definition at line 4775 of file rete.cpp.
References compare_symbols(), rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, field_from_wme(), and rete_test_struct::right_field_num.
Referenced by init_rete().
Definition at line 4758 of file rete.cpp.
References compare_symbols(), rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, field_from_wme(), and rete_test_struct::right_field_num.
Referenced by init_rete().
Definition at line 4766 of file rete.cpp.
References compare_symbols(), rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, field_from_wme(), and rete_test_struct::right_field_num.
Referenced by init_rete().
Definition at line 4750 of file rete.cpp.
References compare_symbols(), rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, field_from_wme(), and rete_test_struct::right_field_num.
Referenced by init_rete().
Definition at line 4741 of file rete.cpp.
References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, field_from_wme(), and rete_test_struct::right_field_num.
Referenced by init_rete().
Definition at line 4784 of file rete.cpp.
References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, field_from_wme(), and rete_test_struct::right_field_num.
Referenced by init_rete().
void consume_last_postponed_assertion | ( | agent * | thisAgent | ) |
Definition at line 1215 of file rete.cpp.
References agent_struct::ms_change_pool, agent_struct::postponed_assertions, and remove_from_dll.
Referenced by do_preference_phase().
action* copy_action_list_and_substitute_varnames | ( | agent * | thisAgent, |
action * | actions, | ||
condition * | cond | ||
) |
Definition at line 4472 of file rete.cpp.
References agent_struct::action_pool, action_struct::attr, copy_rhs_value_and_substitute_varnames(), first_letter_from_rhs_value(), FUNCALL_ACTION, action_struct::id, action_struct::next, NIL, preference_is_binary(), 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 | ( | agent * | thisAgent, |
rhs_value | rv, | ||
condition * | cond, | ||
char | first_letter | ||
) |
Definition at line 4409 of file rete.cpp.
References allocate_cons(), cons_struct::first, funcall_list_to_rhs_value(), generate_new_variable(), agent_struct::highest_rhs_unboundvar_index, NIL, cons_struct::rest, rhs_value_is_funcall(), rhs_value_is_reteloc(), rhs_value_is_unboundvar(), rhs_value_to_funcall_list(), rhs_value_to_reteloc_field_num(), rhs_value_to_reteloc_levels_up(), rhs_value_to_symbol(), rhs_value_to_unboundvar(), agent_struct::rhs_variable_bindings, symbol_add_ref(), symbol_to_rhs_value(), and var_bound_in_reconstructed_conds().
Referenced by copy_action_list_and_substitute_varnames().
uint64_t count_rete_tokens_for_production | ( | agent * | thisAgent, |
production * | prod | ||
) |
Definition at line 7664 of file rete.cpp.
References rete_node_struct::a, rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, CN_BNODE, agent_struct::dummy_top_node, token_struct::next_of_node, NIL, 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, POSITIVE_BNODE, non_pos_node_data_struct::tokens, and UNHASHED_POSITIVE_BNODE.
void deallocate_node_varnames | ( | agent * | thisAgent, |
rete_node * | node, | ||
rete_node * | cutoff, | ||
node_varnames * | nvn | ||
) |
Definition at line 2717 of file rete.cpp.
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, CN_BNODE, node_varnames_struct::data, deallocate_varnames(), node_varnames_struct::varname_data_union::fields, three_field_varnames_struct::id_varnames, rete_node_struct::node_type, agent_struct::node_varnames_pool, rete_node_struct::parent, node_varnames_struct::parent, cn_node_data_struct::partner, real_parent_node(), and three_field_varnames_struct::value_varnames.
Referenced by excise_production_from_rete().
Definition at line 2385 of file rete.cpp.
References rete_node_struct::a, abort_with_fatal_error(), posneg_node_data_struct::alpha_mem_, rete_node_struct::b, bnode_is_bottom_of_split_mp(), bnode_is_posneg(), BUFFER_MSG_SIZE, rete_node_struct::rete_node_b_union::cn, CN_BNODE, deallocate_rete_test_list(), agent_struct::dummy_top_node, rete_node_struct::first_child, merge_into_mp_node(), rete_node_struct::next_sibling, NIL, node_is_left_unlinked(), node_is_right_unlinked(), rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, posneg_node_data_struct::other_tests, P_BNODE, 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(), agent_struct::rete_node_pool, non_pos_node_data_struct::tokens, unlink_from_left_mem, unlink_from_right_mem, and update_stats_for_destroying_node().
Referenced by excise_production_from_rete().
Definition at line 2368 of file rete.cpp.
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, DISJUNCTION_RETE_TEST, rete_test_struct::next, agent_struct::rete_test_pool, symbol_remove_ref(), test_is_constant_relational_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().
Definition at line 7886 of file rete.cpp.
References token_struct::next_of_node, and agent_struct::token_pool.
Referenced by ppmi_aux(), print_partial_match_information(), xml_aux(), and xml_partial_match_information().
Definition at line 2703 of file rete.cpp.
References deallocate_symbol_list_removing_references(), NIL, symbol_remove_ref(), varnames_is_one_var(), varnames_to_one_var(), and varnames_to_var_list().
Referenced by deallocate_node_varnames().
Definition at line 4723 of file rete.cpp.
References rete_test_struct::data, rete_test_struct::rete_test_data_union::disjunction_list, FALSE, field_from_wme(), cons_struct::first, NIL, cons_struct::rest, rete_test_struct::right_field_num, and TRUE.
Referenced by init_rete().
Definition at line 7858 of file rete.cpp.
References agent_struct::dummy_matches_node_tokens, token_struct::next_of_node, NIL, token_struct::node, token_struct::parent, agent_struct::token_pool, and token_struct::w.
Referenced by init_left_and_right_addition_routines().
|
inline |
Definition at line 2491 of file rete.cpp.
Referenced by find_var_location().
|
inline |
Definition at line 2497 of file rete.cpp.
Referenced by find_var_location().
Definition at line 4707 of file rete.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, and FALSE.
void excise_production_from_rete | ( | agent * | thisAgent, |
production * | p | ||
) |
Definition at line 3910 of file rete.cpp.
References rete_node_struct::a, adjust_sharing_factors_from_here_to_top, rete_node_struct::b, deallocate_node_varnames(), deallocate_rete_node(), agent_struct::dummy_top_node, rete_node_struct::first_child, ms_change_struct::next_of_node, NIL, rete_node_struct::rete_node_a_union::np, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, production_struct::p_node, rete_node_struct::parent, node_varnames_struct::parent, p_node_data_struct::parents_nvn, PRODUCTION_JUST_ABOUT_TO_BE_EXCISED_CALLBACK, remove_node_from_parents_list_of_children(), remove_token_and_subtree(), agent_struct::rete_node_pool, soar_invoke_callbacks(), p_node_data_struct::tentative_retractions, non_pos_node_data_struct::tokens, and update_stats_for_destroying_node().
Referenced by excise_production().
Bool extract_rete_test_to_hash_with | ( | agent * | thisAgent, |
rete_test ** | rt, | ||
var_location * | dest_hash_loc | ||
) |
Definition at line 3203 of file rete.cpp.
References deallocate_rete_test_list(), FALSE, rete_test_struct::next, NIL, RELATIONAL_EQUAL_RETE_TEST, TRUE, and VARIABLE_RELATIONAL_RETE_TEST.
Referenced by make_node_for_negative_cond(), and make_node_for_positive_cond().
Definition at line 292 of file rete.cpp.
Referenced by beta_memory_node_left_addition(), 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(), disjunction_rete_test_routine(), mp_node_left_addition(), negative_node_left_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().
alpha_mem* find_alpha_mem | ( | agent * | thisAgent, |
Symbol * | id, | ||
Symbol * | attr, | ||
Symbol * | value, | ||
Bool | acceptable | ||
) |
Definition at line 1452 of file rete.cpp.
References alpha_mem_struct::acceptable, alpha_hash_value(), alpha_mem_struct::attr, hash_table_struct::buckets, alpha_mem_struct::id, hash_table_struct::log2size, alpha_mem_struct::next_in_hash_table, NIL, table_for_tests(), uint32_t(), and alpha_mem_struct::value.
Referenced by find_or_make_alpha_mem().
Definition at line 1001 of file rete.cpp.
References abort_with_fatal_error(), rete_node_struct::b, BUFFER_MSG_SIZE, agent_struct::dummy_top_token, wme_struct::id, symbol_union::id, identifier_struct::isa_goal, identifier_struct::level, production_struct::name, NIL, 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_to_string(), ms_change_struct::tok, TRUE, ms_change_struct::w, and token_struct::w.
Referenced by p_node_left_addition().
Definition at line 1055 of file rete.cpp.
References ms_change_struct::inst, instantiation_struct::match_goal, production_struct::name, NIL, print(), print_with_symbols(), and instantiation_struct::prod.
Referenced by p_node_left_removal().
alpha_mem* find_or_make_alpha_mem | ( | agent * | thisAgent, |
Symbol * | id, | ||
Symbol * | attr, | ||
Symbol * | value, | ||
Bool | acceptable | ||
) |
Definition at line 1471 of file rete.cpp.
References alpha_mem_struct::acceptable, add_to_hash_table(), add_wme_to_alpha_mem(), agent_struct::all_wmes_in_rete, agent_struct::alpha_mem_pool, alpha_mem_struct::am_id, alpha_mem_struct::attr, alpha_mem_struct::beta_nodes, find_alpha_mem(), get_next_alpha_mem_id(), alpha_mem_struct::id, alpha_mem_struct::last_beta_node, right_mem_struct::next_in_am, alpha_mem_struct::next_in_hash_table, NIL, alpha_mem_struct::reference_count, wme_struct::rete_next, alpha_mem_struct::right_mems, symbol_add_ref(), table_for_tests(), alpha_mem_struct::value, right_mem_struct::w, and wme_matches_alpha_mem().
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 2536 of file rete.cpp.
References dummy_to_varloc_depth(), dummy_to_varloc_field_num(), FALSE, var_location_struct::field_num, cons_struct::first, var_location_struct::levels_up, variable_struct::rete_binding_locations, TRUE, and symbol_union::var.
Referenced by add_rete_tests_for_test(), and fixup_rhs_value_variable_references().
void fixup_rhs_value_variable_references | ( | agent * | thisAgent, |
rhs_value * | rv, | ||
rete_node_level | bottom_depth, | ||
list *& | rhs_unbound_vars_for_new_prod, | ||
uint64_t & | num_rhs_unbound_vars_for_new_prod, | ||
tc_number | rhs_unbound_vars_tc | ||
) |
Definition at line 3616 of file rete.cpp.
References variable_struct::current_binding_value, var_location_struct::field_num, find_var_location(), cons_struct::first, var_location_struct::levels_up, NIL, push(), cons_struct::rest, reteloc_to_rhs_value(), rhs_value_is_funcall(), rhs_value_is_symbol(), rhs_value_to_funcall_list(), rhs_value_to_symbol(), symbol_add_ref(), symbol_remove_ref(), variable_struct::tc_num, unboundvar_to_rhs_value(), symbol_union::var, and VARIABLE_SYMBOL_TYPE.
Referenced by add_production_to_rete().
Definition at line 7871 of file rete.cpp.
References DUMMY_MATCHES_BNODE, agent_struct::dummy_matches_node_tokens, rete_node_struct::first_child, rete_node_struct::next_sibling, NIL, rete_node_struct::node_type, rete_node_struct::parent, and update_node_with_matches_from_above().
Referenced by ppmi_aux(), print_partial_match_information(), xml_aux(), and xml_partial_match_information().
void get_all_node_count_stats | ( | agent * | thisAgent | ) |
Definition at line 7729 of file rete.cpp.
References agent_struct::actual, DUMMY_MATCHES_BNODE, agent_struct::if_no_merging, agent_struct::if_no_sharing, init_bnode_type_names(), MEMORY_BNODE, MP_BNODE, POSITIVE_BNODE, agent_struct::rete_node_counts, agent_struct::rete_node_counts_if_no_sharing, UNHASHED_MEMORY_BNODE, UNHASHED_MP_BNODE, and UNHASHED_POSITIVE_BNODE.
Referenced by get_node_count_statistic().
Definition at line 1405 of file rete.cpp.
References agent_struct::alpha_mem_id_counter.
Referenced by find_or_make_alpha_mem().
Definition at line 1864 of file rete.cpp.
References agent_struct::beta_node_id_counter.
Referenced by make_new_cn_node(), make_new_mem_node(), and make_new_negative_node().
Bool get_next_nil_goal_retraction | ( | agent * | thisAgent, |
instantiation ** | inst | ||
) |
Definition at line 1292 of file rete.cpp.
References rete_node_struct::b, FALSE, ms_change_struct::inst, agent_struct::ms_change_pool, agent_struct::ms_retractions, agent_struct::nil_goal_retractions, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, remove_from_dll, p_node_data_struct::tentative_retractions, and TRUE.
Referenced by do_preference_phase().
Bool get_next_retraction | ( | agent * | thisAgent, |
instantiation ** | inst | ||
) |
Definition at line 1256 of file rete.cpp.
References agent_struct::active_goal, agent_struct::active_level, rete_node_struct::b, FALSE, symbol_union::id, ms_change_struct::inst, agent_struct::ms_change_pool, agent_struct::ms_retractions, identifier_struct::ms_retractions, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, remove_from_dll, p_node_data_struct::tentative_retractions, and TRUE.
Referenced by do_preference_phase().
int get_node_count_statistic | ( | agent * | thisAgent, |
char * | node_type_name, | ||
char * | column_name, | ||
uint64_t * | result | ||
) |
Definition at line 7771 of file rete.cpp.
References agent_struct::actual, bnode_type_names, get_all_node_count_stats(), agent_struct::if_no_merging, and agent_struct::if_no_sharing.
node_varnames* get_nvn_for_condition_list | ( | agent * | thisAgent, |
condition * | cond_list, | ||
node_varnames * | parent_nvn | ||
) |
Definition at line 2806 of file rete.cpp.
References three_field_tests_struct::attr_test, bind_variables_in_test(), node_varnames_struct::varname_data_union::bottom_of_subconditions, CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, node_varnames_struct::data, FALSE, three_field_tests_struct::id_test, make_nvn_for_posneg_cond(), condition_struct::condition_main_data_union::ncc, NEGATIVE_CONDITION, condition_struct::next, NIL, agent_struct::node_varnames_pool, node_varnames_struct::parent, pop_bindings_and_deallocate_list_of_variables(), POSITIVE_CONDITION, 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().
Definition at line 4573 of file rete.cpp.
References wme_struct::attr, wme_struct::id, token_struct::parent, wme_struct::value, and token_struct::w.
Referenced by calculate_support_for_instantiation_preferences(), instantiate_rhs_value(), p_node_left_addition(), and shouldCreateInstantiation().
uint32_t hash_alpha_mem | ( | void * | item, |
short | num_bits | ||
) |
Definition at line 1383 of file rete.cpp.
References alpha_hash_value(), alpha_mem_struct::attr, alpha_mem_struct::id, and alpha_mem_struct::value.
Referenced by init_rete().
Definition at line 4715 of file rete.cpp.
References wme_struct::id, symbol_union::id, and identifier_struct::isa_goal.
Referenced by init_rete().
Definition at line 4719 of file rete.cpp.
References wme_struct::id, symbol_union::id, and identifier_struct::isa_impasse.
Referenced by init_rete().
Definition at line 8055 of file rete.cpp.
References match_set_trace::next, and match_set_trace::sym.
Definition at line 8064 of file rete.cpp.
References match_set_trace::goal, match_set_trace::next, and match_set_trace::sym.
Referenced by print_match_set(), and xml_match_set().
void init_bnode_type_names | ( | agent * | ) |
Definition at line 7700 of file rete.cpp.
References bnode_type_names, CN_BNODE, CN_PARTNER_BNODE, DUMMY_MATCHES_BNODE, DUMMY_TOP_BNODE, MEMORY_BNODE, MP_BNODE, NEGATIVE_BNODE, P_BNODE, POSITIVE_BNODE, UNHASHED_MEMORY_BNODE, UNHASHED_MP_BNODE, UNHASHED_NEGATIVE_BNODE, and UNHASHED_POSITIVE_BNODE.
Referenced by get_all_node_count_stats(), and init_rete().
void init_dummy_top_node | ( | agent * | thisAgent | ) |
Definition at line 1877 of file rete.cpp.
References rete_node_struct::a, DUMMY_TOP_BNODE, agent_struct::dummy_top_node, agent_struct::dummy_top_token, token_struct::first_child, rete_node_struct::first_child, init_new_rete_node_with_type(), token_struct::next_from_wme, token_struct::next_of_node, token_struct::next_sibling, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::rete_node_a_union::np, token_struct::parent, rete_node_struct::parent, token_struct::prev_from_wme, token_struct::prev_of_node, token_struct::prev_sibling, agent_struct::rete_node_pool, agent_struct::token_pool, non_pos_node_data_struct::tokens, and token_struct::w.
Referenced by init_rete().
void init_left_and_right_addition_routines | ( | ) |
Definition at line 9021 of file rete.cpp.
References beta_memory_node_left_addition(), CN_BNODE, cn_node_left_addition(), CN_PARTNER_BNODE, cn_partner_node_left_addition(), DUMMY_MATCHES_BNODE, dummy_matches_node_left_addition(), left_addition_routines(), MEMORY_BNODE, MP_BNODE, mp_node_left_addition(), mp_node_right_addition(), NEGATIVE_BNODE, negative_node_left_addition(), negative_node_right_addition(), P_BNODE, p_node_left_addition(), POSITIVE_BNODE, positive_node_right_addition(), right_addition_routines(), unhashed_beta_memory_node_left_addition(), UNHASHED_MEMORY_BNODE, UNHASHED_MP_BNODE, unhashed_mp_node_left_addition(), unhashed_mp_node_right_addition(), UNHASHED_NEGATIVE_BNODE, unhashed_negative_node_left_addition(), unhashed_negative_node_right_addition(), UNHASHED_POSITIVE_BNODE, and unhashed_positive_node_right_addition().
Referenced by init_rete().
Definition at line 941 of file rete.cpp.
References init_sharing_stats_for_new_node, and agent_struct::rete_node_counts.
Referenced by init_dummy_top_node(), make_new_cn_node(), make_new_mem_node(), make_new_negative_node(), make_new_positive_node(), make_new_production_node(), merge_into_mp_node(), and split_mp_node().
void init_rete | ( | agent * | thisAgent | ) |
Definition at line 9049 of file rete.cpp.
References allocate_memory_and_zerofill(), agent_struct::alpha_hash_tables, agent_struct::alpha_mem_pool, 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_RELATIONAL_RETE_TEST, constant_same_type_rete_test_routine(), DISJUNCTION_RETE_TEST, disjunction_rete_test_routine(), FALSE, hash_alpha_mem(), HASH_TABLE_MEM_USAGE, ID_IS_GOAL_RETE_TEST, id_is_goal_rete_test_routine(), ID_IS_IMPASSE_RETE_TEST, id_is_impasse_rete_test_routine(), init_bnode_type_names(), init_dummy_top_node(), init_left_and_right_addition_routines(), init_memory_pool(), init_test_type_conversion_tables(), agent_struct::left_ht, LEFT_HT_SIZE, make_hash_table(), agent_struct::max_rhs_unbound_variables, MISCELLANEOUS_MEM_USAGE, agent_struct::ms_change_pool, agent_struct::node_varnames_pool, RELATIONAL_EQUAL_RETE_TEST, RELATIONAL_GREATER_OR_EQUAL_RETE_TEST, RELATIONAL_GREATER_RETE_TEST, RELATIONAL_LESS_OR_EQUAL_RETE_TEST, RELATIONAL_LESS_RETE_TEST, RELATIONAL_NOT_EQUAL_RETE_TEST, RELATIONAL_SAME_TYPE_RETE_TEST, agent_struct::rete_node_pool, agent_struct::rete_test_pool, agent_struct::rhs_variable_bindings, agent_struct::right_ht, RIGHT_HT_SIZE, agent_struct::right_mem_pool, agent_struct::token_pool, TRUE, 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(), VARIABLE_RELATIONAL_RETE_TEST, and variable_same_type_rete_test_routine().
Referenced by init_soar_agent().
void init_test_type_conversion_tables | ( | void | ) |
Definition at line 2938 of file rete.cpp.
References EQUAL_TEST_TYPE, FALSE, GREATER_OR_EQUAL_TEST, GREATER_TEST, LESS_OR_EQUAL_TEST, LESS_TEST, NOT_EQUAL_TEST, RELATIONAL_EQUAL_RETE_TEST, RELATIONAL_GREATER_OR_EQUAL_RETE_TEST, RELATIONAL_GREATER_RETE_TEST, RELATIONAL_LESS_OR_EQUAL_RETE_TEST, RELATIONAL_LESS_RETE_TEST, RELATIONAL_NOT_EQUAL_RETE_TEST, RELATIONAL_SAME_TYPE_RETE_TEST, relational_test_type_to_test_type, SAME_TYPE_TEST, test_type_to_relational_test_type, and TRUE.
Referenced by init_rete().
Definition at line 682 of file rete.cpp.
References insert_at_head_of_dll, agent_struct::left_ht, and LEFT_HT_MASK.
Referenced by beta_memory_node_left_addition(), cn_node_left_addition(), cn_partner_node_left_addition(), mp_node_left_addition(), negative_node_left_addition(), unhashed_beta_memory_node_left_addition(), unhashed_mp_node_left_addition(), and unhashed_negative_node_left_addition().
Definition at line 247 of file rete.cpp.
Referenced by add_rete_test_list_to_tests().
Referenced by cn_node_left_addition(), init_left_and_right_addition_routines(), 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().
Definition at line 667 of file rete.cpp.
References agent_struct::left_ht, and LEFT_HT_MASK.
Referenced by cn_node_left_addition(), cn_partner_node_left_addition(), mp_node_right_addition(), negative_node_right_addition(), positive_node_right_addition(), remove_token_from_left_ht(), unhashed_mp_node_right_addition(), unhashed_negative_node_right_addition(), and unhashed_positive_node_right_addition().
Definition at line 929 of file rete.cpp.
References null_activation_stats_for_left_activation.
Referenced by beta_memory_node_left_addition(), cn_node_left_addition(), cn_partner_node_left_addition(), mp_node_left_addition(), negative_node_left_addition(), p_node_left_addition(), positive_node_left_addition(), remove_token_and_subtree(), unhashed_beta_memory_node_left_addition(), unhashed_mp_node_left_addition(), unhashed_negative_node_left_addition(), and unhashed_positive_node_left_addition().
Definition at line 7568 of file rete.cpp.
References agent_struct::all_wmes_in_rete, agent_struct::dummy_top_node, excise_all_productions(), FALSE, init_agent_memory(), NUM_PRODUCTION_TYPES, agent_struct::num_productions_of_type, print(), reinitialize_soar(), rete_fs_file, rete_net_64, reteload_all_symbols(), reteload_alpha_memories(), reteload_eight_bytes(), reteload_free_am_table(), reteload_free_symbol_table(), reteload_node_and_children(), reteload_one_byte(), reteload_string(), reteload_string_buf, and TRUE.
|
inline |
Definition at line 594 of file rete.cpp.
Referenced by merge_into_mp_node(), mp_node_right_addition(), and unhashed_mp_node_right_addition().
|
inline |
Definition at line 589 of file rete.cpp.
Referenced by merge_into_mp_node(), mp_node_left_addition(), remove_wme_from_rete(), and unhashed_mp_node_left_addition().
rete_node* make_new_cn_node | ( | agent * | thisAgent, |
rete_node * | parent, | ||
rete_node * | bottom_of_subconditions | ||
) |
Definition at line 2273 of file rete.cpp.
References rete_node_struct::a, rete_node_struct::b, rete_node_struct::rete_node_b_union::cn, CN_BNODE, CN_PARTNER_BNODE, rete_node_struct::first_child, get_next_beta_node_id(), init_new_rete_node_with_type(), rete_node_struct::next_sibling, NIL, 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(), agent_struct::rete_node_pool, 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 | ( | agent * | thisAgent, |
rete_node * | parent, | ||
byte | node_type, | ||
var_location | left_hash_loc | ||
) |
Definition at line 2006 of file rete.cpp.
References rete_node_struct::a, rete_node_struct::b, var_location_struct::field_num, rete_node_struct::first_child, beta_memory_node_data_struct::first_linked_child, get_next_beta_node_id(), init_new_rete_node_with_type(), 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, NIL, rete_node_struct::node_id, rete_node_struct::rete_node_a_union::np, rete_node_struct::parent, agent_struct::rete_node_pool, non_pos_node_data_struct::tokens, and update_node_with_matches_from_above().
Referenced by make_new_mp_node(), and reteload_node_and_children().
rete_node* make_new_mp_node | ( | agent * | thisAgent, |
rete_node * | parent, | ||
byte | node_type, | ||
var_location | left_hash_loc, | ||
alpha_mem * | am, | ||
rete_test * | rt, | ||
Bool | prefer_left_unlinking | ||
) |
Definition at line 2209 of file rete.cpp.
References make_new_mem_node(), make_new_positive_node(), MEMORY_BNODE, merge_into_mp_node(), MP_BNODE, POSITIVE_BNODE, UNHASHED_MEMORY_BNODE, and UNHASHED_POSITIVE_BNODE.
Referenced by make_node_for_positive_cond(), and reteload_node_and_children().
rete_node* make_new_negative_node | ( | agent * | thisAgent, |
rete_node * | parent, | ||
byte | node_type, | ||
var_location | left_hash_loc, | ||
alpha_mem * | am, | ||
rete_test * | rt | ||
) |
Definition at line 2235 of file rete.cpp.
References rete_node_struct::a, posneg_node_data_struct::alpha_mem_, rete_node_struct::b, var_location_struct::field_num, rete_node_struct::first_child, get_next_beta_node_id(), init_new_rete_node_with_type(), rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, var_location_struct::levels_up, posneg_node_data_struct::nearest_ancestor_with_same_am, nearest_ancestor_with_same_am(), rete_node_struct::next_sibling, NIL, 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, relink_to_right_mem(), agent_struct::rete_node_pool, non_pos_node_data_struct::tokens, unlink_from_right_mem, and update_node_with_matches_from_above().
Referenced by make_node_for_negative_cond(), and reteload_node_and_children().
rete_node* make_new_positive_node | ( | agent * | thisAgent, |
rete_node * | parent_mem, | ||
byte | node_type, | ||
alpha_mem * | am, | ||
rete_test * | rt, | ||
Bool | prefer_left_unlinking | ||
) |
Definition at line 2039 of file rete.cpp.
References rete_node_struct::a, posneg_node_data_struct::alpha_mem_, rete_node_struct::b, rete_node_struct::first_child, init_new_rete_node_with_type(), posneg_node_data_struct::nearest_ancestor_with_same_am, nearest_ancestor_with_same_am(), rete_node_struct::next_sibling, NIL, node_is_right_unlinked(), 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, relink_to_left_mem, relink_to_right_mem(), agent_struct::rete_node_pool, alpha_mem_struct::right_mems, non_pos_node_data_struct::tokens, unlink_from_left_mem, and unlink_from_right_mem.
Referenced by make_new_mp_node(), make_node_for_positive_cond(), and reteload_node_and_children().
rete_node* make_new_production_node | ( | agent * | thisAgent, |
rete_node * | parent, | ||
production * | new_prod | ||
) |
Definition at line 2329 of file rete.cpp.
References rete_node_struct::a, rete_node_struct::b, rete_node_struct::first_child, init_new_rete_node_with_type(), rete_node_struct::next_sibling, NIL, rete_node_struct::rete_node_a_union::np, rete_node_struct::rete_node_b_union::p, P_BNODE, production_struct::p_node, rete_node_struct::parent, p_node_data_struct::prod, agent_struct::rete_node_pool, 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 | ( | agent * | thisAgent, |
condition * | cond, | ||
rete_node_level | current_depth, | ||
rete_node * | parent | ||
) |
Definition at line 3363 of file rete.cpp.
References add_rete_tests_for_test(), posneg_node_data_struct::alpha_mem_, three_field_tests_struct::attr_test, rete_node_struct::b, bind_variables_in_test(), condition_struct::data, deallocate_rete_test_list(), extract_rete_test_to_hash_with(), FALSE, 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, make_new_negative_node(), NEGATIVE_BNODE, rete_node_struct::next_sibling, NIL, 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_test_lists_are_identical(), condition_struct::test_for_acceptable_preference, condition_struct::condition_main_data_union::tests, UNHASHED_NEGATIVE_BNODE, and three_field_tests_struct::value_test.
Referenced by build_network_for_condition_list().
rete_node* make_node_for_positive_cond | ( | agent * | thisAgent, |
condition * | cond, | ||
rete_node_level | current_depth, | ||
rete_node * | parent | ||
) |
Definition at line 3236 of file rete.cpp.
References add_rete_tests_for_test(), posneg_node_data_struct::alpha_mem_, three_field_tests_struct::attr_test, rete_node_struct::b, bind_variables_in_test(), condition_struct::data, deallocate_rete_test_list(), extract_rete_test_to_hash_with(), FALSE, 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, make_new_mp_node(), make_new_positive_node(), MEMORY_BNODE, MP_BNODE, rete_node_struct::next_sibling, NIL, rete_node_struct::node_type, posneg_node_data_struct::other_tests, pop_bindings_and_deallocate_list_of_variables(), POSITIVE_BNODE, rete_node_struct::rete_node_b_union::posneg, remove_ref_to_alpha_mem(), rete_test_lists_are_identical(), split_mp_node(), condition_struct::test_for_acceptable_preference, condition_struct::condition_main_data_union::tests, UNHASHED_MEMORY_BNODE, UNHASHED_MP_BNODE, UNHASHED_POSITIVE_BNODE, and three_field_tests_struct::value_test.
Referenced by build_network_for_condition_list().
node_varnames* make_nvn_for_posneg_cond | ( | agent * | thisAgent, |
condition * | cond, | ||
node_varnames * | parent_nvn | ||
) |
Definition at line 2775 of file rete.cpp.
References add_unbound_varnames_in_test(), three_field_tests_struct::attr_test, three_field_varnames_struct::attr_varnames, bind_variables_in_test(), condition_struct::data, node_varnames_struct::data, FALSE, node_varnames_struct::varname_data_union::fields, three_field_tests_struct::id_test, three_field_varnames_struct::id_varnames, NIL, agent_struct::node_varnames_pool, node_varnames_struct::parent, pop_bindings_and_deallocate_list_of_variables(), condition_struct::condition_main_data_union::tests, three_field_tests_struct::value_test, and three_field_varnames_struct::value_varnames.
Referenced by get_nvn_for_condition_list().
|
inline |
Definition at line 558 of file rete.cpp.
References rete_node_struct::a, pos_node_data_struct::next_from_beta_mem, and rete_node_struct::rete_node_a_union::pos.
|
inline |
Definition at line 474 of file rete.cpp.
References rete_node_struct::b, posneg_node_data_struct::next_from_alpha_mem, and rete_node_struct::rete_node_b_union::posneg.
|
inline |
Definition at line 4623 of file rete.cpp.
Referenced by mp_node_left_addition(), mp_node_right_addition(), negative_node_left_addition(), negative_node_right_addition(), positive_node_left_addition(), positive_node_right_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(), and unhashed_positive_node_right_addition().
Definition at line 2145 of file rete.cpp.
References rete_node_struct::a, abort_with_fatal_error(), rete_node_struct::b, BUFFER_MSG_SIZE, rete_node_struct::first_child, init_new_rete_node_with_type(), rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, make_mp_bnode_left_linked(), make_mp_bnode_left_unlinked(), MEMORY_BNODE, MP_BNODE, token_struct::next_of_node, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::node_id, node_is_left_unlinked(), 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(), agent_struct::rete_node_pool, set_sharing_factor, non_pos_node_data_struct::tokens, UNHASHED_MP_BNODE, and update_stats_for_destroying_node().
Referenced by deallocate_rete_node(), and make_new_mp_node().
|
inline |
Definition at line 599 of file rete.cpp.
Referenced by mp_node_left_addition(), mp_node_right_addition(), remove_token_and_subtree(), split_mp_node(), unhashed_mp_node_left_addition(), and unhashed_mp_node_right_addition().
Definition at line 5104 of file rete.cpp.
References token_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, posneg_node_data_struct::alpha_mem_, right_mem_struct::am, alpha_mem_struct::am_id, rete_node_struct::b, FALSE, field_from_wme(), rete_node_struct::first_child, token_struct::token_a_union::ht, wme_struct::id, insert_token_into_left_ht(), left_addition_routines(), rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, left_node_activation(), make_mp_bnode_left_unlinked(), match_left_and_right(), mp_bnode_is_left_unlinked(), new_left_token(), rete_test_struct::next, right_mem_struct::next_in_bucket, rete_node_struct::next_sibling, NIL, rete_node_struct::node_id, node_is_right_unlinked(), rete_node_struct::node_type, 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, relink_to_right_mem(), right_ht_bucket(), alpha_mem_struct::right_mems, token_added, agent_struct::token_pool, TRUE, uint32_t(), token_struct::w, and right_mem_struct::w.
Referenced by init_left_and_right_addition_routines().
Definition at line 5306 of file rete.cpp.
References token_struct::a, rete_node_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, FALSE, rete_node_struct::first_child, token_struct::token_a_union::ht, wme_struct::id, left_addition_routines(), left_ht_bucket(), make_mp_bnode_left_linked(), match_left_and_right(), mp_bnode_is_left_unlinked(), rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, NIL, 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, right_node_activation(), non_pos_node_data_struct::tokens, TRUE, uint32_t(), and unlink_from_right_mem.
Referenced by init_left_and_right_addition_routines().
Definition at line 1990 of file rete.cpp.
References posneg_node_data_struct::alpha_mem_, rete_node_struct::b, bnode_is_posneg(), rete_node_struct::rete_node_b_union::cn, CN_BNODE, DUMMY_TOP_BNODE, NIL, rete_node_struct::node_type, rete_node_struct::parent, cn_node_data_struct::partner, rete_node_struct::rete_node_b_union::posneg, and real_parent_node().
Referenced by make_new_negative_node(), and make_new_positive_node().
Definition at line 5391 of file rete.cpp.
References token_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, posneg_node_data_struct::alpha_mem_, right_mem_struct::am, alpha_mem_struct::am_id, rete_node_struct::b, FALSE, field_from_wme(), token_struct::first_child, rete_node_struct::first_child, token_struct::token_a_union::ht, wme_struct::id, insert_at_head_of_dll, insert_token_into_left_ht(), left_addition_routines(), rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, left_node_activation(), token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, match_left_and_right(), token_struct::token_a_union::neg, token_struct::negrm_tokens, new_left_token(), rete_test_struct::next, right_mem_struct::next_in_bucket, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::node_id, node_is_right_unlinked(), rete_node_struct::node_type, 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, relink_to_right_mem(), right_ht_bucket(), token_added, agent_struct::token_pool, wme_struct::tokens, TRUE, uint32_t(), token_struct::w, and right_mem_struct::w.
Referenced by init_left_and_right_addition_routines().
Definition at line 5520 of file rete.cpp.
References token_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, FALSE, token_struct::first_child, token_struct::token_a_union::ht, wme_struct::id, insert_at_head_of_dll, left_ht_bucket(), token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, match_left_and_right(), 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, NIL, 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(), right_node_activation(), agent_struct::token_pool, wme_struct::tokens, TRUE, uint32_t(), and token_struct::w.
Referenced by init_left_and_right_addition_routines().
|
inline |
Definition at line 621 of file rete.cpp.
References insert_at_head_of_dll, and NIL.
Referenced by beta_memory_node_left_addition(), cn_node_left_addition(), cn_partner_node_left_addition(), mp_node_left_addition(), negative_node_left_addition(), p_node_left_addition(), unhashed_beta_memory_node_left_addition(), unhashed_mp_node_left_addition(), and unhashed_negative_node_left_addition().
|
inline |
Definition at line 551 of file rete.cpp.
References rete_node_struct::a, pos_node_data_struct::next_from_beta_mem, and rete_node_struct::rete_node_a_union::pos.
Referenced by deallocate_rete_node(), merge_into_mp_node(), positive_node_right_addition(), retesave_rete_node_and_children(), and unhashed_positive_node_right_addition().
|
inline |
Definition at line 467 of file rete.cpp.
References rete_node_struct::b, posneg_node_data_struct::next_from_alpha_mem, and rete_node_struct::rete_node_b_union::posneg.
Referenced by deallocate_rete_node(), make_new_positive_node(), mp_node_left_addition(), negative_node_left_addition(), positive_node_left_addition(), relink_to_right_mem(), unhashed_mp_node_left_addition(), unhashed_negative_node_left_addition(), unhashed_positive_node_left_addition(), and update_node_with_matches_from_above().
Definition at line 2659 of file rete.cpp.
Referenced by add_var_to_varnames(), and reteload_varnames().
shouldn't this be either
symbol_to_rhs_value (act->id) == or act->id == rhs_value_to_symbol(temp..)
Definition at line 5718 of file rete.cpp.
References rete_node_struct::a, wme_struct::acceptable, ACCEPTABLE_PREFERENCE_TYPE, production_struct::action_list, activation_entry_sanity_check, activation_exit_sanity_check, add_to_growable_string(), production_struct::already_fired, wme_struct::attr, action_struct::attr, rete_node_struct::b, bnode_is_positive(), instantiation_struct::bottom_of_instantiated_conditions, condition_struct::bt, agent_struct::current_phase, DECLARED_I_SUPPORT, DECLARED_O_SUPPORT, production_struct::declared_support, DUMMY_TOP_BNODE, FALSE, find_goal_for_match_set_change_assertion(), free_growable_string(), get_symbol_from_rete_loc(), ms_change_struct::goal, I_LIST, wme_struct::id, action_struct::id, symbol_union::id, IE_PRODS, insert_at_head_of_dll, ms_change_struct::inst, production_struct::interrupt, identifier_struct::isa_goal, JUSTIFICATION_PRODUCTION_TYPE, left_node_activation(), ms_change_struct::level, identifier_struct::level, MAKE_ACTION, make_blank_growable_string(), agent_struct::ms_change_pool, identifier_struct::ms_i_assertions, agent_struct::ms_i_assertions, identifier_struct::ms_o_assertions, agent_struct::ms_o_assertions, agent_struct::ms_retractions, identifier_struct::ms_retractions, production_struct::name, new_left_token(), action_struct::next, ms_change_struct::next_of_node, token_struct::next_of_node, NIL, agent_struct::nil_goal_retractions, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, O_LIST, agent_struct::o_support_calculation_type, production_struct::OPERAND_which_assert_list, agent_struct::operator_symbol, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, token_struct::parent, rete_node_struct::parent, PE_PRODS, action_struct::preference_type, condition_struct::prev, print(), PRINT_WARNINGS_SYSPARAM, print_with_symbols(), p_node_data_struct::prod, real_parent_node(), agent_struct::reason_for_stopping, remove_from_dll, instantiation_struct::rete_token, instantiation_struct::rete_wme, rhs_value_is_reteloc(), rhs_value_is_symbol(), rhs_value_to_reteloc_field_num(), rhs_value_to_reteloc_levels_up(), rhs_value_to_string(), rhs_value_to_symbol(), agent_struct::soar_verbose_flag, agent_struct::stop_soar, symbol_to_string(), agent_struct::sysparams, p_node_data_struct::tentative_assertions, p_node_data_struct::tentative_retractions, text_of_growable_string(), ms_change_struct::tok, token_added, agent_struct::token_pool, non_pos_node_data_struct::tokens, TRUE, production_struct::type, action_struct::type, UNDECLARED_SUPPORT, wme_struct::value, ms_change_struct::w, token_struct::w, bt_info_struct::wme_, xml_generate_verbose(), and xml_generate_warning().
Referenced by init_left_and_right_addition_routines().
Definition at line 6133 of file rete.cpp.
References abort_with_fatal_error(), activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, BUFFER_MSG_SIZE, find_goal_for_match_set_change_retraction(), ms_change_struct::goal, I_LIST, symbol_union::id, insert_at_head_of_dll, ms_change_struct::inst, production_struct::instantiations, production_struct::interrupt, JUSTIFICATION_PRODUCTION_TYPE, ms_change_struct::level, identifier_struct::level, identifier_struct::link_count, agent_struct::ms_change_pool, identifier_struct::ms_i_assertions, agent_struct::ms_i_assertions, identifier_struct::ms_o_assertions, agent_struct::ms_o_assertions, agent_struct::ms_retractions, 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, NIL, agent_struct::nil_goal_retractions, O_LIST, 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, remove_from_dll, instantiation_struct::rete_token, instantiation_struct::rete_wme, agent_struct::soar_verbose_flag, agent_struct::stop_soar, symbol_to_string(), p_node_data_struct::tentative_assertions, p_node_data_struct::tentative_retractions, ms_change_struct::tok, TRUE, production_struct::type, ms_change_struct::w, xml_generate_verbose(), and xml_generate_warning().
Referenced by remove_token_and_subtree().
void p_node_to_conditions_and_nots | ( | agent * | thisAgent, |
rete_node * | p_node, | ||
token * | tok, | ||
wme * | w, | ||
condition ** | dest_top_cond, | ||
condition ** | dest_bottom_cond, | ||
not_struct ** | dest_nots, | ||
action ** | dest_rhs | ||
) |
Definition at line 4525 of file rete.cpp.
References production_struct::action_list, rete_node_struct::b, copy_action_list_and_substitute_varnames(), agent_struct::dummy_top_node, cons_struct::first, agent_struct::highest_rhs_unboundvar_index, NIL, rete_node_struct::rete_node_b_union::p, rete_node_struct::parent, p_node_data_struct::parents_nvn, p_node_data_struct::prod, reset_variable_generator(), cons_struct::rest, rete_node_to_conditions(), production_struct::rhs_unbound_variables, and agent_struct::rhs_variable_bindings.
Referenced by create_instantiation(), print_partial_match_information(), print_production(), rl_build_template_instantiation(), and xml_partial_match_information().
Definition at line 2593 of file rete.cpp.
References cons_struct::first, free_cons(), pop_var_binding(), 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().
|
inline |
Definition at line 2518 of file rete.cpp.
References free_cons(), cons_struct::rest, variable_struct::rete_binding_locations, and symbol_union::var.
Referenced by pop_bindings_and_deallocate_list_of_variables().
void positive_node_left_addition | ( | agent * | thisAgent, |
rete_node * | node, | ||
token * | New, | ||
Symbol * | hash_referent | ||
) |
Definition at line 5024 of file rete.cpp.
References activation_entry_sanity_check, activation_exit_sanity_check, posneg_node_data_struct::alpha_mem_, right_mem_struct::am, alpha_mem_struct::am_id, rete_node_struct::b, FALSE, rete_node_struct::first_child, wme_struct::id, left_addition_routines(), left_node_activation(), match_left_and_right(), rete_test_struct::next, right_mem_struct::next_in_bucket, rete_node_struct::next_sibling, NIL, node_is_right_unlinked(), rete_node_struct::node_type, posneg_node_data_struct::other_tests, rete_node_struct::rete_node_b_union::posneg, relink_to_right_mem(), right_ht_bucket(), alpha_mem_struct::right_mems, TRUE, uint32_t(), unlink_from_left_mem, and right_mem_struct::w.
Referenced by beta_memory_node_left_addition().
Definition at line 5227 of file rete.cpp.
References token_struct::a, rete_node_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, FALSE, rete_node_struct::first_child, token_struct::token_a_union::ht, wme_struct::id, left_addition_routines(), left_ht_bucket(), match_left_and_right(), rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::node_id, node_is_left_unlinked(), 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, relink_to_left_mem, right_node_activation(), non_pos_node_data_struct::tokens, TRUE, uint32_t(), and unlink_from_right_mem.
Referenced by init_left_and_right_addition_routines().
Bool postpone_assertion | ( | agent * | thisAgent, |
production ** | prod, | ||
struct token_struct ** | tok, | ||
wme ** | w | ||
) |
Definition at line 1147 of file rete.cpp.
References agent_struct::active_goal, rete_node_struct::b, FALSE, agent_struct::FIRING_TYPE, symbol_union::id, insert_at_head_of_dll, identifier_struct::ms_i_assertions, agent_struct::ms_i_assertions, identifier_struct::ms_o_assertions, agent_struct::ms_o_assertions, NIL, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, PE_PRODS, agent_struct::postponed_assertions, p_node_data_struct::prod, remove_from_dll, p_node_data_struct::tentative_assertions, ms_change_struct::tok, TRUE, and ms_change_struct::w.
Referenced by do_preference_phase().
int64_t ppmi_aux | ( | agent * | thisAgent, |
rete_node * | node, | ||
rete_node * | cutoff, | ||
condition * | cond, | ||
wme_trace_type | wtt, | ||
int | indent | ||
) |
Definition at line 7928 of file rete.cpp.
References posneg_node_data_struct::alpha_mem_, rete_node_struct::b, ncc_info_struct::bottom, rete_node_struct::rete_node_b_union::cn, CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, deallocate_token_list(), FULL_WME_TRACE, get_all_left_tokens_emerging_from_node(), MATCH_COUNT_STRING_BUFFER_SIZE, condition_struct::condition_main_data_union::ncc, right_mem_struct::next_in_am, token_struct::next_of_node, NIL, NONE_WME_TRACE, node_varnames_struct::parent, 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(), real_parent_node(), alpha_mem_struct::right_mems, wme_struct::timetag, TIMETAG_WME_TRACE, condition_struct::type, and right_mem_struct::w.
Referenced by print_partial_match_information().
Definition at line 1078 of file rete.cpp.
References rete_node_struct::b, 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.
void print_match_set | ( | agent * | thisAgent, |
wme_trace_type | wtt, | ||
ms_trace_type | mst | ||
) |
Definition at line 8073 of file rete.cpp.
References allocate_memory(), rete_node_struct::b, free_memory(), ms_change_struct::goal, match_set_trace::goal, in_ms_trace_same_goal(), ms_change_struct::inst, MISCELLANEOUS_MEM_USAGE, MS_ASSERT, MS_ASSERT_RETRACT, agent_struct::ms_i_assertions, agent_struct::ms_o_assertions, MS_RETRACT, agent_struct::ms_retractions, production_struct::name, ms_change_struct::next, match_set_trace::next, NIL, NONE_WME_TRACE, 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(), instantiation_struct::prod, p_node_data_struct::prod, match_set_trace::sym, ms_change_struct::tok, ms_change_struct::w, and token_struct::w.
void print_partial_match_information | ( | agent * | thisAgent, |
rete_node * | p_node, | ||
wme_trace_type | wtt | ||
) |
Definition at line 8017 of file rete.cpp.
References deallocate_condition_list(), deallocate_token_list(), agent_struct::dummy_top_node, get_all_left_tokens_emerging_from_node(), token_struct::next_of_node, NIL, NONE_WME_TRACE, p_node_to_conditions_and_nots(), rete_node_struct::parent, ppmi_aux(), print(), and print_whole_token().
Definition at line 1086 of file rete.cpp.
References rete_node_struct::b, 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.
void print_whole_token | ( | agent * | thisAgent, |
token * | t, | ||
wme_trace_type | wtt | ||
) |
Definition at line 7896 of file rete.cpp.
References agent_struct::dummy_top_token, FULL_WME_TRACE, NONE_WME_TRACE, token_struct::parent, print(), print_wme(), wme_struct::timetag, TIMETAG_WME_TRACE, and token_struct::w.
Referenced by ppmi_aux(), print_match_set(), and print_partial_match_information().
|
inline |
Definition at line 2506 of file rete.cpp.
References push(), variable_struct::rete_binding_locations, symbol_union::var, and varloc_to_dummy().
Referenced by bind_variables_in_test().
Definition at line 451 of file rete.cpp.
References bnode_is_bottom_of_split_mp().
Referenced by cn_partner_node_left_addition(), deallocate_node_varnames(), nearest_ancestor_with_same_am(), p_node_left_addition(), ppmi_aux(), rete_node_to_conditions(), reteload_node_and_children(), reteload_node_varnames(), retesave_node_varnames(), retesave_rete_node_and_children(), and xml_aux().
|
inline |
Definition at line 502 of file rete.cpp.
References posneg_node_data_struct::alpha_mem_, rete_node_struct::b, alpha_mem_struct::beta_nodes, alpha_mem_struct::last_beta_node, posneg_node_data_struct::nearest_ancestor_with_same_am, posneg_node_data_struct::next_from_alpha_mem, NIL, node_is_right_unlinked(), rete_node_struct::rete_node_b_union::posneg, and posneg_node_data_struct::prev_from_alpha_mem.
Referenced by make_new_negative_node(), make_new_positive_node(), mp_node_left_addition(), negative_node_left_addition(), positive_node_left_addition(), unhashed_mp_node_left_addition(), unhashed_negative_node_left_addition(), and unhashed_positive_node_left_addition().
void remove_node_from_parents_list_of_children | ( | rete_node * | node | ) |
Definition at line 1910 of file rete.cpp.
References rete_node_struct::first_child, rete_node_struct::next_sibling, and rete_node_struct::parent.
Referenced by deallocate_rete_node(), excise_production_from_rete(), make_new_cn_node(), merge_into_mp_node(), and split_mp_node().
Definition at line 1823 of file rete.cpp.
References alpha_mem_struct::acceptable, agent_struct::alpha_mem_pool, alpha_mem_struct::attr, alpha_mem_struct::id, alpha_mem_struct::reference_count, remove_from_hash_table(), remove_wme_from_alpha_mem(), alpha_mem_struct::right_mems, symbol_remove_ref(), table_for_tests(), 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().
Definition at line 6323 of file rete.cpp.
References token_struct::a, rete_node_struct::a, abort_with_fatal_error(), rete_node_struct::b, BUFFER_MSG_SIZE, CN_BNODE, CN_PARTNER_BNODE, FALSE, fast_remove_from_dll, token_struct::first_child, rete_node_struct::first_child, beta_memory_node_data_struct::first_linked_child, token_struct::token_a_union::ht, left_addition_routines(), left_node_activation(), 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, MEMORY_BNODE, MP_BNODE, mp_bnode_is_left_unlinked(), token_struct::token_a_union::neg, NEGATIVE_BNODE, 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, token_struct::next_sibling, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::node_id, rete_node_struct::node_type, rete_node_struct::rete_node_a_union::np, P_BNODE, 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, remove_token_from_left_ht(), agent_struct::token_pool, wme_struct::tokens, non_pos_node_data_struct::tokens, TRUE, UNHASHED_MEMORY_BNODE, UNHASHED_MP_BNODE, UNHASHED_NEGATIVE_BNODE, unlink_from_right_mem, 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().
Definition at line 693 of file rete.cpp.
References fast_remove_from_dll, and left_ht_bucket().
Referenced by remove_token_and_subtree().
Definition at line 1431 of file rete.cpp.
References right_mem_struct::am, alpha_mem_struct::am_id, wme_struct::id, remove_from_dll, agent_struct::right_ht, RIGHT_HT_MASK, agent_struct::right_mem_pool, wme_struct::right_mems, alpha_mem_struct::right_mems, uint32_t(), and right_mem_struct::w.
Referenced by remove_ref_to_alpha_mem(), and remove_wme_from_rete().
Definition at line 1740 of file rete.cpp.
References _epmem_process_ids(), _epmem_remove_wme(), token_struct::a, agent_struct::all_wmes_in_rete, right_mem_struct::am, rete_node_struct::b, alpha_mem_struct::beta_nodes, soar_module::connected, agent_struct::epmem_db, FALSE, rete_node_struct::first_child, soar_module::status_object< T >::get_status(), soar_module::constant_param< T >::get_value(), wme_struct::id, symbol_union::id, left_addition_routines(), token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, make_mp_bnode_left_unlinked(), smem_param_container::mirroring, MP_BNODE, token_struct::token_a_union::neg, token_struct::negrm_tokens, posneg_node_data_struct::next_from_alpha_mem, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::node_type, agent_struct::num_wmes_in_rete, soar_module::on, token_struct::parent, POSITIVE_BNODE, rete_node_struct::rete_node_b_union::posneg, remove_from_dll, remove_token_and_subtree(), remove_wme_from_alpha_mem(), wme_struct::right_mems, alpha_mem_struct::right_mems, right_node_activation(), agent_struct::smem_changed_ids, smem_enabled(), agent_struct::smem_ignore_changes, identifier_struct::smem_lti, agent_struct::smem_params, symbol_add_ref(), agent_struct::token_pool, wme_struct::tokens, UNHASHED_MP_BNODE, UNHASHED_POSITIVE_BNODE, and unlink_from_left_mem.
Referenced by do_buffered_wm_changes().
void restore_postponed_assertions | ( | agent * | thisAgent | ) |
Definition at line 1227 of file rete.cpp.
References agent_struct::active_goal, rete_node_struct::b, agent_struct::FIRING_TYPE, symbol_union::id, insert_at_head_of_dll, identifier_struct::ms_i_assertions, agent_struct::ms_i_assertions, identifier_struct::ms_o_assertions, agent_struct::ms_o_assertions, NIL, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, PE_PRODS, agent_struct::postponed_assertions, remove_from_dll, and p_node_data_struct::tentative_assertions.
Referenced by do_preference_phase().
Definition at line 4941 of file rete.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, and rete_node_struct::node_type.
Definition at line 4949 of file rete.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, and rete_node_struct::node_type.
void rete_node_to_conditions | ( | agent * | thisAgent, |
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, | ||
not_struct *& | nots_found_in_production | ||
) |
Definition at line 4288 of file rete.cpp.
References wme_struct::acceptable, alpha_mem_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_, wme_struct::attr, alpha_mem_struct::attr, three_field_tests_struct::attr_test, three_field_varnames_struct::attr_varnames, rete_node_struct::b, bnode_is_positive(), ncc_info_struct::bottom, node_varnames_struct::varname_data_union::bottom_of_subconditions, condition_struct::bt, rete_node_struct::rete_node_b_union::cn, CN_BNODE, collect_nots(), agent_struct::condition_pool, CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, node_varnames_struct::data, node_varnames_struct::varname_data_union::fields, first_letter_from_test(), wme_struct::id, alpha_mem_struct::id, three_field_tests_struct::id_test, three_field_varnames_struct::id_varnames, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, make_blank_or_equality_test(), make_equality_test(), MP_BNODE, condition_struct::condition_main_data_union::ncc, NEGATIVE_BNODE, NEGATIVE_CONDITION, condition_struct::next, NIL, rete_node_struct::node_type, posneg_node_data_struct::other_tests, token_struct::parent, rete_node_struct::parent, node_varnames_struct::parent, cn_node_data_struct::partner, POSITIVE_BNODE, POSITIVE_CONDITION, rete_node_struct::rete_node_b_union::posneg, condition_struct::prev, real_parent_node(), condition_struct::test_for_acceptable_preference, test_includes_equality_test_for_symbol(), condition_struct::condition_main_data_union::tests, ncc_info_struct::top, condition_struct::type, wme_struct::value, alpha_mem_struct::value, three_field_tests_struct::value_test, three_field_varnames_struct::value_varnames, token_struct::w, and bt_info_struct::wme_.
Referenced by p_node_to_conditions_and_nots().
Definition at line 3183 of file rete.cpp.
References FALSE, rete_test_struct::next, single_rete_tests_are_identical(), and TRUE.
Referenced by make_node_for_negative_cond(), and make_node_for_positive_cond().
Definition at line 7116 of file rete.cpp.
References action_struct::next, NIL, reteload_eight_bytes(), and reteload_rhs_action().
Referenced by reteload_node_and_children().
void reteload_all_symbols | ( | agent * | thisAgent, |
FILE * | f | ||
) |
Definition at line 6690 of file rete.cpp.
References allocate_memory(), make_float_constant(), make_int_constant(), make_sym_constant(), make_variable(), MISCELLANEOUS_MEM_USAGE, reteload_eight_bytes(), agent_struct::reteload_num_syms, reteload_string(), reteload_string_buf, and agent_struct::reteload_symbol_table.
Referenced by load_rete_net().
void reteload_alpha_memories | ( | agent * | thisAgent, |
FILE * | f | ||
) |
Definition at line 6804 of file rete.cpp.
References allocate_memory(), FALSE, find_or_make_alpha_mem(), MISCELLANEOUS_MEM_USAGE, agent_struct::reteload_am_table, reteload_eight_bytes(), agent_struct::reteload_num_ams, reteload_one_byte(), reteload_symbol_from_index(), and TRUE.
Referenced by load_rete_net().
Definition at line 6821 of file rete.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, agent_struct::reteload_am_table, reteload_eight_bytes(), and agent_struct::reteload_num_ams.
Referenced by reteload_node_and_children().
uint64_t reteload_eight_bytes | ( | FILE * | f | ) |
Definition at line 6582 of file rete.cpp.
References rete_net_64, reteload_four_bytes(), and 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().
uint32_t reteload_four_bytes | ( | FILE * | f | ) |
Definition at line 6558 of file rete.cpp.
References reteload_one_byte(), and uint32_t().
Referenced by reteload_eight_bytes().
void reteload_free_am_table | ( | agent * | thisAgent | ) |
Definition at line 6835 of file rete.cpp.
References free_memory(), MISCELLANEOUS_MEM_USAGE, remove_ref_to_alpha_mem(), agent_struct::reteload_am_table, and agent_struct::reteload_num_ams.
Referenced by load_rete_net().
void reteload_free_symbol_table | ( | agent * | thisAgent | ) |
Definition at line 6745 of file rete.cpp.
References free_memory(), MISCELLANEOUS_MEM_USAGE, agent_struct::reteload_num_syms, agent_struct::reteload_symbol_table, and symbol_remove_ref().
Referenced by load_rete_net().
Definition at line 7377 of file rete.cpp.
References abort_with_fatal_error(), production_struct::action_list, adjust_sharing_factors_from_here_to_top, agent_struct::all_productions_of_type, rete_node_struct::b, BUFFER_MSG_SIZE, CN_PARTNER_BNODE, production_struct::declared_support, destructively_reverse_list(), production_struct::documentation, FALSE, var_location_struct::field_num, production_struct::filename, production_struct::firing_count, get_number_from_symbol(), insert_at_head_of_dll, production_struct::instantiations, production_struct::interrupt, JUSTIFICATION_PRODUCTION_TYPE, var_location_struct::levels_up, 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(), MEMORY_BNODE, MP_BNODE, production_struct::name, NEGATIVE_BNODE, NIL, agent_struct::num_productions_of_type, rete_node_struct::rete_node_b_union::p, P_BNODE, production_struct::p_node, node_varnames_struct::parent, p_node_data_struct::parents_nvn, POSITIVE_BNODE, sym_constant_struct::production, PRODUCTION_JUST_ADDED_CALLBACK, agent_struct::production_pool, push(), real_parent_node(), production_struct::reference_count, alpha_mem_struct::reference_count, action_struct::referent, reteload_action_list(), reteload_am_from_index(), reteload_eight_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, rhs_value_to_symbol(), production_struct::rl_delta_bar_delta_beta, production_struct::rl_delta_bar_delta_h, production_struct::rl_ecr, production_struct::rl_efr, production_struct::rl_rule, rl_rule_meta(), production_struct::rl_template_conds, production_struct::rl_template_instantiations, production_struct::rl_update_count, rl_valid_rule(), symbol_union::sc, soar_invoke_callbacks(), symbol_add_ref(), TEMPLATE_PRODUCTION_TYPE, production_struct::trace_firings, production_struct::type, UNHASHED_MEMORY_BNODE, UNHASHED_MP_BNODE, UNHASHED_NEGATIVE_BNODE, UNHASHED_POSITIVE_BNODE, update_max_rhs_unbound_variables(), and update_node_with_matches_from_above().
Referenced by load_rete_net().
node_varnames* reteload_node_varnames | ( | agent * | thisAgent, |
rete_node * | node, | ||
FILE * | f | ||
) |
Definition at line 6918 of file rete.cpp.
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, CN_BNODE, node_varnames_struct::data, DUMMY_TOP_BNODE, node_varnames_struct::varname_data_union::fields, three_field_varnames_struct::id_varnames, NIL, rete_node_struct::node_type, agent_struct::node_varnames_pool, rete_node_struct::parent, node_varnames_struct::parent, cn_node_data_struct::partner, real_parent_node(), reteload_varnames(), and three_field_varnames_struct::value_varnames.
Referenced by reteload_node_and_children().
uint8_t reteload_one_byte | ( | FILE * | f | ) |
Definition at line 6535 of file rete.cpp.
Referenced by load_rete_net(), reteload_alpha_memories(), reteload_eight_bytes(), reteload_four_bytes(), reteload_node_and_children(), reteload_rete_test(), reteload_rhs_action(), reteload_rhs_value(), reteload_string(), reteload_two_bytes(), and reteload_varnames().
Definition at line 7166 of file rete.cpp.
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, DISJUNCTION_RETE_TEST, var_location_struct::field_num, var_location_struct::levels_up, NIL, push(), agent_struct::rete_test_pool, reteload_one_byte(), reteload_symbol_from_index(), reteload_two_bytes(), rete_test_struct::right_field_num, symbol_add_ref(), test_is_constant_relational_test(), test_is_variable_relational_test(), rete_test_struct::type, and rete_test_struct::rete_test_data_union::variable_referent.
Referenced by reteload_rete_test_list().
Definition at line 7205 of file rete.cpp.
References rete_test_struct::next, NIL, reteload_rete_test(), and reteload_two_bytes().
Referenced by reteload_node_and_children().
Definition at line 7085 of file rete.cpp.
References agent_struct::action_pool, action_struct::attr, FUNCALL_ACTION, action_struct::id, NIL, preference_is_binary(), 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().
Definition at line 6983 of file rete.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, destructively_reverse_list(), funcall_list_to_rhs_value(), lookup_rhs_function(), NIL, print_with_symbols(), push(), reteload_eight_bytes(), reteload_one_byte(), reteload_symbol_from_index(), reteload_two_bytes(), reteloc_to_rhs_value(), symbol_add_ref(), symbol_to_rhs_value(), symbol_to_string(), TRUE, unboundvar_to_rhs_value(), and update_max_rhs_unbound_variables().
Referenced by reteload_rhs_action().
void reteload_string | ( | FILE * | f | ) |
Definition at line 6624 of file rete.cpp.
References reteload_one_byte(), and reteload_string_buf.
Referenced by load_rete_net(), reteload_all_symbols(), and reteload_node_and_children().
Definition at line 6730 of file rete.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, NIL, reteload_eight_bytes(), agent_struct::reteload_num_syms, and agent_struct::reteload_symbol_table.
Referenced by reteload_alpha_memories(), reteload_node_and_children(), reteload_rete_test(), reteload_rhs_value(), and reteload_varnames().
uint16_t reteload_two_bytes | ( | FILE * | f | ) |
Definition at line 6544 of file rete.cpp.
References reteload_one_byte().
Referenced by reteload_node_and_children(), reteload_rete_test(), reteload_rete_test_list(), and reteload_rhs_value().
Definition at line 6878 of file rete.cpp.
References destructively_reverse_list(), NIL, one_var_to_varnames(), push(), reteload_eight_bytes(), reteload_one_byte(), reteload_symbol_from_index(), symbol_add_ref(), and var_list_to_varnames().
Referenced by reteload_node_varnames().
void retesave_action_list | ( | action * | first_a, |
FILE * | f | ||
) |
Definition at line 7107 of file rete.cpp.
References action_struct::next, NIL, retesave_eight_bytes(), and retesave_rhs_action().
Referenced by retesave_rete_node_and_children().
Definition at line 6778 of file rete.cpp.
References alpha_mem_struct::acceptable, alpha_mem_struct::attr, agent_struct::current_retesave_amindex, FALSE, alpha_mem_struct::id, alpha_mem_struct::retesave_amindex, retesave_eight_bytes(), retesave_one_byte(), and alpha_mem_struct::value.
Referenced by retesave_alpha_memories().
void retesave_alpha_memories | ( | agent * | thisAgent, |
FILE * | f | ||
) |
Definition at line 6792 of file rete.cpp.
References agent_struct::alpha_hash_tables, hash_table_struct::count, agent_struct::current_retesave_amindex, do_for_all_items_in_hash_table(), retesave_alpha_mem_and_assign_index(), and retesave_eight_bytes().
Referenced by save_rete_net().
Definition at line 7270 of file rete.cpp.
References CN_BNODE, rete_node_struct::first_child, rete_node_struct::next_sibling, rete_node_struct::node_type, retesave_eight_bytes(), and retesave_rete_node_and_children().
Referenced by retesave_rete_node_and_children(), and save_rete_net().
void retesave_eight_bytes | ( | uint64_t | w, |
FILE * | f | ||
) |
Definition at line 6567 of file rete.cpp.
References rete_net_64, retesave_four_bytes(), 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_four_bytes | ( | uint32_t | w, |
FILE * | f | ||
) |
Definition at line 6551 of file rete.cpp.
References retesave_one_byte().
Referenced by retesave_eight_bytes().
void retesave_node_varnames | ( | node_varnames * | nvn, |
rete_node * | node, | ||
FILE * | f | ||
) |
Definition at line 6902 of file rete.cpp.
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, CN_BNODE, node_varnames_struct::data, DUMMY_TOP_BNODE, node_varnames_struct::varname_data_union::fields, three_field_varnames_struct::id_varnames, rete_node_struct::node_type, rete_node_struct::parent, node_varnames_struct::parent, cn_node_data_struct::partner, real_parent_node(), retesave_varnames(), TRUE, and three_field_varnames_struct::value_varnames.
Referenced by retesave_rete_node_and_children().
void retesave_one_byte | ( | uint8_t | b, |
FILE * | |||
) |
Definition at line 6531 of file rete.cpp.
References rete_fs_file.
Referenced by retesave_alpha_mem_and_assign_index(), retesave_eight_bytes(), 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().
Definition at line 7284 of file rete.cpp.
References rete_node_struct::a, abort_with_fatal_error(), production_struct::action_list, posneg_node_data_struct::alpha_mem_, rete_node_struct::b, BUFFER_MSG_SIZE, rete_node_struct::rete_node_b_union::cn, CN_BNODE, CN_PARTNER_BNODE, production_struct::declared_support, production_struct::documentation, cons_struct::first, non_pos_node_data_struct::is_left_unlinked, rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, MEMORY_BNODE, MP_BNODE, production_struct::name, NEGATIVE_BNODE, NIL, node_is_left_unlinked(), 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, P_BNODE, rete_node_struct::parent, p_node_data_struct::parents_nvn, cn_node_data_struct::partner, POSITIVE_BNODE, rete_node_struct::rete_node_b_union::posneg, p_node_data_struct::prod, real_parent_node(), cons_struct::rest, retesave_action_list(), alpha_mem_struct::retesave_amindex, retesave_children_of_node(), retesave_eight_bytes(), retesave_node_varnames(), retesave_one_byte(), retesave_rete_test_list(), retesave_string(), retesave_two_bytes(), production_struct::rhs_unbound_variables, production_struct::type, UNHASHED_MEMORY_BNODE, UNHASHED_MP_BNODE, UNHASHED_NEGATIVE_BNODE, and UNHASHED_POSITIVE_BNODE.
Referenced by retesave_children_of_node().
void retesave_rete_test | ( | rete_test * | rt, |
FILE * | f | ||
) |
Definition at line 7148 of file rete.cpp.
References rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test_struct::rete_test_data_union::disjunction_list, DISJUNCTION_RETE_TEST, var_location_struct::field_num, cons_struct::first, var_location_struct::levels_up, NIL, cons_struct::rest, retesave_eight_bytes(), retesave_one_byte(), retesave_two_bytes(), rete_test_struct::right_field_num, test_is_constant_relational_test(), test_is_variable_relational_test(), 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, |
FILE * | f | ||
) |
Definition at line 7195 of file rete.cpp.
References rete_test_struct::next, NIL, retesave_rete_test(), and retesave_two_bytes().
Referenced by retesave_rete_node_and_children().
void retesave_rhs_action | ( | action * | a, |
FILE * | f | ||
) |
Definition at line 7070 of file rete.cpp.
References action_struct::attr, FUNCALL_ACTION, action_struct::id, preference_is_binary(), 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, |
FILE * | f | ||
) |
Definition at line 6954 of file rete.cpp.
References cons_struct::first, NIL, cons_struct::rest, retesave_eight_bytes(), retesave_one_byte(), retesave_two_bytes(), rhs_value_is_funcall(), rhs_value_is_reteloc(), rhs_value_is_symbol(), rhs_value_to_funcall_list(), rhs_value_to_reteloc_field_num(), rhs_value_to_reteloc_levels_up(), rhs_value_to_symbol(), and rhs_value_to_unboundvar().
Referenced by retesave_rhs_action().
void retesave_string | ( | const char * | s, |
FILE * | f | ||
) |
Definition at line 6616 of file rete.cpp.
References retesave_one_byte().
Referenced by retesave_rete_node_and_children(), retesave_symbol_and_assign_index(), and save_rete_net().
Definition at line 6661 of file rete.cpp.
References agent_struct::current_retesave_symindex, FALSE, NIL, retesave_string(), and symbol_to_string().
Referenced by retesave_symbol_table().
void retesave_symbol_table | ( | agent * | thisAgent, |
FILE * | f | ||
) |
Definition at line 6672 of file rete.cpp.
References hash_table_struct::count, agent_struct::current_retesave_symindex, do_for_all_items_in_hash_table(), agent_struct::float_constant_hash_table, agent_struct::int_constant_hash_table, retesave_eight_bytes(), retesave_symbol_and_assign_index(), agent_struct::sym_constant_hash_table, and agent_struct::variable_hash_table.
Referenced by save_rete_net().
void retesave_two_bytes | ( | uint16_t | w, |
FILE * | f | ||
) |
Definition at line 6539 of file rete.cpp.
References 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, |
FILE * | f | ||
) |
Definition at line 6858 of file rete.cpp.
References NIL, cons_struct::rest, retesave_eight_bytes(), retesave_one_byte(), varnames_is_one_var(), varnames_to_one_var(), and varnames_to_var_list().
Referenced by retesave_node_varnames().
Referenced by add_wme_to_aht(), init_left_and_right_addition_routines(), and update_node_with_matches_from_above().
Definition at line 672 of file rete.cpp.
References agent_struct::right_ht, and RIGHT_HT_MASK.
Referenced by mp_node_left_addition(), negative_node_left_addition(), and positive_node_left_addition().
Definition at line 919 of file rete.cpp.
References null_activation_stats_for_right_activation.
Referenced by mp_node_right_addition(), negative_node_right_addition(), positive_node_right_addition(), remove_wme_from_rete(), unhashed_mp_node_right_addition(), unhashed_negative_node_right_addition(), and unhashed_positive_node_right_addition().
Definition at line 3545 of file rete.cpp.
References action_struct::attr, FALSE, FLOAT_CONSTANT_SYMBOL_TYPE, FUNCALL_ACTION, action_struct::id, INT_CONSTANT_SYMBOL_TYPE, action_struct::next, preference_is_binary(), action_struct::preference_type, action_struct::referent, rhs_value_is_symbol(), rhs_value_to_symbol(), TRUE, action_struct::type, and action_struct::value.
Referenced by add_production_to_rete().
Definition at line 7548 of file rete.cpp.
References agent_struct::all_productions_of_type, agent_struct::dummy_top_node, FALSE, JUSTIFICATION_PRODUCTION_TYPE, print(), rete_fs_file, rete_net_64, retesave_alpha_memories(), retesave_children_of_node(), retesave_one_byte(), retesave_string(), retesave_symbol_table(), and TRUE.
Definition at line 3146 of file rete.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, rete_test_struct::rete_test_data_union::constant_referent, rete_test_struct::data, rete_test_struct::rete_test_data_union::disjunction_list, DISJUNCTION_RETE_TEST, FALSE, cons_struct::first, ID_IS_GOAL_RETE_TEST, ID_IS_IMPASSE_RETE_TEST, NIL, cons_struct::rest, rete_test_struct::right_field_num, test_is_constant_relational_test(), test_is_variable_relational_test(), TRUE, rete_test_struct::type, var_locations_equal(), and rete_test_struct::rete_test_data_union::variable_referent.
Referenced by rete_test_lists_are_identical().
Definition at line 2082 of file rete.cpp.
References rete_node_struct::a, rete_node_struct::b, rete_node_struct::first_child, beta_memory_node_data_struct::first_linked_child, init_new_rete_node_with_type(), rete_node_struct::left_hash_loc_field_num, rete_node_struct::left_hash_loc_levels_up, rete_node_struct::rete_node_b_union::mem, MEMORY_BNODE, MP_BNODE, mp_bnode_is_left_unlinked(), token_struct::next_of_node, rete_node_struct::next_sibling, NIL, 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, POSITIVE_BNODE, rete_node_struct::rete_node_b_union::posneg, relink_to_left_mem, remove_node_from_parents_list_of_children(), agent_struct::rete_node_pool, set_sharing_factor, non_pos_node_data_struct::tokens, UNHASHED_MEMORY_BNODE, UNHASHED_POSITIVE_BNODE, unlink_from_left_mem, and update_stats_for_destroying_node().
Referenced by make_node_for_positive_cond().
|
inline |
Definition at line 1395 of file rete.cpp.
References agent_struct::alpha_hash_tables.
Referenced by find_alpha_mem(), find_or_make_alpha_mem(), and remove_ref_to_alpha_mem().
Definition at line 225 of file rete.cpp.
References CONSTANT_RELATIONAL_RETE_TEST.
Referenced by add_rete_test_list_to_tests(), deallocate_rete_test_list(), reteload_rete_test(), retesave_rete_test(), and single_rete_tests_are_identical().
Definition at line 252 of file rete.cpp.
References CONSTANT_RELATIONAL_RETE_TEST, RELATIONAL_NOT_EQUAL_RETE_TEST, and VARIABLE_RELATIONAL_RETE_TEST.
Referenced by collect_nots().
Definition at line 230 of file rete.cpp.
References VARIABLE_RELATIONAL_RETE_TEST.
Referenced by add_rete_test_list_to_tests(), reteload_rete_test(), retesave_rete_test(), and single_rete_tests_are_identical().
void unhashed_beta_memory_node_left_addition | ( | agent * | thisAgent, |
rete_node * | node, | ||
token * | tok, | ||
wme * | w | ||
) |
Definition at line 4997 of file rete.cpp.
References token_struct::a, rete_node_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, beta_memory_node_data_struct::first_linked_child, token_struct::token_a_union::ht, insert_token_into_left_ht(), left_node_activation(), rete_node_struct::rete_node_b_union::mem, new_left_token(), pos_node_data_struct::next_from_beta_mem, NIL, rete_node_struct::node_id, rete_node_struct::rete_node_a_union::pos, token_struct::token_a_union::token_in_hash_table_data_struct::referent, token_added, agent_struct::token_pool, TRUE, uint32_t(), and unhashed_positive_node_left_addition().
Referenced by init_left_and_right_addition_routines().
Definition at line 5177 of file rete.cpp.
References token_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, posneg_node_data_struct::alpha_mem_, rete_node_struct::b, FALSE, rete_node_struct::first_child, token_struct::token_a_union::ht, insert_token_into_left_ht(), left_addition_routines(), left_node_activation(), make_mp_bnode_left_unlinked(), match_left_and_right(), mp_bnode_is_left_unlinked(), new_left_token(), rete_test_struct::next, right_mem_struct::next_in_am, rete_node_struct::next_sibling, NIL, rete_node_struct::node_id, node_is_right_unlinked(), rete_node_struct::node_type, 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, relink_to_right_mem(), alpha_mem_struct::right_mems, token_added, agent_struct::token_pool, TRUE, uint32_t(), and right_mem_struct::w.
Referenced by init_left_and_right_addition_routines().
Definition at line 5347 of file rete.cpp.
References token_struct::a, rete_node_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, FALSE, rete_node_struct::first_child, token_struct::token_a_union::ht, left_addition_routines(), left_ht_bucket(), make_mp_bnode_left_linked(), match_left_and_right(), mp_bnode_is_left_unlinked(), rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, NIL, 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, right_node_activation(), non_pos_node_data_struct::tokens, TRUE, uint32_t(), and unlink_from_right_mem.
Referenced by init_left_and_right_addition_routines().
void unhashed_negative_node_left_addition | ( | agent * | thisAgent, |
rete_node * | node, | ||
token * | tok, | ||
wme * | w | ||
) |
Definition at line 5465 of file rete.cpp.
References token_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, posneg_node_data_struct::alpha_mem_, rete_node_struct::b, FALSE, token_struct::first_child, rete_node_struct::first_child, token_struct::token_a_union::ht, insert_at_head_of_dll, insert_token_into_left_ht(), left_addition_routines(), left_node_activation(), token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, match_left_and_right(), token_struct::token_a_union::neg, token_struct::negrm_tokens, new_left_token(), rete_test_struct::next, right_mem_struct::next_in_am, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::node_id, node_is_right_unlinked(), rete_node_struct::node_type, 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, relink_to_right_mem(), alpha_mem_struct::right_mems, token_added, agent_struct::token_pool, wme_struct::tokens, TRUE, uint32_t(), token_struct::w, and right_mem_struct::w.
Referenced by init_left_and_right_addition_routines().
Definition at line 5561 of file rete.cpp.
References token_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, FALSE, token_struct::first_child, token_struct::token_a_union::ht, insert_at_head_of_dll, left_ht_bucket(), token_struct::token_a_union::token_from_right_memory_of_negative_or_cn_node_struct::left_token, match_left_and_right(), 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, NIL, 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(), right_node_activation(), agent_struct::token_pool, wme_struct::tokens, TRUE, uint32_t(), and token_struct::w.
Referenced by init_left_and_right_addition_routines().
Definition at line 5068 of file rete.cpp.
References activation_entry_sanity_check, activation_exit_sanity_check, posneg_node_data_struct::alpha_mem_, rete_node_struct::b, FALSE, rete_node_struct::first_child, left_addition_routines(), left_node_activation(), match_left_and_right(), rete_test_struct::next, right_mem_struct::next_in_am, rete_node_struct::next_sibling, NIL, node_is_right_unlinked(), rete_node_struct::node_type, posneg_node_data_struct::other_tests, rete_node_struct::rete_node_b_union::posneg, relink_to_right_mem(), alpha_mem_struct::right_mems, TRUE, unlink_from_left_mem, and right_mem_struct::w.
Referenced by unhashed_beta_memory_node_left_addition().
Definition at line 5268 of file rete.cpp.
References token_struct::a, rete_node_struct::a, activation_entry_sanity_check, activation_exit_sanity_check, rete_node_struct::b, FALSE, rete_node_struct::first_child, token_struct::token_a_union::ht, left_addition_routines(), left_ht_bucket(), match_left_and_right(), rete_test_struct::next, token_struct::token_a_union::token_in_hash_table_data_struct::next_in_bucket, rete_node_struct::next_sibling, NIL, token_struct::node, rete_node_struct::node_id, node_is_left_unlinked(), 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, relink_to_left_mem, right_node_activation(), non_pos_node_data_struct::tokens, TRUE, uint32_t(), and unlink_from_right_mem.
Referenced by init_left_and_right_addition_routines().
void update_max_rhs_unbound_variables | ( | agent * | thisAgent, |
uint64_t | num_for_new_production | ||
) |
Definition at line 3674 of file rete.cpp.
References allocate_memory_and_zerofill(), free_memory(), agent_struct::max_rhs_unbound_variables, MISCELLANEOUS_MEM_USAGE, and agent_struct::rhs_variable_bindings.
Referenced by add_production_to_rete(), reteload_node_and_children(), and reteload_rhs_value().
Definition at line 1931 of file rete.cpp.
References rete_node_struct::a, abort_with_fatal_error(), posneg_node_data_struct::alpha_mem_, rete_node_struct::b, bnode_is_bottom_of_split_mp(), bnode_is_positive(), BUFFER_MSG_SIZE, DUMMY_TOP_BNODE, agent_struct::dummy_top_token, 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, NIL, node_is_right_unlinked(), 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, right_addition_routines(), alpha_mem_struct::right_mems, 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().
Definition at line 951 of file rete.cpp.
References agent_struct::rete_node_counts, and set_sharing_factor.
Referenced by deallocate_rete_node(), excise_production_from_rete(), merge_into_mp_node(), and split_mp_node().
Symbol* var_bound_in_reconstructed_conds | ( | agent * | thisAgent, |
condition * | cond, | ||
byte | where_field_num, | ||
rete_node_level | where_levels_up | ||
) |
Definition at line 4027 of file rete.cpp.
References abort_with_fatal_error(), three_field_tests_struct::attr_test, BUFFER_MSG_SIZE, complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, condition_struct::data, cons_struct::first, three_field_tests_struct::id_test, NIL, condition_struct::prev, referent_of_equality_test(), cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_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().
|
inline |
Definition at line 2479 of file rete.cpp.
References NIL, variable_struct::rete_binding_locations, and symbol_union::var.
Referenced by add_unbound_varnames_in_test(), and bind_variables_in_test().
Definition at line 2660 of file rete.cpp.
Referenced by add_var_to_varnames(), and reteload_varnames().
|
inline |
Definition at line 269 of file rete.cpp.
Referenced by single_rete_tests_are_identical().
Definition at line 4793 of file rete.cpp.
References rete_test_struct::data, field_from_wme(), var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test_struct::right_field_num, rete_test_struct::rete_test_data_union::variable_referent, and token_struct::w.
Referenced by init_rete().
Bool variable_greater_or_equal_rete_test_routine | ( | agent * | , |
rete_test * | rt, | ||
token * | left, | ||
wme * | w | ||
) |
Definition at line 4890 of file rete.cpp.
References compare_symbols(), rete_test_struct::data, field_from_wme(), var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test_struct::right_field_num, rete_test_struct::rete_test_data_union::variable_referent, and token_struct::w.
Referenced by init_rete().
Definition at line 4851 of file rete.cpp.
References compare_symbols(), rete_test_struct::data, field_from_wme(), var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test_struct::right_field_num, rete_test_struct::rete_test_data_union::variable_referent, and token_struct::w.
Referenced by init_rete().
Definition at line 4870 of file rete.cpp.
References compare_symbols(), rete_test_struct::data, field_from_wme(), var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test_struct::right_field_num, rete_test_struct::rete_test_data_union::variable_referent, and token_struct::w.
Referenced by init_rete().
Definition at line 4832 of file rete.cpp.
References compare_symbols(), rete_test_struct::data, field_from_wme(), var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test_struct::right_field_num, rete_test_struct::rete_test_data_union::variable_referent, and token_struct::w.
Referenced by init_rete().
Definition at line 4812 of file rete.cpp.
References rete_test_struct::data, field_from_wme(), var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test_struct::right_field_num, rete_test_struct::rete_test_data_union::variable_referent, and token_struct::w.
Referenced by init_rete().
Definition at line 4910 of file rete.cpp.
References rete_test_struct::data, field_from_wme(), var_location_struct::field_num, var_location_struct::levels_up, token_struct::parent, rete_test_struct::right_field_num, rete_test_struct::rete_test_data_union::variable_referent, and token_struct::w.
Referenced by init_rete().
|
inline |
Definition at line 2485 of file rete.cpp.
Referenced by push_var_binding().
Definition at line 2662 of file rete.cpp.
References varnames_is_var_list().
Referenced by add_var_to_varnames(), add_varnames_to_test(), deallocate_varnames(), and retesave_varnames().
|
inline |
Definition at line 2661 of file rete.cpp.
Referenced by varnames_is_one_var().
Definition at line 2663 of file rete.cpp.
Referenced by add_var_to_varnames(), add_varnames_to_test(), deallocate_varnames(), and retesave_varnames().
Definition at line 2664 of file rete.cpp.
Referenced by add_var_to_varnames(), add_varnames_to_test(), deallocate_varnames(), and retesave_varnames().
Definition at line 1359 of file rete.cpp.
References wme_struct::acceptable, alpha_mem_struct::acceptable, wme_struct::attr, alpha_mem_struct::attr, wme_struct::id, alpha_mem_struct::id, NIL, wme_struct::value, and alpha_mem_struct::value.
Referenced by add_wme_to_aht(), and find_or_make_alpha_mem().
int64_t xml_aux | ( | agent * | thisAgent, |
rete_node * | node, | ||
rete_node * | cutoff, | ||
condition * | cond, | ||
wme_trace_type | wtt, | ||
int | indent | ||
) |
Definition at line 8876 of file rete.cpp.
References posneg_node_data_struct::alpha_mem_, rete_node_struct::b, ncc_info_struct::bottom, rete_node_struct::rete_node_b_union::cn, CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, deallocate_token_list(), FULL_WME_TRACE, 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, NIL, NONE_WME_TRACE, cn_node_data_struct::partner, rete_node_struct::rete_node_b_union::posneg, condition_struct::prev, real_parent_node(), alpha_mem_struct::right_mems, wme_struct::timetag, TIMETAG_WME_TRACE, condition_struct::type, right_mem_struct::w, xml_att_val(), xml_begin_tag(), xml_condition(), xml_end_tag(), xml_move_current_to_last_child(), xml_move_current_to_parent(), xml_object(), and xml_whole_token().
Referenced by xml_partial_match_information().
Definition at line 8552 of file rete.cpp.
References condition_struct::next, NIL, condition_struct::prev, TRUE, and xml_condition_list().
Referenced by xml_aux().
Definition at line 8391 of file rete.cpp.
References three_field_tests_struct::attr_test, COLUMNS_PER_LINE, CONJUNCTIVE_NEGATION_CONDITION, copy_of_equality_test_found_in_test(), copy_test_removing_goal_impasse_tests(), condition_struct::data, deallocate_test(), agent_struct::dl_cons_pool, extract_dl_list_elements(), FALSE, three_field_tests_struct::id_test, agent_struct::id_test_to_match, dl_cons_struct::item, condition_struct::condition_main_data_union::ncc, NEGATIVE_CONDITION, dl_cons_struct::next, condition_struct::next, match_set_trace::next, NIL, dl_cons_struct::prev, agent_struct::printer_output_column, remove_from_dll, condition_struct::test_for_acceptable_preference, test_is_blank_test(), test_to_string(), condition_struct::condition_main_data_union::tests, ncc_info_struct::top, TRUE, condition_struct::type, three_field_tests_struct::value_test, xml_att_val(), xml_begin_tag(), XML_CONDITION_LIST_TEMP_SIZE, xml_end_tag(), and xml_pick_conds_with_matching_id_test().
Referenced by xml_condition().
void xml_instantiation_with_wmes | ( | agent * | thisAgent, |
instantiation * | inst, | ||
wme_trace_type | wtt, | ||
int | action | ||
) |
Definition at line 8564 of file rete.cpp.
References condition_struct::bt, FULL_WME_TRACE, production_struct::name, condition_struct::next, NIL, NONE_WME_TRACE, POSITIVE_CONDITION, instantiation_struct::prod, wme_struct::timetag, TIMETAG_WME_TRACE, instantiation_struct::top_of_instantiated_conditions, condition_struct::type, bt_info_struct::wme_, xml_att_val(), xml_begin_tag(), xml_end_tag(), and xml_object().
Referenced by xml_match_set().
void xml_match_set | ( | agent * | thisAgent, |
wme_trace_type | wtt, | ||
ms_trace_type | mst | ||
) |
Definition at line 8660 of file rete.cpp.
References allocate_memory(), rete_node_struct::b, free_memory(), ms_change_struct::goal, match_set_trace::goal, in_ms_trace_same_goal(), ms_change_struct::inst, MISCELLANEOUS_MEM_USAGE, MS_ASSERT, MS_ASSERT_RETRACT, agent_struct::ms_i_assertions, agent_struct::ms_o_assertions, MS_RETRACT, agent_struct::ms_retractions, production_struct::name, ms_change_struct::next, match_set_trace::next, NIL, NONE_WME_TRACE, rete_node_struct::rete_node_b_union::p, ms_change_struct::p_node, token_struct::parent, instantiation_struct::prod, p_node_data_struct::prod, match_set_trace::sym, ms_change_struct::tok, ms_change_struct::w, token_struct::w, xml_att_val(), xml_begin_tag(), xml_end_tag(), xml_instantiation_with_wmes(), and xml_whole_token().
void xml_partial_match_information | ( | agent * | thisAgent, |
rete_node * | p_node, | ||
wme_trace_type | wtt | ||
) |
Definition at line 8988 of file rete.cpp.
References deallocate_condition_list(), deallocate_token_list(), agent_struct::dummy_top_node, get_all_left_tokens_emerging_from_node(), token_struct::next_of_node, NIL, NONE_WME_TRACE, p_node_to_conditions_and_nots(), rete_node_struct::parent, print(), xml_att_val(), xml_aux(), xml_begin_tag(), xml_end_tag(), and xml_whole_token().
Definition at line 8270 of file rete.cpp.
References CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, FALSE, three_field_tests_struct::id_test, agent_struct::id_test_to_match, dl_cons_struct::item, condition_struct::condition_main_data_union::tests, tests_are_equal(), and condition_struct::type.
Referenced by xml_condition_list().
void xml_whole_token | ( | agent * | thisAgent, |
token * | t, | ||
wme_trace_type | wtt | ||
) |
Definition at line 8260 of file rete.cpp.
References agent_struct::dummy_top_token, FULL_WME_TRACE, token_struct::parent, wme_struct::timetag, TIMETAG_WME_TRACE, token_struct::w, xml_att_val(), and xml_object().
Referenced by xml_aux(), xml_match_set(), and xml_partial_match_information().
Definition at line 1550 of file rete.cpp.
Referenced by add_wme_to_rete().
const char* bnode_type_names[256] |
Definition at line 356 of file rete.cpp.
Referenced by get_node_count_statistic(), and init_bnode_type_names().
byte relational_test_type_to_test_type[256] |
Definition at line 2913 of file rete.cpp.
Referenced by add_rete_test_list_to_tests(), and init_test_type_conversion_tables().
FILE* rete_fs_file |
Definition at line 6519 of file rete.cpp.
Referenced by load_rete_net(), retesave_one_byte(), and save_rete_net().
Bool rete_net_64 |
Definition at line 6520 of file rete.cpp.
Referenced by load_rete_net(), reteload_eight_bytes(), retesave_eight_bytes(), and save_rete_net().
char reteload_string_buf[4 *(1000+5)] |
Definition at line 6614 of file rete.cpp.
Referenced by load_rete_net(), reteload_all_symbols(), reteload_node_and_children(), and reteload_string().
byte test_type_to_relational_test_type[256] |
Definition at line 2890 of file rete.cpp.
Referenced by add_rete_tests_for_test(), and init_test_type_conversion_tables().