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

soar_core_utils.c File Reference

Go to the source code of this file.

Functions

int next_available_agent_id ()
void init_soar_agent ()
int read_id_or_context_var_from_string (const char *the_lexeme, Symbol **result_id)
Symbolread_identifier_or_context_variable (void)
productionname_to_production (const char *string_to_test)
void do_print_for_identifier (Symbol *id, int depth, bool internal)
void get_lexeme_from_string (const char *the_lexeme)
void get_context_var_info (Symbol **dest_goal, Symbol **dest_attr_of_slot, Symbol **dest_current_value)
void get_context_var_info_from_string (char *str, Symbol **dest_goal, Symbol **dest_attr_of_slot, Symbol **dest_current_value)
wme ** get_augs_of_id (Symbol *id, tc_number tc, int *num_attr)
void print_augs_of_id (Symbol *id, int depth, bool internal, int indent, tc_number tc)
int compare_attr (const void *e1, const void *e2)
void neatly_print_wme_augmentation_of_id (wme *w, int indentation)
bool string_match (const char *string1, const char *string2)
bool string_match_up_to (const char *string1, const char *string2, int positions)
void soar_default_create_agent_procedure (const char *agent_name)
void soar_default_destroy_agent_procedure (psoar_agent delete_agent)

Variables

int soar_agent_ids []
int agent_counter


Function Documentation

int compare_attr const void *  e1,
const void *  e2
 

Definition at line 402 of file soar_core_utils.c.

References symbol_to_string(), and wme.

Referenced by get_augs_of_id().

void do_print_for_identifier Symbol id,
int  depth,
bool  internal
 

Definition at line 145 of file soar_core_utils.c.

References get_new_tc_number(), print_augs_of_id(), Symbol, and tc_number.

Referenced by generate_chunk_name_sym_constant(), and soar_Print().

wme** get_augs_of_id Symbol id,
tc_number  tc,
int *  num_attr
 

Definition at line 277 of file soar_core_utils.c.

References slot_struct::acceptable_preference_wmes, allocate_memory(), compare_attr(), symbol_union::id, identifier_struct::impasse_wmes, identifier_struct::input_wmes, list, slot_struct::next, wme_struct::next, slot, identifier_struct::slots, Symbol, identifier_struct::tc_num, tc_number, wme, and slot_struct::wmes.

Referenced by print_augs_of_id().

void get_context_var_info Symbol **  dest_goal,
Symbol **  dest_attr_of_slot,
Symbol **  dest_current_value
 

Definition at line 209 of file soar_core_utils.c.

References get_context_var_info_from_string(), and Symbol.

Referenced by parse_go_command(), parse_run_command(), read_id_or_context_var_from_string(), and read_identifier_or_context_variable().

void get_context_var_info_from_string char *  str,
Symbol **  dest_goal,
Symbol **  dest_attr_of_slot,
Symbol **  dest_current_value
 

Definition at line 215 of file soar_core_utils.c.

References find_variable(), identifier_struct::higher_goal, symbol_union::id, wme_struct::id, Symbol, wme_struct::value, and wme.

Referenced by get_context_var_info().

void get_lexeme_from_string const char *  the_lexeme  ) 
 

Definition at line 177 of file soar_core_utils.c.

References determine_type_of_constituent_string(), and SYM_CONSTANT_LEXEME.

Referenced by parse_go_command(), parse_run_command(), read_attribute_from_string(), read_id_or_context_var_from_string(), read_wme_filter_component(), soar_cAddWme(), soar_cMultiAttributes(), soar_ExplainBacktraces(), soar_FormatWatch(), and soar_Print().

void init_soar_agent  ) 
 

Definition at line 137 of file agent.c.

References add_bot_rhs_functions(), add_trace_format(), create_predefined_symbols(), init_attention_lapse(), init_built_in_rhs_functions(), init_chunker(), init_decider(), init_explain(), init_firer(), init_lexer(), init_memory_utilities(), init_production_utilities(), init_real_time(), init_rete(), init_soar_io(), init_symbol_tables(), init_sysparams(), init_tracing(), make_sym_constant(), reset_statistics(), and Symbol.

Referenced by soar_default_create_agent_procedure().

production* name_to_production const char *  string_to_test  ) 
 

Definition at line 133 of file soar_core_utils.c.

References find_sym_constant(), production, sym_constant_struct::production, symbol_union::sc, and Symbol.

Referenced by soar_cExciseProductionByName(), soar_ecBeginTracingProductions(), soar_ecPrintFiringsForProduction(), soar_ecPrintMatchInfoForProduction(), soar_ecStopTracingProductions(), and soar_Memories().

