Soar Kernel
9.3.2 08-06-12
|
#include <portability.h>
#include <stdlib.h>
#include "consistency.h"
#include "agent.h"
#include "print.h"
#include "decide.h"
#include "symtab.h"
#include "production.h"
#include "init_soar.h"
#include "rete.h"
#include "wmem.h"
#include "xml.h"
Go to the source code of this file.
Functions | |
int | active_production_type_at_goal (Symbol *goal) |
Bool | check_context_slot_decisions (agent *thisAgent, goal_stack_level level) |
Bool | decision_consistent_with_current_preferences (agent *thisAgent, Symbol *goal, slot *s) |
void | determine_highest_active_production_level_in_stack_apply (agent *thisAgent) |
void | determine_highest_active_production_level_in_stack_propose (agent *thisAgent) |
Bool | goal_stack_consistent_through_goal (agent *thisAgent, Symbol *goal) |
Symbol * | highest_active_goal_apply (agent *thisAgent, Symbol *start_goal, Bool noneOk) |
Symbol * | highest_active_goal_propose (agent *thisAgent, Symbol *start_goal, Bool noneOk) |
Bool | i_activity_at_goal (Symbol *goal) |
void | initialize_consistency_calculations_for_new_decision (agent *thisAgent) |
Bool | minor_quiescence_at_goal (agent *thisAgent, Symbol *goal) |
void | remove_current_decision (agent *thisAgent, slot *s) |
void | remove_operator_if_necessary (agent *thisAgent, slot *s, wme *w) |
Definition at line 526 of file consistency.cpp.
References i_activity_at_goal(), IE_PRODS, and PE_PRODS.
Referenced by determine_highest_active_production_level_in_stack_apply().
Bool check_context_slot_decisions | ( | agent * | thisAgent, |
goal_stack_level | level | ||
) |
Definition at line 332 of file consistency.cpp.
References slot_struct::changed, decision_consistent_with_current_preferences(), FALSE, agent_struct::highest_goal_whose_context_changed, symbol_union::id, identifier_struct::level, identifier_struct::lower_goal, identifier_struct::operator_slot, print_with_symbols(), remove_current_decision(), agent_struct::soar_verbose_flag, agent_struct::sysparams, TRACE_WM_CHANGES_SYSPARAM, TRUE, and slot_struct::wmes.
Referenced by goal_stack_consistent_through_goal().
Definition at line 122 of file consistency.cpp.
References slot_struct::attr, attribute_of_existing_impasse(), CONFLICT_IMPASSE_TYPE, CONSTRAINT_FAILURE_IMPASSE_TYPE, FALSE, symbol_union::id, slot_struct::id, slot_struct::impasse_id, slot_struct::impasse_type, slot_struct::isa_context_slot, identifier_struct::isa_impasse, identifier_struct::lower_goal, preference_struct::next, preference_struct::next_candidate, NIL, NO_CHANGE_IMPASSE_TYPE, NONE_IMPASSE_TYPE, identifier_struct::operator_slot, print_preference(), print_with_symbols(), print_wme(), run_preference_semantics_for_consistency_check(), TIE_IMPASSE_TYPE, TRUE, type_of_existing_impasse(), wme_struct::value, preference_struct::value, and slot_struct::wmes.
Referenced by check_context_slot_decisions().
void determine_highest_active_production_level_in_stack_apply | ( | agent * | thisAgent | ) |
Definition at line 611 of file consistency.cpp.
References agent_struct::active_goal, agent_struct::active_level, active_production_type_at_goal(), any_assertions_or_retractions_ready(), agent_struct::bottom_goal, agent_struct::current_phase, determine_highest_active_production_level_in_stack_apply(), agent_struct::e_cycles_this_d_cycle, FALSE, agent_struct::FIRING_TYPE, goal_stack_consistent_through_goal(), HIGHER_LEVEL, highest_active_goal_apply(), symbol_union::id, IE_PRODS, identifier_struct::level, LOWER_LEVEL, MAX_ELABORATIONS_SYSPARAM, minor_quiescence_at_goal(), NEW_DECISION, NIL_GOAL_RETRACTIONS, NO_SAVED_PRODS, OUTPUT_PHASE, PE_PRODS, agent_struct::previous_active_goal, agent_struct::previous_active_level, print(), PRINT_WARNINGS_SYSPARAM, SAME_LEVEL, identifier_struct::saved_firing_type, agent_struct::sysparams, agent_struct::top_goal, and xml_generate_warning().
Referenced by determine_highest_active_production_level_in_stack_apply(), and do_one_top_level_phase().
void determine_highest_active_production_level_in_stack_propose | ( | agent * | thisAgent | ) |
Definition at line 842 of file consistency.cpp.
References agent_struct::active_goal, agent_struct::active_level, agent_struct::bottom_goal, agent_struct::current_phase, DECISION_PHASE, agent_struct::e_cycles_this_d_cycle, FALSE, agent_struct::FIRING_TYPE, goal_stack_consistent_through_goal(), HIGHER_LEVEL, highest_active_goal_propose(), symbol_union::id, IE_PRODS, identifier_struct::level, LOWER_LEVEL, MAX_ELABORATIONS_SYSPARAM, minor_quiescence_at_goal(), agent_struct::ms_i_assertions, agent_struct::ms_retractions, NEW_DECISION, NIL_GOAL_RETRACTIONS, NO_SAVED_PRODS, PE_PRODS, agent_struct::previous_active_goal, agent_struct::previous_active_level, print(), PRINT_WARNINGS_SYSPARAM, SAME_LEVEL, identifier_struct::saved_firing_type, agent_struct::sysparams, agent_struct::top_goal, and xml_generate_warning().
Referenced by do_one_top_level_phase().
Definition at line 537 of file consistency.cpp.
References check_context_slot_decisions(), agent_struct::current_phase, agent_struct::highest_goal_whose_context_changed, symbol_union::id, identifier_struct::level, print(), and print_with_symbols().
Referenced by determine_highest_active_production_level_in_stack_apply(), and determine_highest_active_production_level_in_stack_propose().
Definition at line 474 of file consistency.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, symbol_union::id, identifier_struct::lower_goal, identifier_struct::ms_i_assertions, identifier_struct::ms_o_assertions, identifier_struct::ms_retractions, NIL, agent_struct::nil_goal_retractions, print(), print_assertion(), print_retraction(), and xml_generate_warning().
Referenced by determine_highest_active_production_level_in_stack_apply(), and do_preference_phase().
Definition at line 434 of file consistency.cpp.
References abort_with_fatal_error(), BUFFER_MSG_SIZE, symbol_union::id, identifier_struct::lower_goal, identifier_struct::ms_i_assertions, identifier_struct::ms_retractions, NIL, agent_struct::nil_goal_retractions, print(), print_assertion(), print_retraction(), and xml_generate_warning().
Referenced by determine_highest_active_production_level_in_stack_propose(), and do_preference_phase().
Definition at line 386 of file consistency.cpp.
References FALSE, symbol_union::id, identifier_struct::ms_i_assertions, identifier_struct::ms_retractions, and TRUE.
Referenced by active_production_type_at_goal(), and minor_quiescence_at_goal().
void initialize_consistency_calculations_for_new_decision | ( | agent * | thisAgent | ) |
Definition at line 580 of file consistency.cpp.
References agent_struct::active_goal, agent_struct::active_level, symbol_union::id, identifier_struct::lower_goal, NIL, NO_SAVED_PRODS, identifier_struct::saved_firing_type, and agent_struct::top_goal.
Referenced by do_one_top_level_phase().
Definition at line 408 of file consistency.cpp.
References FALSE, agent_struct::FIRING_TYPE, i_activity_at_goal(), IE_PRODS, and TRUE.
Referenced by determine_highest_active_production_level_in_stack_apply(), and determine_highest_active_production_level_in_stack_propose().
Definition at line 305 of file consistency.cpp.
References slot_struct::attr, do_buffered_wm_and_ownership_changes(), symbol_union::id, slot_struct::id, identifier_struct::lower_goal, print_with_symbols(), remove_existing_context_and_descendents(), remove_wmes_for_context_slot(), agent_struct::sysparams, TRACE_OPERAND2_REMOVALS_SYSPARAM, and slot_struct::wmes.
Referenced by check_context_slot_decisions().
Definition at line 41 of file consistency.cpp.
References agent_struct::current_phase, symbol_union::id, slot_struct::id, identifier_struct::lower_goal, print(), print_with_symbols(), print_wme(), remove_existing_context_and_descendents(), remove_wmes_for_context_slot(), agent_struct::soar_verbose_flag, agent_struct::sysparams, TRACE_OPERAND2_REMOVALS_SYSPARAM, TRACE_WM_CHANGES_SYSPARAM, wme_struct::value, and slot_struct::wmes.
Referenced by do_acceptable_preference_wme_changes_for_slot().