Soar Kernel
9.3.2 08-06-12
|
#include <portability.h>
#include <stdlib.h>
#include "osupport.h"
#include "symtab.h"
#include "wmem.h"
#include "gdatastructs.h"
#include "agent.h"
#include "kernel.h"
#include "production.h"
#include "instantiations.h"
#include "rhsfun.h"
#include "print.h"
#include "reorder.h"
#include "rete.h"
#include "xml.h"
Go to the source code of this file.
Enumerations | |
enum | yes_no_maybe |
enum yes_no_maybe |
void add_tc_through_lhs_and_rhs | ( | agent * | thisAgent, |
condition * | lhs, | ||
action * | rhs, | ||
tc_number | tc, | ||
list ** | id_list, | ||
list ** | var_list | ||
) |
Definition at line 815 of file osupport.cpp.
References action_is_in_tc(), add_action_to_tc(), add_cond_to_tc(), action_struct::already_in_tc, condition_struct::already_in_tc, cond_is_in_tc(), FALSE, action_struct::next, condition_struct::next, NIL, and TRUE.
Referenced by calculate_compile_time_o_support().
Definition at line 84 of file osupport.cpp.
References add_to_os_tc_if_needed(), preference_struct::all_of_slot_next, slot_struct::all_preferences, preference_struct::attr, slot_struct::attr, wme_struct::id, preference_struct::id, symbol_union::id, identifier_struct::input_wmes, preference_struct::inst_next, wme_struct::next, slot_struct::next, NIL, agent_struct::o_support_tc, agent_struct::operator_symbol, preference_is_binary(), preference_struct::referent, agent_struct::rhs_prefs_from_instantiation, identifier_struct::slots, identifier_struct::tc_num, preference_struct::type, wme_struct::value, preference_struct::value, and slot_struct::wmes.
Referenced by add_to_os_tc_if_needed().
Definition at line 72 of file osupport.cpp.
References common, and IDENTIFIER_SYMBOL_TYPE.
Definition at line 63 of file osupport.cpp.
References add_to_os_tc(), common, FALSE, and IDENTIFIER_SYMBOL_TYPE.
Referenced by add_to_os_tc().
void begin_os_tc | ( | agent * | thisAgent, |
preference * | rhs_prefs_or_nil | ||
) |
Definition at line 122 of file osupport.cpp.
References get_new_tc_number(), agent_struct::o_support_tc, and agent_struct::rhs_prefs_from_instantiation.
Definition at line 854 of file osupport.cpp.
References ACCEPTABLE_PREFERENCE_TYPE, action_is_in_tc(), add_bound_variables_in_test(), add_symbol_to_tc(), add_tc_through_lhs_and_rhs(), action_struct::attr, three_field_tests_struct::attr_test, condition_list_has_id_test_for_sym(), condition_struct::data, FALSE, find_compile_time_match_goal(), find_known_goals(), find_thing_off_goal(), cons_struct::first, free_list(), get_new_tc_number(), I_SUPPORT, action_struct::id, three_field_tests_struct::id_test, MAKE_ACTION, match_state_tests_non_operator_slot(), MAYBE, action_struct::next, condition_struct::next, NIL, NO, O_SUPPORT, agent_struct::operator_symbol, POSITIVE_CONDITION, action_struct::preference_type, REQUIRE_PREFERENCE_TYPE, cons_struct::rest, rhs_value_is_symbol(), rhs_value_to_symbol(), agent_struct::soar_verbose_flag, action_struct::support, test_is_for_symbol(), condition_struct::condition_main_data_union::tests, TRUE, action_struct::type, condition_struct::type, UNKNOWN_SUPPORT, action_struct::value, three_field_tests_struct::value_test, VARIABLE_SYMBOL_TYPE, xml_generate_verbose(), and YES.
Referenced by make_production().
void calculate_support_for_instantiation_preferences | ( | agent * | thisAgent, |
instantiation * | inst | ||
) |
Definition at line 267 of file osupport.cpp.
References wme_struct::acceptable, ACCEPTABLE_PREFERENCE_TYPE, production_struct::action_list, add_to_growable_string(), wme_struct::attr, action_struct::attr, condition_struct::bt, DECLARED_I_SUPPORT, DECLARED_O_SUPPORT, production_struct::declared_support, FALSE, free_growable_string(), get_symbol_from_rete_loc(), wme_struct::id, action_struct::id, symbol_union::id, preference_struct::inst_next, identifier_struct::isa_goal, identifier_struct::level, MAKE_ACTION, make_blank_growable_string(), production_struct::name, action_struct::next, condition_struct::next, NIL, agent_struct::o_support_calculation_type, preference_struct::o_supported, agent_struct::operator_symbol, POSITIVE_CONDITION, action_struct::preference_type, instantiation_struct::preferences_generated, print_with_symbols(), instantiation_struct::prod, instantiation_struct::rete_token, 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, symbol_to_string(), text_of_growable_string(), instantiation_struct::top_of_instantiated_conditions, TRUE, action_struct::type, condition_struct::type, UNDECLARED_SUPPORT, wme_struct::value, bt_info_struct::wme_, xml_generate_verbose(), and xml_generate_warning().
Referenced by fill_in_new_instantiation_stuff().
Definition at line 757 of file osupport.cpp.
References 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, test_includes_equality_test_for_symbol(), condition_struct::condition_main_data_union::tests, ncc_info_struct::top, TRUE, and condition_struct::type.
Referenced by calculate_compile_time_o_support().
void dougs_calculate_support_for_instantiation_preferences | ( | agent * | thisAgent, |
instantiation * | inst | ||
) |
Definition at line 490 of file osupport.cpp.
References ACCEPTABLE_PREFERENCE_TYPE, wme_struct::attr, preference_struct::attr, condition_struct::bt, FALSE, get_new_tc_number(), wme_struct::id, preference_struct::id, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, preference_struct::inst_next, instantiation_struct::match_goal, condition_struct::next, NIL, agent_struct::o_support_tc, preference_struct::o_supported, agent_struct::operator_symbol, POSITIVE_CONDITION, preference_is_binary(), instantiation_struct::preferences_generated, preference_struct::referent, REQUIRE_PREFERENCE_TYPE, identifier_struct::tc_num, instantiation_struct::top_of_instantiated_conditions, TRUE, preference_struct::type, condition_struct::type, preference_struct::value, and bt_info_struct::wme_.
Referenced by fill_in_new_instantiation_stuff().
Definition at line 654 of file osupport.cpp.
References three_field_tests_struct::attr_test, collect_root_variables(), condition_struct::data, FALSE, cons_struct::first, free_cons(), free_list(), get_new_tc_number(), three_field_tests_struct::id_test, member_of_list(), condition_struct::next, NIL, agent_struct::nil_symbol, POSITIVE_CONDITION, push(), cons_struct::rest, agent_struct::superstate_symbol, test_is_for_symbol(), condition_struct::condition_main_data_union::tests, condition_struct::type, three_field_tests_struct::value_test, and YES.
Referenced by calculate_compile_time_o_support().
Definition at line 625 of file osupport.cpp.
References add_bound_variables_in_test(), condition_struct::data, FALSE, get_new_tc_number(), three_field_tests_struct::id_test, condition_struct::next, NIL, POSITIVE_CONDITION, test_includes_goal_or_impasse_id_test(), condition_struct::condition_main_data_union::tests, TRUE, and condition_struct::type.
Referenced by calculate_compile_time_o_support().
Definition at line 725 of file osupport.cpp.
References add_bound_variables_in_test(), three_field_tests_struct::attr_test, condition_struct::data, cons_struct::first, free_list(), get_new_tc_number(), three_field_tests_struct::id_test, condition_struct::next, NIL, POSITIVE_CONDITION, condition_struct::test_for_acceptable_preference, test_is_for_symbol(), condition_struct::condition_main_data_union::tests, condition_struct::type, three_field_tests_struct::value_test, and YES.
Referenced by calculate_compile_time_o_support().
Bool id_or_value_of_condition_list_is_in_os_tc | ( | agent * | thisAgent, |
condition * | conds, | ||
Symbol * | sym_excluded_from_value, | ||
Symbol * | match_state_to_exclude_test_of_the_operator_off_of | ||
) |
Definition at line 163 of file osupport.cpp.
References three_field_tests_struct::attr_test, 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, agent_struct::operator_symbol, POSITIVE_CONDITION, test_has_id_in_os_tc(), test_includes_equality_test_for_symbol(), condition_struct::condition_main_data_union::tests, ncc_info_struct::top, TRUE, condition_struct::type, and three_field_tests_struct::value_test.
Definition at line 207 of file osupport.cpp.
References FALSE, symbol_union::id, identifier_struct::lower_goal, agent_struct::top_goal, and TRUE.
Bool match_state_tests_non_operator_slot | ( | agent * | thisAgent, |
condition * | conds, | ||
Symbol * | match_state | ||
) |
Definition at line 782 of file osupport.cpp.
References three_field_tests_struct::attr_test, 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, NO, agent_struct::operator_symbol, POSITIVE_CONDITION, test_includes_equality_test_for_symbol(), test_is_for_symbol(), condition_struct::condition_main_data_union::tests, ncc_info_struct::top, TRUE, and condition_struct::type.
Referenced by calculate_compile_time_o_support().
Definition at line 140 of file osupport.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, FALSE, cons_struct::first, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, NIL, agent_struct::o_support_tc, referent_of_equality_test(), cons_struct::rest, identifier_struct::tc_num, test_is_blank_or_equality_test(), test_is_blank_test(), TRUE, and complex_test_struct::type.
Referenced by id_or_value_of_condition_list_is_in_os_tc().
yes_no_maybe test_is_for_symbol | ( | test | t, |
Symbol * | sym | ||
) |
Definition at line 576 of file osupport.cpp.
References 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, MAYBE, member_of_list(), NIL, NO, referent_of_equality_test(), cons_struct::rest, test_is_blank_or_equality_test(), test_is_blank_test(), TRUE, complex_test_struct::type, VARIABLE_SYMBOL_TYPE, and YES.
Referenced by calculate_compile_time_o_support(), find_compile_time_match_goal(), find_thing_off_goal(), and match_state_tests_non_operator_slot().