Soar Kernel
9.3.2 08-06-12
|
#include <portability.h>
#include "semantic_memory.h"
#include "agent.h"
#include "prefmem.h"
#include "symtab.h"
#include "wmem.h"
#include "print.h"
#include "xml.h"
#include "lexer.h"
#include "instantiations.h"
#include "rhsfun.h"
#include "decide.h"
#include <list>
#include <map>
#include <queue>
#include <utility>
#include <ctype.h>
#include <fstream>
Go to the source code of this file.
Functions | |
void | _smem_close_vars (agent *my_agent) |
void | _smem_lti_from_rhs_value (rhs_value rv, std::set< Symbol * > *valid_ltis) |
void | _smem_lti_from_test (test t, std::set< Symbol * > *valid_ltis) |
std::set< smem_lti_id > | _smem_print_lti (agent *my_agent, smem_lti_id lti_id, char lti_letter, uint64_t lti_number, double lti_act, std::string *return_val) |
void | _smem_process_buffered_wme_list (agent *my_agent, Symbol *state, soar_module::wme_set &cue_wmes, soar_module::symbol_triple_list &my_list, bool meta) |
bool | _smem_process_cue_wme (agent *my_agent, wme *w, bool pos_cue, smem_prioritized_weighted_cue &weighted_pq) |
void | smem_attach (agent *my_agent) |
bool | smem_backup_db (agent *my_agent, const char *file_name, std::string *err) |
void | smem_buffer_add_wme (soar_module::symbol_triple_list &my_list, Symbol *id, Symbol *attr, Symbol *value) |
void | smem_clear_result (agent *my_agent, Symbol *state) |
void | smem_close (agent *my_agent) |
Bool | smem_count_ltis (agent *, void *item, void *userdata) |
void | smem_deallocate_chunk (agent *my_agent, smem_chunk *chunk, bool free_chunk=true) |
void | smem_disconnect_chunk (agent *my_agent, smem_lti_id parent_id) |
bool | smem_enabled (agent *my_agent) |
smem_wme_list * | smem_get_direct_augs_of_id (Symbol *id, tc_number tc=(0)) |
void | smem_go (agent *my_agent, bool store_only) |
void | smem_init_db (agent *my_agent) |
void | smem_install_memory (agent *my_agent, Symbol *state, smem_lti_id parent_id, Symbol *lti, bool activate_lti, soar_module::symbol_triple_list &meta_wmes, soar_module::symbol_triple_list &retrieval_wmes) |
double | smem_lti_activate (agent *my_agent, smem_lti_id lti, bool add_access, uint64_t num_edges=static_cast< uint64_t >(static_cast< uint64_t >(0-1)/static_cast< uint64_t >(2))) |
smem_lti_id | smem_lti_add_id (agent *my_agent, char name_letter, uint64_t name_number) |
double | smem_lti_calc_base (agent *my_agent, smem_lti_id lti, int64_t time_now, uint64_t n=0, uint64_t access_1=0) |
smem_lti_id | smem_lti_get_id (agent *my_agent, char name_letter, uint64_t name_number) |
smem_lti_id | smem_lti_soar_add (agent *my_agent, Symbol *id) |
Symbol * | smem_lti_soar_make (agent *my_agent, smem_lti_id lti, char name_letter, uint64_t name_number, goal_stack_level level) |
smem_slot * | smem_make_slot (smem_slot_map *slots, Symbol *attr) |
bool | smem_parse_chunk (agent *my_agent, smem_str_to_chunk_map *chunks, smem_chunk_set *newbies) |
bool | smem_parse_chunks (agent *my_agent, const char *chunks_str, std::string **err_msg) |
Symbol * | smem_parse_constant_attr (agent *my_agent, struct lexeme_info *lexeme) |
std::string * | smem_parse_lti_name (struct lexeme_info *lexeme, char *id_letter, uint64_t *id_number) |
void | smem_print_lti (agent *my_agent, smem_lti_id lti_id, unsigned int depth, std::string *return_val) |
void | smem_print_store (agent *my_agent, std::string *return_val) |
void | smem_process_buffered_wmes (agent *my_agent, Symbol *state, soar_module::wme_set &cue_wmes, soar_module::symbol_triple_list &meta_wmes, soar_module::symbol_triple_list &retrieval_wmes) |
smem_lti_id | smem_process_query (agent *my_agent, Symbol *state, Symbol *query, Symbol *negquery, smem_lti_set *prohibit, soar_module::wme_set &cue_wmes, soar_module::symbol_triple_list &meta_wmes, soar_module::symbol_triple_list &retrieval_wmes, smem_query_levels query_level=qry_full) |
void | smem_reset (agent *my_agent, Symbol *state) |
void | smem_reset_id_counters (agent *my_agent) |
void | smem_respond_to_cmd (agent *my_agent, bool store_only) |
Symbol * | smem_reverse_hash (agent *my_agent, byte sym_type, smem_hash_id hash_value) |
double | smem_reverse_hash_float (agent *my_agent, smem_hash_id hash_value) |
int64_t | smem_reverse_hash_int (agent *my_agent, smem_hash_id hash_value) |
void | smem_reverse_hash_str (agent *my_agent, smem_hash_id hash_value, std::string &dest) |
soar_module::sqlite_statement * | smem_setup_web_crawl (agent *my_agent, smem_weighted_cue_element *el) |
void | smem_soar_store (agent *my_agent, Symbol *id, smem_storage_type store_type=store_level, tc_number tc=(0)) |
void | smem_store_chunk (agent *my_agent, smem_lti_id parent_id, smem_slot_map *children, bool remove_old_children=true, Symbol *print_id=NULL) |
bool | smem_symbol_is_constant (Symbol *sym) |
smem_hash_id | smem_temporal_hash (agent *my_agent, Symbol *sym, bool add_on_fail=true) |
smem_hash_id | smem_temporal_hash_add (agent *my_agent, byte sym_type) |
smem_hash_id | smem_temporal_hash_float (agent *my_agent, double val, bool add_on_fail=true) |
smem_hash_id | smem_temporal_hash_int (agent *my_agent, int64_t val, bool add_on_fail=true) |
smem_hash_id | smem_temporal_hash_str (agent *my_agent, char *val, bool add_on_fail=true) |
bool | smem_valid_production (condition *lhs_top, action *rhs_top) |
void | smem_variable_create (agent *my_agent, smem_variable_key variable_id, int64_t variable_value) |
bool | smem_variable_get (agent *my_agent, smem_variable_key variable_id, int64_t *variable_value) |
void | smem_variable_set (agent *my_agent, smem_variable_key variable_id, int64_t variable_value) |
void | smem_visualize_lti (agent *my_agent, smem_lti_id lti_id, unsigned int depth, std::string *return_val) |
void | smem_visualize_store (agent *my_agent, std::string *return_val) |
|
inline |
Definition at line 2794 of file semantic_memory.cpp.
References smem_stat_container::chunks, soar_module::primitive_stat< T >::get_value(), smem_stat_container::slots, agent_struct::smem_max_cycle, agent_struct::smem_stats, smem_variable_set(), var_max_cycle, var_num_edges, and var_num_nodes.
Referenced by smem_backup_db(), and smem_close().
Definition at line 1277 of file semantic_memory.cpp.
References symbol_union::id, IDENTIFIER_SYMBOL_TYPE, NIL, cons_struct::rest, rhs_value_is_symbol(), rhs_value_to_funcall_list(), rhs_value_to_symbol(), and identifier_struct::smem_lti.
Referenced by smem_valid_production().
Definition at line 1248 of file semantic_memory.cpp.
References complex_test_from_test(), complex_test_struct::test_info_union::conjunct_list, CONJUNCTIVE_TEST, complex_test_struct::data, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, NIL, referent_of_equality_test(), identifier_struct::smem_lti, test_is_blank_or_equality_test(), test_is_blank_test(), and complex_test_struct::type.
Referenced by smem_valid_production().
|
inline |
Definition at line 4365 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), FLOAT_CONSTANT_SYMBOL_TYPE, INT_CONSTANT_SYMBOL_TYPE, soar_module::statement::reinitialize(), soar_module::row, smem_reverse_hash_float(), smem_reverse_hash_int(), smem_reverse_hash_str(), agent_struct::smem_stmts, SMEM_WEB_NULL, SYM_CONSTANT_SYMBOL_TYPE, and smem_statement_container::web_expand.
Referenced by smem_print_lti(), and smem_print_store().
|
inline |
Definition at line 670 of file semantic_memory.cpp.
References add_preference_to_tm(), chunk_instantiation(), symbol_union::id, insert_at_head_of_dll, preference_struct::inst_next, soar_module::make_fake_instantiation(), instantiation_struct::next, NIL, preference_add_ref(), preference_remove_ref(), identifier_struct::preferences_from_goal, instantiation_struct::preferences_generated, identifier_struct::smem_info, smem_data_struct::smem_wmes, wma_activate_wmes_in_pref(), and wma_enabled().
Referenced by smem_process_buffered_wmes().
|
inline |
Definition at line 2139 of file semantic_memory.cpp.
References wme_struct::attr, smem_weighted_cue_element_struct::attr_hash, attr_t, soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), smem_statement_container::ct_attr_get, smem_statement_container::ct_const_get, smem_statement_container::ct_lti_get, smem_weighted_cue_element_struct::cue_element, smem_weighted_cue_element_struct::element_type, soar_module::statement::execute(), symbol_union::id, NIL, smem_weighted_cue_element_struct::pos_element, soar_module::statement::reinitialize(), soar_module::row, identifier_struct::smem_lti, agent_struct::smem_stmts, smem_symbol_is_constant(), smem_temporal_hash(), wme_struct::value, value_const_t, smem_weighted_cue_element_struct::value_hash, smem_weighted_cue_element_struct::value_lti, value_lti_t, and smem_weighted_cue_element_struct::weight.
Referenced by smem_process_query().
void smem_attach | ( | agent * | my_agent | ) |
Definition at line 2786 of file semantic_memory.cpp.
References soar_module::disconnected, soar_module::status_object< T >::get_status(), agent_struct::smem_db, and smem_init_db().
Referenced by do_one_top_level_phase(), smem_lti_get_id(), smem_parse_chunks(), smem_print_lti(), smem_print_store(), smem_respond_to_cmd(), and smem_visualize_store().
bool smem_backup_db | ( | agent * | my_agent, |
const char * | file_name, | ||
std::string * | err | ||
) |
Definition at line 3812 of file semantic_memory.cpp.
References _smem_close_vars(), soar_module::sqlite_database::backup(), smem_statement_container::begin, smem_statement_container::commit, soar_module::connected, soar_module::statement::execute(), soar_module::status_object< T >::get_status(), soar_module::constant_param< T >::get_value(), smem_param_container::lazy_commit, soar_module::on, soar_module::op_reinit, agent_struct::smem_db, agent_struct::smem_params, and agent_struct::smem_stmts.
|
inline |
Definition at line 756 of file semantic_memory.cpp.
References symbol_add_ref().
Referenced by smem_install_memory(), smem_process_query(), and smem_respond_to_cmd().
Definition at line 2526 of file semantic_memory.cpp.
References symbol_union::id, preference_struct::in_tm, remove_preference_from_tm(), identifier_struct::smem_info, and smem_data_struct::smem_wmes.
Referenced by smem_respond_to_cmd().
void smem_close | ( | agent * | my_agent | ) |
Definition at line 2805 of file semantic_memory.cpp.
References _smem_close_vars(), smem_statement_container::commit, soar_module::connected, soar_module::sqlite_database::disconnect(), soar_module::statement::execute(), soar_module::status_object< T >::get_status(), soar_module::constant_param< T >::get_value(), smem_param_container::lazy_commit, soar_module::on, soar_module::op_reinit, agent_struct::smem_db, agent_struct::smem_params, and agent_struct::smem_stmts.
Referenced by destroy_soar_agent().
Definition at line 1396 of file semantic_memory.cpp.
References symbol_union::id, NIL, and identifier_struct::smem_lti.
Referenced by reset_id_counters().
void smem_deallocate_chunk | ( | agent * | my_agent, |
smem_chunk * | chunk, | ||
bool | free_chunk = true |
||
) |
Definition at line 2832 of file semantic_memory.cpp.
References smem_chunk_struct::slots, symbol_remove_ref(), and value_const_t.
Referenced by smem_parse_chunk(), and smem_parse_chunks().
void smem_disconnect_chunk | ( | agent * | my_agent, |
smem_lti_id | parent_id | ||
) |
Definition at line 1553 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), smem_statement_container::ct_attr_update, smem_statement_container::ct_const_update, smem_statement_container::ct_lti_update, soar_module::statement::execute(), soar_module::primitive_stat< T >::get_value(), soar_module::op_reinit, soar_module::statement::reinitialize(), soar_module::row, soar_module::primitive_stat< T >::set_value(), smem_stat_container::slots, agent_struct::smem_stats, agent_struct::smem_stmts, SMEM_WEB_NULL, smem_statement_container::web_all, and smem_statement_container::web_truncate.
Referenced by smem_store_chunk().
bool smem_enabled | ( | agent * | my_agent | ) |
Definition at line 194 of file semantic_memory.cpp.
References soar_module::constant_param< T >::get_value(), smem_param_container::learning, soar_module::on, and agent_struct::smem_params.
Referenced by add_wme_to_rete(), do_one_top_level_phase(), and remove_wme_from_rete().
smem_wme_list* smem_get_direct_augs_of_id | ( | Symbol * | id, |
tc_number | tc = (0) |
||
) |
Definition at line 609 of file semantic_memory.cpp.
References wme_struct::acceptable, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, identifier_struct::impasse_wmes, identifier_struct::input_wmes, wme_struct::next, slot_struct::next, NIL, identifier_struct::slots, identifier_struct::tc_num, and slot_struct::wmes.
Referenced by smem_process_query(), smem_respond_to_cmd(), and smem_soar_store().
void smem_go | ( | agent * | my_agent, |
bool | store_only | ||
) |
Definition at line 3797 of file semantic_memory.cpp.
References smem_respond_to_cmd(), agent_struct::smem_timers, soar_module::timer::start(), soar_module::timer::stop(), and smem_timer_container::total.
Referenced by do_one_top_level_phase().
void smem_init_db | ( | agent * | my_agent | ) |
Definition at line 2568 of file semantic_memory.cpp.
References smem_param_container::activation_mode, smem_statement_container::begin, smem_param_container::cache_size, smem_stat_container::chunks, smem_statement_container::commit, soar_module::sqlite_database::connect(), smem_param_container::database, soar_module::disconnected, soar_module::statement::execute(), soar_module::status_object< T >::get_errmsg(), soar_module::status_object< T >::get_status(), soar_module::primitive_param< T >::get_string(), soar_module::primitive_param< T >::get_value(), soar_module::string_param::get_value(), soar_module::constant_param< T >::get_value(), smem_timer_container::init, smem_param_container::lazy_commit, smem_param_container::memory, soar_module::on, soar_module::op_reinit, smem_param_container::opt, smem_param_container::opt_speed, smem_param_container::page_16k, smem_param_container::page_1k, smem_param_container::page_2k, smem_param_container::page_32k, smem_param_container::page_4k, smem_param_container::page_64k, smem_param_container::page_8k, smem_param_container::page_size, smem_param_container::path, soar_module::statement::prepare(), soar_module::statement_container::prepare(), print(), soar_module::problem, soar_module::ready, soar_module::primitive_param< T >::set_value(), soar_module::constant_param< T >::set_value(), soar_module::primitive_stat< T >::set_value(), smem_stat_container::slots, agent_struct::smem_db, agent_struct::smem_max_cycle, agent_struct::smem_params, smem_reset_id_counters(), SMEM_SIGNATURE, agent_struct::smem_stats, agent_struct::smem_stmts, agent_struct::smem_timers, agent_struct::smem_validation, smem_variable_create(), smem_variable_get(), soar_module::timer::start(), soar_module::timer::stop(), soar_module::sqlite_statement_container::structure(), smem_param_container::thresh, var_act_mode, var_act_thresh, var_max_cycle, var_num_edges, var_num_nodes, and xml_generate_warning().
Referenced by smem_attach().
void smem_install_memory | ( | agent * | my_agent, |
Symbol * | state, | ||
smem_lti_id | parent_id, | ||
Symbol * | lti, | ||
bool | activate_lti, | ||
soar_module::symbol_triple_list & | meta_wmes, | ||
soar_module::symbol_triple_list & | retrieval_wmes | ||
) |
Definition at line 2016 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), soar_module::constant_param< T >::get_value(), symbol_union::id, identifier_struct::impasse_wmes, identifier_struct::input_wmes, identifier_struct::level, smem_statement_container::lti_letter_num, smem_param_container::merge, smem_param_container::merge_add, smem_timer_container::ncb_retrieval, NIL, soar_module::statement::reinitialize(), soar_module::row, identifier_struct::slots, smem_buffer_add_wme(), smem_lti_activate(), smem_lti_soar_make(), agent_struct::smem_params, identifier_struct::smem_result_header, smem_reverse_hash(), agent_struct::smem_stmts, agent_struct::smem_sym_retrieved, agent_struct::smem_timers, SMEM_WEB_NULL, soar_module::timer::start(), soar_module::timer::stop(), symbol_remove_ref(), and smem_statement_container::web_expand.
Referenced by smem_process_query(), and smem_respond_to_cmd().
|
inline |
Definition at line 1091 of file semantic_memory.cpp.
References smem_timer_container::act, smem_param_container::act_base, smem_param_container::act_frequency, smem_statement_container::act_lti_child_ct_get, smem_statement_container::act_lti_set, smem_param_container::act_recency, smem_statement_container::act_set, smem_stat_container::act_updates, smem_param_container::activation_mode, smem_param_container::base_incremental_threshes, smem_param_container::base_update, soar_module::sqlite_statement::bind_double(), soar_module::sqlite_statement::bind_int(), smem_param_container::bupt_incremental, soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), soar_module::primitive_param< T >::get_value(), soar_module::constant_param< T >::get_value(), soar_module::primitive_stat< T >::get_value(), smem_statement_container::history_add, smem_statement_container::history_push, smem_statement_container::lti_access_get, smem_statement_container::lti_access_set, smem_statement_container::lti_get_t, soar_module::op_reinit, soar_module::statement::reinitialize(), soar_module::row, soar_module::primitive_set_param< T >::set_begin(), soar_module::primitive_set_param< T >::set_end(), soar_module::primitive_stat< T >::set_value(), SMEM_ACT_MAX, smem_lti_calc_base(), agent_struct::smem_max_cycle, agent_struct::smem_params, agent_struct::smem_stats, agent_struct::smem_stmts, agent_struct::smem_timers, soar_module::timer::start(), soar_module::timer::stop(), and smem_param_container::thresh.
Referenced by smem_install_memory(), smem_process_query(), and smem_store_chunk().
|
inline |
Definition at line 1432 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_double(), soar_module::sqlite_statement::bind_int(), smem_stat_container::chunks, soar_module::statement::execute(), soar_module::primitive_stat< T >::get_value(), soar_module::sqlite_database::last_insert_rowid(), smem_statement_container::lti_add, soar_module::op_reinit, soar_module::primitive_stat< T >::set_value(), agent_struct::smem_db, agent_struct::smem_stats, and agent_struct::smem_stmts.
Referenced by smem_lti_soar_add(), smem_parse_chunks(), and smem_store_chunk().
|
inline |
Definition at line 1041 of file semantic_memory.cpp.
References smem_param_container::base_decay, soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), soar_module::primitive_param< T >::get_value(), smem_statement_container::history_get, smem_statement_container::lti_access_get, soar_module::statement::reinitialize(), SMEM_ACT_HISTORY_ENTRIES, SMEM_ACT_LOW, agent_struct::smem_params, and agent_struct::smem_stmts.
Referenced by smem_lti_activate().
smem_lti_id smem_lti_get_id | ( | agent * | my_agent, |
char | name_letter, | ||
uint64_t | name_number | ||
) |
Definition at line 1410 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), smem_statement_container::lti_get, NIL, soar_module::statement::reinitialize(), soar_module::row, smem_attach(), and agent_struct::smem_stmts.
Referenced by _epmem_install_id_wme(), make_symbol_for_current_lexeme(), parse_rhs_action(), smem_lti_soar_add(), and smem_parse_chunks().
|
inline |
Definition at line 1455 of file semantic_memory.cpp.
References epmem_schedule_promotion(), agent_struct::epmem_stats, agent_struct::epmem_validation, soar_module::primitive_stat< T >::get_value(), symbol_union::id, IDENTIFIER_SYMBOL_TYPE, identifier_struct::name_letter, identifier_struct::name_number, NIL, identifier_struct::smem_lti, smem_lti_add_id(), smem_lti_get_id(), and epmem_stat_container::time.
Referenced by smem_soar_store().
Symbol* smem_lti_soar_make | ( | agent * | my_agent, |
smem_lti_id | lti, | ||
char | name_letter, | ||
uint64_t | name_number, | ||
goal_stack_level | level | ||
) |
Definition at line 1478 of file semantic_memory.cpp.
References find_identifier(), symbol_union::id, identifier_struct::level, make_new_identifier(), NIL, identifier_struct::promotion_level, identifier_struct::smem_lti, SMEM_LTI_UNKNOWN_LEVEL, and symbol_add_ref().
Referenced by _epmem_install_id_wme(), make_symbol_for_current_lexeme(), parse_rhs_action(), and smem_install_memory().
|
inline |
Definition at line 1541 of file semantic_memory.cpp.
Referenced by smem_parse_chunk(), and smem_soar_store().
bool smem_parse_chunk | ( | agent * | my_agent, |
smem_str_to_chunk_map * | chunks, | ||
smem_chunk_set * | newbies | ||
) |
Definition at line 2937 of file semantic_memory.cpp.
References AT_LEXEME, FLOAT_CONSTANT_LEXEME, lexeme_info::float_val, get_lexeme(), IDENTIFIER_LEXEME, INT_CONSTANT_LEXEME, lexeme_info::int_val, agent_struct::lexeme, smem_chunk_struct::lti_id, smem_chunk_struct::lti_letter, smem_chunk_struct::lti_number, make_float_constant(), make_int_constant(), make_sym_constant(), sym_constant_struct::name, NIL, PERIOD_LEXEME, R_PAREN_LEXEME, symbol_union::sc, smem_chunk_struct::slots, smem_deallocate_chunk(), smem_make_slot(), smem_parse_constant_attr(), smem_parse_lti_name(), smem_chunk_struct::soar_id, lexeme_info::string, SYM_CONSTANT_LEXEME, SYM_CONSTANT_SYMBOL_TYPE, symbol_remove_ref(), lexeme_info::type, UP_ARROW_LEXEME, smem_chunk_value_union::val_const, smem_chunk_value_union::val_lti, smem_chunk_value_constant::val_type, smem_chunk_value_lti::val_type, smem_chunk_value_constant::val_value, smem_chunk_value_lti::val_value, value_const_t, value_lti_t, and VARIABLE_LEXEME.
Referenced by smem_parse_chunks().
bool smem_parse_chunks | ( | agent * | my_agent, |
const char * | chunks_str, | ||
std::string ** | err_msg | ||
) |
Definition at line 3248 of file semantic_memory.cpp.
References agent_struct::alternate_input_exit, agent_struct::alternate_input_string, agent_struct::alternate_input_suffix, agent_struct::current_char, epmem_schedule_promotion(), agent_struct::epmem_stats, agent_struct::epmem_validation, find_identifier(), get_lexeme(), soar_module::primitive_stat< T >::get_value(), symbol_union::id, agent_struct::id_counter, L_PAREN_LEXEME, agent_struct::lexeme, NIL, set_lexer_allow_ids(), smem_attach(), smem_deallocate_chunk(), identifier_struct::smem_lti, smem_lti_add_id(), smem_lti_get_id(), smem_parse_chunk(), smem_store_chunk(), identifier_struct::smem_time_id, identifier_struct::smem_valid, epmem_stat_container::time, and lexeme_info::type.
|
inline |
Definition at line 2917 of file semantic_memory.cpp.
References FLOAT_CONSTANT_LEXEME, INT_CONSTANT_LEXEME, make_float_constant(), make_int_constant(), make_sym_constant(), NIL, and SYM_CONSTANT_LEXEME.
Referenced by smem_parse_chunk().
|
inline |
Definition at line 2891 of file semantic_memory.cpp.
References IDENTIFIER_LEXEME.
Referenced by smem_parse_chunk().
void smem_print_lti | ( | agent * | my_agent, |
smem_lti_id | lti_id, | ||
unsigned int | depth, | ||
std::string * | return_val | ||
) |
Definition at line 4501 of file semantic_memory.cpp.
References _smem_print_lti(), soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_double(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), smem_statement_container::lti_letter_num, soar_module::statement::reinitialize(), smem_attach(), agent_struct::smem_stmts, and smem_statement_container::vis_lti_act.
void smem_print_store | ( | agent * | my_agent, |
std::string * | return_val | ||
) |
Definition at line 4487 of file semantic_memory.cpp.
References _smem_print_lti(), soar_module::sqlite_statement::column_double(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), soar_module::statement::reinitialize(), soar_module::row, smem_attach(), agent_struct::smem_stmts, and smem_statement_container::vis_lti.
|
inline |
Definition at line 750 of file semantic_memory.cpp.
References _smem_process_buffered_wme_list().
Referenced by smem_respond_to_cmd().
smem_lti_id smem_process_query | ( | agent * | my_agent, |
Symbol * | state, | ||
Symbol * | query, | ||
Symbol * | negquery, | ||
smem_lti_set * | prohibit, | ||
soar_module::wme_set & | cue_wmes, | ||
soar_module::symbol_triple_list & | meta_wmes, | ||
soar_module::symbol_triple_list & | retrieval_wmes, | ||
smem_query_levels | query_level = qry_full |
||
) |
Definition at line 2240 of file semantic_memory.cpp.
References _smem_process_cue_wme(), smem_param_container::act_base, smem_statement_container::act_lti_get, smem_param_container::activate_on_query, smem_param_container::activation_mode, attr_t, smem_param_container::base_update, soar_module::sqlite_statement::bind_int(), smem_param_container::bupt_naive, soar_module::sqlite_statement::column_double(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), soar_module::constant_param< T >::get_value(), symbol_union::id, NIL, soar_module::on, soar_module::op_reinit, qry_full, smem_timer_container::query, soar_module::statement::reinitialize(), soar_module::row, SMEM_ACT_MAX, smem_buffer_add_wme(), smem_get_direct_augs_of_id(), smem_install_memory(), smem_lti_activate(), agent_struct::smem_params, identifier_struct::smem_result_header, smem_setup_web_crawl(), agent_struct::smem_stmts, agent_struct::smem_sym_failure, agent_struct::smem_sym_success, agent_struct::smem_timers, soar_module::timer::start(), soar_module::timer::stop(), value_const_t, value_lti_t, smem_statement_container::web_attr_child, smem_statement_container::web_const_child, and smem_statement_container::web_lti_child.
Referenced by smem_respond_to_cmd().
Definition at line 2543 of file semantic_memory.cpp.
References symbol_union::id, smem_data_struct::last_cmd_count, smem_data_struct::last_cmd_time, identifier_struct::lower_goal, identifier_struct::smem_info, smem_data_struct::smem_wmes, and agent_struct::top_goal.
Referenced by remove_existing_context_and_descendents().
void smem_reset_id_counters | ( | agent * | my_agent | ) |
Definition at line 1507 of file semantic_memory.cpp.
References soar_module::sqlite_statement::column_int(), soar_module::connected, soar_module::statement::execute(), soar_module::status_object< T >::get_status(), agent_struct::id_counter, smem_statement_container::lti_max, soar_module::statement::reinitialize(), soar_module::row, agent_struct::smem_db, and agent_struct::smem_stmts.
Referenced by reset_id_counters(), and smem_init_db().
void smem_respond_to_cmd | ( | agent * | my_agent, |
bool | store_only | ||
) |
Definition at line 3376 of file semantic_memory.cpp.
References smem_timer_container::api, smem_statement_container::begin, agent_struct::bottom_goal, smem_stat_container::cbr, smem_statement_container::commit, do_working_memory_phase(), soar_module::statement::execute(), smem_stat_container::expansions, get_new_tc_number(), soar_module::constant_param< T >::get_value(), soar_module::primitive_stat< T >::get_value(), identifier_struct::higher_goal, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, smem_data_struct::last_cmd_count, smem_data_struct::last_cmd_time, smem_param_container::lazy_commit, smem_param_container::mirroring, smem_stat_container::mirrors, NIL, soar_module::off, soar_module::on, soar_module::op_reinit, soar_module::primitive_stat< T >::set_value(), smem_attach(), smem_buffer_add_wme(), agent_struct::smem_changed_ids, smem_clear_result(), identifier_struct::smem_cmd_header, smem_get_direct_augs_of_id(), agent_struct::smem_ignore_changes, identifier_struct::smem_info, smem_install_memory(), identifier_struct::smem_lti, agent_struct::smem_params, smem_process_buffered_wmes(), smem_process_query(), identifier_struct::smem_result_header, smem_soar_store(), agent_struct::smem_stats, agent_struct::smem_stmts, agent_struct::smem_sym_bad_cmd, agent_struct::smem_sym_failure, agent_struct::smem_sym_negquery, agent_struct::smem_sym_prohibit, agent_struct::smem_sym_query, agent_struct::smem_sym_retrieve, agent_struct::smem_sym_store, agent_struct::smem_sym_success, agent_struct::smem_timers, soar_module::timer::start(), soar_module::timer::stop(), smem_timer_container::storage, store_level, store_recursive, smem_stat_container::stores, and symbol_remove_ref().
Referenced by smem_go().
|
inline |
Definition at line 1006 of file semantic_memory.cpp.
References FLOAT_CONSTANT_SYMBOL_TYPE, INT_CONSTANT_SYMBOL_TYPE, make_float_constant(), make_int_constant(), make_sym_constant(), smem_reverse_hash_float(), smem_reverse_hash_int(), smem_reverse_hash_str(), and SYM_CONSTANT_SYMBOL_TYPE.
Referenced by smem_install_memory().
|
inline |
Definition at line 982 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_double(), soar_module::statement::execute(), smem_statement_container::hash_rev_float, NIL, soar_module::statement::reinitialize(), soar_module::row, and agent_struct::smem_stmts.
Referenced by _smem_print_lti(), smem_reverse_hash(), smem_visualize_lti(), and smem_visualize_store().
|
inline |
Definition at line 968 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), smem_statement_container::hash_rev_int, NIL, soar_module::statement::reinitialize(), soar_module::row, and agent_struct::smem_stmts.
Referenced by _smem_print_lti(), smem_reverse_hash(), smem_visualize_lti(), and smem_visualize_store().
|
inline |
Definition at line 996 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_text(), soar_module::statement::execute(), smem_statement_container::hash_rev_str, soar_module::statement::reinitialize(), soar_module::row, and agent_struct::smem_stmts.
Referenced by _smem_print_lti(), smem_reverse_hash(), smem_visualize_lti(), and smem_visualize_store().
|
inline |
Definition at line 2109 of file semantic_memory.cpp.
References smem_weighted_cue_element_struct::attr_hash, attr_t, soar_module::sqlite_statement::bind_int(), smem_weighted_cue_element_struct::element_type, agent_struct::smem_stmts, value_const_t, smem_weighted_cue_element_struct::value_hash, smem_weighted_cue_element_struct::value_lti, value_lti_t, smem_statement_container::web_attr_all, smem_statement_container::web_const_all, and smem_statement_container::web_lti_all.
Referenced by smem_process_query().
void smem_soar_store | ( | agent * | my_agent, |
Symbol * | id, | ||
smem_storage_type | store_type = store_level , |
||
tc_number | tc = (0) |
||
) |
Definition at line 1905 of file semantic_memory.cpp.
References get_new_tc_number(), symbol_union::id, smem_chunk_struct::lti_id, NIL, smem_get_direct_augs_of_id(), identifier_struct::smem_lti, smem_lti_soar_add(), smem_make_slot(), smem_store_chunk(), smem_symbol_is_constant(), store_recursive, smem_chunk_value_union::val_const, smem_chunk_value_union::val_lti, smem_chunk_value_constant::val_type, smem_chunk_value_lti::val_type, smem_chunk_value_constant::val_value, smem_chunk_value_lti::val_value, value_const_t, and value_lti_t.
Referenced by smem_respond_to_cmd().
void smem_store_chunk | ( | agent * | my_agent, |
smem_lti_id | parent_id, | ||
smem_slot_map * | children, | ||
bool | remove_old_children = true , |
||
Symbol * | print_id = NULL |
||
) |
Definition at line 1611 of file semantic_memory.cpp.
References smem_statement_container::act_lti_child_ct_get, smem_statement_container::act_lti_child_ct_set, smem_statement_container::act_set, soar_module::sqlite_statement::bind_double(), soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), smem_statement_container::ct_attr_add, smem_statement_container::ct_attr_check, smem_statement_container::ct_attr_update, smem_statement_container::ct_const_add, smem_statement_container::ct_const_check, smem_statement_container::ct_const_update, smem_statement_container::ct_lti_add, smem_statement_container::ct_lti_check, smem_statement_container::ct_lti_update, epmem_schedule_promotion(), agent_struct::epmem_stats, agent_struct::epmem_validation, soar_module::statement::execute(), soar_module::primitive_param< T >::get_value(), soar_module::primitive_stat< T >::get_value(), NIL, soar_module::op_reinit, print(), soar_module::statement::reinitialize(), soar_module::row, soar_module::primitive_stat< T >::set_value(), smem_stat_container::slots, SMEM_ACT_MAX, smem_disconnect_chunk(), smem_lti_activate(), smem_lti_add_id(), agent_struct::smem_params, agent_struct::smem_stats, agent_struct::smem_stmts, smem_temporal_hash(), SMEM_WEB_NULL, snprintf_with_symbols(), agent_struct::sysparams, smem_param_container::thresh, epmem_stat_container::time, TRACE_SMEM_SYSPARAM, value_const_t, smem_statement_container::web_add, smem_statement_container::web_attr_child, smem_statement_container::web_const_child, smem_statement_container::web_lti_child, and xml_generate_warning().
Referenced by smem_parse_chunks(), and smem_soar_store().
|
inline |
Definition at line 661 of file semantic_memory.cpp.
References FLOAT_CONSTANT_SYMBOL_TYPE, INT_CONSTANT_SYMBOL_TYPE, and SYM_CONSTANT_SYMBOL_TYPE.
Referenced by _smem_process_cue_wme(), smem_soar_store(), and smem_temporal_hash().
smem_hash_id smem_temporal_hash | ( | agent * | my_agent, |
Symbol * | sym, | ||
bool | add_on_fail = true |
||
) |
Definition at line 923 of file semantic_memory.cpp.
References symbol_union::fc, FLOAT_CONSTANT_SYMBOL_TYPE, smem_timer_container::hash, symbol_union::ic, INT_CONSTANT_SYMBOL_TYPE, sym_constant_struct::name, NIL, symbol_union::sc, smem_symbol_is_constant(), smem_temporal_hash_float(), smem_temporal_hash_int(), smem_temporal_hash_str(), agent_struct::smem_timers, agent_struct::smem_validation, soar_module::timer::start(), soar_module::timer::stop(), SYM_CONSTANT_SYMBOL_TYPE, int_constant_struct::value, and float_constant_struct::value.
Referenced by _smem_process_cue_wme(), and smem_store_chunk().
|
inline |
Definition at line 834 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::statement::execute(), smem_statement_container::hash_add_type, soar_module::sqlite_database::last_insert_rowid(), soar_module::op_reinit, agent_struct::smem_db, and agent_struct::smem_stmts.
Referenced by smem_temporal_hash_float(), smem_temporal_hash_int(), and smem_temporal_hash_str().
|
inline |
Definition at line 868 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_double(), soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), FLOAT_CONSTANT_SYMBOL_TYPE, smem_statement_container::hash_add_float, smem_statement_container::hash_get_float, NIL, soar_module::op_reinit, soar_module::statement::reinitialize(), soar_module::row, agent_struct::smem_stmts, and smem_temporal_hash_add().
Referenced by smem_temporal_hash().
|
inline |
Definition at line 841 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), smem_statement_container::hash_add_int, smem_statement_container::hash_get_int, INT_CONSTANT_SYMBOL_TYPE, NIL, soar_module::op_reinit, soar_module::statement::reinitialize(), soar_module::row, agent_struct::smem_stmts, and smem_temporal_hash_add().
Referenced by smem_temporal_hash().
|
inline |
Definition at line 895 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::bind_text(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), smem_statement_container::hash_add_str, smem_statement_container::hash_get_str, NIL, soar_module::op_reinit, soar_module::statement::reinitialize(), soar_module::row, agent_struct::smem_stmts, smem_temporal_hash_add(), and SYM_CONSTANT_SYMBOL_TYPE.
Referenced by smem_temporal_hash().
Definition at line 1298 of file semantic_memory.cpp.
References _smem_lti_from_rhs_value(), _smem_lti_from_test(), action_struct::already_in_tc, action_struct::attr, action_struct::id, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, MAKE_ACTION, action_struct::next, NIL, POSITIVE_CONDITION, rhs_value_to_symbol(), identifier_struct::smem_lti, action_struct::type, and action_struct::value.
Referenced by chunk_instantiation(), and make_production().
|
inline |
Definition at line 807 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::statement::execute(), soar_module::op_reinit, agent_struct::smem_stmts, and smem_statement_container::var_create.
Referenced by smem_init_db().
|
inline |
Definition at line 777 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), soar_module::statement::reinitialize(), soar_module::row, agent_struct::smem_stmts, and smem_statement_container::var_get.
Referenced by smem_init_db().
|
inline |
Definition at line 796 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::statement::execute(), soar_module::op_reinit, agent_struct::smem_stmts, and smem_statement_container::var_set.
Referenced by _smem_close_vars().
void smem_visualize_lti | ( | agent * | my_agent, |
smem_lti_id | lti_id, | ||
unsigned int | depth, | ||
std::string * | return_val | ||
) |
Definition at line 4095 of file semantic_memory.cpp.
References soar_module::sqlite_statement::bind_int(), soar_module::sqlite_statement::column_double(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), FLOAT_CONSTANT_SYMBOL_TYPE, INT_CONSTANT_SYMBOL_TYPE, smem_vis_lti_struct::level, smem_vis_lti_struct::lti_id, smem_statement_container::lti_letter_num, smem_vis_lti_struct::lti_name, soar_module::statement::reinitialize(), soar_module::row, smem_reverse_hash_float(), smem_reverse_hash_int(), smem_reverse_hash_str(), agent_struct::smem_stmts, SMEM_WEB_NULL, SYM_CONSTANT_SYMBOL_TYPE, smem_statement_container::vis_lti_act, and smem_statement_container::web_expand.
void smem_visualize_store | ( | agent * | my_agent, |
std::string * | return_val | ||
) |
Definition at line 3847 of file semantic_memory.cpp.
References soar_module::sqlite_statement::column_double(), soar_module::sqlite_statement::column_int(), soar_module::statement::execute(), FLOAT_CONSTANT_SYMBOL_TYPE, INT_CONSTANT_SYMBOL_TYPE, soar_module::statement::reinitialize(), soar_module::row, smem_attach(), smem_reverse_hash_float(), smem_reverse_hash_int(), smem_reverse_hash_str(), agent_struct::smem_stmts, SYM_CONSTANT_SYMBOL_TYPE, smem_statement_container::vis_lti, smem_statement_container::vis_value_const, and smem_statement_container::vis_value_lti.