Soar Kernel
9.3.2 08-06-12
|
Go to the source code of this file.
Typedefs | |
typedef struct agent_struct | agent |
typedef char | Bool |
typedef signed short | goal_stack_level |
typedef union symbol_union | Symbol |
Enumerations | |
enum | go_type_enum |
enum | top_level_phase |
Functions | |
void | abort_with_fatal_error (agent *thisAgent, const char *) |
void | add_pwatch (agent *thisAgent, struct production_struct *prod) |
void | do_one_top_level_phase (agent *thisAgent) |
void | init_agent_memory (agent *thisAgent) |
bool | reinitialize_soar (agent *thisAgent) |
void | remove_pwatch (agent *thisAgent, struct production_struct *prod) |
void | reset_max_stats (agent *thisAgent) |
void | reset_statistics (agent *thisAgent) |
void | reset_timers (agent *thisAgent) |
void | run_for_n_decision_cycles (agent *thisAgent, int64_t n) |
void | run_for_n_elaboration_cycles (agent *thisAgent, int64_t n) |
void | run_for_n_modifications_of_output (agent *thisAgent, int64_t n) |
void | run_for_n_phases (agent *thisAgent, int64_t n) |
void | run_for_n_selections_of_slot (agent *, int64_t n, Symbol *attr_of_slot) |
void | run_for_n_selections_of_slot_at_level (agent *thisAgent, int64_t n, Symbol *attr_of_slot, goal_stack_level level) |
void | run_forever (agent *thisAgent) |
void | set_sysparam (agent *thisAgent, int param_number, int64_t new_value) |
void | setup_signal_handling (void) |
typedef struct agent_struct agent |
Definition at line 21 of file init_soar.h.
typedef char Bool |
Definition at line 18 of file init_soar.h.
typedef signed short goal_stack_level |
Definition at line 19 of file init_soar.h.
typedef union symbol_union Symbol |
Definition at line 20 of file init_soar.h.
enum go_type_enum |
Definition at line 121 of file init_soar.h.
enum top_level_phase |
INPUT_PHASE | |
PROPOSE_PHASE | |
DECISION_PHASE | |
APPLY_PHASE | |
OUTPUT_PHASE | |
PREFERENCE_PHASE | |
WM_PHASE | |
NUM_PHASE_TYPES |
Definition at line 140 of file init_soar.h.
void abort_with_fatal_error | ( | agent * | thisAgent, |
const char * | |||
) |
Definition at line 89 of file init_soar.cpp.
References print(), and xml_generate_error().
Referenced by add_rete_test_list_to_tests(), add_rete_tests_for_test(), allocate_memory(), attribute_of_existing_impasse(), copy_of_equality_test_found_in_test(), deallocate_preference(), deallocate_production(), deallocate_rete_node(), deallocate_symbol(), decide_context_slot(), decide_non_context_slot(), error_rete_test_routine(), find_goal_for_match_set_change_assertion(), get_next_char(), hash_condition(), hash_test(), highest_active_goal_apply(), highest_active_goal_propose(), init_memory_pool(), make_fake_preference_for_goal_item(), make_symbol_for_current_lexeme(), merge_into_mp_node(), p_node_left_removal(), parse_rhs_action(), preference_type_indicator(), print_trace_format_list(), promote_id_and_tc(), remove_output_link_tc_info(), remove_token_and_subtree(), rete_error_left(), rete_error_right(), reteload_am_from_index(), reteload_node_and_children(), reteload_rhs_value(), reteload_symbol_from_index(), retesave_rete_node_and_children(), reverse_direction_of_relational_test(), rhs_value_to_string(), single_rete_tests_are_identical(), symbol_to_string(), trace_format_list_to_string(), type_of_existing_impasse(), update_node_with_matches_from_above(), var_bound_in_reconstructed_conds(), and variablize_nots_and_insert_into_conditions().
void add_pwatch | ( | agent * | thisAgent, |
struct production_struct * | prod | ||
) |
Definition at line 247 of file init_soar.cpp.
References agent_struct::productions_being_traced, push(), production_struct::trace_firings, and TRUE.
void do_one_top_level_phase | ( | agent * | thisAgent | ) |
KJC June 05: moved output function timers into do_output_cycle
Definition at line 527 of file init_soar.cpp.
References AFTER_APPLY_PHASE_CALLBACK, AFTER_DECISION_CYCLE_CALLBACK, AFTER_DECISION_PHASE_CALLBACK, AFTER_ELABORATION_CALLBACK, AFTER_HALT_SOAR_CALLBACK, AFTER_INPUT_PHASE_CALLBACK, AFTER_OUTPUT_PHASE_CALLBACK, AFTER_PREFERENCE_PHASE_CALLBACK, AFTER_PROPOSE_PHASE_CALLBACK, AFTER_WM_PHASE_CALLBACK, rl_param_container::apoptosis, rl_param_container::apoptosis_none, APPLY_PHASE, agent_struct::applyPhase, BEFORE_APPLY_PHASE_CALLBACK, BEFORE_DECISION_CYCLE_CALLBACK, BEFORE_DECISION_PHASE_CALLBACK, BEFORE_ELABORATION_CALLBACK, BEFORE_INPUT_PHASE_CALLBACK, BEFORE_OUTPUT_PHASE_CALLBACK, BEFORE_PREFERENCE_PHASE_CALLBACK, BEFORE_PROPOSE_PHASE_CALLBACK, BEFORE_WM_PHASE_CALLBACK, agent_struct::bottom_goal, agent_struct::chunks_this_d_cycle, agent_struct::cumulative_wm_size, agent_struct::current_phase, agent_struct::d_cycle_count, agent_struct::dc_stat_tracking, DECISION_CYCLE_MAX_USEC_INTERRUPT, DECISION_PHASE, agent_struct::decision_phases_count, determine_highest_active_production_level_in_stack_apply(), determine_highest_active_production_level_in_stack_propose(), do_decision_phase(), do_input_cycle(), do_output_cycle(), do_preference_phase(), do_working_memory_phase(), agent_struct::e_cycle_count, agent_struct::e_cycles_this_d_cycle, epmem_enabled(), epmem_go(), agent_struct::epmem_params, agent_struct::epmem_timers, excise_production(), FALSE, agent_struct::FIRING_TYPE, soar_module::object_memory< T, N >::forget(), soar_module::object_memory< T, N >::forgotten_begin(), soar_module::object_memory< T, N >::forgotten_end(), get_derived_kernel_time_usec(), soar_module::constant_param< T >::get_value(), GO_ELABORATION, agent_struct::go_type, identifier_struct::higher_goal, symbol_union::id, IE_PRODS, initialize_consistency_calculations_for_new_decision(), agent_struct::input_cycle_flag, agent_struct::input_period, INPUT_PHASE, agent_struct::last_derived_kernel_time_usec, agent_struct::max_dc_epmem_time_cycle, agent_struct::max_dc_epmem_time_sec, agent_struct::max_dc_production_firing_count_cycle, agent_struct::max_dc_production_firing_count_value, agent_struct::max_dc_smem_time_cycle, agent_struct::max_dc_smem_time_sec, agent_struct::max_dc_time_cycle, agent_struct::max_dc_time_usec, agent_struct::max_dc_wm_changes_cycle, agent_struct::max_dc_wm_changes_value, MAX_NIL_OUTPUT_CYCLES_SYSPARAM, agent_struct::max_wm_size, agent_struct::ms_o_assertions, NIL, agent_struct::num_wm_sizes_accumulated, agent_struct::num_wmes_in_rete, identifier_struct::operator_slot, agent_struct::output_link_changed, OUTPUT_PHASE, agent_struct::pe_cycle_count, agent_struct::pe_cycles_this_d_cycle, PE_PRODS, epmem_param_container::phase, epmem_param_container::phase_output, epmem_param_container::phase_selection, PREFERENCE_PHASE, print(), print_lowest_slot_in_context_stack(), print_phase(), print_string(), soar_module::object_memory< T, N >::process_buffered_references(), agent_struct::production_firing_count, PROPOSE_PHASE, agent_struct::reason_for_stopping, rl_enabled(), agent_struct::rl_params, rl_perform_update(), agent_struct::rl_prods, rl_tabulate_reward_value_for_goal(), agent_struct::run_elaboration_count, agent_struct::run_generated_output_count, agent_struct::run_last_output_count, agent_struct::run_phase_count, smem_attach(), smem_enabled(), smem_go(), agent_struct::smem_timers, soar_invoke_callbacks(), agent_struct::start_dc_production_firing_count, agent_struct::start_dc_wme_addition_count, agent_struct::start_dc_wme_removal_count, stats_db_store(), agent_struct::stop_soar, agent_struct::sysparams, agent_struct::system_halted, soar_module::object_memory< T, N >::time_forward(), agent_struct::timers_decision_cycle_phase, agent_struct::timers_phase, smem_timer_container::total, epmem_timer_container::total, agent_struct::total_dc_epmem_time_sec, agent_struct::total_dc_smem_time_sec, TRACE_CONTEXT_DECISIONS_SYSPARAM, TRACE_PHASES_SYSPARAM, TRUE, soar_module::timer::value(), WM_PHASE, agent_struct::wma_d_cycle_count, wma_enabled(), wma_forgetting, wma_go(), wma_histories, agent_struct::wme_addition_count, agent_struct::wme_removal_count, slot_struct::wmes, xml_generate_error(), and xml_invoke_callback().
Referenced by run_for_n_decision_cycles(), run_for_n_elaboration_cycles(), run_for_n_modifications_of_output(), run_for_n_phases(), run_for_n_selections_of_slot(), run_for_n_selections_of_slot_at_level(), and run_forever().
void init_agent_memory | ( | agent * | thisAgent | ) |
Definition at line 1481 of file init_soar.cpp.
References add_input_wme(), create_top_goal(), agent_struct::current_phase, agent_struct::d_cycle_count, do_input_cycle(), do_output_cycle(), agent_struct::epmem_timers, get_new_io_identifier(), agent_struct::input_link_symbol, INPUT_PHASE, agent_struct::io_header, agent_struct::io_header_input, agent_struct::io_header_link, agent_struct::io_header_output, agent_struct::io_symbol, agent_struct::output_link_symbol, agent_struct::prev_top_state, print_lowest_slot_in_context_stack(), print_string(), soar_module::timer_container::reset(), reset_max_stats(), reset_timers(), agent_struct::smem_timers, agent_struct::sysparams, agent_struct::top_goal, agent_struct::top_state, TRACE_CONTEXT_DECISIONS_SYSPARAM, agent_struct::wma_d_cycle_count, and agent_struct::wma_timers.
Referenced by init_soar_agent(), and load_rete_net().
bool reinitialize_soar | ( | agent * | thisAgent | ) |
Definition at line 382 of file init_soar.cpp.
References wma_param_container::activation, agent_struct::active_level, AFTER_INIT_SOAR_CALLBACK, rl_param_container::apoptosis, rl_param_container::apoptosis_none, BEFORE_INIT_SOAR_CALLBACK, clear_goal_stack(), agent_struct::current_phase, agent_struct::did_PE, do_preference_phase(), agent_struct::dyn_counters, agent_struct::epmem_stats, FALSE, agent_struct::FIRING_TYPE, soar_module::constant_param< T >::get_value(), GO_DECISION, agent_struct::go_number, agent_struct::go_type, IE_PRODS, agent_struct::input_cycle_flag, INPUT_PHASE, NONE_WME_TRACE, soar_module::off, soar_module::ok, soar_module::on, agent_struct::reason_for_stopping, soar_module::stat_container::reset(), reset_explain(), reset_id_counters(), reset_statistics(), reset_wme_timetags(), agent_struct::rl_params, agent_struct::rl_stats, set_sysparam(), wma_activation_param::set_value(), rl_apoptosis_param::set_value(), agent_struct::smem_stats, soar_invoke_callbacks(), stats_close(), agent_struct::stats_db, agent_struct::stop_soar, agent_struct::substate_break_level, agent_struct::sysparams, agent_struct::system_halted, TRACE_CONTEXT_DECISIONS_SYSPARAM, TRACE_FIRINGS_OF_DEFAULT_PRODS_SYSPARAM, TRACE_FIRINGS_OF_USER_PRODS_SYSPARAM, TRACE_FIRINGS_PREFERENCES_SYSPARAM, TRACE_FIRINGS_WME_TRACE_TYPE_SYSPARAM, TRACE_GDS_SYSPARAM, TRACE_PHASES_SYSPARAM, TRACE_WM_CHANGES_SYSPARAM, TRUE, wma_enabled(), agent_struct::wma_params, agent_struct::wma_stats, and xml_reset().
Referenced by load_rete_net().
void remove_pwatch | ( | agent * | thisAgent, |
struct production_struct * | prod | ||
) |
Definition at line 260 of file init_soar.cpp.
References extract_list_elements(), FALSE, free_list(), agent_struct::productions_being_traced, remove_pwatch_test_fn(), and production_struct::trace_firings.
Referenced by excise_production().
void reset_max_stats | ( | agent * | thisAgent | ) |
Definition at line 363 of file init_soar.cpp.
References agent_struct::max_dc_epmem_time_cycle, agent_struct::max_dc_epmem_time_sec, agent_struct::max_dc_production_firing_count_cycle, agent_struct::max_dc_production_firing_count_value, agent_struct::max_dc_smem_time_cycle, agent_struct::max_dc_smem_time_sec, agent_struct::max_dc_time_cycle, agent_struct::max_dc_time_usec, agent_struct::max_dc_wm_changes_cycle, agent_struct::max_dc_wm_changes_value, agent_struct::total_dc_epmem_time_sec, and agent_struct::total_dc_smem_time_sec.
Referenced by create_soar_agent(), init_agent_memory(), and reset_statistics().
void reset_statistics | ( | agent * | thisAgent | ) |
Definition at line 290 of file init_soar.cpp.
References agent_struct::chunks_this_d_cycle, agent_struct::cumulative_wm_size, agent_struct::d_cycle_count, agent_struct::d_cycle_last_output, agent_struct::decision_phases_count, agent_struct::e_cycle_count, agent_struct::e_cycles_this_d_cycle, agent_struct::epmem_timers, agent_struct::inner_e_cycle_count, agent_struct::max_wm_size, agent_struct::num_wm_sizes_accumulated, agent_struct::pe_cycle_count, agent_struct::pe_cycles_this_d_cycle, agent_struct::production_firing_count, soar_module::timer_container::reset(), reset_max_stats(), reset_production_firing_counts(), reset_timers(), agent_struct::run_elaboration_count, agent_struct::run_generated_output_count, agent_struct::run_last_output_count, agent_struct::run_phase_count, agent_struct::smem_timers, agent_struct::start_dc_production_firing_count, agent_struct::start_dc_wme_addition_count, agent_struct::start_dc_wme_removal_count, agent_struct::wma_d_cycle_count, agent_struct::wma_timers, agent_struct::wme_addition_count, and agent_struct::wme_removal_count.
Referenced by init_soar_agent(), and reinitialize_soar().
void reset_timers | ( | agent * | thisAgent | ) |
Definition at line 333 of file init_soar.cpp.
References agent_struct::last_derived_kernel_time_usec, NUM_PHASE_TYPES, agent_struct::sysparams, agent_struct::timers_cpu, agent_struct::timers_decision_cycle_phase, TIMERS_ENABLED, agent_struct::timers_input_function_cpu_time, agent_struct::timers_kernel, agent_struct::timers_monitors_cpu_time, agent_struct::timers_output_function_cpu_time, agent_struct::timers_phase, agent_struct::timers_total_cpu_time, and agent_struct::timers_total_kernel_time.
Referenced by create_soar_agent(), init_agent_memory(), and reset_statistics().
void run_for_n_decision_cycles | ( | agent * | thisAgent, |
int64_t | n | ||
) |
Definition at line 1354 of file init_soar.cpp.
References agent_struct::d_cycle_count, do_one_top_level_phase(), FALSE, agent_struct::reason_for_stopping, run_forever(), agent_struct::stop_soar, agent_struct::timers_cpu, agent_struct::timers_kernel, agent_struct::timers_total_cpu_time, and agent_struct::timers_total_kernel_time.
void run_for_n_elaboration_cycles | ( | agent * | thisAgent, |
int64_t | n | ||
) |
Definition at line 1285 of file init_soar.cpp.
References agent_struct::d_cycle_count, do_one_top_level_phase(), agent_struct::e_cycle_count, FALSE, GO_ELABORATION, GO_PHASE, agent_struct::go_type, agent_struct::reason_for_stopping, run_forever(), agent_struct::stop_soar, agent_struct::timers_cpu, agent_struct::timers_kernel, agent_struct::timers_total_cpu_time, and agent_struct::timers_total_kernel_time.
void run_for_n_modifications_of_output | ( | agent * | thisAgent, |
int64_t | n | ||
) |
Definition at line 1319 of file init_soar.cpp.
References agent_struct::current_phase, do_one_top_level_phase(), FALSE, MAX_NIL_OUTPUT_CYCLES_SYSPARAM, agent_struct::output_link_changed, OUTPUT_PHASE, agent_struct::reason_for_stopping, run_forever(), agent_struct::stop_soar, agent_struct::sysparams, agent_struct::timers_cpu, agent_struct::timers_kernel, agent_struct::timers_total_cpu_time, and agent_struct::timers_total_kernel_time.
void run_for_n_phases | ( | agent * | thisAgent, |
int64_t | n | ||
) |
Definition at line 1264 of file init_soar.cpp.
References do_one_top_level_phase(), FALSE, agent_struct::reason_for_stopping, run_forever(), agent_struct::stop_soar, agent_struct::timers_cpu, agent_struct::timers_kernel, agent_struct::timers_total_cpu_time, and agent_struct::timers_total_kernel_time.
Definition at line 1387 of file init_soar.cpp.
References attr_of_slot_just_decided(), agent_struct::current_phase, DECISION_PHASE, do_one_top_level_phase(), FALSE, agent_struct::reason_for_stopping, run_forever(), agent_struct::stop_soar, agent_struct::timers_cpu, agent_struct::timers_kernel, agent_struct::timers_total_cpu_time, and agent_struct::timers_total_kernel_time.
void run_for_n_selections_of_slot_at_level | ( | agent * | thisAgent, |
int64_t | n, | ||
Symbol * | attr_of_slot, | ||
goal_stack_level | level | ||
) |
Definition at line 1414 of file init_soar.cpp.
References attr_of_slot_just_decided(), agent_struct::bottom_goal, agent_struct::current_phase, DECISION_PHASE, do_one_top_level_phase(), FALSE, symbol_union::id, identifier_struct::level, agent_struct::reason_for_stopping, run_forever(), agent_struct::stop_soar, agent_struct::timers_cpu, agent_struct::timers_kernel, agent_struct::timers_total_cpu_time, and agent_struct::timers_total_kernel_time.
void run_forever | ( | agent * | thisAgent | ) |
Definition at line 1244 of file init_soar.cpp.
References do_one_top_level_phase(), FALSE, agent_struct::reason_for_stopping, agent_struct::stop_soar, agent_struct::timers_cpu, agent_struct::timers_kernel, agent_struct::timers_total_cpu_time, and agent_struct::timers_total_kernel_time.
Referenced by run_for_n_decision_cycles(), run_for_n_elaboration_cycles(), run_for_n_modifications_of_output(), run_for_n_phases(), run_for_n_selections_of_slot(), and run_for_n_selections_of_slot_at_level().
Definition at line 174 of file init_soar.cpp.
References HIGHEST_SYSPARAM_NUMBER, print(), soar_invoke_callbacks(), agent_struct::sysparams, and SYSTEM_PARAMETER_CHANGED_CALLBACK.
void setup_signal_handling | ( | void | ) |