]> git.pld-linux.org Git - packages/clips.git/blob - clips.hlp
- cosmetics
[packages/clips.git] / clips.hlp
1
2 0MBEGIN-ENTRY-MAIN
3
4 HELP_USAGE                 FUNCTION_SUMMARY
5 RELEASE_NOTES              COMMAND_SUMMARY
6 CONSTRUCT_SUMMARY          INTEGRATED_EDITOR
7
8 END-ENTRY
9
10 1IBEGIN-ENTRY-HELP_USAGE
11
12 HELP_USAGE
13
14 H.2 Using the Help Facility
15 The help facility displays menus of topics and prompts the user for a choice.  
16 It then references the help file for that information.  The help facility can 
17 be called with or without a command-line topic.
18
19 Syntax:
20    (help [<path>])
21
22 where <path> is the full path leading to a topic in the help tree.  For 
23 example, for information on defrule syntax, the user would type:  
24    (help construct_summary defrule).  
25 The help function has no return value.
26
27 Each element or field in the path is delimited by white space, and the help 
28 facility is not case sensitive.  In addition, the entire name of a field does  
29 not need to be specified.  Only enough characters to distinguish the field 
30 from other choices in the menu are necessary (if there is a conflict, the help  
31 facility will pick the first one in the list).  For instance, (help con def)  
32 would be sufficient for the above example.
33
34 A few special fields can be used while in the help facility.
35
36 ^      Branch up one level.
37 ?      When specified at the end of a path, this forces a display of the  
38        current menu, even on branch-ups.
39 <nil>  Giving no topic field will branch up one level.
40
41 A branch-up from the MAIN topic root node implies an exit from help.
42
43 By default, the help facility comes up in the MAIN topic root menu and the 
44 user may make a choice as described above.  The prompt line always displays 
45 the name of the current menu.  The help facility will branch through the help-
46 tree until instructed to exit by a branch-up from the top level.  The level 
47 always is reset to the MAIN topic upon exit from the help facility.
48
49 The first call to the help facility will take longer than successive calls  
50 while the system loads help information into an internal lookup table.  All 
51 other calls to the help facility are very fast.
52
53 The help facility reads help information from a file during execution.  Users  
54 may wish to change the location of the help file to meet the configuration of 
55 their system.  The help-path function was provided to allow this.
56
57 Syntax:
58    (help-path [<help-file-name>])
59
60 If no argument is specified, the function displays the name of the current 
61 help file.  If an argument is specified, the help facility will use the new 
62 file name for future help references during this CLIPS session.  To change the 
63 location of the help file permanently, a change must be made in the setup.h 
64 file, then CLIPS must be recompiled.  The help-path function has no return 
65 value.
66
67 END-ENTRY
68
69 1MBEGIN-ENTRY-RELEASE_NOTES
70
71 RELEASE_NOTES
72
73 The release notes help section contains information about new features
74 and where to get technical support.
75
76 Subtopics:
77 NEW_FEATURES               SUPPORT_INFORMATION
78
79 END-ENTRY
80
81 2IBEGIN-ENTRY-NEW_FEATURES
82
83 RELEASE_NOTES
84   NEW_FEATURES
85   
86 Version 6.2 of CLIPS contains two major enhancements. First, CLIPS now 
87 provides a mechanism which allows an embedded application to create 
88 multiple environments into which programs can be loaded. Second, an 
89 improved Windows 95/98/NT CLIPS interface is now available and the 
90 Macintosh CLIPS interface has been enhanced to support MacOS X. For a 
91 detailed listing of differences between the 6.x releases of CLIPS, 
92 refer to appendix B of the Basic Programming Guide and appendix C of 
93 the Advanced Programming Guide.
94
95 END-ENTRY
96
97 2IBEGIN-ENTRY-SUPPORT_INFORMATION
98
99 RELEASE_NOTES
100   SUPPORT_INFORMATION
101   
102 CLIPS executables, documentation, and source code are available for
103 download from http://www.ghg.net/clips/download/.
104
105 Questions regarding CLIPS can be sent via electronic mail to 
106 clips@ghg.net. 
107
108 An electronic conferencing facility, sponsored by Distributed Computing
109 Systems (http://www.discomsys.com), is also available to CLIPS users.
110 Subscribers to this facility may send questions, observations, answers,
111 editorials, etc., in the form of electronic mail to the conference. All
112 subscribers will have a copy of these messages reflected back to them at
113 their respective electronic mail addresses. To subscribe, send a single
114 line message to clips-request@discomsys.com containing the word
115 "subscribe". The subject field is ignored but the address found in the
116 ÔReply:Õ, ÔReply to:Õ, or ÔFrom:Õ field will be entered in the
117 distribution list. Upon subscription you will receive a mail message
118 instructing you how to participate in the conference from that point
119 forward. Save this mail message. You may need the instructions later if
120 you wish to unsubscribe from the list server.
121
122 To send your own messages to members of the conference you need simply
123 address your mail to clips@discomsys.com. Your message will be reflected
124 to all other members of the conference.
125     
126 If you wish to remove yourself from the conference and discontinue
127 receiving mail simply send a message to clips-request@discomsys.com with
128 "unsubscribe" as the message text. If you want to unsubscribe using
129 another email account than the one you subscribed with, then append the
130 original subscribing email account to the text of the message. For
131 example: "unsubscribe john.doe@account.net". Do not send unsubscribe
132 messages to clips@discomsys.com! This sends a mail message to every
133 member of the list. If you need to get in contact with the list
134 administrator (for trouble unsubscribing or other questions about the
135 list), send email to clips-owner @discomsys.com.
136
137 Intelligent Software Professionals has made available the CLIPS-LIST
138 archive, a WWW-based full text searchable archive containing over two
139 years of question and answers directed to the CLIPS List Server. It can
140 be accessed at the URL http://www.isphouston.com/swish-web.html.
141
142 A CLIPS World Wide Web page can be accessed using the URL 
143 http://www.ghg.net/clips/CLIPS.html.
144
145 Usenet users can also find information and post questions about CLIPS to the 
146 comp.ai.shells news group.
147
148 The CLIPS Developers' Forum, a thread-based message board, is available
149 at http://www.cpbinc.com/clips. This board exists to provide a site for 
150 discussion of research, development, and implementation of the CLIPS 
151 expert systems and related technologies. The hosting services for this 
152 web page are provided by CPB, Inc. Questions pertaining to this forum 
153 can be sent to jerry.gamble@cpbinc.com.
154
155 END-ENTRY
156
157 1MBEGIN-ENTRY-CONSTRUCT_SUMMARY
158
159 CONSTRUCT_SUMMARY
160
161 This section gives a general overview of the available CLIPS constructs.
162
163 Subtopics:
164 DEFRULE                    DEFCLASS
165 DEFFACTS                   DEFINSTANCES
166 DEFTEMPLATE                DEFMESSAGE-HANDLER
167 DEFGLOBAL                  DEFMODULE
168 DEFFUNCTION                CONSTRAINT_ATTRIBUTES            
169 DEFGENERIC/DEFMETHOD
170
171 END-ENTRY
172
173 2IBEGIN-ENTRY-DEFRULE
174
175 CONSTRUCT_SUMMARY
176   DEFRULE
177
178 One of the primary methods of representing knowledge in CLIPS is a rule.  
179 A rule is a collection of conditions and the actions to be taken if the 
180 conditions are met.  The developer of an expert system defines the rules 
181 which describe how to solve a problem.  Rules execute (or fire) based on 
182 the existence or non-existence of facts.  CLIPS provides the mechanism 
183 (the inference engine) which attempts to match the rules to the current 
184 state of the system (as represented by the fact-list) and applies the 
185 actions.  
186
187 (defrule <rule-name> [<comment>]
188     [<declaration>]              
189     <conditional-element>*       
190     =>
191     <action>*)  
192
193 DECLARATIONS
194 ------------------------------------------------------------------
195 <declaration>           ::= (declare <rule-property>+)
196
197 <rule-property>         ::= (salience <integer-expression>) |
198                             (auto-focus <boolean-symbol>)
199
200 CONDITIONAL ELEMENTS
201 ------------------------------------------------------------------
202 <conditional-element>   ::= <pattern-CE> | <assigned-pattern-CE> | 
203                             <not-CE> | <and-CE> | <or-CE> |
204                             <logical-CE> | <test-CE> |
205                             <exists-CE> | <forall-CE>
206
207 <test-CE>               ::= (test <function-call>)
208
209 <not-CE>                ::= (not <conditional-element>) 
210
211 <and-CE>                ::= (and <conditional-element>+)
212  
213 <or-CE>                 ::= (or <conditional-element>+)  
214  
215 <exists-CE>             ::= (exists <conditional-element>+)
216
217 <forall-CE>             ::= (forall <conditional-element>
218                                     <conditional-element>+)
219
220 <logical-CE>            ::= (logical <conditional-element>+)
221
222 PATTERN CONDITIONAL ELEMENT
223 ------------------------------------------------------------------
224 <assigned-pattern-CE>   ::= ?<variable-symbol> <- <pattern-CE>
225
226 <pattern-CE>            ::= <ordered-pattern-CE> | 
227                             <template-pattern-CE> |
228                             <object-pattern-CE>
229
230 <ordered-pattern-CE>    ::= (<symbol> <constraint>*)
231
232 <template-pattern-CE>   ::= (<deftemplate-name <LHS-slot>*)
233
234 <object-pattern-CE>     ::= (object <attribute-constraint>*)
235
236 <attribute-constraint>  ::= (is-a <constraint>) |
237                             (name <constraint>) |
238                             (<slot-name> <constraint>*)
239
240 <LHS-slot>              ::= <single-field-LHS-slot> | 
241                             <multifield-LHS-slot>
242
243 <LHS-slot>              ::= <single-field-LHS-slot> | 
244                             <multifield-LHS-slot>
245
246 <single-field-LHS-slot> ::= (<slot-name> <constraint>)
247
248 <multifield-LHS-slot>   ::= (<slot-name> <constraint>*)
249
250 PATTERN CONSTRAINTS
251 ------------------------------------------------------------------
252 <constraint>            ::= ? | $? | <connected-constraint>
253
254 <connected-constraint>  
255                 ::= <single-constraint> |
256                     <single-constraint> & <connected-constraint> |
257                     <single-constraint> | <connected-constraint>
258
259 <single-constraint>     ::= <term> | ~<term>
260                      
261 <term>                  ::= <constant> | 
262                             <single-field-variable> |
263                             <multifield-variable> |
264                             :<function-call> |
265                             =<function-call>
266                             
267 END-ENTRY
268
269 2IBEGIN-ENTRY-DEFFACTS
270
271 CONSTRUCT_SUMMARY
272   DEFFACTS
273   
274 With the deffacts construct, a list of facts can be defined which are 
275 automatically asserted whenever the reset command is performed.  
276 Facts asserted through deffacts may be retracted or pattern matched like 
277 any other fact.  The initial fact-list, including any defined deffacts, 
278 is always reconstructed after a reset command.
279
280 The syntax of the deffacts construct is:
281
282 (deffacts <deffacts-name> [<comment>]
283    <RHS-pattern>*)
284
285 END-ENTRY
286
287 2IBEGIN-ENTRY-DEFTEMPLATE
288
289 CONSTRUCT_SUMMARY
290   DEFTEMPLATE
291   
292 Ordered facts encode information positionally.  To access that information, 
293 a user must know not only what data is stored in a fact but which field 
294 contains the data.  Non-ordered (or deftemplate) facts provide the user 
295 with the ability to abstract the structure of a fact by assigning names 
296 to each field found within the fact.  The deftemplate construct is 
297 used to create a template which can then be used by non-ordered facts to 
298 access fields of the fact by name.  The deftemplate construct is analogous 
299 to a record or structure definition in programming languages such as Pascal 
300 and C.
301
302 The syntax of the deftemplate construct is:
303
304 (deftemplate <deftemplate-name> [<comment>]
305    <slot-definition>*)
306
307 <slot-definition>         ::= <single-slot-definition> | 
308                               <multislot-definition>
309
310 <single-slot-definition>  ::= (slot <slot-name> 
311                                     <template-attribute>*)
312
313 <multislot-definition>    ::= (multislot <slot-name> 
314                                          <template-attribute>*)
315
316 <template-attribute>      ::= <default-attribute> |
317                               <constraint-attribute>
318
319 <default-attribute>  
320                    ::= (default ?DERIVE | ?NONE | <expression>*) |
321                        (default-dynamic <expression>*)
322
323 END-ENTRY
324
325 2IBEGIN-ENTRY-DEFGLOBAL
326
327 CONSTRUCT_SUMMARY
328   DEFGLOBAL
329   
330 With the defglobal construct, global variables can be defined, set, and 
331 accessed within the CLIPS environment.  Global variables can be accessed 
332 as part of the pattern matching process, but changing them does not invoke 
333 the pattern matching process.  The bind function is used to set the value 
334 of global variables.
335
336 The syntax of the defglobal construct is:
337
338 <defglobal-construct> ::= (defglobal [<defmodule-name>] 
339                              <global-assignment>*)
340
341 <global-assignment>   ::= <global-variable> = <expression>
342
343 <global-variable>     ::= ?*<symbol>*
344
345
346 END-ENTRY
347
348 2IBEGIN-ENTRY-DEFFUNCTION
349
350 CONSTRUCT_SUMMARY
351   DEFFUNCTION
352   
353 With the deffunction construct, new functions may be defined directly in 
354 CLIPS.  Deffunctions are equivalent in use to other functions in CLIPS.  
355 The only differences between user-defined external functions and 
356 deffunctions are that deffunctions are written in CLIPS and executed 
357 by CLIPS interpretively and user-defined external functions are written 
358 in an external language, such as C, and executed by CLIPS directly.  
359 Also, deffunctions allow the addition of new functions without having to 
360 recompile and relink CLIPS.
361
362 The syntax of the deffunction construct is:
363
364 (deffunction <name> [<comment>]
365     (<regular-parameter>* [<wildcard-parameter>])
366     <action>*)
367
368 <regular-parameter>  ::= <single-field-variable>
369 <wildcard-parameter> ::= <multifield-variable>
370
371 END-ENTRY
372
373 2IBEGIN-ENTRY-DEFGENERIC/DEFMETHOD
374
375 CONSTRUCT_SUMMARY
376   DEFGENERIC/DEFMETHOD
377   
378 With the defgeneric/defmethod constructs, new generic functions may be written 
379 directly in CLIPS.  Generic functions are similar to deffunctions because 
380 they can be used to define new procedural code directly in CLIPS, and they can 
381 be called like any other function. However, generic functions are much more 
382 powerful because they can do different things depending on the types 
383 (or classes) and number of their arguments. For example, a '+' operator could 
384 be defined which performs concatenation for strings but still performs 
385 arithmetic addition for numbers.  Generic functions are comprised of 
386 multiple components called methods, where each method handles different 
387 cases of arguments for the generic function.  A generic function which has 
388 more than one method is said to be overloaded.
389
390 A generic function is comprised of a header (similar to a forward declaration) 
391 and zero or more methods.  A generic function header can either be explicitly 
392 declared by the user or implicitly declared by the definition of at least one 
393 method. The defgeneric construct is used to specify the generic function 
394 header,
395 and the defmethod construct is used for each of the generic function's 
396 methods.
397
398 The syntax of the defgeneric/defmethod constructs is:
399
400 (defgeneric <name> [<comment>])
401
402 (defmethod <name> [<index>] [<comment>]
403     (<parameter-restriction>* [<wildcard-parameter>])
404     <action>*)
405
406 <parameter-restriction> ::= <single-field-variable> |
407                             (<single-field-variable> <type>* [<query>])
408
409 <wildcard-parameter>    ::= <multifield-variable>
410
411 <type>                  ::= <class-name>
412
413 <query>                 ::= <global-variable> | <function-call>
414                             
415 END-ENTRY
416
417 2IBEGIN-ENTRY-DEFCLASS
418
419 CONSTRUCT_SUMMARY
420   DEFCLASS
421
422 A defclass is a construct for specifying the properties (slots) of a class of 
423 objects.  A defclass consists of four elements: 1) a name, 2) a list of 
424 superclasses from which the new class inherits slots and message-handlers, 
425 3)  a specifier saying whether or not the creation of direct instances of the 
426 new class is allowed and 4) a list of slots specific to the new class.  All 
427 user-defined classes must inherit from at least one class, and to this end 
428 COOL provides predefined system classes for use as a base in the derivation 
429 of new classes.
430
431 Any slots explicitly given in the defclass override those gotten from 
432 inheritance.  COOL applies rules to the list of superclasses to generate a 
433 class precedence list for the new class.  Facets further describe slots.  
434 Some examples of facets include: default value, cardinality, and types of 
435 access allowed.
436
437 The syntax of the defclass construct is:
438
439 (defclass <name> [<comment>]
440   (is-a <superclass-name>+)
441   [<role>]
442   [<pattern-match-role>]
443   <slot>*
444   <handler-documentation>*)
445
446 <role>  ::= (role concrete | abstract)
447
448 <pattern-match-role> 
449         ::= (pattern-match reactive | non-reactive)
450
451 <slot>  ::= (slot <name> <facet>*) |
452             (single-slot <name> <facet>*) |
453             (multislot <name> <facet>*)
454
455 <facet> ::=  <default-facet> | <storage-facet> |
456              <access-facet> | <propagation-facet> | 
457              <source-facet> | <pattern-match-facet> |
458              <visibility-facet> | <create-accessor-facet>
459              <override-message-facet> | <constraint-attributes>
460  
461 <default-facet> ::= 
462            (default ?DERIVE | ?NONE | <expression>*) |
463            (default-dynamic <expression>*)
464
465 <storage-facet> ::= (storage local | shared)
466
467 <access-facet> 
468        ::= (access read-write | read-only | initialize-only)
469
470 <propagation-facet> ::= (propagation inherit | no-inherit)
471
472 <source-facet> ::= (source exclusive | composite)
473
474 <pattern-match-facet> 
475        ::= (pattern-match reactive | non-reactive)
476
477 <visibility-facet> ::= (visibility private | public)
478
479 <create-accessor-facet> 
480      ::= (create-accessor ?NONE | read | write | read-write)
481
482 <override-message-facet> 
483      ::= (override-message ?DEFAULT | <message-name>)
484                                            
485 <handler-documentation> 
486        ::= (message-handler <name> [<handler-type>])
487
488 <handler-type> ::= primary | around | before | after
489
490 END-ENTRY
491
492 2IBEGIN-ENTRY-DEFINSTANCES
493
494 CONSTRUCT_SUMMARY
495   DEFINSTANCES
496   
497 Similar to deffacts, the definstances construct allows the specification of 
498 instances which will be created every time the reset command is executed.  
499 On every reset all current instances receive a delete message, and the 
500 equivalent of a make-instance function call is made for every instance 
501 specified in definstances constructs.
502
503 The syntax of the definstances construct is:
504
505 <definstances-construct> 
506                 ::= (definstances <definstances-name> [<comment>]
507                        <instance-template>*)
508
509 <instance-template>   ::= (<instance-definition>)
510
511 <instance-definition> ::= <instance-name-expression> of
512                              <class-name-expression>
513                              <slot-override>*
514
515 <slot-override>       ::= (<slot-name-expression> <expression>*)
516
517 END-ENTRY
518
519 2IBEGIN-ENTRY-DEFMESSAGE-HANDLER
520
521 CONSTRUCT_SUMMARY
522   DEFMESSAGE-HANDLER
523   
524 Objects are manipulated by sending them messages via the function send.  The 
525 result of a message is a useful return-value or side-effect.  A 
526 defmessage-handler is a construct for specifying the behavior of a class of 
527 objects in response to a particular message.  The implementation of a message 
528 is made up of pieces of procedural code called message-handlers (or handlers 
529 for short).  Each class in the class precedence list of an object's class can 
530 have handlers for a message.  In this way, the object's class and all its 
531 superclasses share the labor of handling the message.  Each class's handlers 
532 handle the part of the message which is appropriate to that class.  Within a 
533 class, the handlers for a particular message can be further subdivided into 
534 four types or categories: primary, before, after and around.
535
536 A defmessage-handler is comprised of seven elements: 1) a class name to which 
537 to attach the handler (the class must have been previously defined), 2) a 
538 message name to which the handler will respond, 3) an optional type (the 
539 default is primary), 4) an optional comment, 5) a list of parameters that will
540 be passed to the handler during execution, 6) an optional wildcard parameter 
541 and 7) a series of expressions which are executed in order when the handler 
542 is called.  The return-value of a message-handler is the evaluation of the 
543 last 
544 expression in the body.
545
546 The syntax of the defmessage-handler construct is:
547   
548 (defmessage-handler <class-name> <message-name>
549    [<handler-type>] [<comment>]
550    (<parameter>* [<wildcard-parameter>])
551    <action>*)
552
553 <handler-type>       ::= around | before | primary | after
554
555 <parameter>          ::= <single-field-variable>
556
557 <wildcard-parameter> ::= <multifield-variable>
558
559 END-ENTRY
560
561 2IBEGIN-ENTRY-DEFMODULE
562
563 CONSTRUCT_SUMMARY
564   DEFMODULE
565   
566 CLIPS provides support for the modular development and execution of knowledge 
567 bases with the defmodule construct. CLIPS modules allow a set of constructs to 
568 be grouped together such that explicit control can be maintained over 
569 restricting the access of the constructs by other modules. This type of 
570 control is similar to global and local scoping used in languages such as C or 
571 Ada. By restricting access to deftemplate and defclass constructs, modules can 
572 function as blackboards, permitting only certain facts and instances to be 
573 seen by other modules. Modules are also used by rules to provide execution 
574 control.
575
576 The syntax of the defmodule construct is:
577
578 <defmodule-construct> ::= (defmodule <module-name> [<comment>] 
579                              <port-spec>*)
580
581 <port-specification>  ::= (export <port-item>) |
582                           (import <module-name> <port-item>)
583                 
584 <port-item>           ::= ?ALL |
585                           ?NONE |
586                           <port-construct> ?ALL |
587                           <port-construct> ?NONE |
588                           <port-construct> <construct-name>+ 
589
590 <port-construct>      ::= deftemplate | defclass |
591                           defglobal | deffunction | defgeneric
592
593 END-ENTRY
594
595 2IBEGIN-ENTRY-CONSTRAINT_ATTRIBUTES
596
597 CONSTRUCT_SUMMARY
598   CONSTRAINT_ATTRIBUTES
599   
600 Constraint attributes can be associated with deftemplate and defclass slots so 
601 that type checking can be performed on slot values when template facts and 
602 instances are created. The constraint information is also analyzed for the 
603 patterns on the LHS of a rule to determine if the specified constraints 
604 prevent the rule from ever firing.
605
606 The syntax for constraint attributes is:
607   
608 <constraint-attribute> ::= <type-attribute>Ê|
609                            <allowed-constant-attribute> |
610                            <range-attribute> |
611                            <cardinality-attribute>
612                            <default-attribute>
613
614 <type-attribute>       ::= (type <type-specification>)
615
616 <type-specification>   ::= <allowed-type>+ | ?VARIABLE
617
618 <allowed-type>         ::= SYMBOL | STRING | LEXEME |
619                            INTEGER | FLOAT | NUMBER | 
620                            INSTANCE-NAME | INSTANCE-ADDRESS |
621                            INSTANCE |
622                            EXTERNAL-ADDRESS | FACT-ADDRESS
623
624 <allowed-constant-attribute> 
625                        ::= (allowed-symbolsÊ<symbol-list>) |
626                            (allowed-strings <string-list>) |
627                            (allowed-lexemes <lexeme-list> |
628                            (allowed-integersÊ<integer-list>) |
629                            (allowed-floatsÊ<float-list>) |
630                            (allowed-numbersÊ<number-list>) |
631                            (allowed-instance-names <instance-list>) |
632                            (allowed-valuesÊ<value-list>) |
633
634 <symbol-list>          ::= <symbol>+ | ?VARIABLE
635
636 <string-list>          ::= <string>+ | ?VARIABLE
637
638 <lexeme-list>          ::= <lexeme>+ | ?VARIABLE
639
640 <integer-list>         ::= <integer>+ | ?VARIABLE
641
642 <float-list>           ::= <float>+ | ?VARIABLE
643
644 <number-list>          ::= <number>+ | ?VARIABLE
645
646 <instance-name-list>   ::= <instance-name>+ | ?VARIABLE
647
648 <value-list>           ::= <constant>+ | ?VARIABLE
649
650 <range-attribute>      ::= (range <range-specification> 
651                                   <range-specification>)
652
653 <range-specification>  ::= <number> | ?VARIABLE
654
655 <cardinality-attribute>    
656                     ::= (cardinality <cardinality-specification> 
657                                      <cardinality-specification>)
658
659 <cardinality-specification> ::= <integer> | ?VARIABLE
660
661 END-ENTRY
662
663 1MBEGIN-ENTRY-FUNCTION_SUMMARY
664
665 FUNCTION_SUMMARY
666
667 This section gives a general overview of the available CLIPS functions.
668
669 Subtopics: 
670 PREDICATE_FUNCTIONS        DEFRULE_FUNCTIONS
671 MULTIFIELD_FUNCTIONS       AGENDA_FUNCTIONS
672 STRING_FUNCTIONS           DEFGLOBAL_FUNCTIONS
673 IO_FUNCTIONS               DEFFUNCTION_FUNCTIONS
674 MATH_FUNCTIONS             GENERIC_FUNCTION_FUNCTIONS
675 PROCEDURAL_FUNCTIONS       COOL_FUNCTIONS
676 MISCELLANEOUS_FUNCTIONS    DEFMODULE_FUNCTIONS
677 DEFTEMPLATE_FUNCTIONS      SEQUENCE_EXPANSION_FUNCTIONS
678 FACT_FUNCTIONS
679
680 END-ENTRY
681
682 2IBEGIN-ENTRY-PREDICATE_FUNCTIONS
683
684 FUNCTION_SUMMARY
685   PREDICATE_FUNCTIONS
686   
687 The following functions perform predicate tests and return
688 either TRUE or FALSE.
689
690 NUMBERP: Returns TRUE for integers and floats.
691 (numberp <expression>)
692
693 FLOATP: Returns TRUE for floats.
694 (floatp <expression>)
695
696 INTEGERP: Returns TRUE for integers.
697 (integerp <expression>)
698
699 LEXEMEP: Returns TRUE for symbols and strings.
700 (numberp <expression>)
701
702 STRINGP: Returns TRUE for strings.
703 (stringp <expression>)
704
705 SYMBOLP: Returns TRUE for symbols.
706 (symbolp <expression>)
707
708 EVENP: Returns TRUE for even numbers.
709 (evenp <expression>)
710
711 ODDP: Returns TRUE for odd numbers.
712 (oddp <expression>)
713
714 MULTIFIELDP: Returns TRUE for multifield values.
715 (multifieldp <expression>)
716
717 POINTERP: Returns TRUE for external addresses.
718 (pointerp <expression>)
719
720 EQ: Returns TRUE if the 1st argument is equal in type and value
721     to all subsequent arguments.
722 (eq <expression> <expression>+)
723
724 NEQ: Returns TRUE if the 1st argument is not equal in type and
725      value to all subsequent arguments.
726 (neq <expression> <expression>+)
727
728 =: Returns TRUE if the 1st argument is equal in value
729    to all subsequent arguments.
730 (= <numeric-expression> <numeric-expression>+)
731
732 <>: Returns TRUE if the 1st argument is not equal in value
733     to all subsequent arguments.
734 (<> <numeric-expression> <numeric-expression>+)
735
736 >: Returns TRUE if each argument is greater in value than the
737    argument following it.
738 (> <numeric-expression> <numeric-expression>+)
739
740 >=: Returns TRUE if each argument is greater than or equal to 
741     in value than the argument following it.
742 (>= <numeric-expression> <numeric-expression>+)
743
744 <: Returns TRUE if each argument is less in value than the
745    argument following it.
746 (> <numeric-expression> <numeric-expression>+)
747
748 <=: Returns TRUE if each argument is less than or equal to 
749     in value than the argument following it.
750 (<= <numeric-expression> <numeric-expression>+)
751    
752 AND: Returns TRUE if all arguments evaluate to a non-FALSE value.
753 (and <expression>+)
754
755 OR: Returns TRUE if any argument evaluates to a non-FALSE value.
756 (or <expression>+)
757
758 NOT: Returns TRUE if its only argument evaluates to FALSE.
759 (not <expression>)
760    
761 END-ENTRY
762
763 2IBEGIN-ENTRY-MULTIFIELD_FUNCTIONS
764
765 FUNCTION_SUMMARY
766   MULTIFIELD_FUNCTIONS
767
768 The following functions operate on multifield values.
769
770 CREATE$: Appends its arguments together to create a multifield value.
771 (create$ <expression>*)
772
773 NTH$: Returns the specified field of a multifield value.
774 (nth$ <integer-expression> <multifield-expression>)
775
776 MEMBER$: Returns the position of a single-field value within a multifield 
777 value.
778 (member$ <single-field-expression> <multifield-expression>)
779
780 SUBSETP: Returns TRUE if the first argument is a subset of the second 
781 argument.
782 (subsetp <multifield-expression> <multifield-expression>)
783
784 DELETE$: Deletes the specified range from a multifield value.
785 (delete$ <multifield-expression>
786          <begin-integer-expression> <end-integer-expression>)
787
788 EXPLODE$: Creates a multifield value from a string.
789 (explode$ <string-expression>)
790
791 IMPLODE$: Creates a string from a multifield value.
792 (implode$ <multifield-expression>)
793
794 SUBSEQ$: Extracts the specified range from a multifield value.
795 (subseq$ <multifield-expression> 
796          <begin-integer-expression> <end-integer-expression>)
797
798 REPLACE$: Replaces the specified range of a multifield value with a 
799           set of values.
800 (replace$ <multifield-expression>
801           <begin-integer-expression> <end-integer-expression> 
802           <single-or-multifield-expression>+)
803
804 INSERT$: Inserts one or more values in a multifield.
805 (insert$ <multifield-expression> <integer-expression> 
806          <single-or-multifield-expression>+)
807
808 FIRST$: Returns the first field of a multifield.
809 (first$ <multifield-expression>)
810
811 REST$: Returns all but the first field of a multifield.
812 (rest$ <multifield-expression>)
813
814 LENGTH$: Returns the number of fields in a multifield value.
815 (length$ <multifield-expression>)
816
817 DELETE-MEMBER$: Deletes specific values contained within a multifield 
818                 value and returns the modified multifield value.
819 (delete-member$ <multifield-expression> <expression>+)
820
821 REPLACE-MEMBER$: Replaces specific values contained within a multifield 
822                  value and returns the modified multifield value.
823 (replace-member$ <multifield-expression> <substitute-expression>
824                  <search-expression>+)
825
826 END-ENTRY
827
828 2IBEGIN-ENTRY-STRING_FUNCTIONS
829
830 FUNCTION_SUMMARY
831   STRING_FUNCTIONS
832
833 The following functions perform operations that are related to strings.
834
835 STR-CAT: Concatenates its arguments to form a single string.
836 (str-cat <expression>*)
837
838 SYM-CAT: Concatenates its arguments to form a single symbol.
839 (sym-cat <expression>*)
840
841 SUB-STRING: Retrieves a subportion from a string.
842 (sub-string <integer-expression> <integer-expression> <string-expression>)
843
844 STR-INDEX: Returns the position of the first argument within the second 
845            argument.
846 (str-index <lexeme-expression> <lexeme-expression>)
847
848 EVAL: Evaluates a string as though it were entered at the command prompt.
849       Only allows functions to be evaluated.
850 (eval <lexeme-expression>)
851
852 BUILD: Evaluates a string as though it were entered at the command prompt.
853        Only allows constructs to be evaluated.
854 (build <lexeme-expression>)
855
856 UPCASE: Converts lowercase characters in a string or symbol to uppercase.
857 (upcase <lexeme-expression>)
858
859 LOWCASE: Converts uppercase characters in a string or symbol to lowercase.
860 (lowcase <lexeme-expression>)
861
862 STR-COMPARE: Lexigraphically compares two strings.
863 (str-compare <lexeme-expression> <lexeme-expression>)
864
865 STR-LENGTH: Returns the length of a string.
866 (str-length <lexeme-expression>)
867
868 CHECK-SYNTAX: Allows the text representation of a construct or function
869               call to be checked for syntax and semantic errors.
870 (check-syntax <construct-or-function-string>)
871
872 STRING-TO-FIELD: Parses a string and converts its contents to a primitive 
873                  data type.
874 (string-to-field  <string-or-symbol-expression>)
875
876 END-ENTRY
877
878 2IBEGIN-ENTRY-IO_FUNCTIONS
879
880 FUNCTION_SUMMARY
881   IO_FUNCTIONS
882   
883 The following functions perform I/O operations.
884
885 OPEN: Opens a file.
886 (open <file-name> <logical-name> [<mode>])
887 <mode> ::= "r" | "w" | "r+" | "a" | "wb"
888
889 CLOSE: Closes a file.
890 (close [<logical-name>])
891
892 PRINTOUT: Sends unformated output to the specified logical name.
893 (printout <logical-name> <expresion>*)
894
895 READ: Reads a single-field value from the specified logical name.
896 (read [<logical-name>])
897
898 READLINE: Reads an entire line as a string from the specified 
899           logical name.
900 (readline [<logical-name>])
901
902 FORMAT: Sends formated output to the specified logical name.
903 (format <logical-name> <string-expression> <expression>*)
904
905 RENAME: Changes the name of a file.
906 (rename <old-file-name> <new-file-name>)
907
908 REMOVE: Deletes a file.
909 (remove <file-name>)
910
911 END-ENTRY
912
913 2MBEGIN-ENTRY-MATH_FUNCTIONS
914
915 FUNCTION_SUMMARY
916   MATH_FUNCTIONS
917
918 The math functions have been divided into three broad categories. The
919 basic math functions are always provided with CLIPS. The trigonometric
920 and extended math functions are included as part of the extended math
921 package.
922
923 Subtopics: 
924 BASIC_MATH_FUNCTIONS       EXTENDED_MATH_FUNCTIONS
925 TRIGONOMETRIC_FUNCTIONS    
926
927 END-ENTRY
928
929 3IBEGIN-ENTRY-BASIC_MATH_FUNCTIONS
930
931 FUNCTION_SUMMARY
932   MATH_FUNCTIONS
933     BASIC_MATH_FUNCTIONS
934     
935 The following functions perform basic mathematical operations.
936
937 +: Returns the sum of its arguments.
938 (+ <numeric-expression> <numeric-expression>+)
939
940 -: Returns the first argument minus all subsequent arguments.
941 (- <numeric-expression> <numeric-expression>+)
942
943 *: Returns the product of its arguments.
944 (* <numeric-expression> <numeric-expression>+)
945
946 /: Returns the first argument divided by all subsequent arguments. 
947 (/ <numeric-expression> <numeric-expression>+)
948
949 DIV: Returns the first argument divided by all subsequent arguments
950      using integer division. 
951 (div <numeric-expression> <numeric-expression>+)
952
953 MAX: Returns the value of its largest numeric argument.
954 (max <numeric-expression>+)
955
956 MIN: Returns the value of its smallest numeric argument.
957 (min <numeric-expression>+)
958
959 ABS: Returns the absolute value of its only argument.
960 (abs <numeric-expression>)
961
962 FLOAT: Converts its only argument to a float.
963 (float <numeric-expression>)
964
965 INTEGER: Converts its only argument to an integer.
966 (integer <numeric-expression>)
967
968 END-ENTRY
969
970 3IBEGIN-ENTRY-TRIGONOMETRIC_FUNCTIONS
971
972 FUNCTION_SUMMARY
973   MATH_FUNCTIONS
974     TRIGONOMETRIC_FUNCTIONS
975     
976 The following trigonometric functions take one numeric argument  
977 and return a float.  The argument is expected to be in radians.
978 These functions are part of the extended math package.
979     
980 FUNCTION         RETURNS
981 ----------------------------------------
982 acos             arccosine
983 acosh            hyperbolic arccosine
984 acot             arccotangent
985 acoth            hyperbolic arccotangent
986 acsc             arccosecant
987 acsch            hyperbolic arccosecant
988 asec             arcsecant
989 asech            hyperbolic arcsecant
990 asin             arcsine
991 asinh            hyperbolic arcsine
992 atan             arctangent
993 atanh            hyperbolic arctangent
994 cos              cosine
995 cosh             hyperbolic cosine
996 cot              cotangent
997 coth             hyperbolic tangent
998 csc              cosecant
999 csch             hyperbolic cosecant
1000 sec              secant
1001 sech             hyperbolic secant
1002 sin              sine
1003 sinh             hyperbolic sine
1004 tan              tangent
1005 tanh             hyperbolic tangent
1006
1007 END-ENTRY
1008
1009 3IBEGIN-ENTRY-EXTENDED_MATH_FUNCTIONS
1010
1011 FUNCTION_SUMMARY
1012   MATH_FUNCTIONS
1013     EXTENDED_MATH_FUNCTIONS
1014     
1015 The following functions perform extended mathematical operations
1016 and are included as part of the extended math package.
1017     
1018 DEG-GRAD: Converts its only argument from degrees to gradients.
1019 (deg-grad <numeric-expression>)
1020
1021 DEG-RAD: Converts its only argument from degrees to radians.
1022 (deg-rad <numeric-expression>)
1023
1024 GRAD-DEG: Converts its only argument from gradients to degrees.
1025 (grad-deg <numeric-expression>)
1026
1027 RAD-DEG: Converts its only argument from radians to degrees.
1028 (rad-deg <numeric-expression>)
1029
1030 PI: Returns the value of pi.
1031 (pi)
1032
1033 SQRT: Returns the square root of its only argument.
1034 (sqrt <numeric-expression>)
1035
1036 **: Raises its first argument to the power of its second argument.
1037 (** <numeric-expression> <numeric-expression>)
1038
1039 EXP: Raises the value e to the power of its only argument.
1040 (exp <numeric-expression>)
1041
1042 LOG: Returns the logarithm base e of its only argument.
1043 (log <numeric-expression>)
1044
1045 LOG10: Returns the logarithm base 10 of its only argument.
1046 (log10 <numeric-expression>)
1047
1048 ROUND: Rounds its argument toward the closest integer or negative
1049        infinity if exactly between two integers.
1050 (round <numeric-expression>)
1051
1052 MOD: Returns the remainder of the result of dividing its first argument 
1053      by its second argument (assuming that the result of division must 
1054      be an integer).  
1055 (mod <numeric-expression> <numeric-expression>)
1056
1057 END-ENTRY
1058
1059 2IBEGIN-ENTRY-PROCEDURAL_FUNCTIONS
1060
1061 FUNCTION_SUMMARY
1062   PROCEDURAL_FUNCTIONS
1063
1064 The following are functions which provide procedural programming
1065 capabilities as found in languages such as Pascal, C, and Ada.
1066
1067 BIND: Binds a variable to a new value.
1068 (bind <variable> <expression>*)
1069
1070 IF: Allows conditional execution of a group of actions.
1071 (if <expression> then <action>* [else <action>*])
1072
1073 WHILE: Allows conditional looping.
1074 (while <expression> [do] <action>*)
1075
1076 LOOP-FOR-COUNT: Allows simple iterative looping.
1077 (loop-for-count <range-spec> [do] <action>*)
1078 <range-spec>  ::= <end-index> |
1079                   (<loop-variable> [<start-index> <end-index>])
1080 <start-index> ::= <integer-expression>
1081 <end-index>   ::= <integer-expression>
1082
1083 PROGN: Evaluates all arguments and returns the value of the last 
1084        argument evaluated.
1085 (progn <expression>*)
1086
1087 PROGN$: Performs a set of actions for each field of a multifield value.
1088 (progn$ <list-spec> <expression>*)
1089 <list-spec> ::= <multifield-expression> |
1090                 (<list-variable> <multifield-expression>)
1091
1092 RETURN: Immediately terminates the currently executing deffunction,
1093         generic function method, message-handler, defrule RHS, or
1094         certain instance set query functions and if a value is 
1095         specified, returns this value as the result of the executing 
1096         construct.
1097 (return [<expression>])
1098
1099 BREAK: Immediately terminates the currently iterating while loop,
1100        progn execution, or certain instance set query functions.
1101 (break)
1102
1103 SWITCH: Allows a particular group of actions to be performed based
1104         on a specified value.
1105 (switch <test-expression>
1106    <case-statement>*
1107    [<default-statement>])
1108 <case-statement> ::= (case <comparison-expression> then <action>*)
1109 <default-statement> ::= (default <action>*)
1110
1111 END-ENTRY
1112
1113 2IBEGIN-ENTRY-MISCELLANEOUS_FUNCTIONS
1114
1115 FUNCTION_SUMMARY
1116   MISCELLANEOUS_FUNCTIONS
1117     
1118 The following are additional functions for use within CLIPS.
1119
1120 GENSYM: Returns a special sequenced symbol.
1121 (gensym)
1122
1123 GENSYM*: Returns a special unique sequenced symbol.
1124 (gensym*)
1125
1126 SETGEN: Sets the starting number used by gensym and gensym*.
1127 (setgen <integer-expression>)
1128
1129 RANDOM: Returns a "random" integer value.
1130 (random [<start-integer-expression> <end-integer-expression>])
1131
1132 SEED: Seeds the random number generator used by random.
1133 (seed <integer-expression>)
1134
1135 TIME: Returns a float representing the elapsed seconds since 
1136       the system reference time.
1137 (time)
1138
1139 LENGTH: Returns an integer for the number of fields in a multifield value
1140         or the length in characters of a string or symbol.
1141 (length <lexeme-or-multifield-expression>)
1142
1143 GET-FUNCTION_RESTRICTIONS: Returns the restriction string associated with 
1144                            a CLIPS or user defined function.
1145 (get-function-restrictions <function-name>)
1146
1147 SORT: Allows a list of values to be sorted based on a user specified
1148       comparison function.
1149 (sort <comparison-function-name> <expression>*)
1150
1151 FUNCALL: Constructs a function call from its arguments and then
1152          evaluates the function call.
1153 (funcall (function-name> <expression>*)
1154
1155 TIMER: Returns the number of seconds elapsed evaluating a series of 
1156        expressions.
1157 (timer <expression>*)
1158
1159 END-ENTRY
1160
1161 2IBEGIN-ENTRY-DEFTEMPLATE_FUNCTIONS
1162
1163 The following functions provide ancillary capabilities for the deftemplate 
1164 construct.
1165
1166 GET-DEFTEMPLATE-LIST: Returns the list of all deftemplates in the specified
1167                       module (or the current module if unspecified).
1168 (get-deftemplate-list [<module-name>])
1169
1170 DEFTEMPLATE-MODULE: Returns the module in which the specified deftemplate is
1171                     defined.
1172 (deftemplate-module <deftemplate-name>)
1173
1174 END-ENTRY
1175
1176 2IBEGIN-ENTRY-FACT_FUNCTIONS
1177
1178 The following actions are used for assert, retracting, and modifying facts.
1179
1180 ASSERT: Adds a fact to the fact-list.
1181 (assert <RHS-pattern>+)
1182
1183 RETRACT: Removes a fact from the fact-list.
1184 (retract <retract-specifier>+ | *)
1185 <retract-specifier> ::= <fact-specifier> | <integer-expression>
1186
1187 MODIFY: Modifies a deftemplate fact in the fact-list.
1188 (modify <fact-specifier> <RHS-slot>*)
1189
1190 DUPLICATE: Duplicates a deftemplate fact in the fact-list.
1191 (duplicate <fact-specifier> <RHS-slot>*)
1192
1193 ASSERT-STRING: Converts a string into a fact and asserts it.
1194 (assert-string <string-expression>)
1195
1196 FACT-INDEX: Returns the fact index of a fact address.
1197 (fact-index <fact-address>)
1198
1199 FACT-EXISTP: Returns TRUE if the fact specified by its fact-index or 
1200              fact-address arguments exists, otherwise FALSE.
1201 (fact-existp <fact-address-or-index>)
1202
1203 FACT-RELATION: Returns the deftemplate (relation) name associated with 
1204                the fact.
1205 (fact-relation <fact-address-or-index>)
1206
1207 FACT-SLOT-NAMES: Returns the slot names associated with the fact.
1208 (fact-slot-names <fact-address-or-index>)
1209
1210 FACT-SLOT-VALUE: Returns the value of the specified slot from the 
1211                  specified fact.
1212 (fact-slot-value <fact-address-or-index> <slot-name>)
1213
1214 GET-FACT-LIST: Returns a multifield containing the list of visible facts.
1215 (get-fact-list [<module-name>])
1216
1217 END-ENTRY
1218
1219 2IBEGIN-ENTRY-DEFFACTS_FUNCTIONS
1220
1221 The following functions provide ancillary capabilities for the deffacts 
1222 construct.
1223
1224 GET-DEFFACTS-LIST: Returns the list of all deffacts in the specified
1225                    module (or the current module if unspecified).
1226 (get-deffacts-list [<module-name>])
1227
1228 DEFFACTS-MODULE: Returns the module in which the specified deffacts is
1229                  defined.
1230 (deffacts-module <deffacts-name>)
1231
1232 END-ENTRY
1233
1234 2IBEGIN-ENTRY-DEFRULE_FUNCTIONS
1235
1236 The following functions provide ancillary capabilities for the defrule 
1237 construct.
1238
1239 GET-DEFRULE-LIST: Returns the list of all defrules in the specified
1240                   module (or the current module if unspecified).
1241 (get-defrule-list [<module-name>])
1242
1243 DEFRULE-MODULE: Returns the module in which the specified defrule is
1244                 defined.
1245 (defrule-module <defrule-name>)
1246
1247 END-ENTRY
1248
1249 2IBEGIN-ENTRY-AGENDA_FUNCTIONS
1250
1251 The following functions provide ancillary capabilities for manipulating the 
1252 agenda.
1253
1254 GET-FOCUS: Returns the module name of the current focus.
1255 (get-focus)
1256
1257 GET-FOCUS-STACK: Returns all of the module names in the focus stack as a
1258                  multifield value.
1259 (get-focus-stack)
1260
1261 POP-FOCUS: Removes the current focus from the focus stack and returns the
1262            module name of the current focus.
1263 (pop-focus)
1264
1265 END-ENTRY
1266
1267 2IBEGIN-ENTRY-DEFGLOBAL_FUNCTIONS
1268
1269 The following functions provide ancillary capabilities for the defglobal 
1270 construct.
1271
1272 GET-DEFGLOBAL-LIST: Returns the list of all defglobals in the specified
1273                     module (or the current module if unspecified).
1274 (get-defglobal-list [<module-name>])
1275
1276 DEFGLOBAL-MODULE: Returns the module in which the specified defglobal is
1277                   defined.
1278 (defglobal-module <defglobal-name>)
1279
1280 END-ENTRY
1281
1282 2IBEGIN-ENTRY-DEFFUNCTION_FUNCTIONS
1283
1284 The following functions provide ancillary capabilities for the deffunction 
1285 construct.
1286
1287 GET-DEFFUNCTION-LIST: Returns the list of all deffunctions in the specified
1288                       module (or the current module if unspecified).
1289 (get-deffunction-list [<module-name>])
1290
1291 DEFFUNCTION-MODULE: Returns the module in which the specified deffunction 
1292                     is defined.
1293 (deffunction-module <deffunction-name>)
1294
1295 END-ENTRY
1296
1297 2IBEGIN-ENTRY-GENERIC_FUNCTION_FUNCTIONS 
1298
1299 FUNCTION_SUMMARY
1300   GENERIC_FUNCTION_FUNCTIONS
1301     
1302 The following functions provide ancillary capabilities for generic 
1303 function methods.
1304
1305 GET-DEFGENERIC-LIST: Returns the list of all defgenerics in the specified
1306                      module (or the current module if unspecified).
1307 (get-defgeneric-list [<module-name>])
1308
1309 DEFGENERIC-MODULE: Returns the module in which the specified defgeneric 
1310                    is defined.
1311 (defgeneric-module <defgeneric-name>)
1312
1313 GET-DEFMETHOD-LIST: Returns the list of all defmethods in the current
1314                     module (or just the methods associated with the
1315                     specified defgeneric).
1316 (get-defmethod-list [<defgeneric-name>])
1317
1318 TYPE: Returns a symbol which is the name of the type (or class) 
1319        of its of argument.
1320 (type <expression>)
1321
1322 NEXT-METHODP: If called from a method for a generic function, the function 
1323               next-methodp will return the symbol TRUE if there is another 
1324               method shadowed by the current one. Otherwise, the function
1325               will return the symbol FALSE.
1326 (next-methodp)
1327
1328 CALL-NEXT-METHOD: Calls the next shadowed method.
1329 (call-next-method)
1330
1331 OVERRIDE-NEXT-METHOD: Calls the next shadowed method allowing new 
1332                       arguments to be provided.
1333 (override-next-method <expression>*)
1334
1335 CALL-SPECIFIC-METHOD: Calls a particular method of a generic function without
1336                       regards to method precedence.
1337 (call-specific-method <generic-function> <method-index> <expression>*)
1338
1339 GET-METHOD-RESTRICTIONS: Returns a multifield value containing information
1340                          about the restrictions for the specified method.
1341 (get-method-restrictions <generic-function-name> <method-index>)
1342
1343 END-ENTRY
1344
1345 2MBEGIN-ENTRY-COOL_FUNCTIONS
1346
1347 FUNCTION_SUMMARY
1348   COOL_FUNCTIONS
1349
1350 The functions manipulating the CLIPS Object-Oriented Language (COOL)
1351 are divided into five categories. 
1352
1353 Subtopics: 
1354 CLASS_FUNCTIONS                    INSTANCE_SLOT_FUNCTIONS
1355 INSTANCE_MANIPULATION_FUNCTIONS    MESSAGE-HANDLER_FUNCTIONS  
1356 DEFINSTANCES_FUNCTIONS             INSTANCE_PREDICATE_FUNCTIONS
1357
1358 END-ENTRY
1359
1360 3IBEGIN-ENTRY-CLASS_FUNCTIONS
1361
1362 FUNCTION_SUMMARY
1363   COOL_FUNCTIONS
1364     CLASS_FUNCTIONS
1365
1366 The following functions are used with classes. 
1367
1368 GET-DEFCLASS-LIST: Returns the list of all defclasses in the specified
1369                    module (or the current module if unspecified).
1370 (get-defclass-list [<module-name>])
1371
1372 DEFCLASS-MODULE: Returns the module in which the specified defclass 
1373                    is defined.
1374 (defclass-module <defclass-name>)
1375
1376 CLASS-EXISTP: Returns TRUE if the specified class is defined, FALSE otherwise.
1377 (class-existp <class-name>)
1378
1379 SUPERCLASSP: Returns TRUE if the first class is a superclass of
1380              the second class, FALSE otherwise.
1381 (superclassp <class1-name> <class2-name>)
1382
1383 SUBCLASSP: Returns TRUE if the first class is a subclass of
1384            the second class, FALSE otherwise.
1385 (subclassp <class1-name> <class2-name>)
1386
1387 SLOT-EXISTP: Returns TRUE if the specified slot is present in the class, 
1388              FALSE otherwise. If the inherit keyword is specified, then
1389              the slot may be inherited.
1390 (slot-existp <class-name> <slot-name> [inherit])
1391
1392 SLOT-WRITABLEP: Returns TRUE if the specified slot is writable, 
1393                 otherwise FALSE.
1394 (slot-writablep <class-name> <slot-name>)
1395
1396 SLOT-INITABLEP: Returns TRUE if the specified slot is initializable, 
1397                 otherwise FALSE.
1398 (slot-initablep <class-name> <slot-name>)
1399
1400 SLOT-PUBLICP: Returns TRUE if the specified slot is public, 
1401               otherwise FALSE.
1402 (slot-initablep <class-name> <slot-name>)
1403
1404 SLOT-DIRECT-ACCESSP: Returns TRUE if the specified slot can be accessed 
1405                      directly, otherwise FALSE.
1406 (slot-direct-accessp <class-name> <slot-name>)
1407
1408 MESSAGE-HANDLER-EXISTP: Returns TRUE if the specified message-handler is 
1409                         defined (directly, not by inheritance) for the 
1410                         class, FALSE otherwise.
1411 (message-handler-existp <class-name> <handler-name> [<handler-type>])
1412 <handler-type> ::= around | before | primary | after
1413
1414 CLASS-ABSTRACTP: Returns TRUE if the specified class is abstract,
1415                  FALSE otherwise.
1416 (class-abstractp <class-name>)
1417
1418 CLASS-REACTIVEP: Returns TRUE if the specified class is reactive,
1419                  FALSE otherwise.
1420 (class-reactivep <class-name>)
1421
1422 CLASS-SUPERCLASSES: Returns the names of the direct superclasses of a class in
1423                     a multifield variable. If the optional "inherit" argument 
1424                     is given, indirect superclasses are also included.
1425 (class-superclasses <class-name> [inherit])
1426
1427 CLASS-SUBCLASSES: Returns the names of the direct subclasses of a class in a
1428                   multifield variable. If the optional "inherit" argument is
1429                   given, indirect subclasses are also included.
1430 (class-subclasses <class-name> [inherit])
1431
1432 CLASS-SLOTS: Returns the names of the explicitly defined slots of a class in
1433              a multifield variable. If the optional inherit keyword is
1434              given, inherited slots are also included.
1435 (class-slots <class-name> [inherit])
1436
1437 GET-DEFMESSAGE-HANDLER-LIST: Returns the class names, message names, and 
1438                              message types of the message-handlers directly 
1439                              attached to a class in a multifield variable. If 
1440                              the optional inherit keyword is given, inherited 
1441                              message-handlers are also included.
1442 (get-defmessage-handler-list <class-name> [inherit])
1443
1444 SLOT-FACETS: Returns the facet values for the specified slot of a class in a
1445              multifield value.
1446 (slot-facets <class-name> <slot-name>)
1447
1448 SLOT-SOURCES: Returns the names of the classes which provide facets for a 
1449               slot of a class in a multifield variable.
1450 (slot-sources <class-name> <slot-name>)
1451
1452 SLOT-TYPES: Returns the names of the primitive types allowed for a slot
1453             in a multifield variable.
1454 (slot-types <class-name> <slot-name>)
1455
1456 SLOT-CARDINALITY: Returns the minimum and maximum number of fields allowed 
1457                   for a multislot in a multifield variable.
1458 (slot-cardinality <class-name> <slot-name>)
1459
1460 SLOT-ALLOWED-VALUES: Returns the allowed values for a slot in a  
1461                      multifield value.
1462 (slot-allowed-values <class-name> <slot-name>)
1463
1464 SLOT-RANGE: Returns the minimum and maximum numeric values allowed
1465             for a slot.
1466 (slot-range <class-name> <slot-name>)
1467
1468 SLOT-DEFAULT-VALUE: Returns the default value associated with a slot.
1469 (slot-default-value <class-name> <slot-name>)
1470
1471 SET-CLASS-DEFAULTS-MODE: Sets the defaults mode used when classes are 
1472                          defined.
1473 (set-class-defaults-mode <mode>)
1474 <mode> ::= convenience | conservation
1475
1476 GET-CLASS-DEFAULTS-MODE: Returns the current defaults mode used when 
1477                          classes are defined.
1478 (get-class-defaults-mode)
1479
1480 END-ENTRY
1481
1482 3IBEGIN-ENTRY-MESSAGE-HANDLER_FUNCTIONS
1483
1484 FUNCTION_SUMMARY
1485   COOL_FUNCTIONS
1486     MESSAGE-HANDLER_FUNCTIONS
1487
1488 The following functions are used with message-handlers. 
1489
1490 NEXT-HANDLERP: Returns TRUE if there is another message-handler available
1491                for execution, FALSE otherwise.
1492 (next-handlerp)
1493
1494 CALL-NEXT-HANDLER: Calls the next shadowed handler.
1495 (call-next-handler)
1496
1497 OVERRIDE-NEXT-HANDLER: Calls the next shadowed handler and allows the 
1498                        arguments to be changed.
1499 (override-next-handler <expression>*)
1500
1501 END-ENTRY
1502
1503 3IBEGIN-ENTRY-DEFINSTANCES_FUNCTIONS
1504
1505 FUNCTION_SUMMARY
1506   COOL_FUNCTIONS
1507     DEFINSTANCES_FUNCTIONS
1508
1509 The following functions are used with definstances. 
1510
1511 GET-DEFINSTANCES-LIST: Returns the list of all definstances in the specified
1512                        module (or the current module if unspecified).
1513 (get-definstances-list [<module-name>])
1514
1515 DEFINSTANCES-MODULE: Returns the module in which the specified definstance 
1516                      is defined.
1517 (definstances-module <definstances-name>)
1518
1519 END-ENTRY
1520
1521 3IBEGIN-ENTRY-INSTANCE_MANIPULATION_FUNCTIONS
1522
1523 FUNCTION_SUMMARY
1524   COOL_FUNCTIONS
1525     INSTANCE_MANIPULATION_FUNCTIONS
1526
1527 The following manipulation functions are used with instances. 
1528
1529 INIT-SLOTS: Implements the init message-handler attached to the class
1530             USER. This function should never be called directly unless
1531             an init message-handler is being defined such that the one
1532             attached to USER will never be called.
1533 (init-slots)
1534
1535 UNMAKE-INSTANCE: Deletes the specified instance by sending it 
1536                  the delete message.
1537 (unmake-instance <instance-expression> | *)
1538
1539 DELETE-INSTANCE: Deletes the active instance when called from within
1540                  the body of a message-handler.
1541 (delete-instance)
1542
1543 CLASS: Returns a symbol which is the name of the class of its argument.
1544 (class <object-expression>)
1545
1546 INSTANCE-NAME: Returns a symbol which is the name of its instance argument.
1547 (instance-name <instance-expression>)
1548
1549 INSTANCE-ADDRESS: Returns the address of its instance argument.
1550 (instance-address <instance-expression>)
1551
1552 SYMBOL-TO-INSTANCE-NAME: Converts a symbol to an instance name.
1553 (symbol-to-instance-name <symbol-expression>)
1554
1555 INSTANCE-NAME-TO-SYMBOL: Converts an instance name to a symbol.
1556 (instance-name-to-symbol <instance-name-expression>)
1557
1558 END-ENTRY
1559
1560 3IBEGIN-ENTRY-INSTANCE_PREDICATE_FUNCTIONS
1561
1562 FUNCTION_SUMMARY
1563   COOL_FUNCTIONS
1564     INSTANCE_PREDICATE_FUNCTIONS
1565
1566 The following predicate functions are used with instances. 
1567
1568 INSTANCEP: Returns TRUE if its argument is an instance name or instance
1569            address, FALSE otherwise.
1570 (instancep <expression>)
1571
1572 INSTANCE-ADDRESSP: Returns TRUE if its argument is an instance address,
1573                    FALSE otherwise.
1574 (instance-addressp <expression>)
1575
1576 INSTANCE-NAMEP: Returns TRUE if its argument is an instance name,
1577                 FALSE otherwise.
1578 (instance-namep <expression>)
1579
1580 INSTANCE-EXISTP: Returns TRUE if the specified instance exists,
1581                  FALSE otherwise.
1582 (instance-existp <instance-expression>)
1583
1584 END-ENTRY
1585
1586 3IBEGIN-ENTRY-INSTANCE_SLOT_FUNCTIONS
1587
1588 FUNCTION_SUMMARY
1589   COOL_FUNCTIONS
1590     INSTANCE_SLOT_FUNCTIONS
1591
1592 The following functions are used to manipulate instance slots. 
1593
1594 DYNAMIC-GET: Returns the value of the specified slot of the active instance.
1595 (dynamic-get <slot-name-expression>)
1596
1597 DYNAMIC-PUT: Sets the value of the specified slot of the active instance.
1598 (put <slot-name-expression> <expression>*)
1599
1600 SLOT-REPLACE$: Allows the replacement of a range of fields in a multifield
1601                slot value.
1602 (slot-replaceR <instance-expression> <mv-slot-name>
1603                <range-begin> <range-end> <expression>+)
1604                  
1605 DIRECT-SLOT-REPLACE$: Allows the replacement of a range of fields in a
1606                       multifield slot value of the active instance from 
1607                       within a message-handler.
1608 (direct-slot-replace$ <mv-slot-name> <range-begin> <range-end> <expression>+)
1609    
1610 SLOT-INSERT$: Allows the insertion of one or more values in a multifield
1611               slot value.
1612 (slot-insert$ <instance-expression> <mv-slot-name> <index> <expression>+)
1613                  
1614 DIRECT-SLOT-INSERT$: Allows the insertion of one or more values in a
1615                      multifield slot value of the active instance from 
1616                      within a message-handler.
1617 (direct-slot-insert$ <mv-slot-name> <index> <expression>+)
1618     
1619 SLOT-DELETE$: Allows the deletion of a range of fields in a multifield
1620              slot value.
1621 (slot-delete$ <instance-expression> <mv-slot-name> <range-begin> <range-end>)
1622                  
1623 DIRECT-SLOT-DELETE$: Allows the deletion of a range of fields in a multifield
1624                      slot value of the active instance from within a 
1625                      message-handler.
1626 (direct-slot-delete$ <mv-slot-name> <range-begin> <range-end>)
1627              
1628 END-ENTRY
1629
1630 2IBEGIN-ENTRY-DEFMODULE_FUNCTIONS
1631
1632 The following functions provide ancillary capabilities for the defmodule 
1633 construct.
1634
1635 GET-DEFMODULE-LIST: Returns the list of all defmodules.
1636 (get-defmodule-list)
1637
1638 END-ENTRY
1639
1640 2IBEGIN-ENTRY-SEQUENCE_EXPANSION_FUNCTIONS
1641
1642 The following functions provide ancillary capabilities for the sequence 
1643 expansion operator.
1644
1645 EXPAND$: When used inside of a function call, expands its arguments
1646          as separate arguements to the function. The $ operator is 
1647          merely a shorthand notation for the expand$ function call.
1648 (expand$; <multifield-expression>)
1649
1650 SET-SEQUENCE-OPERATOR-RECOGNITION: Sets the sequence operator recognition
1651                                    behavior.
1652 (set-sequence-operator-recognition; <boolean-expression>)
1653
1654 GET-SEQUENCE-OPERATOR-RECOGNITION: Returns the current value of the sequence 
1655                                    operator recognition behavior.
1656 (get-sequence-operator-recognition)
1657
1658 END-ENTRY
1659
1660 1MBEGIN-ENTRY-COMMAND_SUMMARY
1661
1662 COMMAND_SUMMARY
1663
1664 This section gives a general overview of the available CLIPS commands.
1665
1666 Subtopics: 
1667 ENVIRONMENT_COMMANDS       DEFFUNCTION_COMMANDS
1668 DEBUGGING_COMMANDS         GENERIC_FUNCTION_COMMANDS
1669 DEFTEMPLATE_COMMANDS       COOL_COMMANDS
1670 FACT_COMMANDS              DEFMODULE_COMMANDS
1671 DEFFACTS_COMMANDS          MEMORY_COMMANDS
1672 DEFRULE_COMMANDS           TEXT_PROCESSING_COMMANDS
1673 AGENDA_COMMANDS            PROFILING_COMMANDS
1674 DEFGLOBAL_COMMANDS
1675     
1676 END-ENTRY
1677
1678 2IBEGIN-ENTRY-ENVIRONMENT_COMMANDS
1679
1680 COMMAND_SUMMARY
1681   ENVIRONMENT_COMMANDS
1682     
1683 The following commands control the CLIPS environment.
1684
1685 LOAD: Loads constructs from a file.
1686 (load <file-name>)
1687
1688 LOAD*: Loads constructs from a file without displaying informational
1689        messages.
1690 (load* <file-name>)
1691
1692 SAVE: Saves constructs to a file.
1693 (save <file-name>)
1694
1695 BLOAD: Loads a binary image from a file.
1696 (bload <file-name>)
1697
1698 BSAVE: Saves a binary image to a file.
1699 (bsave <file-name>)
1700
1701 CLEAR: Clears the CLIPS environment.
1702 (clear)
1703
1704 EXIT: Exits the CLIPS environment.
1705 (exit)
1706
1707 RESET: Resets the CLIPS environment.
1708 (reset)
1709
1710 BATCH: Executes commands from a file.
1711 (batch <file-name>)
1712
1713 BATCH*: Executes commands from a file. Unlike the batch command,
1714         evaluates all of the commands in the specified file before 
1715         returning rather than replacing standard input.
1716 (batch* <file-name>)
1717
1718 OPTIONS: Lists the settings of CLIPS compiler flags.
1719 (options)
1720
1721 SYSTEM: Appends its arguments together to form a command which is
1722         then sent to the operating system.
1723 (system <lexeme-expression>*)
1724
1725 SET-AUTO-FLOAT-DIVIDEND: Sets the auto-float dividend behaviour.
1726 (set-auto-float-dividend <boolean-expression>)
1727
1728 GET-AUTO-FLOAT-DIVIDEND: Returns the current value of the auto-float 
1729                          dividend behaviour.
1730 (get-auto-float-dividend)
1731
1732 SET-DYNAMIC-CONSTRAINT-CHECKING: Sets the dynamic constraint checking
1733                                  behaviour.
1734 (set-dynamic-constraint-checking <boolean-expression>)
1735
1736 GET-DYNAMIC-CONSTRAINT-CHECKING: Returns the current value of the dynamic
1737                                  constraint checking behaviour.
1738 (get-dynamic-constraint-checking)
1739
1740 SET-STATIC-CONSTRAINT-CHECKING: Sets the static constraint checking
1741                                 behaviour.
1742 (set-static-constraint-checking <boolean-expression>)
1743
1744 GET-STATIC-CONSTRAINT-CHECKING: Returns the current value of the static
1745                                 constraint checking behaviour.
1746 (get-static-constraint-checking)
1747
1748 APROPOS: Displays all symbols currently defined in CLIPS which contain 
1749          a specified substring
1750 (apropos <lexeme>)
1751
1752 END-ENTRY
1753
1754 2IBEGIN-ENTRY-DEBUGGING_COMMANDS
1755
1756 COMMAND_SUMMARY
1757   DEBUGGING_COMMANDS
1758   
1759 The following commands control the CLIPS debugging features.
1760
1761 DRIBBLE-ON: Sends trace information to the specified file.
1762 (dribble-on <file-name>)
1763
1764 DRIBBLE-OFF: Closes the trace file.
1765 (dribble-off)
1766
1767 WATCH: Enables trace information for the specified item.
1768 (watch <watch-item>)
1769 <watch-item> ::= all |
1770                  compilations | 
1771                  statistics |
1772                  focus |
1773                  messages |
1774                  deffunctions <deffunction-name>* |
1775                  globals <global-name>* |
1776                  rules <rule-name>* |
1777                  activations <rule-name>* |
1778                  facts <deftemplate-name>* |
1779                  instances <class-name>* |
1780                  slots <class-name>* |
1781                  message-handlers <handler-spec-1>* [<handler-spec-2>]) |
1782                  generic-functions <generic-name>* |
1783                  methods <method-spec-1>* [<method-spec-2>]
1784
1785 <handler-spec-1> ::= <class-name> <handler-name> <handler-type>
1786 <handler-spec-2> ::= <class-name> [<handler-name> [<handler-type>]]
1787
1788 <method-spec-1> ::= <generic-name> <method-index>
1789 <method-spec-2> ::= <generic-name> [<method-index>]
1790
1791 UNWATCH: Disables trace information for the specified item.
1792 (unwatch <watch-item>)
1793
1794 LIST-WATCH-ITEMS: Displays the current state of watch items.
1795 (list-watch-items [<watch-item>])
1796
1797 END-ENTRY
1798
1799 2IBEGIN-ENTRY-DEFTEMPLATE_COMMANDS
1800
1801 COMMAND_SUMMARY
1802   DEFTEMPLATE_COMMANDS
1803
1804 The following commands manipulate deftemplates.
1805
1806 PPDEFTEMPLATE: Displays the text of a given deftemplate.
1807 (ppdeftemplate <deftemplate-name>)
1808
1809 LIST-DEFTEMPLATES: Displays the list of all deftemplates in the specified
1810                    module (or the current module if none specified).
1811 (list-deftemplates [<module-name>])
1812
1813 UNDEFTEMPLATE: Deletes a deftemplate.
1814 (undeftemplate <deftemplate-name>)
1815
1816 END-ENTRY
1817
1818 2IBEGIN-ENTRY-FACT_COMMANDS
1819
1820 COMMAND_SUMMARY
1821   FACT_COMMANDS
1822
1823 The following commands display information about facts.
1824
1825 FACTS: Display the facts in the fact-list.
1826 (facts [<module-name>]
1827        [<start-integer-expression> 
1828        [<end-integer-expression> 
1829        [<max-integer-expression>]]])
1830
1831 LOAD-FACTS: Asserts facts loaded from a file.
1832 (load-facts <file-name>)
1833
1834 SAVE-FACTS: Saves facts to a file.
1835 (save-facts <file-name> [<save-scope> <deftemplate-names>*])
1836 <save-scope> ::= visible | local
1837
1838 DEPENDENCIES: Lists the partial matches from which a fact or 
1839               instance receives logical support.
1840 (dependencies <fact-or-instance-specifier>)
1841
1842 DEPENDENTS: Lists all facts or instances which receive logical support 
1843            from a fact or instance.
1844 (dependents <fact-or-instance-specifier>)
1845
1846 SET-FACT-DUPLICATION: Sets the fact duplication behavior.
1847 (set-fact-duplication <boolean-expression>)
1848
1849 GET-FACT-DUPLICATION: Returns the fact duplication behavior.
1850 (get-fact-duplication)
1851
1852 END-ENTRY
1853
1854 2IBEGIN-ENTRY-DEFFACTS_COMMANDS
1855
1856 COMMAND_SUMMARY
1857   DEFFACTS_COMMANDS
1858
1859 The following commands manipulate deffacts.
1860
1861 PPDEFFACTS: Displays the text of a given deffacts.
1862 (ppdeffacts <deffacts-name>)
1863
1864 LIST-DEFFACTS: Displays the list of all deffacts in the specified
1865                module (or the current module if none specified).
1866 (list-deffacts [<module-name>])
1867
1868 UNDEFFACTS: Deletes a deffacts.
1869 (undeffacts <deffacts-name>)
1870
1871 END-ENTRY
1872
1873 2IBEGIN-ENTRY-DEFRULE_COMMANDS
1874
1875 COMMAND_SUMMARY
1876   DEFRULE_COMMANDS
1877
1878 The following commands manipulate defrules.
1879
1880 PPDEFRULE: Displays the text of a given rule.
1881 (ppdefrule <rule-name>)
1882
1883 LIST-DEFRULES: Displays the list of all defrules in the specified
1884                module (or the current module if none specified).
1885 (list-defrules [<module-name>])
1886
1887 UNDEFRULE: Deletes a defrule.
1888 (undefrule <rule-name>)
1889
1890 MATCHES: Displays the facts which match the patterns of a rule.
1891 (matches <rule-name>)
1892
1893 SET-BREAK: Sets a breakpoint on a rule.
1894 (set-break <rule-name>)
1895
1896 REMOVE-BREAK: Removes a breakpoint on a rule.
1897 (remove-break [<rule-name>])
1898
1899 SHOW-BREAKS: Displays all rules having breakpoints.
1900 (show-breaks [<module-name>])
1901
1902 REFRESH: Places all current activations of a rule on the agenda.
1903 (refresh <rule-name>)
1904
1905 SET-INCREMENTAL-RESET: Sets the incremental reset behavior.
1906 (set-incremental-reset <boolean-expression>)
1907
1908 GET-INCREMENTAL-RESET: Returns the incremental reset behavior.
1909 (get-incremental-reset)
1910
1911 END-ENTRY
1912
1913 2IBEGIN-ENTRY-AGENDA_COMMANDS
1914
1915 COMMAND_SUMMARY
1916   AGENDA_COMMANDS
1917
1918 The following commands manipulate the agenda.
1919
1920 AGENDA: Displays all activations on the agenda of the specified module.
1921 (agenda [<module-name>])
1922
1923 RUN: Starts execution of rules.  Rules fire until agenda is empty or
1924      the number of rule firings limit specified by the first argument 
1925      is reached (infinity if unspecified).
1926 (run [<integer-expression>])
1927
1928 FOCUS: Pushes one or more modules onto the focus stack.
1929 (focus <module-name>+)
1930
1931 HALT: Stops rule execution.
1932 (halt)
1933
1934 SET-STRATEGY: Sets the current conflict resolution strategy.
1935 (set-strategy <strategy>)
1936 <strategy> ::= depth | breadth | simplicity | complexity | lex | mea | random
1937
1938 GET-STRATEGY: Returns the current conflict resolution strategy.
1939 (get-strategy)
1940
1941 LIST-FOCUS-STACK: Lists all module names on the focus stack.
1942 (list-focus-stack)
1943
1944 CLEAR-FOCUS-STACK: Removes all modules from the focus stack.
1945 (clear-focus-stack)
1946
1947 SET-SALIENCE-EVALUATION: Sets the salience evaluation behavior.
1948 (set-salience-evaluation <behavior>)
1949 <behavior> ::= when-defined | when-activated | every-cycle
1950
1951 GET-SALIENCE-EVALUATION: Returns the salience evaluation behavior.
1952 (get-salience-evaluation)
1953
1954 REFRESH-AGENDA: Forces reevaluation of salience of rules on the agenda
1955                 of the specified module.
1956 (refresh-agenda [<module-name>])
1957
1958 END-ENTRY
1959
1960 2IBEGIN-ENTRY-DEFGLOBAL_COMMANDS
1961 COMMAND_SUMMARY
1962   DEFGLOBAL_COMMANDS
1963   
1964 The following commands manipulate defglobals.
1965
1966 PPDEFGLOBAL: Displays the text required to define a given global variable.
1967 (ppdefglobal <global-variable-name>)
1968
1969 LIST-DEFGLOBALS: Displays the list of all defglobals in the specified
1970                  module (or the current module if none specified).
1971 (list-defglobals [<module-name>])
1972
1973 UNDEFGLOBAL: Deletes a global variable.
1974 (undefglobal <global-variable-name>)
1975
1976 SHOWS-DEFGLOBALS: Displays the name and current value of all defglobals 
1977                   in the specified module (or the current module if none
1978                   specified).
1979 (show-defglobals [<module-name>])
1980
1981 SET-RESET-GLOBALS: Sets the reset global variables behavior.
1982 (set-reset-globals <boolean-expression>)
1983
1984 GET-RESET-GLOBALS: Returns the reset global variables behavior.
1985 (get-reset-globals)
1986
1987 END-ENTRY
1988
1989 2IBEGIN-ENTRY-DEFFUNCTION_COMMANDS
1990
1991 COMMAND_SUMMARY
1992   DEFFUNCTION_COMMANDS
1993  
1994 The following commands manipulate deffunctions.
1995
1996 PPDEFFUNCTION: Displays the text of a given deffunction.
1997 (ppdeffunction <deffunction-name>)
1998
1999 LIST-DEFFUNCTIONS: Displays the list of all deffunctions in the specified
2000                    module (or the current module if none specified).
2001 (list-deffunctions [<deffunction-name>])
2002
2003 UNDEFFUNCTION: Deletes a deffunction.
2004 (undeffunction <deffunction-name>)
2005
2006 END-ENTRY
2007
2008 2IBEGIN-ENTRY-GENERIC_FUNCTION_COMMANDS
2009
2010 COMMAND_SUMMARY
2011   GENERIC_FUNCTION_COMMANDS
2012  
2013 The following commands manipulate generic functions.
2014
2015 PPDEFGENERIC: Displays the text of a given generic function header.
2016 (ppdefgeneric <generic-function-name>)
2017
2018 PPDEFMETHOD: Displays the text of a given method.
2019 (ppdefmethod <generic-function-name> <index>)
2020
2021 LIST-DEFGENERICS: Displays the names of all generic functions in the specified
2022                   module (or the current module if none specified).
2023 (list-defgenerics [<module-name>])
2024
2025 LIST-DEFMETHODS: Displays a list of generic function methods.
2026 (list-defmethods [<generic-function-name>])
2027
2028 UNDEFGENERIC: Deletes a generic function.
2029 (undefgeneric <generic-function-name>)
2030
2031 UNDEFMETHOD: Deletes a generic function method.
2032 (undefmethod <generic-function-name> <index>)
2033
2034 PREVIEW-GENERIC: Lists all applicable methods for a particular generic
2035                  function call in order of decreasing precedence.
2036 (preview-generic <generic-function-name> <expression>*)
2037
2038 END-ENTRY
2039
2040 2MBEGIN-ENTRY-COOL_COMMANDS
2041
2042 COMMAND_SUMMARY
2043   COOL_COMMANDS
2044
2045 The commands manipulating the CLIPS Object-Oriented Language (COOL)
2046 are divided into four categories. 
2047
2048 Subtopics: 
2049 CLASS_COMMANDS                MESSAGE-HANDLER_COMMANDS 
2050 DEFINSTANCES_COMMANDS         INSTANCES_COMMANDS
2051
2052 END-ENTRY
2053
2054 3IBEGIN-ENTRY-CLASS_COMMANDS
2055
2056 COMMAND_SUMMARY
2057   COOL_COMMANDS
2058     CLASS_COMMANDS
2059
2060 The following commands manipulate defclasses. 
2061
2062 PPDEFCLASS: Displays the text of a given defclass.
2063 (ppdefclass <class-name>)
2064
2065 LIST-DEFCLASSES: Displays the list of all defclasses in the specified
2066                  module (or the current module if none specified).
2067 (list-defclasses [<module-name>])
2068
2069 UNDEFCLASS: Deletes a defclass, all its subclasses, and all
2070             associated instances.
2071 (undefclass <class-name>)
2072
2073 DESCRIBE-CLASS: Provides a verbose description of a class.
2074 (describe-class <class-name>)
2075
2076 BROWSE-CLASSES: Provides a rudimentary display of the inheritance
2077                 relationships between a class and all its subclasses.
2078 (browse-classes [<class-name>])
2079
2080 END-ENTRY
2081
2082 3IBEGIN-ENTRY-MESSAGE-HANDLER_COMMANDS
2083
2084 COMMAND_SUMMARY
2085   COOL_COMMANDS
2086     MESSAGE-HANDLER_COMMANDS
2087
2088 The following commands manipulate defmessage-handlers. Note that
2089 <handler-type> is defined as follows:
2090
2091 <handler-type> ::= around | before | primary | after
2092
2093 PPDEFMESSAGE-HANDLER: Displays the text of a given defmessage-handler.
2094 (ppdefmessage-handler <class-name> <handler-name> [<handler-type>])
2095
2096 LIST-DEFMESSAGE-HANDLERS: Displays a list of all (or some) defmessage-
2097 handlers.
2098 (list-defmessage-handlers [<class-name> [<handler-name> [<handler-type>]]])
2099
2100 UNDEFMESSAGE-HANDLER: Deletes a defmessage-handler.
2101 (undefmessage-handler <class-name> <handler-name> [<handler-type>])
2102
2103 PREVIEW-SEND: Displays a list of all the applicable message-handlers for
2104               a message sent to an instance of a particular class.
2105 (preview-send <class-name> <message-name>)
2106
2107 END-ENTRY
2108
2109 3IBEGIN-ENTRY-DEFINSTANCES_COMMANDS
2110
2111 COMMAND_SUMMARY
2112   COOL_COMMANDS
2113     DEFINSTANCES_COMMANDS
2114
2115 The following commands manipulate definstances. 
2116
2117 PPDEFINSTANCES: Displays the text of a given definstances.
2118 (ppdefinstances <definstances-name>)
2119
2120 LIST-DEFINSTANCES: Displays the list of all definstances in the specified
2121                    module (or the current module if none specified).
2122 (list-definstances [<module-name>])
2123
2124 UNDEFINSTANCES: Deletes a definstances.
2125 (undefinstances <definstances-name>)
2126
2127 END-ENTRY
2128
2129 3IBEGIN-ENTRY-INSTANCES_COMMANDS
2130
2131 COMMAND_SUMMARY
2132   COOL_COMMANDS
2133     INSTANCES_COMMANDS
2134
2135 The following commands manipulate instances of user-defined classes. 
2136
2137 INSTANCES: Displays a list of instances.
2138 (instances [<module-name> [<class-name> [inherit]]])
2139
2140 PPINSTANCE: Prints the slots of the active instance when called from 
2141             within the body of a message-handler.
2142 (ppinstance)
2143
2144 SAVE-INSTANCES: Saves all instances to the specified file.
2145 (save-instances <file-name>)
2146
2147 LOAD-INSTANCES: Loads instances from the specified file.
2148 (load-instances <file-name>)
2149
2150 RESTORE-INSTANCES: Loads instances from the specified file.
2151 (restore-instances <file-name>)
2152
2153 END-ENTRY
2154
2155 2IBEGIN-ENTRY-DEFMODULE_COMMANDS
2156
2157 COMMAND_SUMMARY
2158   DEFMODULE_COMMANDS
2159
2160 The following commands manipulate defmodules.
2161
2162 PPDEFMODULE: Displays the text of a given defmodule.
2163 (ppdefmodule <defmodule-name>)
2164
2165 LIST-DEFMODULES: Displays the list of all defmodules.
2166 (list-defmodules)
2167
2168 SET-CURRENT-MODULE: Sets the current module.
2169 (set-current-module <module-name>)
2170
2171 GET-CURRENT-MODULE: Returns the current module.
2172 (get-current-module)
2173
2174 END-ENTRY
2175
2176 2IBEGIN-ENTRY-MEMORY_COMMANDS
2177
2178 COMMAND_SUMMARY
2179   MEMORY_COMMANDS
2180   
2181 The following commands display CLIPS memory status information.
2182
2183 MEM-USED: Returns number of bytes of memory CLIPS is using.
2184 (mem-used)
2185
2186 MEM-REQUESTS: Returns the number of times CLIPS has requested memory
2187               from the operating system.
2188 (mem-requests)
2189
2190 RELEASE-MEM: Releases all free memory held internally by CLIPS by to
2191              the operating system. Returns the amount of memory freed.
2192 (release-mem)
2193
2194 CONSERVE-MEM: Turns on or off the storage of information used for the
2195               save and pretty-print commands.
2196 (conserve-mem <status>)
2197 <status> ::= on | off
2198
2199 END-ENTRY
2200
2201 2IBEGIN-ENTRY-TEXT_PROCESSING_COMMANDS
2202
2203 COMMAND_SUMMARY
2204   TEXT_PROCESSING_COMMANDS
2205   
2206 The following commands can be used by users to maintain their own
2207 information system similar to the help facility.
2208
2209 FETCH: Loads the named file into the internal lookup table.
2210 (fetch <file-name>)
2211
2212 PRINT-REGION: Looks up the specified entry in a particular file which has
2213               been previously loaded into the lookup table and prints the
2214               contents of that entry to the specified logical name.
2215 (print-region <logical-name> <lookup-file> <topic-field>*)
2216
2217 TOSS: Unloads the named file from the internal lookup table.
2218 (toss <file-name>)
2219
2220 END-ENTRY
2221
2222 2IBEGIN-ENTRY-PROFILING_COMMANDS
2223
2224 COMMAND_SUMMARY
2225   PROFILING_COMMANDS
2226   
2227 The following commands provide the ability to profile CLIPS programs 
2228 for performance.
2229
2230 SET-PROFILE-PERCENT-THRESHOLD: Sets the minimum percentage of time that 
2231                                must be spent executing a construct or user 
2232                                function for it to be displayed by the 
2233                                profile-info command.
2234 (set-profile-percent-threshold <number in the range 0 to 100>)
2235
2236 GET-PROFILE-PERCENT-THRESHOLD: Returns the current value of the
2237                                profile percent threshold.
2238 (get-profile-percent-threshold)
2239
2240 PROFILE-RESET: Resets all profiling information currently collected 
2241                for constructs and user functions.
2242 (profile-reset)
2243
2244 PROFILE-INFO: Displays profiling information currently collected for 
2245               constructs or user functions.
2246 (profile-info)
2247
2248 PROFILE: Enables/disables profiling of constructs and user 
2249          functions.
2250 (profile constructs | user-functions | off)
2251
2252 END-ENTRY
2253
2254 1MBEGIN-ENTRY-INTEGRATED_EDITOR
2255
2256 INTEGRATED_EDITOR
2257
2258 CLIPS includes a fully integrated version of the full screen MicroEMACS 
2259 editor. You may call the editor from CLIPS, compile full buffers or just 
2260 sections of the editor (incremental compile), temporarily exit the editor back 
2261 to CLIPS, or permanently exit the editor.  Since the editor is full screen, 
2262 portions of it are highly machine dependent.  As it is currently set up, the 
2263 editor will run on VAX VMS machines using VT100- or VT240-compatible 
2264 terminals, UNIX systems which support TERMCAP, the IBM PC, and most IBM 
2265 compatibles.
2266
2267 Subtopics: 
2268 USING_THE_EDITOR           EXTENDED_COMMANDS
2269 CONTROL_COMMANDS           META_COMMANDS                
2270
2271 END-ENTRY
2272
2273 2IBEGIN-ENTRY-USING_THE_EDITOR
2274
2275 INTEGRATED_EDITOR
2276   USING_THE_EDITOR
2277
2278 The editor may be called from CLIPS with the following command:
2279
2280     (edit ["<file-name>"])
2281
2282 The file name is optional. If one is given, that file would be loaded.  If no 
2283 file name is given, the editor is entered without loading a file.  Once in the 
2284 file, all of the EMACS commands listed below are applicable.  To exit the 
2285 editor and clear all buffers, use <Ctrl-Z> or <Ctrl-X><Ctrl-C>.  To 
2286 temporarily exit the editor and retain the information in the buffers, use 
2287 <Ctrl-X> Q.  To compile a rules section, mark a region and type 
2288 <Ctrl-X><Ctrl-T>. To compile the entire buffer, use <Meta-T>. The editor can 
2289 use extensive amounts of memory and a flag is available in clips.h to remove 
2290 all of the editor code.
2291
2292 When using the editor on multiuser machines like the VAX or many UNIX 
2293 environments, be careful with the control S and control Q commands; they could 
2294 conflict with terminal XON/XOFF communications. All of the control S commands 
2295 have a work around built into the editor. The save file command, normally 
2296 <Ctrl-X><Ctrl-S>, is also <Meta> Z. The forward search command, normally 
2297 <Ctrl-S>, is also <Meta> J. The control Q command is rarely needed in a CLIPS 
2298 file and, therefore, has no substitute.
2299
2300 The following two special characters should be noted when using the editor.
2301   
2302  <del>                 Delete previous character.
2303                        (also <ctrl-H> on some terminals)
2304  <esc>                 Meta command prefix.
2305                        (also <ctrl-[> on some terminals)
2306
2307 END-ENTRY
2308
2309 2IBEGIN-ENTRY-CONTROL_COMMANDS
2310
2311 INTEGRATED_EDITOR
2312   CONTROL_COMMANDS
2313   
2314 These commands are entered by pressing the control key along with the 
2315 designated character.
2316
2317  <ctrl-@>          Set mark at current position.
2318  <ctrl-A>          Move cursor to beginning of line.
2319  <ctrl-B>          Move cursor BACK one character.
2320  <ctrl-C>          Start a new interactive command shell.  Be careful!
2321  <ctrl-D>          DELETE character under cursor.
2322  <ctrl-E>          Move cursor to END of line.
2323  <ctrl-F>          Move cursor FORWARD one character.
2324  <ctrl-G>          Abort any command.
2325  <ctrl-H>          (backspace) delete previous character.
2326  <ctrl-I>          Insert a TAB.
2327  <ctrl-J>          Insert a CR-LF and indent next line.
2328  <ctrl-K>          KILL (delete) to end of line.
2329  <ctrl-L>          Redisplay screen.
2330  <ctrl-M>          Insert a CR-LF.
2331  <ctrl-N>          Move cursor to NEXT line.
2332  <ctrl-O>          OPEN a new line.
2333  <ctrl-P>          Move to PREVIOUS line.
2334  <ctrl-Q>          QUOTE the next character (insert the next character typed).
2335  <ctrl-R>          Reverse SEARCH.
2336  <ctrl-S>          Forward SEARCH (also <Meta-J>).
2337  <ctrl-T>          TRANSPOSE characters.
2338  <ctrl-U>          Enter repeat count for next command.
2339  <ctrl-V>          VIEW the next screen (scroll up one screen).
2340  <ctrl-W>          KILL region (all text between cursor and last mark set).
2341  <ctrl-X>          Extended command prefix - see below.
2342  <ctrl-Y>          YANK (undelete) last text killed.
2343  <ctrl-Z>          Quick save of file in current buffer (only) and exit.
2344
2345 END-ENTRY
2346
2347 2IBEGIN-ENTRY-EXTENDED_COMMANDS
2348
2349 INTEGRATED_EDITOR
2350   EXTENDED_COMMANDS
2351   
2352 These commands are entered by first pressing the control key along with the 
2353 'x' character and then pressing the designated character.
2354
2355  <ctrl-X>(             Begin keyboard Macro.
2356  <ctrl-X>)             End keyboard Macro.
2357  <ctrl-X>!             Execute a single external command.
2358  <ctrl-X>=             Show current cursor column and line number.
2359  <ctrl-X>:             Go to a specific line number.
2360  <ctrl-X>1             Display current window only.
2361  <ctrl-X>2             Split the current window.
2362  <ctrl-X>B             Switch to a different BUFFER.
2363  <ctrl-X>E             EXECUTE keyboard Macro.
2364  <ctrl-X>F             Set FILL column.
2365  <ctrl-X>K             KILL a buffer (other than current buffer).
2366  <ctrl-X>M             MATCH parenthesis (or {} or []).
2367  <ctrl-X>N             Move to NEXT window.
2368  <ctrl-X>P             Move to PREVIOUS window.
2369  <ctrl-X>R             Global search and REPLACE (backwards).
2370  <ctrl-X>S             Global SEARCH and replace (forwards).
2371  <ctrl-X>Z             Enlarge current window by repeat count <ctrl-U> lines.
2372
2373  <ctrl-X><ctrl-B>      Show active BUFFERS.
2374  <ctrl-X><ctrl-C>      Exit without saving buffers.
2375  <ctrl-X><ctrl-F>      FIND file.  Load if not already in buffer.
2376  <ctrl-X><ctrl-N>      Scroll current window up by repeat count lines.
2377  <ctrl-X><ctrl-P>      Scroll current window down by repeat count lines.
2378  <ctrl-X><ctrl-R>      RENAME file.  Change file name for buffer.
2379  <ctrl-X><ctrl-S>      SAVE (write) current buffer into its file.
2380  <ctrl-X><ctrl-V>      VISIT a file.  Read file and display in current window.
2381  <ctrl-X><ctrl-W>      WRITE buffer to file.  Option to change name of file.
2382  <ctrl-X><ctrl-Z>      Reduce current window by repeat count lines.
2383
2384 END-ENTRY
2385
2386 2IBEGIN-ENTRY-META_COMMANDS
2387
2388 INTEGRATED_EDITOR
2389   META_COMMANDS
2390   
2391 These commands are entered by first pressing the meta key (Activated by <esc> 
2392 or <ctrl-[>) and then pressing the designated character.
2393         
2394  <meta>!                Move current line to repeat count lines from top of
2395                         window.
2396  <meta>>                Move cursor to end of buffer.
2397  <meta><                Move cursor to beginning of buffer.
2398  <meta>.                Set mark.
2399  <meta>B                Move cursor BACK one word.
2400  <meta>C                CAPITALIZE first letter of word.
2401  <meta>D                DELETE next word.
2402  <meta>F                Move cursor FORWARD one word.
2403  <meta>J                SEARCH forward (same as <ctrl-S>).
2404  <meta>L                LOWERCASE (lowercase) next word.
2405  <meta>R                Query search and REPLACE (backwards).
2406  <meta>S                Query SEARCH and replace (forwards).
2407  <meta>U                UPPERCASE (uppercase) next word.
2408  <meta>V                VIEW the previous screen (scroll down one screen).
2409  <meta>W                COPY region into kill buffer.
2410  <meta>Z                SAVE current buffer into file (same as
2411                         <ctrl-X><ctrl-S>).
2412  <meta><del>            DELETE previous word.
2413
2414 END-ENTRY
2415
2416
2417
This page took 0.449529 seconds and 3 git commands to generate.