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

soarapiUtils.c File Reference

Go to the source code of this file.

Data Structures

struct  binding_structure

Typedefs

typedef binding_structure Binding

Functions

int getInt (const char *string, int *i)
bool cfps_removal_test_function (cons *c)
void do_print_for_production_name (const char *prod_name, bool internal, bool print_filename, bool full_prod)
void do_print_for_wme (wme *w, int depth, bool internal)
void execute_go_selection (agent *the_agent, long go_number, enum go_type_enum go_type, Symbol *go_slot_attr, goal_stack_level go_slot_level)
void print_current_learn_settings (void)
void print_multi_attribute_symbols (void)
int read_pref_detail_from_string (const char *the_lexeme, bool *print_productions, wme_trace_type *wtt)
int read_pattern_component (Symbol **dest_sym)
listread_pattern_and_get_matching_wmes (void)
void cb_appendToSoarResultResult (agent *the_agent, soar_callback_data data, soar_call_data call_data)
bool soar_agent_already_defined (char *name)
Symbolget_binding (Symbol *f, list *bindings)
void reset_old_binding_point (list **bindings, list **current_binding_point)
void free_binding_list (list *bindings)
void print_binding_list (list *bindings)
bool symbols_are_equal_with_bindings (Symbol *s1, Symbol *s2, list **bindings)
bool tests_are_equal_with_bindings (test t1, test test2, list **bindings)
bool conditions_are_equal_with_bindings (condition *c1, condition *c2, list **bindings)
void read_pattern_and_get_matching_productions (list **current_pf_list, bool show_bindings, bool just_chunks, bool no_chunks)
bool funcalls_match (list *fc1, list *fc2)
bool actions_are_equal_with_bindings (action *a1, action *a2, list **bindings)
void read_rhs_pattern_and_get_matching_productions (list **current_pf_list, bool show_bindings, bool just_chunks, bool no_chunks)
Symbolmake_symbol_for_current_lexeme (void)
void print_current_watch_settings (void)
int set_watch_setting (int dest_sysparam_number, const char *param, const char *arg, soarResult *res)
int set_watch_prod_group_setting (int prodgroup, const char *prodtype, const char *arg, soarResult *res)
int parse_run_command (int argc, const char *argv[], long *go_number, enum go_type_enum *go_type, Symbol **go_slot_attr, goal_stack_level *go_slot_level, bool *self_only, soarResult *res)
int parse_go_command (int argc, char *argv[], long *go_number, enum go_type_enum *go_type, Symbol **go_slot_attr, goal_stack_level *go_slot_level, soarResult *res)
int parse_memory_stats (int argc, const char *argv[], soarResult *res)
int parse_rete_stats (int argc, const char *argv[], soarResult *res)
int parse_system_stats (int argc, const char *argv[], soarResult *res)
int printTimingInfo ()

Variables

char * preference_name []
Symbolspace_to_remove_from_cfps


Typedef Documentation

typedef struct binding_structure Binding
 

Referenced by get_binding(), print_binding_list(), and symbols_are_equal_with_bindings().


Function Documentation

bool actions_are_equal_with_bindings action a1,
action a2,
list **  bindings
 

Definition at line 754 of file soarapiUtils.c.

References action, action_struct::attr, funcalls_match(), action_struct::id, list, action_struct::preference_type, symbols_are_equal_with_bindings(), action_struct::type, and action_struct::value.

Referenced by read_rhs_pattern_and_get_matching_productions().

void cb_appendToSoarResultResult agent the_agent,
soar_callback_data  data,
soar_call_data  call_data
 

Definition at line 415 of file soarapiUtils.c.

References agent, appendSoarResultResult(), soar_call_data, soar_callback_data, and soarResult.

bool cfps_removal_test_function cons c  ) 
 

Definition at line 97 of file soarapiUtils.c.

References cons, cons_struct::first, and space_to_remove_from_cfps.

bool conditions_are_equal_with_bindings condition c1,
condition c2,
list **  bindings
 

Definition at line 628 of file soarapiUtils.c.

