clips-sys 0.4.0

Bindgen generated wrapper for CLIPS (clipsrules.net)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
TRUE
CLIPS> (batch "classerr.bat")
TRUE
CLIPS> (make-instance bad of OBJECT)
[INSMNGR3] Cannot create instances of abstract class 'OBJECT'.
CLIPS> (make-instance bad of USER)
[INSMNGR3] Cannot create instances of abstract class 'USER'.
CLIPS> (make-instance bad of PRIMITIVE)
[INSMNGR3] Cannot create instances of abstract class 'PRIMITIVE'.
CLIPS> (make-instance bad of MULTIFIELD)
[INSMNGR3] Cannot create instances of abstract class 'MULTIFIELD'.
CLIPS> (make-instance bad of NUMBER)
[INSMNGR3] Cannot create instances of abstract class 'NUMBER'.
CLIPS> (make-instance bad of EXTERNAL-ADDRESS)
[INSMNGR3] Cannot create instances of abstract class 'EXTERNAL-ADDRESS'.
CLIPS> (make-instance bad of INTEGER)
[INSMNGR3] Cannot create instances of abstract class 'INTEGER'.
CLIPS> (make-instance bad of FLOAT)
[INSMNGR3] Cannot create instances of abstract class 'FLOAT'.
CLIPS> (make-instance bad of LEXEME)
[INSMNGR3] Cannot create instances of abstract class 'LEXEME'.
CLIPS> (make-instance bad of SYMBOL)
[INSMNGR3] Cannot create instances of abstract class 'SYMBOL'.
CLIPS> (make-instance bad of STRING)
[INSMNGR3] Cannot create instances of abstract class 'STRING'.
CLIPS> (make-instance bad of ADDRESS)
[INSMNGR3] Cannot create instances of abstract class 'ADDRESS'.
CLIPS> (make-instance bad of INSTANCE)
[INSMNGR3] Cannot create instances of abstract class 'INSTANCE'.
CLIPS> (make-instance bad of INSTANCE-NAME)
[INSMNGR3] Cannot create instances of abstract class 'INSTANCE-NAME'.
CLIPS> (make-instance bad of INSTANCE-ADDRESS)
[INSMNGR3] Cannot create instances of abstract class 'INSTANCE-ADDRESS'.
CLIPS> (make-instance bad of FACT-ADDRESS)
[INSMNGR3] Cannot create instances of abstract class 'FACT-ADDRESS'.
CLIPS> (defclass OBJECT (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::OBJECT
   (
CLIPS> (defclass USER (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::USER
   (
CLIPS> (defclass PRIMITIVE (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::PRIMITIVE
   (
CLIPS> (defclass MULTIFIELD (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::MULTIFIELD
   (
CLIPS> (defclass NUMBER (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::NUMBER
   (
CLIPS> (defclass EXTERNAL-ADDRESS (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::EXTERNAL-ADDRESS
   (
CLIPS> (defclass INTEGER (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::INTEGER
   (
CLIPS> (defclass FLOAT (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::FLOAT
   (
CLIPS> (defclass LEXEME (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::LEXEME
   (
CLIPS> (defclass SYMBOL (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::SYMBOL
   (
CLIPS> (defclass STRING (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::STRING
   (
CLIPS> (defclass ADDRESS (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::ADDRESS
   (
CLIPS> (defclass INSTANCE (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::INSTANCE
   (
CLIPS> (defclass INSTANCE-NAME (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::INSTANCE-NAME
   (
CLIPS> (defclass INSTANCE-ADDRESS (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::INSTANCE-ADDRESS
   (
CLIPS> (defclass FACT-ADDRESS (is-a USER))
[CLASSPSR2] Cannot redefine a predefined system class.

ERROR:
(defclass MAIN::FACT-ADDRESS
   (
CLIPS> (defclass BAD (is-a INSTANCE))
[INHERPSR6] A user-defined class cannot be a subclass of 'INSTANCE'.

ERROR:
(defclass MAIN::BAD
   (is-a INSTANCE
CLIPS> (defclass BAD (is-a INSTANCE-NAME))
[INHERPSR6] A user-defined class cannot be a subclass of 'INSTANCE-NAME'.

ERROR:
(defclass MAIN::BAD
   (is-a INSTANCE-NAME
CLIPS> (defclass BAD (is-a INSTANCE-ADDRESS))
[INHERPSR6] A user-defined class cannot be a subclass of 'INSTANCE-ADDRESS'.

ERROR:
(defclass MAIN::BAD
   (is-a INSTANCE-ADDRESS
CLIPS> (defmessage-handler INSTANCE bad ())
[MSGPSR8] Message-handlers cannot be attached to the class 'INSTANCE'.

ERROR:
(defmessage-handler MAIN::INSTANCE
   bad
CLIPS> (defmessage-handler INSTANCE-NAME bad ())
[MSGPSR8] Message-handlers cannot be attached to the class 'INSTANCE-NAME'.

ERROR:
(defmessage-handler MAIN::INSTANCE-NAME
   bad
CLIPS> (defmessage-handler INSTANCE-ADDRESS bad ())
[MSGPSR8] Message-handlers cannot be attached to the class 'INSTANCE-ADDRESS'.

ERROR:
(defmessage-handler MAIN::INSTANCE-ADDRESS
   bad
CLIPS> (defclass)

[CSTRCPSR2] Missing name for defclass construct.

ERROR:
(defclass )
CLIPS> (defclass JUNK)

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass inheritance.

ERROR:
(defclass MAIN::JUNK)
CLIPS> (defclass JUNK bad-comment)

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass inheritance.

ERROR:
(defclass MAIN::JUNK
   bad-comment
CLIPS> (defclass JUNK "comment")

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass inheritance.

ERROR:
(defclass MAIN::JUNK "comment")
CLIPS> (defclass JUNK "comment" ())

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass inheritance.

ERROR:
(defclass MAIN::JUNK "comment"
   ()
CLIPS> (defclass JUNK ())

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass inheritance.

ERROR:
(defclass MAIN::JUNK
   ()
CLIPS> (defclass JUNK "comment" (is-a))
[INHERPSR4] A class must have at least one superclass.

ERROR:
(defclass MAIN::JUNK "comment"
   (is-a )
CLIPS> (defclass JUNK (is-a))
[INHERPSR4] A class must have at least one superclass.

ERROR:
(defclass MAIN::JUNK
   (is-a )
CLIPS> (defclass JUNK (is-a BOGUS))
[INHERPSR3] A class must be defined after all its superclasses.

ERROR:
(defclass MAIN::JUNK
   (is-a BOGUS
CLIPS> (defclass JUNK (is-a USER) (role abstract) (role concrete))
[CLASSPSR4] The 'role' class attribute is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (role abstract)
   (role
CLIPS> (defclass JUNK (is-a USER) (role concrete) (role abstract))
[CLASSPSR4] The 'role' class attribute is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (role concrete)
   (role
CLIPS> (defclass GOOD (is-a USER) (role abstract))
CLIPS> (make-instance bad of GOOD)
[INSMNGR3] Cannot create instances of abstract class 'GOOD'.
CLIPS> (defclass blah (is-a USER) (is-a USER))

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass.

ERROR:
(defclass MAIN::blah
   (is-a USER)
   (is-a
CLIPS> (defclass JUNK (is-a USER)
   (role concrete)
   (slot))

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass slot.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (role concrete)
   (slot )
CLIPS> (defclass JUNK (is-a USER)
   (slot 5))

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass slot.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot 5
CLIPS> (defclass JUNK (is-a USER)
  (slot bad)
  (slot bad))
[CLSLTPSR1] The 'bad' slot for class 'JUNK' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad)
   (slot bad
CLIPS> (defclass JUNK (is-a USER)
  (slot bad (default) (default-dynamic (time))))
[CLSLTPSR2] The 'default' facet for slot 'bad' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (default)
      (default-dynamic
CLIPS> (defclass JUNK (is-a USER)
  (multislot bad)
  (slot bad))
[CLSLTPSR1] The 'bad' slot for class 'JUNK' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (multislot bad)
   (slot bad
CLIPS> (defclass JUNK (is-a USER)
  (slot bad (storage shared) (storage local)))
[CLSLTPSR2] The 'storage' facet for slot 'bad' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (storage shared)
      (storage
CLIPS> (defclass JUNK (is-a USER)
  (slot bad (access read-write) (access read-only)))
[CLSLTPSR2] The 'access' facet for slot 'bad' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (access read-write)
      (access
CLIPS> (defclass JUNK (is-a USER)
  (slot bad (access read-write) (access initialize-only)))
[CLSLTPSR2] The 'access' facet for slot 'bad' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (access read-write)
      (access
CLIPS> (defclass JUNK (is-a USER)
  (slot bad (access read-write) (access initialize-only)))
[CLSLTPSR2] The 'access' facet for slot 'bad' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (access read-write)
      (access
CLIPS> (defclass JUNK (is-a USER)
  (slot bad (propagation no-inherit) (propagation inherit)))
[CLSLTPSR2] The 'propagation' facet for slot 'bad' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (propagation no-inherit)
      (propagation
CLIPS> (defclass JUNK (is-a USER)
  (slot bad (source composite) (source exclusive)))
[CLSLTPSR2] The 'source' facet for slot 'bad' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (source composite)
      (source
CLIPS> (defclass JUNK (is-a USER)
  (multislot bad)
  (slot bad))
[CLSLTPSR1] The 'bad' slot for class 'JUNK' is already specified.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (multislot bad)
   (slot bad
CLIPS> (defclass JUNK (is-a USER)
  (slot bad (bogus)))

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass slot.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (bogus
CLIPS> (defclass JUNK (is-a USER)
   (bogus))

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defclass.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (bogus
CLIPS> (defclass JUNK (is-a USER)
   (slot bad (default (+ (eval "(gensym)") 2))))
[ARGACCES2] Function '+' expected argument #1 to be of type integer or float.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (default (+ (eval "(gensym)") 2)))
CLIPS> (defclass JUNK (is-a USER)
   (slot bad (default-dynamic abc ())))

[EXPRNPSR1] A function name must be a symbol.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (default-dynamic abc ()
CLIPS> (defclass JUNK (is-a USER)
   (slot bad (default abc def)))
[INSFUN7] The value (abc def) is illegal for single-field slot 'bad' found in the 'default' facet.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (default abc def))
CLIPS> (defclass JUNK (is-a USER)
   (slot bad (default (create$))))
[INSFUN7] The value () is illegal for single-field slot 'bad' found in the 'default' facet.

ERROR:
(defclass MAIN::JUNK
   (is-a USER)
   (slot bad
      (default (create$)))
CLIPS> (defclass GOOD2 (is-a USER) (role concrete)
   (slot bad (default-dynamic abc def)))
[CSTRNCHK1] Expression for slot 'bad' found in dynamic default value does not satisfy the cardinality restrictions.

ERROR:
(defclass MAIN::GOOD2
   (is-a USER)
   (role concrete)
   (slot bad
      (default-dynamic abc def))
CLIPS> (make-instance gd2 of GOOD2)
[PRNTUTIL1] Unable to find class 'GOOD2'.
CLIPS> (defclass SUBGOOD (is-a GOOD) (role concrete))
CLIPS> (make-instance sg of SUBGOOD)
[sg]
CLIPS> (defclass GOOD (is-a USER))
[CLASSPSR3] Class 'GOOD' cannot be redefined while outstanding references to it still exist.

ERROR:
(defclass MAIN::GOOD
   (
CLIPS> (list-defclasses)
FLOAT
INTEGER
SYMBOL
STRING
MULTIFIELD
EXTERNAL-ADDRESS
FACT-ADDRESS
INSTANCE-ADDRESS
INSTANCE-NAME
OBJECT
PRIMITIVE
NUMBER
LEXEME
ADDRESS
INSTANCE
USER
GOOD
SUBGOOD
For a total of 18 defclasses.
CLIPS> (instances)
[sg] of SUBGOOD
For a total of 1 instance.
CLIPS> (defclass BOGUS (is-a USER)
  (slot x (default ?y)))

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for default attribute.

ERROR:
(defclass MAIN::BOGUS
   (is-a USER)
   (slot x
      (default ?y
CLIPS> (defclass BOGUS (is-a USER)
  (slot x (default-dynamic ?y)))

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for default-dynamic attribute.

ERROR:
(defclass MAIN::BOGUS
   (is-a USER)
   (slot x
      (default-dynamic ?y
CLIPS> (defclass BAD-GLOBAL (is-a USER) (role concrete)
   (slot x (default ?*bogus*)))
[GLOBLDEF1] Global variable ?*bogus* is unbound.

ERROR:
(defclass MAIN::BAD-GLOBAL
   (is-a USER)
   (role concrete)
   (slot x
      (default ?*bogus*))
CLIPS> (defclass BAD-GLOBAL (is-a USER) (role concrete)
   (slot x (default-dynamic ?*bogus*)))
CLIPS> (make-instance bad-global of BAD-GLOBAL)
[GLOBLDEF1] Global variable ?*bogus* is unbound.
[PRCCODE4] Execution halted during the actions of message-handler 'init' primary in class 'USER'
[INSMNGR8] An error occurred during the initialization of instance [bad-global].
FALSE
CLIPS> (dribble-off)