00001 00002 extern void print_node_count_statistics(void); 00003 extern void print_null_activation_statistics(void); 00004 00005 #ifdef NULL_ACTIVATION_STATS 00006 extern void print_null_activation_stats(void); 00007 #else 00008 #define print_null_activation_stats() {} 00009 #endif 00010 00011 typedef struct token_struct { 00012 /* --- Note: "parent" is NIL on negative node negrm (local join result) 00013 tokens, non-NIL on all other tokens including CN and CN_P stuff. 00014 I put "parent" at offset 0 in the structure, so that upward scans 00015 are fast (saves doing an extra integer addition in the inner loop) --- */ 00016 struct token_struct *parent; 00017 union token_a_union { 00018 struct token_in_hash_table_data_struct { 00019 struct token_struct *next_in_bucket, *prev_in_bucket; /*hash bucket dll */ 00020 Symbol *referent; /* referent of the hash test (thing we hashed on) */ 00021 } ht; 00022 struct token_from_right_memory_of_negative_or_cn_node_struct { 00023 struct token_struct *next_negrm, *prev_negrm; /*other local join results */ 00024 struct token_struct *left_token; /* token this is local join result for */ 00025 } neg; 00026 } a; 00027 struct rete_node_struct *node; 00028 wme *w; 00029 struct token_struct *first_child; /* first of dll of children */ 00030 struct token_struct *next_sibling, *prev_sibling; /* for dll of children */ 00031 struct token_struct *next_of_node, *prev_of_node; /* dll of tokens at node */ 00032 struct token_struct *next_from_wme, *prev_from_wme; /* tree-based remove */ 00033 struct token_struct *negrm_tokens; /* join results: for Neg, CN nodes only */ 00034 } token; 00035 00036 typedef struct match_set_trace { 00037 Symbol *sym; 00038 int count; 00039 struct match_set_trace *next; 00040 /* REW: begin 08.20.97 */ 00041 /* Add match goal to the print of the matching production */ 00042 Symbol *goal; 00043 /* REW: end 08.20.97 */ 00044 } MS_trace; 00045 00046 void print_whole_token(token * t, wme_trace_type wtt);
1.3.5