References three_field_tests_struct::attr_test, condition, condition_struct::data, three_field_tests_struct::id_test, list, condition_struct::condition_main_data_union::ncc, condition_struct::next, condition_struct::test_for_acceptable_preference, condition_struct::condition_main_data_union::tests, tests_are_equal_with_bindings(), ncc_info_struct::top, condition_struct::type, and three_field_tests_struct::value_test.

Referenced by read_pattern_and_get_matching_productions().

void do_print_for_production_name const char *  prod_name,
bool  internal,
bool  print_filename,
bool  full_prod
 

Definition at line 102 of file soarapiUtils.c.

References production_struct::filename, find_sym_constant(), print(), print_location_of_most_recent_lexeme(), print_production(), print_string(), sym_constant_struct::production, symbol_union::sc, and Symbol.

Referenced by soar_Print().

void do_print_for_wme wme w,
int  depth,
bool  internal
 

Definition at line 125 of file soarapiUtils.c.

References get_new_tc_number(), wme_struct::id, print_augs_of_id(), print_wme(), tc_number, and wme.

Referenced by soar_Print().

void execute_go_selection agent the_agent,
long  go_number,
enum go_type_enum  go_type,
Symbol go_slot_attr,
goal_stack_level  go_slot_level
 

Definition at line 138 of file soarapiUtils.c.

References agent, GO_DECISION, GO_ELABORATION, GO_OPERATOR, GO_OUTPUT, GO_PHASE, GO_SLOT, GO_STATE, goal_stack_level, agent_struct::operator_symbol, 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(), agent_struct::state_symbol, and Symbol.

void free_binding_list list bindings  ) 
 

Definition at line 487 of file soarapiUtils.c.

References cons, cons_struct::first, free_list(), free_memory(), list, and cons_struct::rest.

Referenced by read_pattern_and_get_matching_productions(), and read_rhs_pattern_and_get_matching_productions().

bool funcalls_match list fc1,
list fc2
 

Definition at line 742 of file soarapiUtils.c.

References list.

Referenced by actions_are_equal_with_bindings().

Symbol* get_binding Symbol f,
list bindings
 

Definition at line 461 of file soarapiUtils.c.

References Binding, cons, cons_struct::first, list, cons_struct::rest, and Symbol.

Referenced by symbols_are_equal_with_bindings().

int getInt const char *  string,
int *  i
 

Definition at line 76 of file soarapiUtils.c.

References SOAR_ERROR, and SOAR_OK.

Referenced by soar_AttributePreferencesMode(), soar_DefaultWmeDepth(), soar_ExplainBacktraces(), soar_FiringCounts(), soar_InputPeriod(), soar_MaxChunks(), soar_MaxElaborations(), soar_Memories(), soar_MultiAttributes(), soar_Print(), and soar_RemoveWme().

Symbol* make_symbol_for_current_lexeme void   ) 
 

Definition at line 269 of file parser.c.

References abort_with_fatal_error(), FLOAT_CONSTANT_LEXEME, IDENTIFIER_LEXEME, INT_CONSTANT_LEXEME, make_float_constant(), make_int_constant(), make_sym_constant(), make_variable(), SYM_CONSTANT_LEXEME, Symbol, and VARIABLE_LEXEME.

Referenced by parse_disjunction_test(), parse_relational_test(), parse_rhs_value(), and read_wme_filter_component().

int parse_go_command int  argc,
char *  argv[],
long go_number,
enum go_type_enum go_type,
Symbol **  go_slot_attr,
goal_stack_level go_slot_level,
soarResult res
 

Definition at line 1214 of file soarapiUtils.c.

References get_context_var_info(), get_lexeme_from_string(), GO_DECISION, GO_ELABORATION, GO_OPERATOR, GO_PHASE, GO_SLOT, GO_STATE, goal_stack_level, symbol_union::id, INT_CONSTANT_LEXEME, identifier_struct::level, setSoarResultResult(), SOAR_ERROR, SOAR_OK, soarResult, SYM_CONSTANT_LEXEME, Symbol, and VARIABLE_LEXEME.

int parse_memory_stats int  argc,
const char *  argv[],
soarResult res
 

Definition at line 1301 of file soarapiUtils.c.

