Soar Kernel
9.3.2 08-06-12
|
Go to the source code of this file.
Data Structures | |
class | stats_statement_container |
Macros | |
#define | stringify(name) # name |
Functions | |
void | get_context_var_info (agent *agnt, Symbol **dest_goal, Symbol **dest_attr_of_slot, Symbol **dest_current_value) |
uint64_t | get_derived_kernel_time_usec (agent *thisAgent) |
void | get_lexeme_from_string (agent *agnt, const char *the_lexeme) |
double | get_number_from_symbol (Symbol *sym) |
bool | is_whole_number (const std::string &str) |
bool | is_whole_number (const char *str) |
bool | read_id_or_context_var_from_string (agent *agnt, const char *the_lexeme, Symbol **result_id) |
Symbol * | read_identifier_or_context_variable (agent *agnt) |
void | stats_close (agent *my_agent) |
void | stats_db_store (agent *thisAgent, const uint64_t &dc_time, const uint64_t &dc_wm_changes, const uint64_t &dc_firing_counts) |
#define stringify | ( | name | ) | # name |
Definition at line 102 of file utilities.h.
void get_context_var_info | ( | agent * | agnt, |
Symbol ** | dest_goal, | ||
Symbol ** | dest_attr_of_slot, | ||
Symbol ** | dest_current_value | ||
) |
Definition at line 105 of file utilities.cpp.
References agent_struct::bottom_goal, find_variable(), identifier_struct::higher_goal, symbol_union::id, identifier_struct::level, agent_struct::lexeme, NIL, agent_struct::o_context_variable, identifier_struct::operator_slot, agent_struct::operator_symbol, agent_struct::s_context_variable, agent_struct::so_context_variable, agent_struct::ss_context_variable, agent_struct::sso_context_variable, agent_struct::sss_context_variable, agent_struct::state_symbol, lexeme_info::string, agent_struct::to_context_variable, agent_struct::top_goal, agent_struct::ts_context_variable, wme_struct::value, and slot_struct::wmes.
Referenced by read_id_or_context_var_from_string(), and read_identifier_or_context_variable().
uint64_t get_derived_kernel_time_usec | ( | agent * | thisAgent | ) |
Definition at line 448 of file utilities.cpp.
References APPLY_PHASE, DECISION_PHASE, INPUT_PHASE, OUTPUT_PHASE, PREFERENCE_PHASE, PROPOSE_PHASE, agent_struct::timers_decision_cycle_phase, and WM_PHASE.
Referenced by do_one_top_level_phase().
void get_lexeme_from_string | ( | agent * | agnt, |
const char * | the_lexeme | ||
) |
Definition at line 63 of file utilities.cpp.
References determine_type_of_constituent_string(), FALSE, lexeme_info::length, agent_struct::lexeme, lexeme_info::string, SYM_CONSTANT_LEXEME, TRUE, and lexeme_info::type.
Referenced by read_id_or_context_var_from_string().
double get_number_from_symbol | ( | Symbol * | sym | ) |
Definition at line 331 of file utilities.cpp.
References symbol_union::fc, FLOAT_CONSTANT_SYMBOL_TYPE, symbol_union::ic, INT_CONSTANT_SYMBOL_TYPE, int_constant_struct::value, and float_constant_struct::value.
Referenced by exploration_compute_value_of_candidate(), make_production(), reteload_node_and_children(), and rl_tabulate_reward_value_for_goal().
bool is_whole_number | ( | const std::string & | str | ) |
Definition at line 308 of file utilities.cpp.
References is_whole_number().
Referenced by is_whole_number(), and rl_get_template_id().
bool is_whole_number | ( | const char * | str | ) |
Definition at line 313 of file utilities.cpp.
bool read_id_or_context_var_from_string | ( | agent * | agnt, |
const char * | the_lexeme, | ||
Symbol ** | result_id | ||
) |
Definition at line 20 of file utilities.cpp.
References find_identifier(), get_context_var_info(), get_lexeme_from_string(), symbol_union::id, lexeme_info::id_letter, lexeme_info::id_number, IDENTIFIER_LEXEME, IDENTIFIER_SYMBOL_TYPE, agent_struct::lexeme, lexeme_info::type, and VARIABLE_LEXEME.
Definition at line 165 of file utilities.cpp.
References find_identifier(), get_context_var_info(), symbol_union::id, lexeme_info::id_letter, lexeme_info::id_number, IDENTIFIER_LEXEME, IDENTIFIER_SYMBOL_TYPE, agent_struct::lexeme, NIL, print(), print_location_of_most_recent_lexeme(), print_with_symbols(), lexeme_info::string, lexeme_info::type, and VARIABLE_LEXEME.
void stats_close | ( | agent * | my_agent | ) |
Definition at line 435 of file utilities.cpp.
References soar_module::connected, soar_module::sqlite_database::disconnect(), soar_module::status_object< T >::get_status(), agent_struct::stats_db, and agent_struct::stats_stmts.
Referenced by destroy_soar_agent(), and reinitialize_soar().
void stats_db_store | ( | agent * | thisAgent, |
const uint64_t & | dc_time, | ||
const uint64_t & | dc_wm_changes, | ||
const uint64_t & | dc_firing_counts | ||
) |
Definition at line 370 of file utilities.cpp.
References soar_module::sqlite_statement::bind_int(), agent_struct::d_cycle_count, soar_module::disconnected, soar_module::statement::execute(), soar_module::status_object< T >::get_status(), stats_statement_container::insert, soar_module::op_reinit, agent_struct::stats_db, stats_init_db(), and agent_struct::stats_stmts.
Referenced by do_one_top_level_phase().