Soar Kernel  9.3.2 08-06-12
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
gdatastructs.h File Reference
#include "symtab.h"
#include "kernel.h"
#include "soar_module.h"
#include <set>

Go to the source code of this file.

Data Structures

struct  bt_info_struct
struct  complex_test_struct
union  condition_struct::condition_main_data_union
struct  condition_struct
struct  gds_struct
struct  ncc_info_struct
struct  preference_struct
struct  reorder_info_struct
struct  slot_struct
union  complex_test_struct::test_info_union
struct  three_field_tests_struct

Macros

#define ACCEPTABLE_PREFERENCE_TYPE   0
#define BEST_PREFERENCE_TYPE   7
#define BETTER_PREFERENCE_TYPE   11
#define BINARY_INDIFFERENT_PREFERENCE_TYPE   9
#define BINARY_PARALLEL_PREFERENCE_TYPE   10
#define CONFLICT_IMPASSE_TYPE   2
#define CONJUNCTIVE_NEGATION_CONDITION   2
#define CONSTRAINT_FAILURE_IMPASSE_TYPE   1
#define FLOAT_CONSTANT_SYMBOL_TYPE   4
#define IDENTIFIER_SYMBOL_TYPE   1
#define INT_CONSTANT_SYMBOL_TYPE   3
#define NEGATIVE_CONDITION   1
#define NO_CHANGE_IMPASSE_TYPE   4
#define NONE_IMPASSE_TYPE   0 /* no impasse */
#define NUM_PREFERENCE_TYPES   14
#define NUM_PRODUCTION_TYPES   5
#define NUM_SYMBOL_TYPES   5
#define NUM_TEST_TYPES   10
#define NUMERIC_INDIFFERENT_PREFERENCE_TYPE   13
#define POSITIVE_CONDITION   0
#define PROHIBIT_PREFERENCE_TYPE   3
#define RECONSIDER_PREFERENCE_TYPE   4
#define REJECT_PREFERENCE_TYPE   2
#define REQUIRE_PREFERENCE_TYPE   1
#define SYM_CONSTANT_SYMBOL_TYPE   2
#define TIE_IMPASSE_TYPE   3
#define UNARY_INDIFFERENT_PREFERENCE_TYPE   5
#define UNARY_PARALLEL_PREFERENCE_TYPE   6
#define VARIABLE_SYMBOL_TYPE   0
#define WORSE_PREFERENCE_TYPE   12
#define WORST_PREFERENCE_TYPE   8

Typedefs

typedef char Bool
typedef struct bt_info_struct bt_info
typedef unsigned char byte
typedef struct complex_test_struct complex_test
typedef struct condition_struct condition
typedef struct cons_struct cons
typedef struct dl_cons_struct dl_cons
typedef struct gds_struct goal_dependency_set
typedef signed short goal_stack_level
typedef cons list
typedef struct ncc_info_struct ncc_info
typedef struct preference_struct preference
typedef struct reorder_info_struct reorder_info
typedef struct slot_struct slot
typedef union symbol_union Symbol
typedef uint64_t tc_number
typedef char * test
typedef struct
three_field_tests_struct 
three_field_tests
typedef std::set< wme
*, std::less< wme * >
, soar_module::soar_memory_pool_allocator
< wme * > > 
wma_pooled_wme_set
typedef std::map< Symbol
*, uint64_t, std::less< Symbol * >
, soar_module::soar_memory_pool_allocator
< std::pair< Symbol
*, uint64_t > > > 
wma_sym_reference_map
typedef struct wme_struct wme

Enumerations

enum  ComplexTextTypes

Functions

complex_testcomplex_test_from_test (test t)
test make_blank_or_equality_test (Symbol *sym_or_nil)
test make_blank_test ()
test make_equality_test (Symbol *sym)
test make_equality_test_without_adding_reference (Symbol *sym)
char * make_test_from_complex_test (complex_test *ct)
Bool preference_is_binary (byte p)
Bool preference_is_unary (byte p)
Symbolreferent_of_equality_test (test t)
Bool remove_preference_from_clones (agent *thisAgent, preference *pref)
Bool test_is_blank_or_equality_test (test t)
Bool test_is_blank_test (test t)
Bool test_is_complex_test (test t)