References memory_pool_struct::item_size, memory_pool_struct::items_per_block, memory_pool, memory_pool_struct::name, memory_pool_struct::next, memory_pool_struct::num_blocks, print(), print_spaces(), print_string(), setSoarResultResult(), soar_ecPrintMemoryPoolStatistics(), soar_ecPrintMemoryStatistics(), SOAR_ERROR, SOAR_OK, soarResult, and memory_pool_struct::used_count.

Referenced by soar_Stats().

int parse_rete_stats int  argc,
const char *  argv[],
soarResult res
 

Definition at line 1452 of file soarapiUtils.c.

References get_node_count_statistic(), print(), setSoarResultResult(), soar_ecPrintReteStatistics(), SOAR_ERROR, SOAR_OK, and soarResult.

Referenced by soar_Stats().

int parse_run_command int  argc,
const char *  argv[],
long go_number,
enum go_type_enum go_type,
Symbol **  go_slot_attr,
goal_stack_level go_slot_level,
bool self_only,
soarResult res
 

Definition at line 1115 of file soarapiUtils.c.

References get_context_var_info(), get_lexeme_from_string(), GO_DECISION, GO_ELABORATION, GO_OPERATOR, GO_OUTPUT, GO_PHASE, GO_SLOT, GO_STATE, goal_stack_level, symbol_union::id, INT_CONSTANT_LEXEME, identifier_struct::level, setSoarResultResult(), SOAR_ERROR, SOAR_OK, soarResult, SYM_CONSTANT_LEXEME, Symbol, and VARIABLE_LEXEME.

Referenced by soar_Run().

int parse_system_stats int  argc,
const char *  argv[],
soarResult res
 

Definition at line 1530 of file soarapiUtils.c.

References DECISION_PHASE, DETERMINE_LEVEL_PHASE, INPUT_PHASE, OUTPUT_PHASE, PREFERENCE_PHASE, print(), setSoarResultResult(), soar_ecPrintSystemStatistics(), SOAR_ERROR, SOAR_OK, soarResult, timer_value(), and WM_PHASE.

Referenced by soar_Stats().

void print_binding_list list bindings  ) 
 

Definition at line 496 of file soarapiUtils.c.

References Binding, cons, cons_struct::first, list, print_with_symbols(), and cons_struct::rest.

Referenced by read_pattern_and_get_matching_productions(), and read_rhs_pattern_and_get_matching_productions().

void print_current_learn_settings void   ) 
 

Definition at line 204 of file soarapiUtils.c.

References print().

Referenced by soar_Learn().

void print_current_watch_settings void   ) 
 

Definition at line 918 of file soarapiUtils.c.

References print().

Referenced by soar_Watch().

void print_multi_attribute_symbols void   ) 
 

Definition at line 234 of file soarapiUtils.c.

References multi_attribute, multi_attributes_struct::next, print(), multi_attributes_struct::symbol, symbol_to_string(), and multi_attributes_struct::value.

Referenced by soar_MultiAttributes().

int printTimingInfo  ) 
 

Definition at line 1714 of file soarapiUtils.c.

References print(), reset_timer(), soar_cDetermineTimerResolution(), start_timer(), stop_timer(), and timer_value().

Referenced by soar_Stats().

void read_pattern_and_get_matching_productions list **  current_pf_list,
bool  show_bindings,
bool  just_chunks,
bool  no_chunks
 

Definition at line 658 of file soarapiUtils.c.

References condition, conditions_are_equal_with_bindings(), deallocate_condition_list(), free_binding_list(), list, production_struct::name, production_struct::next, condition_struct::next, production_struct::p_node, p_node_to_conditions_and_nots(), parse_lhs(), print(), print_binding_list(), print_with_symbols(), production, and reset_old_binding_point().

Referenced by soar_ProductionFind().

list* read_pattern_and_get_matching_wmes void   ) 
 

Definition at line 342 of file soarapiUtils.c.

References wme_struct::acceptable, wme_struct::attr, current_lexer_parentheses_level(), get_lexeme(), wme_struct::id, L_PAREN_LEXEME, list, PLUS_LEXEME, print(), print_location_of_most_recent_lexeme(), R_PAREN_LEXEME, read_pattern_component(), wme_struct::rete_next, skip_ahead_to_balanced_parentheses(), Symbol, UP_ARROW_LEXEME, wme_struct::value, and wme.

Referenced by soar_Print().

