Soar Kernel  9.3.2 08-06-12
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
consistency.h
Go to the documentation of this file.
1 /*************************************************************************
2  * PLEASE SEE THE FILE "license.txt" (INCLUDED WITH THIS SOFTWARE PACKAGE)
3  * FOR LICENSE AND COPYRIGHT INFORMATION.
4  *************************************************************************/
5 
6 /*************************************************************************
7  *
8  * file: consistency.h
9  *
10  * =======================================================================
11  *
12  * Source code for Operand2/Waterfall specific functions in the kernel.
13  *
14  * =======================================================================
15  *
16  * Revision history:
17  *
18  * 05 May 97: Created for version 2.0 of Operand2
19  * REW
20  *
21  * 20 Aug 97: Version 2.1 of Operand2/Waterfall
22  * Reimplemented the Waterfall functions with a more efficient algorithm
23  * REW
24  *
25  */
26 
27 #ifndef CONSISTENCY_H
28 #define CONSISTENCY_H
29 
30 #include "gdatastructs.h"
31 
32 #ifdef __cplusplus
33 //extern "C"
34 //{
35 #endif
36 
37 typedef char Bool;
38 typedef signed short goal_stack_level;
39 typedef struct slot_struct slot;
40 typedef struct wme_struct wme;
41 typedef struct agent_struct agent;
42 typedef struct ms_change_struct ms_change;
43 typedef union symbol_union Symbol;
44 
45 /* For information on the consistency check routines */
46 /* #define DEBUG_CONSISTENCY_CHECK */
47 
48 /* For information on aspects of determining the active level */
49 /* #define DEBUG_DETERMINE_LEVEL_PHASE */
50 
51 /* REW: begin 08.20.97 */
52 #define NEW_DECISION 0
53 #define SAME_LEVEL 1
54 #define HIGHER_LEVEL 2
55 #define LOWER_LEVEL 3
56 #define NIL_GOAL_RETRACTIONS 4
57 /* REW: end 08.20.97 */
58 
59 /* REW: begin 09.15.96 */
60 
61 /* These prototypes moved to decide.h -ajc (5/3/02) */
62 
63 //extern void remove_wmes_for_context_slot (agent* thisAgent, slot *s);
64 //extern void remove_existing_context_and_descendents (Symbol *goal);
65 //extern byte type_of_existing_impasse (Symbol *goal);
66 //extern Symbol *attribute_of_existing_impasse (Symbol *goal);
67 //extern byte run_preference_semantics_for_consistency_check (slot *s, preference **result_candidates);
68 
69 void remove_operator_if_necessary(agent* thisAgent, slot *s, wme *w);
71 void remove_current_decision(agent* thisAgent, slot *s);
73 /* REW: end 09.15.96 */
74 
75 /* REW: begin 08.20.97 */ /* To implement the Waterfall part of Operand2 */
76 extern void print_assertion(ms_change *msc);
77 extern void print_retraction(ms_change *msc);
83 Bool minor_quiescence_at_goal(agent* thisAgent, Symbol *goal);
85 
86 Symbol * highest_active_goal_propose(agent* thisAgent, Symbol* start_goal, Bool noneOk);
87 Symbol * highest_active_goal_apply(agent* thisAgent, Symbol* start_goal, Bool noneOk);
88 
89 /* REW: end 08.20.97 */
90 
91 #ifdef __cplusplus
92 //}
93 #endif
94 
95 #endif