Soar Kernel
9.3.2 08-06-12
|
#include <portability.h>
#include <stdlib.h>
#include "production.h"
#include "mem.h"
#include "kernel.h"
#include "print.h"
#include "agent.h"
#include "gdatastructs.h"
#include "rhsfun.h"
#include "instantiations.h"
#include "reorder.h"
#include "symtab.h"
#include "init_soar.h"
#include "rete.h"
#include "utilities.h"
#include "reinforcement_learning.h"
#include <ctype.h>
Go to the source code of this file.
Macros | |
#define | CANONICAL_TEST_ORDER canonical_test |
#define | GENERATE_NEW_VARIABLE_BUFFER_SIZE 200 /* that ought to be long enough! */ |
#define | NON_EQUAL_TEST_RETURN_VAL 0 /* some unusual number */ |
#define CANONICAL_TEST_ORDER canonical_test |
Definition at line 578 of file production.cpp.
Referenced by canonical_cond_greater().
#define GENERATE_NEW_VARIABLE_BUFFER_SIZE 200 /* that ought to be long enough! */ |
Referenced by generate_new_variable().
#define NON_EQUAL_TEST_RETURN_VAL 0 /* some unusual number */ |
Definition at line 554 of file production.cpp.
Referenced by canonical_test().
Definition at line 1465 of file production.cpp.
References FALSE, action_struct::id, MAKE_ACTION, rhs_value_to_symbol(), symbol_is_in_tc(), and action_struct::type.
Referenced by add_tc_through_lhs_and_rhs(), and calculate_compile_time_o_support().
void add_action_to_tc | ( | agent * | thisAgent, |
action * | a, | ||
tc_number | tc, | ||
list ** | id_list, | ||
list ** | var_list | ||
) |
Definition at line 1390 of file production.cpp.
References add_symbol_to_tc(), action_struct::id, MAKE_ACTION, preference_is_binary(), action_struct::preference_type, action_struct::referent, rhs_value_is_symbol(), rhs_value_to_symbol(), action_struct::type, and action_struct::value.
Referenced by add_tc_through_lhs_and_rhs().
Definition at line 1298 of file production.cpp.
References add_all_variables_in_rhs_value(), action_struct::attr, action_struct::id, MAKE_ACTION, mark_variable_if_unmarked(), preference_is_binary(), action_struct::preference_type, action_struct::referent, rhs_value_to_symbol(), action_struct::type, action_struct::value, and VARIABLE_SYMBOL_TYPE.
Referenced by add_all_variables_in_action_list(), and reorder_action_list().
void add_all_variables_in_action_list | ( | agent * | thisAgent, |
action * | actions, | ||
tc_number | tc, | ||
list ** | var_list | ||
) |
Definition at line 1317 of file production.cpp.
References add_all_variables_in_action(), action_struct::next, and NIL.
Referenced by reset_variable_generator().
void add_all_variables_in_condition | ( | agent * | thisAgent, |
condition * | c, | ||
tc_number | tc, | ||
list ** | var_list | ||
) |
Definition at line 1245 of file production.cpp.
References add_all_variables_in_condition_list(), add_all_variables_in_test(), three_field_tests_struct::attr_test, CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, three_field_tests_struct::id_test, condition_struct::condition_main_data_union::ncc, condition_struct::condition_main_data_union::tests, ncc_info_struct::top, condition_struct::type, and three_field_tests_struct::value_test.
Referenced by add_all_variables_in_condition_list().
void add_all_variables_in_condition_list | ( | agent * | thisAgent, |
condition * | cond_list, | ||
tc_number | tc, | ||
list ** | var_list | ||
) |
Definition at line 1257 of file production.cpp.
References add_all_variables_in_condition(), condition_struct::next, and NIL.
Referenced by add_all_variables_in_condition(), and reset_variable_generator().
void add_all_variables_in_rhs_value | ( | agent * | thisAgent, |
rhs_value | rv, | ||
tc_number | tc, | ||
list ** | var_list | ||
) |
Definition at line 1278 of file production.cpp.
References cons_struct::first, mark_variable_if_unmarked(), NIL, cons_struct::rest, rhs_value_is_symbol(), rhs_value_to_funcall_list(), rhs_value_to_symbol(), and VARIABLE_SYMBOL_TYPE.
Referenced by add_all_variables_in_action().
Definition at line 1205 of file production.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, DISJUNCTION_TEST, cons_struct::first, GOAL_ID_TEST, IMPASSE_ID_TEST, mark_variable_if_unmarked(), NIL, complex_test_struct::test_info_union::referent, referent_of_equality_test(), cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_test(), complex_test_struct::type, and VARIABLE_SYMBOL_TYPE.
Referenced by add_all_variables_in_condition().
void add_bound_variables_in_condition | ( | agent * | thisAgent, |
condition * | c, | ||
tc_number | tc, | ||
list ** | var_list | ||
) |
Definition at line 1180 of file production.cpp.
References add_bound_variables_in_test(), three_field_tests_struct::attr_test, condition_struct::data, three_field_tests_struct::id_test, POSITIVE_CONDITION, condition_struct::condition_main_data_union::tests, condition_struct::type, and three_field_tests_struct::value_test.
Referenced by add_bound_variables_in_condition_list(), check_negative_relational_test_bindings(), fill_in_vars_requiring_bindings(), find_lowest_cost_lookahead(), and reorder_simplified_conditions().
void add_bound_variables_in_condition_list | ( | agent * | thisAgent, |
condition * | cond_list, | ||
tc_number | tc, | ||
list ** | var_list | ||
) |
Definition at line 1188 of file production.cpp.
References add_bound_variables_in_condition(), condition_struct::next, and NIL.
Referenced by make_production().
Definition at line 1158 of file production.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, cons_struct::first, mark_variable_if_unmarked(), NIL, referent_of_equality_test(), cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_test(), complex_test_struct::type, and VARIABLE_SYMBOL_TYPE.
Referenced by add_bound_variables_in_condition(), calculate_compile_time_o_support(), collect_root_variables(), find_known_goals(), find_thing_off_goal(), reorder_lhs(), and restore_and_deallocate_saved_tests().
void add_cond_to_tc | ( | agent * | thisAgent, |
condition * | c, | ||
tc_number | tc, | ||
list ** | id_list, | ||
list ** | var_list | ||
) |
Definition at line 1382 of file production.cpp.
References add_test_to_tc(), condition_struct::data, three_field_tests_struct::id_test, POSITIVE_CONDITION, condition_struct::condition_main_data_union::tests, condition_struct::type, and three_field_tests_struct::value_test.
Referenced by add_tc_through_lhs_and_rhs(), build_chunk_conds_for_grounds_and_add_negateds(), cond_is_in_tc(), and trace_grounded_potentials().
Definition at line 340 of file production.cpp.
References allocate_cons(), complex_test_from_test(), agent_struct::complex_test_pool, complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, FALSE, cons_struct::first, make_test_from_complex_test(), NIL, cons_struct::rest, test_is_blank_test(), test_is_complex_test(), TRUE, and complex_test_struct::type.
Referenced by add_gensymmed_equality_test(), add_goal_or_impasse_tests(), add_hash_info_to_id_test(), add_new_test_to_test_if_not_already_there(), add_rete_test_list_to_tests(), add_varnames_to_test(), copy_test_removing_goal_impasse_tests(), parse_attr_value_tests(), parse_head_of_conds_for_one_id(), parse_test(), parse_value_test_star(), rl_add_goal_or_impasse_tests_to_conds(), and variablize_nots_and_insert_into_conditions().
void add_new_test_to_test_if_not_already_there | ( | agent * | thisAgent, |
test * | t, | ||
test | add_me, | ||
bool | neg | ||
) |
Definition at line 383 of file production.cpp.
References add_new_test_to_test(), complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, deallocate_test(), cons_struct::first, NIL, cons_struct::rest, test_is_complex_test(), tests_are_equal(), and complex_test_struct::type.
Referenced by restore_saved_tests_to_test().
void add_symbol_to_tc | ( | agent * | thisAgent, |
Symbol * | sym, | ||
tc_number | tc, | ||
list ** | id_list, | ||
list ** | var_list | ||
) |
Definition at line 1354 of file production.cpp.
References IDENTIFIER_SYMBOL_TYPE, mark_identifier_if_unmarked(), mark_variable_if_unmarked(), and VARIABLE_SYMBOL_TYPE.
Referenced by add_action_to_tc(), add_test_to_tc(), and calculate_compile_time_o_support().
Definition at line 1363 of file production.cpp.
References add_symbol_to_tc(), 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(), and complex_test_struct::type.
Referenced by add_cond_to_tc().
Definition at line 584 of file production.cpp.
References three_field_tests_struct::attr_test, CANONICAL_TEST_ORDER, condition_struct::data, FALSE, condition_struct::condition_main_data_union::tests, TRUE, uint32_t(), and three_field_tests_struct::value_test.
Referenced by reorder_simplified_conditions().
Definition at line 556 of file production.cpp.
References FLOAT_CONSTANT_SYMBOL_TYPE, INT_CONSTANT_SYMBOL_TYPE, NON_EQUAL_TEST_RETURN_VAL, referent_of_equality_test(), SYM_CONSTANT_SYMBOL_TYPE, test_is_blank_or_equality_test(), and test_is_blank_test().
Definition at line 1427 of file production.cpp.
References add_cond_to_tc(), condition_struct::already_in_tc, cond_is_in_tc(), CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, FALSE, three_field_tests_struct::id_test, condition_struct::condition_main_data_union::ncc, condition_struct::next, NIL, test_is_in_tc(), condition_struct::condition_main_data_union::tests, ncc_info_struct::top, TRUE, condition_struct::type, unmark_identifiers_and_free_list(), and unmark_variables_and_free_list().
Referenced by add_tc_through_lhs_and_rhs(), build_chunk_conds_for_grounds_and_add_negateds(), cond_is_in_tc(), and trace_grounded_potentials().
Definition at line 847 of file production.cpp.
References three_field_tests_struct::attr_test, conditions_are_equal(), CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, FALSE, three_field_tests_struct::id_test, condition_struct::condition_main_data_union::ncc, NEGATIVE_CONDITION, condition_struct::next, NIL, POSITIVE_CONDITION, condition_struct::test_for_acceptable_preference, condition_struct::condition_main_data_union::tests, tests_are_equal(), ncc_info_struct::top, TRUE, condition_struct::type, and three_field_tests_struct::value_test.
Referenced by add_to_chunk_cond_set(), conditions_are_equal(), and explain_find_cond().
Definition at line 794 of file production.cpp.
References three_field_tests_struct::attr_test, ncc_info_struct::bottom, condition_struct::bt, agent_struct::condition_pool, CONJUNCTIVE_NEGATION_CONDITION, copy_condition_list(), copy_test(), condition_struct::data, three_field_tests_struct::id_test, condition_struct::condition_main_data_union::ncc, NEGATIVE_CONDITION, NIL, POSITIVE_CONDITION, condition_struct::test_for_acceptable_preference, condition_struct::condition_main_data_union::tests, ncc_info_struct::top, condition_struct::type, and three_field_tests_struct::value_test.
Referenced by build_chunk_conds_for_grounds_and_add_negateds(), copy_condition_list(), copy_conds_from_list(), and explain_add_temp_to_backtrace_list().
void copy_condition_list | ( | agent * | thisAgent, |
condition * | top_cond, | ||
condition ** | dest_top, | ||
condition ** | dest_bottom | ||
) |
Definition at line 825 of file production.cpp.
References copy_condition(), condition_struct::next, NIL, and condition_struct::prev.
Referenced by chunk_instantiation(), copy_cond_list(), copy_condition(), and rl_build_template_instantiation().
Definition at line 739 of file production.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, copy_test(), complex_test_struct::data, cons_struct::first, NIL, cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_test(), and complex_test_struct::type.
Referenced by fill_in_attr_tests(), fill_in_id_tests(), parse_conds_for_one_id(), parse_head_of_conds_for_one_id(), print_condition_list(), and xml_condition_list().
Definition at line 954 of file production.cpp.
References allocate_cons(), copy_rhs_value(), cons_struct::first, funcall_list_to_rhs_value(), NIL, cons_struct::rest, rhs_value_is_funcall(), rhs_value_is_reteloc(), rhs_value_is_unboundvar(), rhs_value_to_funcall_list(), rhs_value_to_symbol(), and symbol_add_ref().
Referenced by copy_rhs_value(), parse_preferences(), and parse_preferences_soar8_non_operator().
Definition at line 129 of file production.cpp.
References allocate_cons(), cons_struct::first, NIL, cons_struct::rest, and symbol_add_ref().
Referenced by add_rete_test_list_to_tests(), add_rete_tests_for_test(), and copy_test().
Definition at line 188 of file production.cpp.
References complex_test_from_test(), agent_struct::complex_test_pool, complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, copy_symbol_list_adding_references(), copy_test_list(), complex_test_struct::data, complex_test_struct::test_info_union::disjunction_list, DISJUNCTION_TEST, GOAL_ID_TEST, IMPASSE_ID_TEST, make_blank_test(), make_equality_test(), make_test_from_complex_test(), complex_test_struct::test_info_union::referent, referent_of_equality_test(), symbol_add_ref(), test_is_blank_or_equality_test(), test_is_blank_test(), and complex_test_struct::type.
Referenced by copy_condition(), copy_of_equality_test_found_in_test(), copy_test_list(), copy_test_removing_goal_impasse_tests(), fill_in_attr_tests(), fill_in_id_tests(), and parse_attr_value_tests().
Definition at line 174 of file production.cpp.
References allocate_cons(), copy_test(), cons_struct::first, NIL, and cons_struct::rest.
Referenced by copy_test().
test copy_test_removing_goal_impasse_tests | ( | agent * | thisAgent, |
test | t, | ||
Bool * | removed_goal, | ||
Bool * | removed_impasse | ||
) |
Definition at line 230 of file production.cpp.
References add_new_test_to_test(), complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, copy_test(), copy_test_removing_goal_impasse_tests(), complex_test_struct::data, destructively_reverse_list(), cons_struct::first, GOAL_ID_TEST, IMPASSE_ID_TEST, make_blank_test(), NIL, cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_test(), test_is_complex_test(), TRUE, and complex_test_struct::type.
Referenced by copy_test_removing_goal_impasse_tests(), print_condition_list(), remove_isa_state_tests_for_non_roots(), and xml_condition_list().
Definition at line 983 of file production.cpp.
References agent_struct::action_pool, action_struct::attr, deallocate_rhs_value(), FUNCALL_ACTION, action_struct::id, action_struct::next, preference_is_binary(), action_struct::preference_type, action_struct::referent, action_struct::type, and action_struct::value.
Referenced by chunk_instantiation(), deallocate_production(), free_explain_chunk(), parse_attr_value_make(), parse_preferences(), parse_preferences_soar8_non_operator(), parse_production(), parse_rhs(), parse_rhs_action(), and print_production().
Definition at line 772 of file production.cpp.
References three_field_tests_struct::attr_test, agent_struct::condition_pool, CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, deallocate_condition_list(), three_field_tests_struct::id_test, condition_struct::condition_main_data_union::ncc, condition_struct::next, quickly_deallocate_test(), condition_struct::condition_main_data_union::tests, ncc_info_struct::top, condition_struct::type, and three_field_tests_struct::value_test.
Referenced by chunk_instantiation(), deallocate_condition_list(), deallocate_instantiation(), deallocate_production(), free_backtrace_list(), free_explain_chunk(), parse_attr_value_tests(), parse_cond(), parse_cond_plus(), parse_production(), parse_tail_of_conds_for_one_id(), parse_value_test_star(), print_partial_match_information(), print_production(), rl_build_template_instantiation(), and xml_partial_match_information().
void deallocate_list_of_nots | ( | agent * | thisAgent, |
not_struct * | nots | ||
) |
Definition at line 1024 of file production.cpp.
References not_struct::next, agent_struct::not_pool, not_struct::s1, not_struct::s2, and symbol_remove_ref().
Referenced by deallocate_instantiation().
void deallocate_production | ( | agent * | thisAgent, |
production * | prod | ||
) |
Definition at line 1653 of file production.cpp.
References abort_with_fatal_error(), production_struct::action_list, BUFFER_MSG_SIZE, deallocate_action_list(), deallocate_condition_list(), deallocate_symbol_list_removing_references(), production_struct::documentation, production_struct::filename, free_memory_block_for_string(), production_struct::instantiations, production_struct::name, agent_struct::production_pool, production_struct::rhs_unbound_variables, production_struct::rl_template_conds, production_struct::rl_template_instantiations, and symbol_remove_ref().
Referenced by production_remove_ref().
Definition at line 934 of file production.cpp.
References deallocate_rhs_value(), cons_struct::first, free_list(), NIL, cons_struct::rest, rhs_value_is_funcall(), rhs_value_is_reteloc(), rhs_value_is_unboundvar(), rhs_value_to_funcall_list(), rhs_value_to_symbol(), and symbol_remove_ref().
Referenced by deallocate_action_list(), deallocate_rhs_value(), parse_attr_value_make(), and parse_function_call_after_lparen().
Definition at line 155 of file production.cpp.
References cons_struct::first, free_cons(), cons_struct::rest, and symbol_remove_ref().
Referenced by add_production_to_rete(), deallocate_production(), deallocate_rete_test_list(), deallocate_test(), deallocate_trace_format_list(), deallocate_varnames(), and parse_attribute_path_in_brackets().
Definition at line 275 of file production.cpp.
References complex_test_from_test(), agent_struct::complex_test_pool, complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, deallocate_symbol_list_removing_references(), deallocate_test(), complex_test_struct::test_info_union::disjunction_list, DISJUNCTION_TEST, cons_struct::first, free_cons(), GOAL_ID_TEST, IMPASSE_ID_TEST, complex_test_struct::test_info_union::referent, referent_of_equality_test(), cons_struct::rest, symbol_remove_ref(), test_is_blank_or_equality_test(), test_is_blank_test(), and complex_test_struct::type.
Referenced by add_new_test_to_test_if_not_already_there(), deallocate_test(), fill_in_attr_tests(), fill_in_id_tests(), parse_attr_value_tests(), parse_conds_for_one_id(), parse_disjunction_test(), parse_head_of_conds_for_one_id(), parse_test(), print_condition_list(), quickly_deallocate_test(), remove_isa_state_tests_for_non_roots(), and xml_condition_list().
Definition at line 1705 of file production.cpp.
References excise_all_productions_of_type(), NUM_PRODUCTION_TYPES, agent_struct::sysparams, and TRACE_LOADING_SYSPARAM.
Referenced by destroy_soar_agent(), and load_rete_net().
Definition at line 1693 of file production.cpp.
References agent_struct::all_productions_of_type, excise_production(), agent_struct::sysparams, and TRACE_LOADING_SYSPARAM.
Referenced by excise_all_productions().
void excise_production | ( | agent * | thisAgent, |
production * | prod, | ||
Bool | print_sharp_sign | ||
) |
Definition at line 1674 of file production.cpp.
References agent_struct::all_productions_of_type, rl_param_container::apoptosis, rl_param_container::apoptosis_none, CHUNK_PRODUCTION_TYPE, excise_production_from_rete(), soar_module::constant_param< T >::get_value(), production_struct::name, NIL, agent_struct::num_productions_of_type, production_struct::p_node, print(), sym_constant_struct::production, production_remove_ref(), remove_from_dll, soar_module::object_memory< T, N >::remove_object(), remove_pwatch(), agent_struct::rl_params, agent_struct::rl_prods, rl_remove_refs_for_prod(), production_struct::rl_rule, symbol_union::sc, production_struct::trace_firings, and production_struct::type.
Referenced by chunk_instantiation(), do_one_top_level_phase(), excise_all_productions_of_type(), parse_production(), retract_instantiation(), and rl_build_template_instantiation().
char first_letter_from_rhs_value | ( | rhs_value | rv | ) |
Definition at line 1008 of file production.cpp.
References first_letter_from_symbol(), rhs_value_is_symbol(), and rhs_value_to_symbol().
Referenced by copy_action_list_and_substitute_varnames(), and parse_attr_value_make().
char first_letter_from_symbol | ( | Symbol * | sym | ) |
Definition at line 86 of file production.cpp.
References symbol_union::id, IDENTIFIER_SYMBOL_TYPE, sym_constant_struct::name, variable_struct::name, identifier_struct::name_letter, symbol_union::sc, SYM_CONSTANT_SYMBOL_TYPE, symbol_union::var, and VARIABLE_SYMBOL_TYPE.
Referenced by execute_action(), first_letter_from_rhs_value(), first_letter_from_test(), and rl_build_template_instantiation().
char first_letter_from_test | ( | test | t | ) |
Definition at line 100 of file production.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, cons_struct::first, first_letter_from_symbol(), first_letter_from_test(), GOAL_ID_TEST, IMPASSE_ID_TEST, NIL, referent_of_equality_test(), cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_test(), and complex_test_struct::type.
Referenced by add_rete_test_list_to_tests(), first_letter_from_test(), parse_attr_value_tests(), and rete_node_to_conditions().
Definition at line 1515 of file production.cpp.
References variable_struct::current_binding_value, agent_struct::current_variable_gensym_number, GENERATE_NEW_VARIABLE_BUFFER_SIZE, variable_struct::gensym_number, agent_struct::gensymed_variable_count, make_variable(), NIL, symbol_remove_ref(), TRUE, and symbol_union::var.
Referenced by add_gensymmed_equality_test(), copy_rhs_value_and_substitute_varnames(), simplify_test(), substitute_for_placeholders_in_symbol(), and variablize_symbol().
Definition at line 1059 of file production.cpp.
References agent_struct::current_tc_number, and reset_id_and_variable_tc_numbers().
Referenced by add_goal_or_impasse_tests(), add_production_to_rete(), backtrace_through_instantiation(), begin_os_tc(), calculate_compile_time_o_support(), chunk_instantiation(), do_demotion(), dougs_calculate_support_for_instantiation_preferences(), epmem_build_dnf(), epmem_new_episode(), epmem_process_query(), epmem_respond_to_cmd(), find_compile_time_match_goal(), find_known_goals(), find_thing_off_goal(), get_results_for_instantiation(), make_production(), print_object_trace(), print_object_trace_using_provided_format_string(), print_stack_trace(), reorder_lhs(), reset_variable_generator(), rl_add_goal_or_impasse_tests_to_conds(), rl_build_template_instantiation(), smem_respond_to_cmd(), smem_soar_store(), and trace_grounded_potentials().
Definition at line 883 of file production.cpp.
References abort_with_fatal_error(), three_field_tests_struct::attr_test, BUFFER_MSG_SIZE, CONJUNCTIVE_NEGATION_CONDITION, condition_struct::data, hash_condition(), hash_test(), three_field_tests_struct::id_test, condition_struct::condition_main_data_union::ncc, NEGATIVE_CONDITION, condition_struct::next, NIL, POSITIVE_CONDITION, condition_struct::test_for_acceptable_preference, condition_struct::condition_main_data_union::tests, ncc_info_struct::top, condition_struct::type, uint32_t(), and three_field_tests_struct::value_test.
Referenced by hash_condition(), and make_chunk_cond_for_condition().
Definition at line 502 of file production.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, common, complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, DISJUNCTION_TEST, cons_struct::first, GOAL_ID_TEST, GREATER_OR_EQUAL_TEST, GREATER_TEST, IMPASSE_ID_TEST, LESS_OR_EQUAL_TEST, LESS_TEST, NIL, NOT_EQUAL_TEST, complex_test_struct::test_info_union::referent, referent_of_equality_test(), cons_struct::rest, SAME_TYPE_TEST, test_is_blank_or_equality_test(), test_is_blank_test(), complex_test_struct::type, and uint32_t().
Referenced by hash_condition().
void init_production_utilities | ( | agent * | thisAgent | ) |
Definition at line 53 of file production.cpp.
References agent_struct::action_pool, agent_struct::complex_test_pool, agent_struct::condition_pool, init_memory_pool(), init_reorderer(), agent_struct::not_pool, and agent_struct::production_pool.
Referenced by init_soar_agent().
production* make_production | ( | agent * | thisAgent, |
byte | type, | ||
Symbol * | name, | ||
condition ** | lhs_top, | ||
condition ** | lhs_bottom, | ||
action ** | rhs_top, | ||
Bool | reorder_nccs | ||
) |
Definition at line 1562 of file production.cpp.
References production_struct::action_list, add_bound_variables_in_condition_list(), agent_struct::all_productions_of_type, calculate_compile_time_o_support(), production_struct::declared_support, production_struct::documentation, FALSE, production_struct::filename, production_struct::firing_count, get_new_tc_number(), get_number_from_symbol(), insert_at_head_of_dll, production_struct::instantiations, production_struct::interrupt, JUSTIFICATION_PRODUCTION_TYPE, MAKE_ACTION, production_struct::name, sym_constant_struct::name, agent_struct::name_of_production_being_reordered, action_struct::next, NIL, agent_struct::num_productions_of_type, production_struct::p_node, print(), print_with_symbols(), sym_constant_struct::production, agent_struct::production_pool, production_struct::reference_count, action_struct::referent, reorder_action_list(), reorder_lhs(), reset_variable_generator(), 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_ref_count, production_struct::rl_rule, production_struct::rl_template_conds, production_struct::rl_template_instantiations, production_struct::rl_update_count, rl_update_template_tracking(), rl_valid_rule(), symbol_union::sc, smem_valid_production(), action_struct::support, TEMPLATE_PRODUCTION_TYPE, production_struct::trace_firings, production_struct::type, action_struct::type, UNDECLARED_SUPPORT, and UNKNOWN_SUPPORT.
Referenced by chunk_instantiation(), parse_production(), and rl_build_template_instantiation().
|
inline |
Definition at line 1098 of file production.cpp.
References push().
Referenced by add_symbol_to_tc().
|
inline |
Definition at line 1113 of file production.cpp.
References push().
Referenced by add_all_variables_in_action(), add_all_variables_in_rhs_value(), add_all_variables_in_test(), add_bound_variables_in_test(), and add_symbol_to_tc().
Definition at line 319 of file production.cpp.
References deallocate_test(), referent_of_equality_test(), symbol_remove_ref(), test_is_blank_or_equality_test(), and test_is_blank_test().
Referenced by deallocate_condition_list().
void reset_variable_generator | ( | agent * | thisAgent, |
condition * | conds_with_vars_to_avoid, | ||
action * | actions_with_vars_to_avoid | ||
) |
Definition at line 1489 of file production.cpp.
References add_all_variables_in_action_list(), add_all_variables_in_condition_list(), agent_struct::current_variable_gensym_number, cons_struct::first, free_list(), agent_struct::gensymed_variable_count, get_new_tc_number(), NIL, reset_variable_gensym_numbers(), and cons_struct::rest.
Referenced by chunk_instantiation(), make_production(), p_node_to_conditions_and_nots(), parse_production(), and rl_build_template_instantiation().
Definition at line 1401 of file production.cpp.
References FALSE, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, variable_struct::tc_num, identifier_struct::tc_num, symbol_union::var, and VARIABLE_SYMBOL_TYPE.
Referenced by action_is_in_tc(), and test_is_in_tc().
Definition at line 687 of file production.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, FALSE, cons_struct::first, NIL, referent_of_equality_test(), cons_struct::rest, test_includes_equality_test_for_symbol(), test_is_blank_or_equality_test(), test_is_blank_test(), TRUE, and complex_test_struct::type.
Referenced by add_rete_test_list_to_tests(), collect_root_variables(), condition_list_has_id_test_for_sym(), id_or_value_of_condition_list_is_in_os_tc(), match_state_tests_non_operator_slot(), parse_attr_value_tests(), parse_head_of_conds_for_one_id(), parse_value_test_star(), restore_saved_tests_to_test(), rete_node_to_conditions(), test_includes_equality_test_for_symbol(), and variablize_nots_and_insert_into_conditions().
Definition at line 712 of file production.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, FALSE, cons_struct::first, GOAL_ID_TEST, IMPASSE_ID_TEST, NIL, cons_struct::rest, test_includes_goal_or_impasse_id_test(), test_is_blank_or_equality_test(), TRUE, and complex_test_struct::type.
Referenced by collect_root_variables(), find_known_goals(), remove_isa_state_tests_for_non_roots(), reorder_lhs(), and test_includes_goal_or_impasse_id_test().
Definition at line 1409 of file production.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, FALSE, cons_struct::first, NIL, referent_of_equality_test(), cons_struct::rest, symbol_is_in_tc(), test_is_blank_or_equality_test(), test_is_blank_test(), TRUE, and complex_test_struct::type.
Referenced by cond_is_in_tc().
Definition at line 411 of file production.cpp.
References variable_struct::common_symbol_info, complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, complex_test_struct::test_info_union::disjunction_list, DISJUNCTION_TEST, FALSE, cons_struct::first, GOAL_ID_TEST, IMPASSE_ID_TEST, NIL, complex_test_struct::test_info_union::referent, referent_of_equality_test(), cons_struct::rest, symbol_common_data_struct::symbol_type, test_is_blank_or_equality_test(), tests_are_equal(), TRUE, complex_test_struct::type, symbol_union::var, and VARIABLE_SYMBOL_TYPE.
Referenced by add_new_test_to_test_if_not_already_there(), conditions_are_equal(), pick_conds_with_matching_id_test(), tests_are_equal(), and xml_pick_conds_with_matching_id_test().
Definition at line 1123 of file production.cpp.
References cons_struct::first, free_cons(), symbol_union::id, cons_struct::rest, and identifier_struct::tc_num.
Referenced by cond_is_in_tc().
Definition at line 1136 of file production.cpp.
References cons_struct::first, free_cons(), cons_struct::rest, variable_struct::tc_num, and symbol_union::var.
Referenced by check_negative_relational_test_bindings(), collect_root_variables(), cond_is_in_tc(), fill_in_vars_requiring_bindings(), find_lowest_cost_lookahead(), reorder_action_list(), reorder_simplified_conditions(), and restore_and_deallocate_saved_tests().