Variables

const char * preference_name [14]

Macro Definition Documentation

#define ACCEPTABLE_PREFERENCE_TYPE   0
#define BEST_PREFERENCE_TYPE   7
#define BETTER_PREFERENCE_TYPE   11
#define BINARY_INDIFFERENT_PREFERENCE_TYPE   9
#define BINARY_PARALLEL_PREFERENCE_TYPE   10
#define CONFLICT_IMPASSE_TYPE   2
#define CONJUNCTIVE_NEGATION_CONDITION   2
#define CONSTRAINT_FAILURE_IMPASSE_TYPE   1
#define FLOAT_CONSTANT_SYMBOL_TYPE   4
#define IDENTIFIER_SYMBOL_TYPE   1

Definition at line 474 of file gdatastructs.h.

Referenced by _epmem_process_ids(), _epmem_remove_wme(), _epmem_respond_to_cmd_parse(), _epmem_store_level(), _smem_lti_from_rhs_value(), _smem_lti_from_test(), add_preference_to_tm(), add_results_if_needed(), add_symbol_to_tc(), add_to_os_tc_if_id(), add_to_os_tc_if_needed(), add_trace_for_attribute_path(), add_values_of_attribute_path(), add_wme_to_rete(), add_wme_to_wm(), backtrace_through_instantiation(), collect_nots(), compare_symbols(), deallocate_symbol(), decide_context_slot(), dont_learn_rhs_function_code(), dougs_calculate_support_for_instantiation_preferences(), epmem_build_dnf(), epmem_get_augs_of_id(), epmem_respond_to_cmd(), execute_action(), find_input_wme_by_timetag_from_id(), find_name_of_object(), first_letter_from_symbol(), float_rhs_function_code(), force_learn_rhs_function_code(), instantiate_rhs_value(), int_rhs_function_code(), level_update_needed(), make_new_identifier(), mark_level_unknown_needed(), object_to_trace_string(), parse_head_of_conds_for_one_id(), print_identifier_ref_info(), read_id_or_context_var_from_string(), read_identifier_or_context_variable(), remove_preference_from_tm(), remove_wme_from_wm(), reset_tc_num(), rl_get_symbol_constant(), rl_tabulate_reward_value_for_goal(), select_force(), smem_get_direct_augs_of_id(), smem_lti_soar_add(), smem_respond_to_cmd(), smem_valid_production(), symbol_is_in_tc(), symbol_to_string(), symbol_to_typeString(), test_has_id_in_os_tc(), and variablize_symbol().

#define INT_CONSTANT_SYMBOL_TYPE   3
#define NEGATIVE_CONDITION   1
#define NO_CHANGE_IMPASSE_TYPE   4
#define NONE_IMPASSE_TYPE   0 /* no impasse */
#define NUM_PREFERENCE_TYPES   14

Definition at line 174 of file gdatastructs.h.

Referenced by make_slot().

#define NUM_PRODUCTION_TYPES   5
#define NUM_SYMBOL_TYPES   5

Definition at line 478 of file gdatastructs.h.

#define NUM_TEST_TYPES   10

Definition at line 468 of file gdatastructs.h.

#define NUMERIC_INDIFFERENT_PREFERENCE_TYPE   13
#define POSITIVE_CONDITION   0

Definition at line 517 of file gdatastructs.h.

