Soar Kernel
9.3.2 08-06-12
|
#include <portability.h>
#include <stdlib.h>
#include "rhsfun.h"
#include "kernel.h"
#include "print.h"
#include "mem.h"
#include "symtab.h"
#include "init_soar.h"
#include "gsysparam.h"
#include "agent.h"
#include "production.h"
#include "rhsfun_math.h"
#include "io_soar.h"
#include "recmem.h"
#include "wmem.h"
#include "gdatastructs.h"
#include "xml.h"
#include "soar_TraceNames.h"
#include <map>
#include <string>
#include <time.h>
Go to the source code of this file.
Macros | |
#define | TIMESTAMP_BUFFER_SIZE 100 |
#define TIMESTAMP_BUFFER_SIZE 100 |
Referenced by timestamp_rhs_function_code().
Definition at line 282 of file rhsfun.cpp.
References get_next_io_symbol_from_text_input_line(), NIL, release_io_symbol(), symbol_add_ref(), and TRUE.
Referenced by init_built_in_rhs_functions().
void add_rhs_function | ( | agent * | thisAgent, |
Symbol * | name, | ||
rhs_function_routine | f, | ||
int | num_args_expected, | ||
Bool | can_be_rhs_value, | ||
Bool | can_be_stand_alone_action, | ||
void * | user_data | ||
) |
Definition at line 63 of file rhsfun.cpp.
References allocate_memory(), rhs_function_struct::can_be_rhs_value, rhs_function_struct::can_be_stand_alone_action, rhs_function_struct::f, MISCELLANEOUS_MEM_USAGE, rhs_function_struct::name, rhs_function_struct::next, NIL, rhs_function_struct::num_args_expected, print(), print_with_symbols(), agent_struct::rhs_functions, and rhs_function_struct::user_data.
Referenced by init_built_in_rhs_functions(), and init_built_in_rhs_math_functions().
Definition at line 308 of file rhsfun.cpp.
References FALSE, cons_struct::first, make_sym_constant(), NIL, print(), print_with_symbols(), cons_struct::rest, savestring(), SYM_CONSTANT_SYMBOL_TYPE, and symbol_to_string().
Referenced by init_built_in_rhs_functions().
Definition at line 710 of file rhsfun.cpp.
References agent_struct::dyn_counters, FALSE, cons_struct::first, NIL, cons_struct::rest, and symbol_to_string().
Referenced by init_built_in_rhs_functions().
Definition at line 190 of file rhsfun.cpp.
References make_sym_constant().
Referenced by init_built_in_rhs_functions().
Definition at line 681 of file rhsfun.cpp.
References cons_struct::first, make_new_identifier(), make_sym_constant(), and recursive_deep_copy_helper().
Referenced by init_built_in_rhs_functions().
Definition at line 491 of file rhsfun.cpp.
References agent_struct::chunk_free_problem_spaces, cons_struct::first, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, identifier_struct::isa_goal, member_of_list(), NIL, print(), print_with_symbols(), push(), and cons_struct::rest.
Referenced by init_built_in_rhs_functions().
Definition at line 527 of file rhsfun.cpp.
References agent_struct::chunky_problem_spaces, cons_struct::first, symbol_union::id, IDENTIFIER_SYMBOL_TYPE, identifier_struct::isa_goal, member_of_list(), NIL, print(), print_with_symbols(), push(), and cons_struct::rest.
Referenced by init_built_in_rhs_functions().
Definition at line 200 of file rhsfun.cpp.
References AFTER_HALT_SOAR_CALLBACK, NIL, soar_invoke_callbacks(), agent_struct::system_halted, and TRUE.
Referenced by init_built_in_rhs_functions().
Definition at line 402 of file rhsfun.cpp.
References cons_struct::first, NIL, print(), cons_struct::rest, and symbol_add_ref().
Referenced by init_built_in_rhs_functions().
void init_built_in_rhs_functions | ( | agent * | thisAgent | ) |
Definition at line 731 of file rhsfun.cpp.
References accept_rhs_function_code(), add_rhs_function(), capitalize_symbol_rhs_function_code(), count_rhs_function_code(), crlf_rhs_function_code(), deep_copy_rhs_function_code(), dont_learn_rhs_function_code(), FALSE, force_learn_rhs_function_code(), halt_rhs_function_code(), ifeq_rhs_function_code(), init_built_in_rhs_math_functions(), make_constant_symbol_rhs_function_code(), make_sym_constant(), strlen_rhs_function_code(), timestamp_rhs_function_code(), trim_rhs_function_code(), TRUE, and write_rhs_function_code().
Referenced by init_soar_agent().
rhs_function* lookup_rhs_function | ( | agent * | thisAgent, |
Symbol * | name | ||
) |
Definition at line 102 of file rhsfun.cpp.
References rhs_function_struct::name, rhs_function_struct::next, NIL, and agent_struct::rhs_functions.
Referenced by parse_function_call_after_lparen(), and reteload_rhs_value().
Definition at line 218 of file rhsfun.cpp.
References FALSE, find_sym_constant(), cons_struct::first, generate_new_sym_constant(), make_sym_constant(), agent_struct::mcs_counter, NIL, cons_struct::rest, and symbol_to_string().
Referenced by init_built_in_rhs_functions().
void recursive_deep_copy_helper | ( | agent * | thisAgent, |
Symbol * | id_to_process, | ||
Symbol * | parent_id, | ||
std::map< Symbol *, Symbol * > & | processedSymbols | ||
) |
Definition at line 635 of file rhsfun.cpp.
References symbol_union::id, identifier_struct::input_wmes, wme_struct::next, slot_struct::next, recursive_wme_copy(), and identifier_struct::slots.
Referenced by deep_copy_rhs_function_code(), and recursive_wme_copy().
void recursive_wme_copy | ( | agent * | thisAgent, |
Symbol * | parent_id, | ||
wme * | curwme, | ||
std::map< Symbol *, Symbol * > & | processedSymbols | ||
) |
Definition at line 565 of file rhsfun.cpp.
References wme_struct::attr, glbDeepCopyWMEs, symbol_union::id, make_new_identifier(), make_wme(), identifier_struct::name_letter, wme_struct::next, recursive_deep_copy_helper(), symbol_add_ref(), and wme_struct::value.
Referenced by recursive_deep_copy_helper().
void remove_built_in_rhs_functions | ( | agent * | thisAgent | ) |
Definition at line 789 of file rhsfun.cpp.
References find_sym_constant(), remove_built_in_rhs_math_functions(), and remove_rhs_function().
Referenced by destroy_soar_agent().
Definition at line 114 of file rhsfun.cpp.
References free_memory(), MISCELLANEOUS_MEM_USAGE, rhs_function_struct::name, rhs_function_struct::next, NIL, print_with_symbols(), agent_struct::rhs_functions, and symbol_remove_ref().
Referenced by remove_built_in_rhs_functions(), and remove_built_in_rhs_math_functions().
Definition at line 470 of file rhsfun.cpp.
References FALSE, cons_struct::first, make_int_constant(), NIL, and symbol_to_string().
Referenced by init_built_in_rhs_functions().
Definition at line 244 of file rhsfun.cpp.
References make_sym_constant(), and TIMESTAMP_BUFFER_SIZE.
Referenced by init_built_in_rhs_functions().
Definition at line 430 of file rhsfun.cpp.
References FALSE, cons_struct::first, make_sym_constant(), NIL, print(), print_with_symbols(), cons_struct::rest, savestring(), SYM_CONSTANT_SYMBOL_TYPE, and symbol_to_string().
Referenced by init_built_in_rhs_functions().
Definition at line 163 of file rhsfun.cpp.
References add_to_growable_string(), FALSE, cons_struct::first, free_growable_string(), make_blank_growable_string(), NIL, print_string(), cons_struct::rest, symbol_to_string(), text_of_growable_string(), and xml_object().
Referenced by init_built_in_rhs_functions().