1    /*******************************************************/
2    /*      "C" Language Integrated Production System      */
3    /*                                                     */
4    /*             CLIPS Version 6.30  02/05/15            */
5    /*                                                     */
6    /*                CONSTANTS HEADER FILE                */
7    /*******************************************************/
8 
9 /*************************************************************/
10 /* Purpose:                                                  */
11 /*                                                           */
12 /* Principal Programmer(s):                                  */
13 /*      Gary D. Riley                                        */
14 /*                                                           */
15 /* Contributing Programmer(s):                               */
16 /*                                                           */
17 /* Revision History:                                         */
18 /*                                                           */
19 /*      6.30: Moved default type constants (NO_DEFAULT,      */
20 /*            STATIC_DEFAULT, and DYNAMIC_DEFAULT) to        */
21 /*            constant.h                                     */
22 /*                                                           */
23 /*            Added DATA_OBJECT_ARRAY primitive type.        */
24 /*                                                           */
25 /*            Added NESTED_RHS constant.                     */
26 /*                                                           */
27 /*************************************************************/
28 
29 #ifndef _H_constant
30 
31 #define _H_constant
32 
33 #ifndef FALSE
34 #define FALSE 0
35 #endif
36 #ifndef TRUE
37 #define TRUE 1
38 #endif
39 
40 #define EXACTLY       0
41 #define AT_LEAST      1
42 #define NO_MORE_THAN  2
43 #define RANGE         3
44 
45 #define OFF           0
46 #define ON            1
47 #define LHS           0
48 #define RHS           1
49 #define NESTED_RHS    2
50 #define NEGATIVE      0
51 #define POSITIVE      1
52 #define EOS        '\0'
53 
54 #define INSIDE        0
55 #define OUTSIDE       1
56 
57 #define LESS_THAN     0
58 #define GREATER_THAN  1
59 #define EQUAL         2
60 
61 #define GLOBAL_SAVE   0
62 #define LOCAL_SAVE    1
63 #define VISIBLE_SAVE  2
64 
65 #define NO_DEFAULT      0
66 #define STATIC_DEFAULT  1
67 #define DYNAMIC_DEFAULT 2
68 
69 #ifndef WPROMPT_STRING
70 #define WPROMPT_STRING "wclips"
71 #endif
72 
73 #ifndef APPLICATION_NAME
74 #define APPLICATION_NAME "CLIPS"
75 #endif
76 
77 #ifndef COMMAND_PROMPT
78 #define COMMAND_PROMPT "CLIPS> "
79 #endif
80 
81 #ifndef VERSION_STRING
82 #define VERSION_STRING "6.30"
83 #endif
84 
85 #ifndef CREATION_DATE_STRING
86 #define CREATION_DATE_STRING "3/17/15"
87 #endif
88 
89 #ifndef BANNER_STRING
90 #define BANNER_STRING "         CLIPS (6.30 3/17/15)\n"
91 #endif
92 
93 /*************************/
94 /* TOKEN AND TYPE VALUES */
95 /*************************/
96 
97 #define OBJECT_TYPE_NAME               "OBJECT"
98 #define USER_TYPE_NAME                 "USER"
99 #define PRIMITIVE_TYPE_NAME            "PRIMITIVE"
100 #define NUMBER_TYPE_NAME               "NUMBER"
101 #define INTEGER_TYPE_NAME              "INTEGER"
102 #define FLOAT_TYPE_NAME                "FLOAT"
103 #define SYMBOL_TYPE_NAME               "SYMBOL"
104 #define STRING_TYPE_NAME               "STRING"
105 #define MULTIFIELD_TYPE_NAME           "MULTIFIELD"
106 #define LEXEME_TYPE_NAME               "LEXEME"
107 #define ADDRESS_TYPE_NAME              "ADDRESS"
108 #define EXTERNAL_ADDRESS_TYPE_NAME     "EXTERNAL-ADDRESS"
109 #define FACT_ADDRESS_TYPE_NAME         "FACT-ADDRESS"
110 #define INSTANCE_TYPE_NAME             "INSTANCE"
111 #define INSTANCE_NAME_TYPE_NAME        "INSTANCE-NAME"
112 #define INSTANCE_ADDRESS_TYPE_NAME     "INSTANCE-ADDRESS"
113 
114 /*************************************************************************/
115 /* The values of these constants should not be changed.  They are set to */
116 /* start after the primitive type codes in CONSTANT.H.  These codes are  */
117 /* used to let the generic function bsave image be used whether COOL is  */
118 /* present or not.                                                       */
119 /*************************************************************************/
120 
121 #define OBJECT_TYPE_CODE                9
122 #define PRIMITIVE_TYPE_CODE            10
123 #define NUMBER_TYPE_CODE               11
124 #define LEXEME_TYPE_CODE               12
125 #define ADDRESS_TYPE_CODE              13
126 #define INSTANCE_TYPE_CODE             14
127 
128 /****************************************************/
129 /* The first 9 primitive types need to retain their */
130 /* values!! Sorted arrays depend on their values!!  */
131 /****************************************************/
132 
133 #define FLOAT                           0
134 #define INTEGER                         1
135 #define SYMBOL                          2
136 #define STRING                          3
137 #define MULTIFIELD                      4
138 #define EXTERNAL_ADDRESS                5
139 #define FACT_ADDRESS                    6
140 #define INSTANCE_ADDRESS                7
141 #define INSTANCE_NAME                   8
142 
143 #define FCALL                          30
144 #define GCALL                          31
145 #define PCALL                          32
146 #define GBL_VARIABLE                   33
147 #define MF_GBL_VARIABLE                34
148 
149 #define SF_VARIABLE                    35
150 #define MF_VARIABLE                    36
151 #define SF_WILDCARD                    37
152 #define MF_WILDCARD                    38
153 #define BITMAPARRAY                    39
154 #define DATA_OBJECT_ARRAY              40
155 
156 #define FACT_PN_CMP1                   50
157 #define FACT_JN_CMP1                   51
158 #define FACT_JN_CMP2                   52
159 #define FACT_SLOT_LENGTH               53
160 #define FACT_PN_VAR1                   54
161 #define FACT_PN_VAR2                   55
162 #define FACT_PN_VAR3                   56
163 #define FACT_JN_VAR1                   57
164 #define FACT_JN_VAR2                   58
165 #define FACT_JN_VAR3                   59
166 #define FACT_PN_CONSTANT1              60
167 #define FACT_PN_CONSTANT2              61
168 #define FACT_STORE_MULTIFIELD          62
169 #define DEFTEMPLATE_PTR                63
170 
171 #define OBJ_GET_SLOT_PNVAR1            70
172 #define OBJ_GET_SLOT_PNVAR2            71
173 #define OBJ_GET_SLOT_JNVAR1            72
174 #define OBJ_GET_SLOT_JNVAR2            73
175 #define OBJ_SLOT_LENGTH                74
176 #define OBJ_PN_CONSTANT                75
177 #define OBJ_PN_CMP1                    76
178 #define OBJ_JN_CMP1                    77
179 #define OBJ_PN_CMP2                    78
180 #define OBJ_JN_CMP2                    79
181 #define OBJ_PN_CMP3                    80
182 #define OBJ_JN_CMP3                    81
183 #define DEFCLASS_PTR                   82
184 #define HANDLER_GET                    83
185 #define HANDLER_PUT                    84
186 
187 #define DEFGLOBAL_PTR                  90
188 
189 #define PROC_PARAM                     95
190 #define PROC_WILD_PARAM                96
191 #define PROC_GET_BIND                  97
192 #define PROC_BIND                      98
193 
194 #define PATTERN_CE                    150
195 #define AND_CE                        151
196 #define OR_CE                         152
197 #define NOT_CE                        153
198 #define TEST_CE                       154
199 #define NAND_CE                       155
200 #define EXISTS_CE                     156
201 #define FORALL_CE                     157
202 
203 #define NOT_CONSTRAINT                160
204 #define AND_CONSTRAINT                161
205 #define OR_CONSTRAINT                 162
206 #define PREDICATE_CONSTRAINT          163
207 #define RETURN_VALUE_CONSTRAINT       164
208 
209 #define LPAREN                        170
210 #define RPAREN                        171
211 #define STOP                          172
212 #define UNKNOWN_VALUE                 173
213 
214 #define RVOID                         175
215 
216 #define INTEGER_OR_FLOAT              180
217 #define SYMBOL_OR_STRING              181
218 #define INSTANCE_OR_INSTANCE_NAME     182
219 
220 typedef long int FACT_ID;
221 
222 /*************************/
223 /* Macintosh Definitions */
224 /*************************/
225 
226 #define CREATOR_STRING "CLIS"
227 #define CREATOR_CODE   'CLIS'
228 
229 #endif
230 
231 
232 
233 
234 
235 
236