int read_pattern_component Symbol **  dest_sym  ) 
 

Definition at line 311 of file soarapiUtils.c.

References find_float_constant(), find_identifier(), find_int_constant(), find_sym_constant(), FLOAT_CONSTANT_LEXEME, IDENTIFIER_LEXEME, INT_CONSTANT_LEXEME, print(), print_location_of_most_recent_lexeme(), read_identifier_or_context_variable(), SYM_CONSTANT_LEXEME, Symbol, and VARIABLE_LEXEME.

Referenced by read_pattern_and_get_matching_wmes().

int read_pref_detail_from_string const char *  the_lexeme,
bool print_productions,
wme_trace_type wtt
 

Definition at line 271 of file soarapiUtils.c.

References SOAR_ERROR, SOAR_OK, and wme_trace_type.

Referenced by soar_Preferences().

void read_rhs_pattern_and_get_matching_productions list **  current_pf_list,
bool  show_bindings,
bool  just_chunks,
bool  no_chunks
 

Definition at line 804 of file soarapiUtils.c.

References action, actions_are_equal_with_bindings(), condition, deallocate_action_list(), deallocate_condition_list(), free_binding_list(), list, production_struct::name, production_struct::next, action_struct::next, production_struct::p_node, p_node_to_conditions_and_nots(), parse_rhs(), print(), print_binding_list(), print_with_symbols(), production, and reset_old_binding_point().

Referenced by soar_ProductionFind().

void reset_old_binding_point list **  bindings,
list **  current_binding_point
 

Definition at line 472 of file soarapiUtils.c.

References cons, cons_struct::first, free_memory(), list, and cons_struct::rest.

Referenced by read_pattern_and_get_matching_productions(), and read_rhs_pattern_and_get_matching_productions().

int set_watch_prod_group_setting int  prodgroup,
const char *  prodtype,
const char *  arg,
soarResult res
 

Definition at line 1017 of file soarapiUtils.c.

References set_sysparam(), setSoarResultResult(), SOAR_ERROR, SOAR_OK, and soarResult.

Referenced by soar_Watch().

int set_watch_setting int  dest_sysparam_number,
const char *  param,
const char *  arg,
soarResult res
 

Definition at line 980 of file soarapiUtils.c.

References set_sysparam(), setSoarResultResult(), soar_ecWatchLevel(), SOAR_ERROR, SOAR_OK, and soarResult.

Referenced by soar_Watch().

bool soar_agent_already_defined char *  name  ) 
 

Definition at line 442 of file soarapiUtils.c.

References agent, all_soar_agents, cons, cons_struct::first, agent_struct::name, and cons_struct::rest.

bool symbols_are_equal_with_bindings Symbol s1,
Symbol s2,
list **  bindings
 

Definition at line 504 of file soarapiUtils.c.

References allocate_memory(), Binding, binding_structure::from, get_binding(), list, sym_constant_struct::name, symbol_union::sc, Symbol, and binding_structure::to.

Referenced by actions_are_equal_with_bindings(), and tests_are_equal_with_bindings().

bool tests_are_equal_with_bindings test  t1,
test  test2,
list **  bindings
 

Definition at line 541 of file soarapiUtils.c.

References complex_test, complex_test_struct::test_info_union::conjunct_list, cons, copy_test(), copy_test_removing_goal_impasse_tests(), complex_test_struct::data, complex_test_struct::test_info_union::disjunction_list, cons_struct::first, list, complex_test_struct::test_info_union::referent, cons_struct::rest, symbols_are_equal_with_bindings(), test, test_includes_goal_or_impasse_id_test(), and complex_test_struct::type.

Referenced by conditions_are_equal_with_bindings().


Variable Documentation

char* preference_name[]
 

Initial value:

 {
    "acceptable",
    "require",
    "reject",
    "prohibit",
    "reconsider",
    "unary indifferent",
    "unary parallel",
    "best",
    "worst",
    "binary indifferent",
    "binary parallel",
    "better",
    "worse"
}

Definition at line 60 of file soarapiUtils.c.

Referenced by soar_ecPrintPreferences().

Symbol* space_to_remove_from_cfps
 

Definition at line 95 of file soarapiUtils.c.

Referenced by cfps_removal_test_function().


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