Table of ContentsCLIPS IFG
Interfaces Guide
Version 6.xx January 2010
CLIPS DocumentationTwo documents are provided with CLIPS. The CLIPS Reference Manual which is split into the following parts:
AcknowledgementsAs with any large project, CLIPS is the result of the efforts of numerous people. The primary contributors have been: Robert Savely, who conceived the project and provided overall direction and support; Chris Culbert, who managed the project and wrote the original CLIPS Reference Manual; Gary Riley, who designed and developed the rule based portion of CLIPS, co authored the CLIPS Reference Manual, and developed the Macintosh interface for CLIPS; Brian Donnell, who designed and developed the CLIPS Object Oriented Language (COOL) and co authored the CLIPS Reference Manual; Bebe Ly, who developed the X Window interface for CLIPS; Chris Ortiz, who developed the original Windows 95 interface for CLIPS; Dr. Joseph Giarratano of the University of Houston-Clear Lake, who wrote the CLIPS User’s Guide; and Frank Lopez, who designed and developed CLIPS version 1.0 and wrote the CLIPS 1.0 User's Guide.
Section 1 IntroductionThis manual is the Interfaces Guide for CLIPS. It is intended for users interested in using the machine specific interfaces for CLIPS. Section 2 of this manual describes the IBM PC compatible Windows interface for CLIPS, Section 3 describes the Macintosh interface for CLIPS, and Section 4 describes the X Window interface for CLIPS. Section 2 - CLIPS Windows InterfaceThis section provides a brief summary of each menu command found in the CLIPS 6.2 Windows interface. The menus are listed in the left to right order in which they appear in the menu bar. The commands within each menu are also listed in the order in which they appear in the menu.
2.1 The File Menu2.1.1 New (Ctrl+N)This command opens a new buffer for editing with the window name Untitled. 2.1.2 Open... (Ctrl+O)This command displays the standard Windows file selection dialog box, allowing the user to select a text file to be opened as a buffer for editing. 2.1.3 Load... (Ctrl+L)This command displays the standard Windows file selection dialog box, allowing the user to select a text file to be loaded into the knowledge base. This command is equivalent to the CLIPS command (load <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS load command will be echoed to the dialog window and executed. This command is not available when CLIPS is executing.
2.1.4 Load Batch...This command displays the standard Windows file selection dialog box, allowing the user to select a text file to be executed as a batch file. This command is equivalent to the CLIPS command (batch <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS batch command will be echoed to the dialog window and executed. This command is not available when CLIPS is executing. 2.1.5 Load Binary...This command displays the standard Windows file selection dialog box, allowing the user to select a file to be loaded as a binary image. This command is equivalent to the CLIPS command (bload <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS bload command will be echoed to the dialog window and executed. This command is not available when CLIPS is executing. 2.1.6 Turn Dribble On...This command displays the standard Windows file selection dialog box, allowing the user to select a text file in which subsequent display window output will be stored. This command is equivalent to the CLIPS command (dribble on <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS dribble on command will be echoed to the dialog window and executed. While the dribble file is active, this menu item will be modified to read Turn Dribble Off. Selecting the menu item at this time will close the dribble text file. The Turn Dribble Off command is equivalent to the CLIPS command (dribble off). This command is available when CLIPS is executing (however the commands will not be echoed to the dialog window). 2.1.7 CloseThis command closes the currently active edit or status window. 2.1.8 Save (Ctrl+S)This command saves the file in the active edit window or the contents of the dialog or status window. If the file is Untitled, the Dialog window, or a status window , a dialog box will prompt for a file name under which to save the file. The file type option in the standard file dialog box determines whether a file is saved as a batch file or a text file. CLIPS batch file documents are executed as a series of commands when launched, whereas CLIPS text file documents are placed in an editing buffer when launched. Both types of documents can be edited as text files in the editor. 2.1.9 Save As...This command allows the active edit window to be saved under a new name. A dialog box will appear to prompt for the new file name. The name of the editing window will be changed to the new file name. 2.1.10 Save Binary...This command allows the constructs currently stored in CLIPS to be saved as a binary image. A dialog box will appear to prompt for the new file name in which to store the binary image. This command is equivalent to the CLIPS command (bsave <file name>). When this command is chosen and a file is selected, the appropriate CLIPS bsave command will be echoed to the dialog window and executed. This command is not available when CLIPS is executing. 2.1.11 RevertThis command restores the active edit window to the last-saved version of the file in the buffer. Any changes made since the file was last saved will be discarded. 2.1.12 Page Setup...This command allows the user to specify information about the size of paper used by the printer. 2.1.13 Print... (Ctrl+P)This command allows the user to print the active edit window. 2.1.14 ExitThis command exits CLIPS. This command is not available when CLIPS is executing. 2.2 The Edit Menu2.2.1 Undo (Ctrl+Z)This command allows you to undo your last editing operation. Typing, cut, copy, paste, and delete operations can all be undone. 2.2.2 Cut (Ctrl+X)This command removes selected text in the edit window and places it in the Clipboard. 2.2.3 Copy (Ctrl+C)This command copies selected text in the edit window and places it in the Clipboard. 2.2.4 Paste (Ctrl+V)This command copies the contents of the Clipboard to the selection point in the edit window or the Dialog window. If there is selected text in the edit window, it is replaced by the contents of the Clipboard. 2.2.5 DeleteThis command removes selected text in the edit window. The selected text is not placed in the Clipboard. 2.2.6 Select AllThis command selects all of the text in the active edit window. 2.2.7 Balance (Ctrl+B)This command operates on the current selection in the edit window by attempting to find the smallest selection containing the current selection which has balanced parentheses. Repeatedly using this command will select larger and larger selections of text until a balanced selection cannot be found. The balance command is a purely textual operation and can be confused by parentheses found in strings. 2.2.8 Comment (Ctrl+;)This command operates on the current selection in the active edit window by adding a semicolon to the beginning of each line contained in the selection. 2.2.9 Uncomment (Ctrl+U)This command operates on the current selection in the active edit window by removing a semicolon (if one exists) from the beginning of each line contained in the selection. 2.2.10 Set Font...This command allows the font used in the currently active editing buffer to be changed. When you use this command, the following dialog will appear: Select the desired font and font attributes in the dialog. The letters in the Sample area will be displayed using the selected font. Click the OK button to change the font used in the currently active editing buffer. Click the Cancel button to retain the current font setting. 2.3 The Buffer Menu2.3.1 Find (Ctrl+F)This command displays a dialog box which allows the user to set parameters for text search operations. The dialog box that appears allows a search string to be specified. The Match Case option makes the string search operation case-insensitive for alphabetic characters; that is, the string “Upper” will not match the string “uPPER”. The default for this setting is off.
2.3.2 Replace (Ctrl+H)This command displays a dialog box which allows the user to set parameters for text search and replacement operations. The dialog box that appears allows a search and replacement string to be specified. The Match Case option makes the string search operation case-insensitive for alphabetic characters; that is, the string “Upper” will not match the string “uPPER”. The default for this setting is off.
2.3.3 Load Selection (Ctrl+K)This command loads the current selection from the edit window into the CLIPS knowledge base. Standard error detection and recovery routines used to load constructs from a file are also used when loading a selection (i.e., if a construct has an error in it, the rest of the construct will be skipped over until another construct to be loaded is found). This command is not available when CLIPS is executing. 2.3.4 Batch Selection (Ctrl+M)This command treats the current selection in the edit window as if it were a batch file and executes it as a series of commands. Standard error detection and recovery routines used to load construct from a file are not used when batching a selection (i.e., if a construct has an error in it, a number of ancillary errors may be generated by subsequent parts of the same construct following the error). This command is not available when CLIPS is executing. 2.3.5 Load BufferThis command loads the contents of the active edit window into the CLIPS knowledge base. It is equivalent to selecting the entire buffer and executing a Load Selection command. This command is not available when CLIPS is executing.
2.4 The Execution Menu2.4.1 Reset (Ctrl+E)This command is equivalent to the CLIPS command (reset). When this command is chosen, the CLIPS command (reset) will be echoed to the dialog window and executed. If Warnings are enabled and activation's are currently on the agenda, a dialog box will appear issuing a warning and providing an opportunity to cancel this command. This command is not available when CLIPS is executing. 2.4.2 Run (Ctrl+R)This command is equivalent to the CLIPS command (run). When this command is chosen, the CLIPS command (run) will be echoed to the dialog window and executed. During execution, this menu command is changed to Halt and can be selected to halt execution (as if a command period had been entered). Holding the shift key down while selecting this menu item is equivalent to entering command-shift-period. For an explanation of the different methods of halting execution refer to the introduction at the beginning of this section. 2.4.3 Step (Ctrl+T)This command is equivalent to the CLIPS command (run <limit>) where <limit> is the value for the Step Rule Firing Increment. (it is set using the Options… command under the Edit menu). When this command is chosen, the CLIPS command (run <limit>) will be echoed to the dialog window and executed. If the default value for the Step Rule Firing Increment is used, this command is equivalent to the CLIPS command (run 1). This command is not available when CLIPS is executing. 2.4.4 Watch... (Ctrl+W)This command displays a dialog box which allows the user to set various watch items as enabled or disabled. Watch items can be enabled or disabled by clicking the appropriate check box. Enabled watch items have a check in their check box. Disabled watch items have no check mark in their check box. Pressing the All button checks all of the watch item check boxes. Pressing the None button unchecks all of the watch item check boxes. Clicking the OK button exits the dialog and changes the current watch settings to those shown in the dialog. Clicking the Cancel button exits the dialog, but retains the original settings of the watch items before the dialog was entered.
2.4.5 Options...This command displays a dialog box which allows the user to set various CLIPS execution options. The Salience Evaluation pop-up menu allows the current salience evaluation behavior to be changed (to either when-defined, when-activated, or every-cycle). The Strategy pop-up menu allows the current conflict resolution strategy to be changed (to either depth, breadth, lex, mea, complexity, simplicity, or random). The Static Constraint Checking, Dynamic Constraint Checking, Reset Global Variables, Sequence Expansion Operator Recognition, Incremental Reset, Auto Float Dividend, and Fact Duplication check boxes are used to enable and disable the named CLIPS option. Enabled options have a check in their check box while disabled items have none. The Incremental Reset option cannot be changed if any defrules are currently defined. Clicking the OK button exits the dialog and changes the CLIPS execution options settings to those shown in the dialog. Clicking the Cancel button exits the dialog, but retains the original settings of the CLIPS execution options before the dialog was entered.
2.4.6 Preferences...This command displays a dialog box which allows the user to set the parameters for several options in the CLIPS Windows interface. Enable Warnings option determines whether certain warnings are issued. The default for this option is on. When Warnings are enabled, certain commands chosen from the menu bar will display a dialog box giving the user the option to abort the command. For example, executing a clear command with Warnings enabled will display the following dialog box: Warnings will only be issued for commands chosen from the menu bar. For example, typing a clear command directly into the dialog window and executing it will not display a warning dialog box regardless of whether Warnings are enabled.
2.4.7 Clear CLIPSThis command is equivalent to the CLIPS command (clear). When this command is chosen, the CLIPS command (clear) will be echoed to the dialog window and executed. If Warnings are enabled, a dialog box will appear issuing a warning and providing an opportunity to cancel this command. This command is not available when CLIPS is executing. 2.5 The Browse Menu2.5.1 The Module MenuThis menu displays a list of the defmodules currently defined in the CLIPS environment. A check mark is displayed by the current module. Selecting a module from the menu list changes the current module to the selected item. 2.5.2 Defrule Manager...This command displays a dialog box which allows the defrules in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defrule selected from the list of defrules currently in the knowledge base. The Remove button will remove the currently selected defrule. Pressing this button is equivalent to issuing an undefrule command. The Refresh button will refresh the currently selected defrule. Pressing this button is equivalent to a refresh command. The Matches command will list the matches for the currently selected defrule. Pressing this button is equivalent to a matches command. The Pprint button will pretty print the currently selected defrule. Pressing this button is equivalent to a ppdefrule command. Both the Matches and Pprint buttons echo the equivalent CLIPS command and resulting output to the dialog window.
2.5.3 Deffacts Manager...This command displays a dialog box which allows the deffacts in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deffacts selected from the list of deffacts currently in the knowledge base. The Remove button will remove the currently selected deffacts. Pressing this button is equivalent to an undeffacts command The Pprint button will pretty print the currently selected deffacts. Pressing this button is equivalent to a ppdeffacts command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Deffacts Manager… command is not available when CLIPS is executing. 2.5.4 Deftemplate Manager...This command displays a dialog box which allows the deftemplates in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deftemplate selected from the list of deftemplates currently in the knowledge base. The Remove button will remove the currently selected deftemplate. Pressing this button is equivalent to an undeftemplate command. The Pprint button will pretty print the currently selected deftemplate. Pressing this button is equivalent to a ppdeftemplate command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
2.5.5 Deffunction Manager...This command displays a dialog box which allows the deffunctions in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deffunction selected from the list of deffunctions currently in the knowledge base. The Remove button will remove the currently selected deffunction. Pressing this button is equivalent to an undeffunction command. The Pprint button will pretty print the currently selected deffunction. Pressing this button is equivalent to a ppdeffunction command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
2.5.6 Defglobals Manager...This command displays a dialog box which allows the defglobals in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defglobal selected from the list of defglobals currently in the knowledge base. The Remove button will remove the currently selected defglobal. Pressing this button is equivalent to an undefglobal command. The Pprint button will pretty print the currently selected defglobal. Pressing this button is equivalent to a ppdefglobal command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
2.5.7 Defgeneric Manager...This command displays a dialog box which allows the defgenerics in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defgeneric selected from the list of defgenerics currently in the knowledge base. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Defgeneric Manager… command is not available when CLIPS is executing. The Remove button will remove the currently selected defgeneric. Pressing this button is equivalent to an undefgeneric command. The Pprint button will pretty print the currently selected defgeneric. Pressing this button is equivalent to a ppdefgeneric command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
The Remove button will remove the currently selected defmethod. Pressing this button is equivalent to an undefmethod command. The Pprint button will pretty print the currently selected defmethod. Pressing this button is equivalent to a ppdefmethod command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
2.5.8 Defclass Manager...This command displays a dialog box which allows the defclasses in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defclass selected from the list of defclasses currently in the knowledge base. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Defclass Manager… command is not available when CLIPS is executing. The Remove button will remove the currently selected defclass. Pressing this button is equivalent to an undefclass command. The Describe button will describe the currently selected defclass. Pressing this button is equivalent to a describe-class command. The Browse command displays the class hierarchy for the currently selected defclass. Pressing this button is equivalent to a browse-class command. The Pprint button will pretty print the currently selected defclass. Pressing this button is equivalent to a ppdefclass command. The Describe, Browse, and Pprint buttons echo the equivalent CLIPS command and resulting output to the dialog window.
The Remove button will remove the currently selected defmessage-handler. Pressing this button is equivalent to an undefmessage-handler command. The Pprint button will pretty print the currently selected defmessage-handler. Pressing this button is equivalent to a ppdefmessage-handler command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
2.5.9 Definstances Manager...This command displays a dialog box which allows the definstances in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a definstances selected from the list of definstances currently in the knowledge base. The Remove button will remove the currently selected definstances. Pressing this button is equivalent to an undefinstances command. The Pprint button will pretty print the currently selected definstances. Pressing this button is equivalent to a ppdefinstances command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Definstances Manager… command is not available when CLIPS is executing. 2.5.10 Agenda Manager...This command displays a dialog box which allows the activation's on the agenda to be examined. The dialog box that appears in response to this command allows any activation on the agenda to be removed or fired. The Remove button will remove the currently selected activation from the agenda. The Fire button will place the currently selected activation at the top of the agenda (regardless of its salience). The dialog is then exited and the CLIPS command (run 1) will then be echoed to the Dialog Window, causing the activation to fire. Any number of remove operations (except the Fire button) can be executed from this dialog. When finished, click the Done button to remove the dialog. The Agenda Manager… command is not available when CLIPS is executing. 2.6 The Window Menu2.6.1 CascadeArranges windows as overlapped tiles. 2.6.2 Tile HorizontallyArranges windows as non-overlapping tiles from top to bottom. 2.6.3 Tile VerticallyArranges windows as non-overlapping tiles from left to right. 2.6.4 Close AllCloses all status and edit windows. 2.6.5 Show Status WindowsThis command displays the Facts Window, Agenda Window, Instances Window, Globals Window, and Focus Window (creating them if they do not already exist). This command is available when CLIPS is executing. 2.6.6 Hide Status WindowsThis command conceals the Facts Window, Agenda Window, Instances Window, Globals Window, and Focus Window. This command is available when CLIPS is executing. 2.6.7 Tile Dialog & Status WindowsArranges the dialog and status windows as non-overlapping tiles. 2.6.8 Clear Dialog WindowThis command clears all of the text in the Dialog Window. From the CLIPS command prompt, the command clear-window (which takes no arguments) will also clear all of the text in the Dialog Window. This command is available when CLIPS is executing. 2.6.9 Facts WindowThis command displays the Facts Window if it is not already visible, otherwise it brings the window to the front. The Facts Window displays the list and number of facts in the fact-list. A check mark is placed by the window name if it is the front-most window. This command is available when CLIPS is executing. 2.6.10 Agenda WindowThis command displays the Agenda Window if it is not already visible, otherwise it brings the window to the front. The Agenda Window displays the list of activation's currently on the agenda. A check mark is placed by the window name if it is the front-most window. This command is available when CLIPS is executing. 2.6.11 Instances WindowThis command displays the Instances Window if it is not already visible, otherwise it brings the window to the front. The Instances Window displays the list of existing instances and their slot values. A check mark is placed by the window name if it is the front-most window. This command is available when CLIPS is executing. 2.6.12 Globals WindowThis command displays the Globals Window if it is not already visible, otherwise it brings the window to the front. The Globals Window displays the list of global variables and their current values. A check mark is placed by the window name if it is the front-most window. This command is available when CLIPS is executing. 2.6.13 Focus WindowThis command displays the Focus Window if it is not already visible, otherwise it brings the window to the front. The Focus Window displays the current focus stack. A check mark is placed by the window name if it is the front-most window. This command is available when CLIPS is executing. 2.6.14 Dialog WindowThis command brings the Display Window to the front. A check mark is placed by the window name if it is the front-most window. This command is available when CLIPS is executing. 2.6.15 Edit WindowsThe list of open editing windows is displayed after the list of status and dialog windows. Selecting an editing window brings the window to the front. A check mark is placed by the editing window name if it is the front-most window. 2.7 The Help Menu2.7.1 About CLIPSThis command displays version information about CLIPS. Click the OK button to continue. This command is available when CLIPS is executing. 2.7.2 CLIPS HelpThis command displays the CLIPS hypertext help information. This command is equivalent to the CLIPS command (winhelp <topic-name>) or (winhelp). This command is available when CLIPS is executing. For more information see the Microsoft Windows User's Guide on using help. 2.7.3 Complete... (Ctrl+J)This command “completes” the symbol currently being entered in the display window. In the display window, the symbol to be completed is always the last symbol in the display window (the current selection has no effect). If no possible completion's exist, a beep is sounded. If only one possible completion exists (e.g. “deftemplat” for “deftemplate”), then the symbol is automatically completed. If more than one completion exists, a dialog is displayed showing all possible completion's (or optionally a beep is sounded—See section 2.3.6).
Click the OK button to complete the symbol with the current selection. Click the Cancel button to terminate the dialog without any command completion. Note that symbols defined by the user (as part of a construct or a CLIPS data structure such as a fact or instance) will also be listed for command completion. This command is not available when CLIPS is executing.
2.8 Creating the Windows 95/98/NT Executables2.8.1 Building the CLIPS Interface Executable Using Microsoft Visual C++ 6.0The following steps describe how to create the Windows 95/98/NT machine specific version of CLIPS using Microsoft Visual C++ 6.0:
7) Select the Set Active Configuration… menu item in the Build Menu and then select CLIPSWin – Win32 Release. 8) Under the Build Menu choose Rebuild all. The CLIPSWin.exe executable will be placed in the MVC directory. 2.8.2 Building the CLIPS Console Executable Using Microsoft Visual C++ 6.0The following steps describe how to create the Windows 95/98/NT console version of CLIPS using Microsoft Visual C++ 6.0:
2) Select the Set Active Configuration… menu item in the Build Menu and then select CLIPS – Win32 Release. 3) Under the Build Menu choose Rebuild all. The CLIPS.exe executable will be placed in the MVC directory. 2.8.3 Building the CLIPS Interface Executable Using Borland C++ 5.0The following steps describe how to create the Windows 95/98/NT machine specific version of CLIPS using Borland C++ 5.0:
8) Select the Project… menu item in the Options Menu and then select Directories. Replace the C:\BC5\INCLUDE and C:\BC5\LIB directory paths with the appropriate paths for your installation of Borland C++. 9) Under the Project Menu choose Build all. The CLIPSWin.exe executable will be placed in the BLC directory. 2.8.4 Building the CLIPS Interface Executable Using Metrowerks CodeWarrior PR4The following steps describe how to create the Windows 95/98/NT machine specific version of CLIPS using Metrowerks CodeWarrior Professional Release 4:
2.8.5 Building the CLIPS Console Executable Using Metrowerks CodeWarrior PR4The following steps describe how to create the Windows 95/98/NT console version of CLIPS using CodeWarrior Professional Release 4:
Section 3 - CLIPS Macintosh InterfaceThis section provides a brief summary of each menu command found in the CLIPS 6.2 Macintosh interface. The menus are listed in the left to right order in which they appear in the menu bar. The commands within each menu are also listed in the order in which they appear in the menu.
The bottom left-hand corner of an edit window contains a pop-up menu control as show below. Clicking in the pop-up menu control displays a menu containing the list of constructs found in the edit window. Selecting one of the constructs in the menu will position the construct in the edit window so that it is visible. 3.1 The File Menu3.1.1 New (N)This command opens a new buffer for editing with the window name untitled. This command is not available when CLIPS is executing. 3.1.2 Open... (O)This command displays the standard file selection dialog box, allowing the user to select a text file to be opened as a buffer for editing. More than one file can be opened at the same time, however, the same file cannot be opened more than once. As files are opened, they are automatically stacked. This command is not available when CLIPS is executing. 3.1.3 Load... (L)This command displays the standard file selection dialog box, allowing the user to select a text file to be loaded into the knowledge base. This command is equivalent to the CLIPS command (load <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS load command will be echoed to the dialog window and executed. This command is not available when CLIPS is executing. 3.1.4 Load Batch...This command displays the standard file selection dialog box, allowing the user to select a text file to be executed as a batch file. This command is equivalent to the CLIPS command (batch <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS batch command will be echoed to the dialog window and executed. This command is not available when CLIPS is executing. 3.1.5 Load Binary...This command displays the standard file selection dialog box, allowing the user to select a file to be loaded as a binary image. This command is equivalent to the CLIPS command (bload <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS bload command will be echoed to the dialog window and executed. This command is not available when CLIPS is executing. 3.1.6 Turn Dribble On...This command displays the standard file selection dialog box, allowing the user to select a text file in which subsequent display window output will be stored. This command is equivalent to the CLIPS command (dribble on <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS dribble on command will be echoed to the dialog window and executed. While the dribble file is active, this menu item will be modified to read Turn Dribble Off. Selecting the menu item at this time will close the dribble text file. The Turn Dribble Off command is equivalent to the CLIPS command (dribble off). This command is available when CLIPS is executing (however the commands will not be echoed to the dialog window). 3.1.7 Close (W)This command closes the active window if it has a go-away box in its upper left corner. If the active window is an editing buffer that has been modified since it was last saved, a dialog box will confirm whether the changes should be saved or discarded or whether the close command should be canceled. This command is available when CLIPS is executing. This command is available when CLIPS is executing. 3.1.8 Save (S)This command saves the file in the active edit window. If the file is untitled, a dialog box will prompt for a file name under which to save the file. The Batch File option in the standard file dialog box determines whether a file is saved as a batch file or a text file. CLIPS batch file documents are executed as a series of commands when launched, whereas CLIPS text file documents are placed in an editing buffer when launched. Both types of documents can be edited as text files in a CLIPS editing buffer. This command is available when CLIPS is executing. 3.1.9 Save As...This command allows the active edit window to be saved under a new name. A dialog box will appear to prompt for the new file name. The name of the editing window will be changed to the new file name. This command is available when CLIPS is executing. 3.1.10 Save Binary...This command allows the constructs currently stored in CLIPS to be saved as a binary image. A dialog box will appear to prompt for the new file name in which to store the binary image. This command is equivalent to the CLIPS command (bsave <file name>). When this command is chosen and a file is selected, the appropriate CLIPS bsave command will be echoed to the dialog window and executed. This command is not available when CLIPS is executing. 3.1.11 RevertThis command restores the active edit window to the last-saved version of the file in the buffer. Any changes made since the file was last saved will be discarded. This command is available when CLIPS is executing. 3.1.12 Page Setup...This command allows the user to specify information about the size of paper used by the printer. This command is available when CLIPS is executing. 3.1.13 Print...This command allows the user to print the active edit window. This command is available when CLIPS is executing. 3.2 The Edit Menu3.2.1 Undo (Z)This command allows you to undo your last editing operation. Typing, cut, copy, paste, and clear operations can all be undone. The Undo menu item will change in the Edit menu to reflect the last operation performed. For example, if a Paste command was just performed, the Undo menu item will read Undo Paste. If the Paste command is undone, the menu item will read Redo Paste. This command is not available when CLIPS is executing. 3.2.2 Cut (X)This command removes selected text in the active edit window and places it in the Clipboard. This command is not available when CLIPS is executing. 3.2.3 Copy (C)This command copies selected text in the active edit window or the display window and places it in the Clipboard. This command is not available when CLIPS is executing. 3.2.4 Paste (V)This command copies the contents of the Clipboard to the selection point in the active edit window or the display window. If selected text is in the active edit window, it is replaced by the contents of the Clipboard. Pasted text to the display window is always placed at the end of the display window regardless of whether there is selected text. This command is not available when CLIPS is executing. 3.2.5 ClearThis command removes selected text in the active edit window. The selected text is not placed in the Clipboard. This command is not available when CLIPS is executing. 3.2.6 Select All (A)This command selects all of the text in the active edit or display window. 3.2.7 Complete... (J)This command “completes” the symbol currently being entered in the display window or the active edit window. In the display window, the symbol to be completed is always the last symbol in the display window (the current selection has no effect). In an edit window, the symbol being completed is the current selection, or if no selection exists, the symbol to the left of the current insertion point. If no possible completions exist, a beep is sounded. If only one possible completion exists (e.g. “deftemplat” for “deftemplate”), then the symbol is automatically completed. If more than one completion exists, a dialog is displayed showing all possible completions (or optionally a beep is sounded—See section 3.3.10). The following dialog shows the possible completions for the symbol “set-s”: Click the OK button to complete the symbol with the current selection. Click the Cancel button to terminate the dialog without any command completion. Note that symbols defined by the user (as part of a construct or a CLIPS data structure such as a fact or instance) will also be listed for command completion. This command is not available when CLIPS is executing. 3.2.8 Balance (B)This command operates on the current selection in the active edit window by attempting to find the smallest selection containing the current selection which has balanced parentheses. Repeatedly using this command will select larger and larger selections of text until a balanced selection cannot be found. The balance command is a purely textual operation and can be confused by parentheses found in strings. This command is not available when CLIPS is executing. 3.2.9 Comment (;)This command operates on the current selection in the active edit window by adding a semicolon to the beginning of each line contained in the selection. 3.2.10 Uncomment (U)This command operates on the current selection in the active edit window by removing a semicolon (if one exists) from the beginning of each line contained in the selection. 3.2.11 Set Font...This command allows the font used in the currently active editing buffer to be changed. When you use this command, the following dialog will appear: Select a font and font size from the popup menus on the left of the dialog. The sentence at the bottom of the dialog will be displayed using the selected font. Click the OK button to change the font used in the currently active editing buffer. Click the Cancel button to retain the current font setting. This command is not available when CLIPS is executing. 3.2.12 Clear WindowThis command clears all of the text in the dialog window. From the CLIPS command prompt, the command clear-window (which takes no arguments) will also clear all of the text in the dialog window. This command is available when CLIPS is executing. 3.2.13 Preferences...This command displays a dialog box which allows the user to set the parameters for several options in the CLIPS Macintosh interface. The Command Completion Dialog option determines whether a dialog is displayed to determine which completion to use if more than one completion is available. The default for this option is on. That is, a dialog will be displayed whenever there is more than one possible completion. If this option is off, then a beep is sounded when no possible completions exist. From the CLIPS command prompt, the command set completion-dialog can be used to enable and disable the use of the completion dialog when there is more than one choice (pass the symbol TRUE to enable the completion dialog and the symbol FALSE to disable it).
3.3 The Buffer Menu3.3.1 Find... (F)This command displays a dialog box which allows the user to set parameters for text search and replacement operations. The dialog box that appears allows a search and replacement string to be specified. Two other options can be set in the search dialog box. The Match Words option will only allow a string search to match whole words; that is, the string “at” would not be bound in the string “match”. The default for this setting is off. The Ignore Case option makes the string search operation case-insensitive for alphabetic characters; that is, the string “Upper” will match the string “uPPER”. The default for this setting is on.
3.3.2 Find Again (G)This command searches for the next occurrence of the Search For string starting at the end of the current selection and preceding to the end of the buffer. This command is not available when CLIPS is executing. 3.3.3 Find Selection (H)This command sets the Search For string to the current selection in the edit window and then searches for that string. It is equivalent to a Enter Find String command followed by a Find Again command. This command is not available when CLIPS is executing. 3.3.4 Enter Find String (E)This command sets the Search For string to the current selection in the edit window. This command is not available when CLIPS is executing. 3.3.5 Replace (=)This command will replace the current selection in the active edit window with the Replace With string. If no selection exists, the Replace With string will be inserted at the current insertion point in the active edit window. The Replace With string may be left empty to replace text with nothing. This command is not available when CLIPS is executing. 3.3.6 Replace and Find Again (T)This command is equivalent to executing a Replace command followed by a Find Again command. This command is not available when CLIPS is executing. 3.3.7 Replace AllThis command is equivalent to executing a Find Again command followed by a Replace command repeatedly until the Find Again command does not find the Search For string. This command is not available when CLIPS is executing. 3.3.8 Load Selection (K)This command loads the current selection in the active edit window into the CLIPS knowledge base. Standard error detection and recovery routines used to load constructs from a file are also used when loading a selection (i.e., if a construct has an error in it, the rest of the construct will be skipped over until another construct to be loaded is found). This command is not available when CLIPS is executing. 3.3.9 Batch Selection (M)This command treats the current selection in the active edit window as if it were a batch file and executes it as a series of commands. Standard error detection and recovery routines used to load construct from a file are not used when batching a selection (i.e., if a construct has an error in it, a number of ancillary errors may be generated by subsequent parts of the same construct following the error). This command is not available when CLIPS is executing. 3.3.10 Load BufferThis command loads the contents of the active edit window into the CLIPS knowledge base. It is equivalent to selecting the entire buffer and executing a Load Selection command. This command is not available when CLIPS is executing. 3.4 The Commands Menu3.4.1 Watch...This command displays a dialog box which allows the user to set various watch items as enabled or disabled. Watch items can be enabled or disabled by clicking the appropriate check box. Enabled watch items have a check in their check box. Disabled watch items have no check mark in their check box. Pressing the All button checks all of the watch item check boxes. Pressing the None button unchecks all of the watch item check boxes. Clicking the OK button exits the dialog and changes the current watch settings to those shown in the dialog. Clicking the Cancel button exits the dialog, but retains the original settings of the watch items before the dialog was entered. Clicking the Use As Default button saves the current settings in the CLIPS preferences file. These settings will be restored the next time the CLIPS application is launched.
3.4.2 Options...This command displays a dialog box which allows the user to set various CLIPS execution options. The Salience Evaluation pop-up menu allows the current salience evaluation behavior to be changed (to either when-defined, when-activated, or every-cycle). The Strategy pop-up menu allows the current conflict resolution strategy to be changed (to either depth, breadth, lex, mea, complexity, simplicity, or random). The Static Constraint Checking, Dynamic Constraint Checking, Reset Global Variables, Sequence Expansion Operator Recognition, Incremental Reset, Auto Float Dividend, and Fact Duplication check boxes are used to enable and disable the named CLIPS option. Enabled options have a check in their check box while disabled items have none. The Incremental Reset option cannot be changed if any defrules are currently defined. Clicking the OK button exits the dialog and changes the CLIPS execution options settings to those shown in the dialog. Clicking the Cancel button exits the dialog, but retains the original settings of the CLIPS execution options before the dialog was entered. Clicking the Use As Default button saves the current settings in the CLIPS preferences file. These settings will be restored the next time the CLIPS application is launched.
3.4.3 Set Commands...This command displays a dialog box which allows the user to define ten “short cut” commands. These commands are accessed using command keys 0 through 9. To change a command short cut, enter the new command in the text field to the left of the desired command key. Clicking the OK button exits the dialog and changes the command short cut settings to those shown in the dialog. Clicking the Cancel button exits the dialog, but retains the original settings of the command short cuts before the dialog was entered. Clicking the Use As Default button saves the current settings in the CLIPS preferences file. These settings will be restored the next time the CLIPS application is launched.
3.5 The Browse Menu3.5.1 The Module MenuThis menu displays a list of the defmodules currently defined in the CLIPS environment. A check mark is displayed by the current module. Selecting a module from the menu list changes the current module to the selected item. 3.5.2 Defrule Manager...This command displays a dialog box which allows the defrules in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defrule selected from the list of defrules currently in the knowledge base. The Remove button will remove the currently selected defrule. Pressing this button is equivalent to issuing an undefrule command. The Refresh button will refresh the currently selected defrule. Pressing this button is equivalent to a refresh command. The Matches command will list the matches for the currently selected defrule. Pressing this button is equivalent to a matches command. The Pprint button will pretty print the currently selected defrule. Pressing this button is equivalent to a ppdefrule command. Both the Matches and Pprint buttons echo the equivalent CLIPS command and resulting output to the dialog window.
3.5.3 Deffacts Manager...This command displays a dialog box which allows the deffacts in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deffacts selected from the list of deffacts currently in the knowledge base. The Remove button will remove the currently selected deffacts. Pressing this button is equivalent to an undeffacts command The Pprint button will pretty print the currently selected deffacts. Pressing this button is equivalent to a ppdeffacts command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Deffacts Manager… command is not available when CLIPS is executing. 3.5.4 Deftemplate Manager...This command displays a dialog box which allows the deftemplates in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deftemplate selected from the list of deftemplates currently in the knowledge base. The Remove button will remove the currently selected deftemplate. Pressing this button is equivalent to an undeftemplate command. The Pprint button will pretty print the currently selected deftemplate. Pressing this button is equivalent to a ppdeftemplate command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
3.5.5 Deffunction Manager...This command displays a dialog box which allows the deffunctions in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deffunction selected from the list of deffunctions currently in the knowledge base. The Remove button will remove the currently selected deffunction. Pressing this button is equivalent to an undeffunction command. The Pprint button will pretty print the currently selected deffunction. Pressing this button is equivalent to a ppdeffunction command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
3.5.6 Defglobal Manager...This command displays a dialog box which allows the defglobals in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defglobal selected from the list of defglobals currently in the knowledge base. The Remove button will remove the currently selected defglobal. Pressing this button is equivalent to an undefglobal command. The Pprint button will pretty print the currently selected defglobal. Pressing this button is equivalent to a ppdefglobal command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
3.5.7 Defgeneric Manager...This command displays a dialog box which allows the defgenerics in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defgeneric selected from the list of defgenerics currently in the knowledge base. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Defgeneric Manager… command is not available when CLIPS is executing. The Remove button will remove the currently selected defgeneric. Pressing this button is equivalent to an undefgeneric command. The Pprint button will pretty print the currently selected defgeneric. Pressing this button is equivalent to a ppdefgeneric command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
The Remove button will remove the currently selected defmethod. Pressing this button is equivalent to an undefmethod command. The Pprint button will pretty print the currently selected defmethod. Pressing this button is equivalent to a ppdefmethod command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
3.5.8 Defclass Manager...This command displays a dialog box which allows the defclasses in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defclass selected from the list of defclasses currently in the knowledge base. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Defclass Manager… command is not available when CLIPS is executing. The Remove button will remove the currently selected defclass. Pressing this button is equivalent to an undefclass command. The Describe button will describe the currently selected defclass. Pressing this button is equivalent to a describe-class command. The Browse command displays the class hierarchy for the currently selected defclass. Pressing this button is equivalent to a browse-class command. The Pprint button will pretty print the currently selected defclass. Pressing this button is equivalent to a ppdefclass command. The Describe, Browse, and Pprint buttons echo the equivalent CLIPS command and resulting output to the dialog window.
The Remove button will remove the currently selected defmessage-handler. Pressing this button is equivalent to an undefmessage-handler command. The Pprint button will pretty print the currently selected defmessage-handler. Pressing this button is equivalent to a ppdefmessage-handler command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
3.5.9 Definstances Manager...This command displays a dialog box which allows the definstances in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a definstances selected from the list of definstances currently in the knowledge base. The Remove button will remove the currently selected definstances. Pressing this button is equivalent to an undefinstances command. The Pprint button will pretty print the currently selected definstances. Pressing this button is equivalent to a ppdefinstances command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Definstances Manager… command is not available when CLIPS is executing. 3.5.10 Agenda Manager...This command displays a dialog box which allows the activations on the agenda to be examined. The dialog box that appears in response to this command allows any activation on the agenda to be removed or fired. The Remove button will remove the currently selected activation from the agenda. The Fire button will place the currently selected activation at the top of the agenda (regardless of its salience). The dialog is then exited and the CLIPS command (run 1) will then be echoed to the Dialog Window, causing the activation to fire. Any number of remove operations (except the Fire button) can be executed from this dialog. When finished, click the Done button to remove the dialog. The Agenda Manager… command is not available when CLIPS is executing. 3.6 The Window Menu3.6.1 Dialog WindowThis command selects the Dialog Window and brings it to the front. A check mark is placed by the window name to indicated that it is the frontmost window. This command is available when CLIPS is executing. 3.6.2 Facts WindowThis command selects the Facts Window and brings it to the front. If the Facts Window does not exist, it will be created. The Facts Window displays the list of facts in the fact-list. A check mark is placed by the window name to indicated that it is the frontmost window. This command is available when CLIPS is executing. 3.6.3 Agenda WindowThis command selects the Agenda Window and brings it to the front. If the Agenda Window does not exist, it will be created. The Agenda Window displays the list of activations currently on the agenda. A check mark is placed by the window name to indicated that it is the frontmost window. This command is available when CLIPS is executing. 3.6.4 Instances WindowThis command selects the Instances Window and brings it to the front. If the Instances Window does not exist, it will be created. The Instances Window displays the list of existing instances and their slot values. A check mark is placed by the window name to indicated that it is the frontmost window. This command is available when CLIPS is executing. 3.6.5 Globals WindowThis command selects the Globals Window and brings it to the front. If the Globals Window does not exist, it will be created. The Globals Window displays the list of global variables and their current values. A check mark is placed by the window name to indicated that it is the frontmost window. This command is available when CLIPS is executing. 3.6.6 Focus WindowThis command selects the Focus Window and brings it to the front. If the Focus Window does not exist, it will be created. The Focus Window displays the current focus stack. A check mark is placed by the window name to indicated that it is the frontmost window. This command is available when CLIPS is executing. 3.6.7 All AboveThis command brings the Dialog Window, Facts Window, Instances Window, Globals Window, and Focus Window in front of all other windows (creating them if they do not already exist). The Dialog Window is selected as the active window. This command is available when CLIPS is executing. 3.6.8 Titled and Untitled Edit WindowsThis command brings the selected edit window to the front. All edit windows appear below the All Above menu item. A check mark is placed by the window name to indicated that it is the frontmost window. A diamond appears next to an edit window title that has changes that need to be saved. The diamond is hollow if the edit window is not frontmost, otherwise it is filled. This command is available when CLIPS is executing. 3.7 Creating The Macintosh Executables3.7.1 Building the CLIPS Interface Executable Using Metrowerks CodeWarrior PR7The following steps describe how to create the MacOS 9.x/X interface version of CLIPS using Metrowerks CodeWarrior Professional Release 7. Note that some familiarity with building applications using Metrowerks CodeWarrior is assumed. Section 2 of the Advanced Programming Guide (which describes in general how to install and tailor CLIPS) should also be read before attempting to build the Macintosh executables.
3.7.2 Building the CLIPS Console Executable Using Metrowerks CodeWarrior PR7The following steps describe how to create the Macintosh console version of CLIPS using Metrowerks CodeWarrior Professional Release 7:
Section 4 - CLIPS X Window InterfaceThis section provides a brief summary of the CLIPS 6.2 X Window interface (xclips) for systems running X Windows. The menus are listed in the left to right order in which they appear in the menu bar. The commands within each menu are also listed in the order in which they appear in the menu.
4.1 The MenuThis command displays version information about CLIPS. Click the left mouse button in this window to kill it. This command is not available when CLIPS is executing. 4.2 The File Menu4.2.1 Edit... (^V)This command displays a file selection box, allowing the user to select a text file to edit. A new window will be opened for each file (see section 4.6 for more details). This command is not available when CLIPS is executing. 4.2.2 Complete... (^C)This command “completes” the symbol currently being entered in the display window. The symbol to be completed is always the last symbol in the display window. If no possible completions exist, a beep is sounded. If only one possible completion exists (e.g. “deftemplat” for “deftemplate”), then the symbol is automatically completed. If more than one completion exists, a dialog is displayed showing all possible completions. The following dialog shows the possible completions for the symbol “get”: Click the Select button to complete the symbol with the current selection. Click the Cancel button to terminate the dialog without any command completion. Note that symbols defined by the user (as part of a construct or a CLIPS data structure such as a fact or instance) will also be listed for command completion. This command is not available when CLIPS is executing. 4.2.3 Load... (^L)This command displays a file selection box, allowing the user to select a text file to be loaded into the knowledge base. This command is equivalent to the CLIPS command (load <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS load command will be echoed to the main window and executed. This command is not available when CLIPS is executing. 4.2.4 Load Batch...This command displays a file selection box, allowing the user to select a text file to be executed as a batch file. This command is equivalent to the CLIPS command (batch <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS batch command will be echoed to the main window and executed. This command is not available when CLIPS is executing. 4.2.5 Load Binary...This command displays a file selection box, allowing the user to select a file to be loaded as a binary image. This command is equivalent to the CLIPS command (bload <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS bload command will be echoed to the main window and executed. This command is not available when CLIPS is executing. 4.2.6 Dribble... (^N)This command displays a file selection box, allowing the user to select a text file in which subsequent display window output will be stored. This command is equivalent to the CLIPS command (dribble on <file-name>). When this command is chosen and a file is selected, the appropriate CLIPS dribble on command will be echoed to the main window and executed. While the dribble file is active, this menu command will be modified to contain an X Window logo in the left margin beside the command. Selecting the menu command at this time will close the dribble text file and remove the X Window logo. This is equivalent to the CLIPS command (dribble-off). This command is available when CLIPS is executing (however the commands will not be echoed to the dialog window). 4.2.7 Save Binary...This command allows the constructs currently stored in CLIPS to be saved as a binary image. A dialog box will appear to prompt for the new file name in which to store the binary image. This command is equivalent to the CLIPS command (bsave <file name>). When this command is chosen and a file is entered, the appropriate CLIPS bsave command will be echoed to the main window and executed. This command is not available when CLIPS is executing. 4.2.8 Quit (^Q)This command exits CLIPS. After choosing this command a Restart option is prompted. This option will restart CLIPS using any new color resources created by the color utility (see section 4.5.8). This command is not available when CLIPS is executing. 4.3 The Execution Menu4.3.1 Reset (^E)This command is equivalent to the CLIPS command (reset). When this command is chosen, the CLIPS command (reset) will be echoed to the main window and executed. If activations are currently on the agenda, a dialog box will appear issuing a warning and providing an opportunity to cancel this command. This command is not available when CLIPS is executing. 4.3.2 Run (^R)This command is equivalent to the CLIPS command (run). When this command is chosen, the CLIPS command (run) will be echoed to the main window and executed. This command is not available when CLIPS is executing. 4.3.3 Step (^T)This command is equivalent to the CLIPS command (run 1). When this command is chosen, the CLIPS command (run 1) will be echoed to the main window and executed. This command is not available when CLIPS is executing. 4.3.4 Watch...This command displays a dialog box which allows the user to set various watch items as enabled or disabled. Watch items can be enabled or disabled by clicking its check box. Enabled watch items have a check in their check box. Disabled watch items have no check mark in their check box. Pressing the All button checks all of the watch item check boxes. Pressing the None button unchecks all of the watch item check boxes. Clicking the Okay button exits the dialog and changes the current watch settings to those shown in the dialog. Clicking the Cancel button exits the dialog, but retains the original settings of the watch items before the dialog was entered.
4.3.5 Options...This command displays a dialog box which allows the user to set various CLIPS execution options. The Salience Evaluation pop-up menu allows the current salience evaluation behavior to be changed (to either when-defined, when-activated, or every-cycle). The Strategy pop-up menu allows the current conflict resolution strategy to be changed (to either depth, breadth, lex, mea, complexity, simplicity, or random). The Static Constraint Checking, Dynamic Constraint Checking, Reset Global Variables, Sequence Expansion Operator Recognition, Incremental Reset, Auto Float Dividend, and Fact Duplication check boxes are used to enable and disable the named CLIPS option. Enabled options have a check in their check box while disabled items have none. The Incremental Reset option cannot be changed if any defrules are currently defined. Clicking the OK button exits the dialog and changes the CLIPS execution options settings to those shown in the dialog. Clicking the Cancel button exits the dialog, but retains the original settings of the CLIPS execution options before the dialog was entered.
4.3.6 Clear CLIPS (^K)This command is equivalent to the CLIPS command (clear). When this command is chosen, the CLIPS command (clear) will be echoed to the main window and executed. A dialog box will appear issuing a warning and providing an opportunity to cancel this command. This command is not available when CLIPS is executing. 4.3.7 Clear Window (^N)This command clears the dialog window. This command is not available when CLIPS is executing. 4.4 The Browse Menu4.4.1 Module MenuThis menu displays a dialog box which contains the list of the defmodules currently defined in the CLIPS environment. A current module is hilighted. Selecting a module from the list changes the current module to the selected item. When finish selecting the module click the Done button to remove the dialog. 4.4.2 Defrule Manager...This command displays a dialog box which allows the defrules in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defrule selected from the list of defrules currently in the knowledge base. The Remove button will remove the currently selected defrule. Pressing this button is equivalent to issuing an undefrule command. The Refresh button will refresh the currently selected defrule. Pressing this button is equivalent to a refresh command. The Matches command will list the matches for the currently selected defrule. Pressing this button is equivalent to a matches command. The Pprint button will pretty print the currently selected defrule. Pressing this button is equivalent to a ppdefrule command. Both the Matches and Pprint buttons echo the equivalent CLIPS command and resulting output to the dialog window.
4.4.3 Deffacts Manager...This command displays a dialog box which allows the deffacts in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deffacts selected from the list of deffacts currently in the knowledge base. The Remove button will remove the currently selected deffacts. Pressing this button is equivalent to an undeffacts command The Pprint button will pretty print the currently selected deffacts. Pressing this button is equivalent to a ppdeffacts command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Deffacts Manager… command is not available when CLIPS is executing. 4.4.4 Deftemplate Manager...This command displays a dialog box which allows the deftemplates in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deftemplate selected from the list of deftemplates currently in the knowledge base. The Remove button will remove the currently selected deftemplate. Pressing this button is equivalent to an undeftemplate command. The Pprint button will pretty print the currently selected deftemplate. Pressing this button is equivalent to a ppdeftemplate command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
4.4.5 Deffunction Manager...This command displays a dialog box which allows the deffunctions in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a deffunction selected from the list of deffunctions currently in the knowledge base. The Remove button will remove the currently selected deffunction. Pressing this button is equivalent to an undeffunction command. The Pprint button will pretty print the currently selected deffunction. Pressing this button is equivalent to a ppdeffunction command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
4.4.6 Defglobal ManagerThis command displays a dialog box which allows the defglobals in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defglobal selected from the list of defglobals currently in the knowledge base. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Defglobal Manager… command is not available when CLIPS is executing. The Remove button will remove the currently selected defglobal. Pressing this button is equivalent to an undefglobal command The Pprint button will pretty print the currently selected deffacts. Pressing this button is equivalent to a ppdefglobal command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Defglobal Manager… command is not available when CLIPS is executing. 4.4.7 Defgeneric ManagerThis command displays a dialog box which allows the defgenerics in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defgeneric selected from the list of defgenerics currently in the knowledge base. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Defgeneric Manager… command is not available when CLIPS is executing. The Remove button will remove the currently selected defgeneric. Pressing this button is equivalent to an undefgeneric command. The Pprint button will pretty print the currently selected defgeneric. Pressing this button is equivalent to a ppdefgeneric command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
The Remove button will remove the currently selected defmethod. Pressing this button is equivalent to an undefmethod command. The Pprint button will pretty print the currently selected defmethod. Pressing this button is equivalent to a ppdefmethod command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
4.4.8 Defclass Manager...This command displays a dialog box which allows the defclasses in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a defclass selected from the list of defclasses currently in the knowledge base. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Defclass Manager… command is not available when CLIPS is executing. The Remove button will remove the currently selected defclass. Pressing this button is equivalent to an undefclass command. The Describe button will describe the currently selected defclass. Pressing this button is equivalent to a describe-class command. The Browse command displays the class hierarchy for the currently selected defclass. Pressing this button is equivalent to a browse-class command. The Pprint button will pretty print the currently selected defclass. Pressing this button is equivalent to a ppdefclass command. The Describe, Browse, and Pprint buttons echo the equivalent CLIPS command and resulting output to the dialog window.
The Remove button will remove the currently selected defmessage-handler. Pressing this button is equivalent to an undefmessage-handler command. The Pprint button will pretty print the currently selected defmessage-handler. Pressing this button is equivalent to a ppdefmessage-handler command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window.
4.4.9 Definstances Manager...This command displays a dialog box which allows the definstances in the knowledge base to be examined. The dialog box that appears in response to this command allows an operation to be performed on a definstances selected from the list of definstances currently in the knowledge base. The Remove button will remove the currently selected definstances. Pressing this button is equivalent to an undefinstances command. The Pprint button will pretty print the currently selected definstances. Pressing this button is equivalent to a ppdefinstances command. The Pprint button echoes the equivalent CLIPS command and resulting output to the dialog window. Any number of operations can be executed from this dialog. When finished, click the Done button to remove the dialog. The Definstances Manager… command is not available when CLIPS is executing. 4.4.10 Agenda Manager...This command displays a dialog box which allows the activations on the agenda to be examined. The dialog box that appears in response to this command allows any activation on the agenda to be removed or fired. The Remove button will remove the currently selected activation from the agenda. The Fire button will place the currently selected activation at the top of the agenda (regardless of its salience). The dialog is then exited and the CLIPS command (run 1) will then be echoed to the Dialog Window, causing the activation to fire. Any number of remove operations (except the Fire button) can be executed from this dialog. When finished, click the Done button to remove the dialog. The Agenda Manager… command is not available when CLIPS is executing. 4.5 The Window Menu4.5.1 Facts WindowThis command creates or deletes the Facts Window. The Facts Window displays the list of facts in the fact-list. An X Window logo is placed by the window name to indicated that it exists. This command is available when CLIPS is executing. 4.5.2 Agenda WindowThis command creates or deletes the Agenda Window. The Agenda Window displays the list of activations currently on the agenda. An X Window logo is placed by the window name to indicated that it exists. This command is available when CLIPS is executing. 4.5.3 Instances WindowThis command creates or deletes the Instances Window. The Instances Window displays the list of existing instances and their slot values. A check mark is placed by the window name to indicated that it exists. This command is available when CLIPS is executing. 4.5.4 Globals WindowThis command creates or deletes the Globals Window. The Globals Window displays the list of global variables and their current values. A check mark is placed by the window name to indicated that it exists. This command is available when CLIPS is executing. 4.5.5 Focus WindowThis command selects the Focus Window and brings it to the front. If the Focus Window does not exist, it will be created. The Focus Window displays the current focus stack. A check mark is placed by the window name to indicated that it is the frontmost window. This command is available when CLIPS is executing. 4.5.6 AllThis command creates the Dialog Window, Facts Window, Instances Window, and Globals Window if they do not already exist. This command is available when CLIPS is executing. 4.5.7 NoneThis command deletes the Dialog Window, Facts Window, Instances Window, and Globals Window if they exist. This command is available when CLIPS is executing. 4.5.8 Command Line CLIPS (^Z)This command creates a xterm window and starts a command line version of CLIPS. This window will still exist after the xclips interface has ended. This command is available when CLIPS is executing. 4.5.9 Color UtilityThis command will execute the color utility for the xclips interface. To use the new colors the Quit command with the Restart (see section 4.2.9) option must be chosen. 4.5.9.1 How To Use The Color UtilityTo change the colors of a window in the X Window interface for CLIPS, the user must: 1) Select the appropriate button for the window at the bottom of the color utility. 2) Select the item that needs to be changed at the top of the color utility. 3) Select the color that is listed on the left of the color utility.
4.6 The EditorThis section provides a brief summary for the editor interface. The editor is an instance of the Athena asciiText widget, which comes with X and is similar to the emacs editor. 4.6.1 File4.6.1.1 SaveThis command displays a dialog box allowing the user to overwrite the old file with the edited file or cancel the save command. This command is not available when CLIPS is executing. 4.6.1.2 Save AsThis command allows the edit window to be saved under a new name. A dialog box will appear to prompt for the new file name. The name of the editing window will be changed to the new file name. This command is not available when CLIPS is executing. 4.6.1.3 RevertThis command restores the edit window to the last saved version of the file in the buffer. Any changes made since the file was last saved will be discarded. This command is not available when CLIPS is executing. 4.6.1.4 Load SelectionThis command loads the current selection in the active edit window into the CLIPS knowledge base. Standard error detection and recovery routines used to load constructs from a file are also used when loading a selection (i.e., if a construct has an error in it, the rest of the construct will be skipped over until another construct to be loaded is found). This command is not available when CLIPS is executing. 4.6.1.5 Batch SelectionThis command treats the current selection in the active edit window as if it were a batch file and executes it as a series of commands. Standard error detection and recovery routines used to load construct from a file are not used when batching a selection (i.e., if a construct has an error in it, a number of ancillary errors may be generated by subsequent parts of the same construct following the error). This command is not available when CLIPS is executing. 4.6.1.6 Load BufferThis command loads the contents of the active edit window into the CLIPS knowledge base. It is equivalent to selecting the entire buffer and executing a Load Selection command. This command is not available when CLIPS is executing. 4.6.1.7 ExitThis command exits the editor. This command is not available when CLIPS is executing. 4.6.2 Edit4.6.2.1 Complete... (%%^%%C)This command “completes” the symbol currently being entered in the active edit window. The symbol being completed is the current selection, or if no selection exists, the symbol to the left of the current insertion point. If no possible completions exist, a beep is sounded. If only one possible completion exists (e.g. “deftemplat” for “deftemplate”), then the symbol is automatically completed. If more than one completion exists, a dialog is displayed showing all possible completions. The following dialog shows the possible completions for the symbol “get”: Click the Select button to complete the symbol with the current selection. Click the Cancel button to be terminate the dialog without any command completion. Note that symbols defined by the user (as part of a construct or a CLIPS data structure such as a fact or instance) will also be listed for command completion. This command is not available when CLIPS is executing. 4.6.2.2 CutThis command removes selected text in the active edit window and places it in the Clipboard. This command is not available when CLIPS is executing. 4.6.2.3 PasteThis command copies the contents of the Clipboard to the selection point in the edit window. This command is not available when CLIPS is executing. 4.6.2.4 Search/Replace... (^S/^R)This command displays the search/replace dialog allowing the user to search for a string or search for a string and replace it with another string. This command is not available when CLIPS is executing. 4.6.2.5 Balance (^B)This command operates on the current selection in the active edit window by attempting to find the smallest selection containing the current selection which has balanced parentheses. Repeatedly using this command will select larger and larger selections of text until a balanced selection cannot be found. The balance command is a purely textual operation and can be confused by parentheses found in strings. The cursor has to be placed to the left of the parenthesis. This command is not available when CLIPS is executing. 4.6.2.6 Beginning of FileThis command will scroll the insertion point to the beginning of the editor file and then scroll the minimum amount necessary to make the new insert point location visible. This command is not available when CLIPS is executing. 4.6.2.7 End of FileThis command will scroll the insertion point to the end of the editor file and then scroll the minimum amount necessary to make the new insert point location visible. This command is not available when CLIPS is executing. 4.6.3 Font4.6.3.1 5x8This command will set the editor font to 5×8. This command is not available when CLIPS is executing. 4.6.3.2 6x10This command will set the editor font to 6×10. This command is not available when CLIPS is executing. 4.6.3.3 6x13boldThis command will set the editor font to 6x13bold. This command is not available when CLIPS is executing. 4.6.3.4 7x13boldThis command will set the editor font to 7x13bold. This command is not available when CLIPS is executing. 4.6.3.5 8x13boldThis command will set the editor font to 8x13bold. This command is not available when CLIPS is executing. 4.6.3.6 9x15boldThis command will set the editor font to 9x15bold. This command is not available when CLIPS is executing. 4.6.3.7 10x20This command will set the editor font to 10×20. This command is not available when CLIPS is executing. 4.6.3.8 12x24This command will set the editor font to 12×20. This command is not available when CLIPS is executing. 4.6.4 Help4.6.4.1 Key BindingsThis command displays a list of all key bindings available for the editor. This command is not available when CLIPS is executing. 4.7 Building The CLIPS X Window InterfaceThe following steps describe how to create the X Window machine specific version of CLIPS. This version of the CLIPS X Window interface requires X Window system release 11R6.4 and has been tested on a Macintosh running MacOS X.1 with Tenon Xtools version 1.0.4p1. Note that some familiarity with building applications using C compilers in a UNIX environment is assumed. Section 2 of the Advanced Programming Guide (which describes in general how to install and tailor CLIPS) should also be read before attempting to build the X Window executables.
Appendix A Update Release NotesThe following sections denote the changes and bug fixes for CLIPS versions 6.01, 6.02, 6.03, and 6.04, 6.05, and 6.10. A.1 Version 6.20• Windows Interface Changes The following enhancements were added by the 6.20 release:
A.2 Version 6.10• Windows Interface Bug Fixes The following bugs were fixed by the 6.10 release:
A.3 Version 6.05• Windows Editor Interface Bug Fixes The following bugs were fixed by the 6.05 release:
|