Referenced by add_bound_variables_in_condition(), add_cond_to_tc(), add_goal_or_impasse_tests(), backtrace_through_instantiation(), build_network_for_condition_list(), build_prohibits_list(), calculate_compile_time_o_support(), calculate_support_for_instantiation_preferences(), check_negative_relational_test_bindings(), collect_root_variables(), condition_list_has_id_test_for_sym(), conditions_are_equal(), copy_condition(), cost_of_adding_condition(), create_instantiation(), deallocate_instantiation(), dougs_calculate_support_for_instantiation_preferences(), elaborate_gds(), fill_in_attr_tests(), fill_in_id_tests(), fill_in_new_instantiation_stuff(), fill_in_vars_requiring_bindings(), find_compile_time_match_goal(), find_known_goals(), find_match_goal(), find_thing_off_goal(), get_nvn_for_condition_list(), hash_condition(), id_or_value_of_condition_list_is_in_os_tc(), soar_module::make_fake_instantiation(), make_fake_preference_for_goal_item(), match_state_tests_non_operator_slot(), negate_condition_list(), parse_attr_value_tests(), parse_tail_of_conds_for_one_id(), parse_value_test_star(), print_instantiation_with_wmes(), remove_isa_state_tests_for_non_roots(), remove_vars_requiring_bindings(), reorder_lhs(), reorder_simplified_conditions(), restore_and_deallocate_saved_tests(), rete_node_to_conditions(), rl_add_goal_or_impasse_tests_to_conds(), rl_get_template_constants(), simplify_condition_list(), smem_valid_production(), substitute_for_placeholders_in_condition_list(), variablize_condition_list(), variablize_nots_and_insert_into_conditions(), wma_activate_wme(), wma_calculate_initial_boost(), and xml_instantiation_with_wmes().

#define PROHIBIT_PREFERENCE_TYPE   3
#define RECONSIDER_PREFERENCE_TYPE   4

Definition at line 164 of file gdatastructs.h.

Referenced by context_slot_is_decidable(), and preference_type_indicator().

#define REJECT_PREFERENCE_TYPE   2
#define REQUIRE_PREFERENCE_TYPE   1
#define SYM_CONSTANT_SYMBOL_TYPE   2
#define TIE_IMPASSE_TYPE   3
#define UNARY_INDIFFERENT_PREFERENCE_TYPE   5
#define UNARY_PARALLEL_PREFERENCE_TYPE   6
#define VARIABLE_SYMBOL_TYPE   0
#define WORSE_PREFERENCE_TYPE   12
#define WORST_PREFERENCE_TYPE   8

Typedef Documentation

typedef char Bool

Definition at line 28 of file gdatastructs.h.

typedef struct bt_info_struct bt_info
typedef unsigned char byte

Definition at line 29 of file gdatastructs.h.

Definition at line 32 of file gdatastructs.h.

typedef struct condition_struct condition
typedef struct cons_struct cons

Definition at line 33 of file gdatastructs.h.

typedef struct dl_cons_struct dl_cons

Definition at line 34 of file gdatastructs.h.

typedef signed short goal_stack_level

Definition at line 31 of file gdatastructs.h.

typedef cons list

Definition at line 37 of file gdatastructs.h.

typedef struct ncc_info_struct ncc_info
typedef struct preference_struct preference
typedef struct slot_struct slot
typedef union symbol_union Symbol

Definition at line 36 of file gdatastructs.h.

typedef uint64_t tc_number

Definition at line 30 of file gdatastructs.h.

typedef char* test

Definition at line 342 of file gdatastructs.h.

typedef std::set< wme*, std::less< wme* >, soar_module::soar_memory_pool_allocator< wme* > > wma_pooled_wme_set

Definition at line 41 of file gdatastructs.h.

typedef std::map< Symbol*, uint64_t, std::less< Symbol* >, soar_module::soar_memory_pool_allocator< std::pair< Symbol*, uint64_t > > > wma_sym_reference_map

Definition at line 44 of file gdatastructs.h.

typedef struct wme_struct wme

Definition at line 35 of file gdatastructs.h.

Enumeration Type Documentation

Enumerator:
NOT_EQUAL_TEST 
LESS_TEST 
GREATER_TEST 
LESS_OR_EQUAL_TEST 
GREATER_OR_EQUAL_TEST 
SAME_TYPE_TEST 
DISJUNCTION_TEST 
CONJUNCTIVE_TEST 
GOAL_ID_TEST 
IMPASSE_ID_TEST 