void neatly_print_wme_augmentation_of_id wme w,
int  indentation
 

Definition at line 419 of file soar_core_utils.c.

References wme_struct::acceptable, wme_struct::attr, get_printer_output_column(), print(), print_spaces(), print_string(), symbol_to_string(), wme_struct::value, and wme.

Referenced by print_augs_of_id().

int next_available_agent_id  ) 
 

Definition at line 69 of file agent.c.

References abort_with_fatal_error(), ALLOCATED, soar_agent_ids, TOUCHED, and UNTOUCHED.

Referenced by soar_default_create_agent_procedure().

void print_augs_of_id Symbol id,
int  depth,
bool  internal,
int  indent,
tc_number  tc
 

Definition at line 330 of file soar_core_utils.c.

References slot_struct::acceptable_preference_wmes, wme_struct::attr, free_memory(), get_augs_of_id(), symbol_union::id, identifier_struct::impasse_wmes, identifier_struct::input_wmes, list, neatly_print_wme_augmentation_of_id(), wme_struct::next, slot_struct::next, print(), print_spaces(), print_with_symbols(), print_wme(), slot, identifier_struct::slots, Symbol, tc_number, wme_struct::value, wme, and slot_struct::wmes.

Referenced by do_print_for_identifier(), and do_print_for_wme().

int read_id_or_context_var_from_string const char *  the_lexeme,
Symbol **  result_id
 

Definition at line 37 of file soar_core_utils.c.

References find_identifier(), get_context_var_info(), get_lexeme_from_string(), IDENTIFIER_LEXEME, SOAR_ERROR, SOAR_OK, Symbol, and VARIABLE_LEXEME.

Referenced by soar_cAddWme(), soar_ecPrintPreferences(), and soar_Preferences().

Symbol* read_identifier_or_context_variable void   ) 
 

Definition at line 77 of file soar_core_utils.c.

References find_identifier(), get_context_var_info(), IDENTIFIER_LEXEME, print(), print_location_of_most_recent_lexeme(), print_with_symbols(), Symbol, and VARIABLE_LEXEME.

Referenced by read_attribute_from_string(), read_pattern_component(), soar_cAddWme(), and soar_Print().

void soar_default_create_agent_procedure const char *  agent_name  ) 
 

Definition at line 519 of file soar_core_utils.c.

References agent, agent_count, agent_counter, all_soar_agents, GLB_AGENT_CREATED, GO_DECISION, init_soar_agent(), INPUT_PHASE, next_available_agent_id(), NUMERIC_INDIFFERENT_MODE_AVG, print(), soar_agent, soar_call_data, soar_callback_agent, soar_init_callbacks(), and soar_invoke_global_callbacks().

Referenced by soar_cCreateAgent().

void soar_default_destroy_agent_procedure psoar_agent  delete_agent  ) 
 

Definition at line 720 of file soar_core_utils.c.

References abort_with_fatal_error(), agent, agent_count, all_soar_agents, cons, cons_struct::first, psoar_agent, remove_bot_rhs_functions(), remove_built_in_rhs_functions(), cons_struct::rest, soar_agent, soar_agent_ids, and TOUCHED.

Referenced by soar_cDestroyAgentByAddress().

bool string_match const char *  string1,
const char *  string2
 

Definition at line 467 of file soar_core_utils.c.

Referenced by soar_AddWme(), soar_cAddWme(), soar_cDestroyAgentByName(), soar_cDestroyAllAgentsWithName(), soar_ExplainBacktraces(), soar_FormatWatch(), soar_Interrupt(), soar_Learn(), soar_Matches(), soar_Operand2(), soar_Pool(), soar_ReteNet(), soar_Verbose(), soar_WaitSNC(), and soar_Watch().

bool string_match_up_to const char *  string1,
const char *  string2,
int  positions
 

Definition at line 498 of file soar_core_utils.c.

Referenced by soar_CaptureInput(), soar_ChunkNameFormat(), soar_Excise(), soar_IndifferentSelection(), soar_Learn(), soar_Log(), soar_Matches(), soar_Memories(), soar_NumericIndifferentMode(), soar_Pool(), soar_Print(), soar_ProductionFind(), soar_PWatch(), soar_ReplayInput(), soar_Stats(), soar_Stop(), soar_Verbose(), soar_WaitSNC(), soar_Warnings(), and soar_Watch().


Variable Documentation

int agent_counter
 

Definition at line 7 of file soar_core_utils.c.

Referenced by soar_default_create_agent_procedure().

int soar_agent_ids[]
 

Definition at line 6 of file soar_core_utils.c.


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