Definition at line 455 of file gdatastructs.h.

{
NOT_EQUAL_TEST = 1, /* various relational tests */
LESS_TEST = 2,
DISJUNCTION_TEST = 7, /* item must be one of a list of constants */
CONJUNCTIVE_TEST = 8, /* item must pass each of a list of tests */
GOAL_ID_TEST = 9, /* item must be a goal identifier */
IMPASSE_ID_TEST = 10 /* item must be an impasse identifier */
};

Function Documentation

complex_test* complex_test_from_test ( test  t)
inline
test make_blank_or_equality_test ( Symbol sym_or_nil)
inline

Definition at line 412 of file gdatastructs.h.

References make_blank_test(), and make_equality_test().

Referenced by rete_node_to_conditions().

{
return ((sym_or_nil) ? (make_equality_test(sym_or_nil)) : make_blank_test());
}
test make_blank_test ( )
inline

Definition at line 389 of file gdatastructs.h.

References NIL.

Referenced by copy_test(), copy_test_removing_goal_impasse_tests(), make_blank_or_equality_test(), parse_head_of_conds_for_one_id(), and parse_test().

{
return static_cast<test>(NIL);
}
test make_equality_test ( Symbol sym)
inline

Definition at line 394 of file gdatastructs.h.

References common, FALSE, and symbol_to_string().

Referenced by add_gensymmed_equality_test(), add_hash_info_to_id_test(), add_varnames_to_test(), copy_test(), make_blank_or_equality_test(), soar_module::make_fake_instantiation(), make_fake_preference_for_goal_item(), and rete_node_to_conditions().

{
(sym)->common.reference_count++;
#ifdef DEBUG_SYMBOL_REFCOUNTS
char buf[64];
OutputDebugString(symbol_to_string(0, (sym), FALSE, buf, 64));
OutputDebugString(":+ ");
OutputDebugString(_itoa((sym)->common.reference_count, buf, 10));
OutputDebugString("\n");
#endif // DEBUG_SYMBOL_REFCOUNTS
return reinterpret_cast<test>(sym);
}
test make_equality_test_without_adding_reference ( Symbol sym)
inline

Definition at line 407 of file gdatastructs.h.

Referenced by add_rete_test_list_to_tests(), make_placeholder_test(), parse_relational_test(), and simplify_test().

{
return reinterpret_cast<test>(sym);
}
char* make_test_from_complex_test ( complex_test ct)
inline
Bool preference_is_binary ( byte  p)
inline
Bool preference_is_unary ( byte  p)
inline

Definition at line 183 of file gdatastructs.h.

Referenced by add_pref_to_results().

{
return (p < 9);
}
Symbol* referent_of_equality_test ( test  t)
inline
Bool remove_preference_from_clones ( agent thisAgent,
preference pref 
)

Definition at line 186 of file prefmem.cpp.

References deallocate_preference(), FALSE, preference_struct::next_clone, NIL, possibly_deallocate_preference_and_clones(), preference_struct::prev_clone, preference_struct::reference_count, and TRUE.

Referenced by remove_existing_context_and_descendents().

{
preference *any_clone;
any_clone = NIL;
if (pref->next_clone) {
any_clone = pref->next_clone;
}
if (pref->prev_clone) {
any_clone = pref->prev_clone;
}
pref->next_clone = pref->prev_clone = NIL;
if (any_clone) possibly_deallocate_preference_and_clones (thisAgent, any_clone);
if (! pref->reference_count) {
deallocate_preference (thisAgent, pref);
return TRUE;
} else {
return FALSE;
}
}
Bool test_is_blank_or_equality_test ( test  t)
inline
Bool test_is_blank_test ( test  t)
inline
Bool test_is_complex_test ( test  t)
inline

Variable Documentation

const char* preference_name[14]

Definition at line 40 of file prefmem.cpp.