Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: Clips (Artificial Intelligence)
Description: In subject of (Artificial Intelligence) in computer science Defination of CLIPS

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


Reference Manual
Volume I
Basic Programming Guide
Quicksilver Beta
December 31st 2007

CLIPS Reference Manual

CLIPS Basic Programming Guide
Quicksilver Beta December 31st 2007
CONTENTS
License Information
...
iii
Acknowledgements
...
1
Section 2 - CLIPS Overview
...
1 Interacting with CLIPS
...
1
...
3
2
...
2 Automated Command Entry and Loading
...
1
...
5
2
...
5
2
...
6
2
...
1 Data Types
...
3
...
9
2
...
3 Constructs
...
4 Data Abstraction
...
4
...
11
2
...
1
...
11
2
...
1
...
12
2
...
1
...
13
2
...
2 Objects
...
4
...
1 Initial Objects
...
4
...
14
2
...
15
2
...
1 Heuristic Knowledge – Rules
...
5
...
16
2
...
2
...
16
2
...
2
...
16
2
...
2
...
17
2
...
2
...
17
2
...
17
2
...
1 COOL Deviations from a Pure OOP Paradigm
...
6
...
18
2
...
3 Instance-set Queries and Distributed Actions
...
21
CLIPS Basic Programming Guide

i

CLIPS Reference Manual

3
...
22
3
...
22
3
...
23
3
...
23
Section 4 - Deffacts Construct
...
27
5
...
27
5
...
28
5
...
29
5
...
1 Depth Strategy
...
3
...
29
5
...
3 Simplicity Strategy
...
3
...
30
5
...
5 LEX Strategy
...
3
...
31
5
...
7 Random Strategy
...
4 LHS Syntax
...
4
...
33
5
...
1
...
34
5
...
1
...
36
5
...
1
...
38
5
...
1
...
40
5
...
1
...
43
5
...
1
...
45
5
...
1
...
46
5
...
1
...
49
5
...
2 Test Conditional Element
...
4
...
51
5
...
4 And Conditional Element
...
4
...
53
5
...
6 Exists Conditional Element
...
4
...
56
5
...
8 Logical Conditional Element
...
4
...
61
5
...
9
...
61
5
...
9
...
61
5
...
9
...
62
5
...
9
...
63
5
...
9
...
63
5
...
10 Declaring Rule Properties
...
4
...
1 The Salience Rule Property
...
4
...
2 The Auto-Focus Rule Property
...
67
Section 7 - Deffunction Construct
...
75
8
...
75
8
...
76
8
...
76
8
...
76
8
...
1 Generic Function Headers
...
4
...
77
8
...
3 Method Parameter Restrictions
...
4
...
79
8
...
81
8
...
1 Applicability of Methods Summary
...
5
...
82
8
...
3 Shadowed Methods
...
5
...
85
8
...
5 Generic Function Return Value
...
87
9
...
87
9
...
87
9
...
88
9
...
1 Multiple Inheritance
...
3
...
1 Multiple Inheritance Rules
...
3
...
92
9
...
2
...
92
9
...
2
...
92
9
...
3 Slots
...
3
...
1 Slot Field Type
...
3
...
2 Default Value Facet
...
3
...
3 Storage Facet
...
3
...
4 Access Facet
...
3
...
5 Inheritance Propagation Facet
...
3
...
6 Source Facet
...
3
...
7 Pattern-Match Reactivity Facet
...
3
...
8 Visibility Facet
...
3
...
9 Create-Accessor Facet
...
3
...
10 Override-Message Facet
...
3
...
11 Constraint Facets
...
3
...
102
CLIPS Basic Programming Guide

iii

CLIPS Reference Manual

9
...
103
9
...
1 Message-handler Parameters
...
4
...
1 Active Instance Parameter
...
4
...
106
9
...
3 Daemons
...
4
...
108
9
...
4
...
108
9
...
4
...
109
9
...
4
...
110
9
...
4
...
110
9
...
4
...
111
9
...
4
...
111
9
...
4
...
112
9
...
4
...
112
9
...
112
9
...
1 Applicability of Message-handlers
...
5
...
113
9
...
3 Shadowed Message-handlers
...
5
...
114
9
...
5 Message Return Value
...
6 Manipulating Instances
...
6
...
115
9
...
1
...
117
9
...
2 Reinitializing Existing Instances
...
6
...
120
9
...
4 Setting Slots
...
6
...
121
9
...
6 Delayed Pattern-Matching When Manipulating Instances
...
6
...
122
9
...
7
...
122
9
...
7
...
123
9
...
7
...
123
9
...
7
...
124
9
...
8 Duplicating Instances
...
6
...
1 Directly Duplicating an Instance with Delayed Pattern-Matching
...
6
...
2 Directly Duplicating an Instance with Immediate Pattern-Matching
...
6
...
3 Duplicating an Instance using Messages with Delayed Pattern-Matching
...
6
...
4 Duplicating an Instance using Messages with Immediate Pattern-Matching 126
9
...
127
9
...
1 Instance-set Definition
...
7
...
129
9
...
3 Query Definition
...
7
...
131
iv

Table of Contents

CLIPS Reference Manual

9
...
5 Scope in Instance-set Query Functions
...
7
...
132
9
...
7 Halting and Returning Values from Query Functions
...
7
...
133
9
...
8
...
133
9
...
8
...
133
9
...
8
...
134
9
...
8
...
134
9
...
8
...
135
9
...
8
...
135
Section 10 - Defmodule Construct
...
1 Defining Modules
...
2 Specifying a Construct’s Module
...
3 Specifying Modules
...
4 Importing and Exporting Constructs
...
4
...
140
10
...
2 Importing Constructs
...
5 Importing and Exporting Facts and Instances
...
5
...
142
10
...
142
Section 11 - Constraint Attributes
...
1 Type Attribute
...
2 Allowed Constant Attributes
...
3 Range Attribute
...
4 Cardinality Attribute
...
5 Deriving a Default Value From Constraints
...
6 Constraint Violation Examples
...
151
12
...
151
12
...
1 Testing For Numbers
...
1
...
151
12
...
3 Testing For Integers
...
1
...
152
12
...
5 Testing For Strings
...
1
...
152
12
...
7 Testing For Even Numbers
...
1
...
152
12
...
9 Testing For Multifield Values
...
1
...
153
12
...
11 Comparing for Equality
...
1
...
153
12
...
13 Comparing Numbers for Equality
...
1
...
154
12
...
15 Greater Than Comparison
...
1
...
155
12
...
17 Less Than Comparison
...
1
...
156
12
...
19 Boolean And
...
1
...
157
12
...
21 Boolean Not
...
2 Multifield Functions
...
2
...
157
12
...
2 Specifying an Element
...
2
...
158
12
...
4 Comparing Multifield Values
...
2
...
159
12
...
6 Creating Multifield Values from Strings
...
2
...
160
12
...
8 Extracting a Sub-sequence from a Multifield Value
...
2
...
161
12
...
10 Inserting Fields within a Multifield Value
...
2
...
162
12
...
12 Getting All but the First Field from a Multifield Value
...
2
...
162
12
...
14 Deleting Specific Values within a Multifield Value
...
2
...
163
12
...
163
12
...
1 String Concatenation
...
3
...
164
12
...
3 Taking a String Apart
...
3
...
164
12
...
5 Evaluating a Function within a String
...
3
...
165
12
...
7 Converting a String to Uppercase
...
3
...
166
12
...
9 Comparing Two Strings
...
3
...
167
12
...
11 Checking the Syntax of a Construct or Function Call within a String
...
3
...
168
12
...
168
12
...
1 Logical Names
...
4
...
169
12
...
2
...
169
vi

Table of Contents

CLIPS Reference Manual

12
...
2
...
170
12
...
2
...
171
12
...
2
...
171
12
...
2
...
172
12
...
2
...
173
12
...
2
...
175
12
...
2
...
175
12
...
2
...
176
12
...
2
...
177
12
...
2
...
177
12
...
178
12
...
1 Standard Math Functions
...
5
...
1 Addition
...
5
...
2 Subtraction
...
5
...
3 Multiplication
...
5
...
4 Division
...
5
...
5 Integer Division
...
5
...
6 Maximum Numeric Value
...
5
...
7 Minimum Numeric Value
...
5
...
8 Absolute Value
...
5
...
9 Convert To Float
...
5
...
10 Convert To Integer
...
5
...
182
12
...
2
...
183
12
...
2
...
184
12
...
2
...
184
12
...
2
...
184
12
...
2
...
185
12
...
2
...
185
12
...
2
...
185
12
...
2
...
185
12
...
2
...
186
12
...
2
...
186
12
...
2
...
186
12
...
2
...
187
12
...
2
...
187
12
...
187
12
...
1 Binding Variables
...
6
...
then
...
189
12
...
3 While
...
6
...
191
12
...
5 Progn
...
6
...
192
CLIPS Basic Programming Guide

vii

CLIPS Reference Manual

12
...
7 Return
...
6
...
193
12
...
9 Switch
...
7 Miscellaneous Functions
...
7
...
194
12
...
2 Gensym*
...
7
...
195
12
...
4 Random
...
7
...
196
12
...
6 Time
...
7
...
197
12
...
8 Determining the Restrictions for a Function
...
7
...
197
12
...
10 Calling a Function
...
7
...
198
12
...
199
12
...
1 Determining the Module in which a Deftemplate is Defined
...
8
...
199
12
...
3 Getting the Cardinality for a Deftemplate Slot
...
8
...
200
12
...
5 Getting the Default Value for a Deftemplate Slot
...
8
...
201
12
...
7 Testing whether a Deftemplate Slot is a Multifield Slot
...
8
...
202
12
...
9 Getting the Numeric Range for a Deftemplate Slot
...
8
...
202
12
...
11 Getting the Primitive Types for a Deftemplate Slot
...
8
...
203
12
...
203
12
...
1 Creating New Facts
...
9
...
204
12
...
3 Modifying Template Facts
...
9
...
206
12
...
5 Asserting a String
...
9
...
207
12
...
7 Determining If a Fact Exists
...
9
...
208
12
...
9 Determining the Slot Names Associated with a Fact
...
9
...
209
12
...
11 Retrieving the Fact-List
...
9
...
210
12
...
12
...
211
12
...
12
...
212
viii

Table of Contents

CLIPS Reference Manual

12
...
12
...
213
12
...
12
...
213
12
...
12
...
214
12
...
12
...
214
12
...
12
...
215
12
...
12
...
215
12
...
218
12
...
1 Getting the List of Deffacts
...
10
...
219
12
...
219
12
...
1 Getting the List of Defrules
...
11
...
219
12
...
219
12
...
1 Getting the Current Focus
...
12
...
220
12
...
3 Removing the Current Focus from the Focus Stack
...
13 Defglobal Functions
...
13
...
221
12
...
2 Determining the Module in which a Defglobal is Defined
...
14 Deffunction Functions
...
14
...
222
12
...
2 Determining the Module in which a Deffunction is Defined
...
15 Generic Function Functions
...
15
...
222
12
...
2 Determining the Module in which a Generic Function is Defined
...
15
...
223
12
...
4 Type Determination
...
15
...
224
12
...
6 Calling Shadowed Methods
...
15
...
225
12
...
8 Calling a Specific Method
...
15
...
226
12
...
227
12
...
1 Class Functions
...
16
...
1 Getting the List of Defclasses
...
16
...
2 Determining the Module in which a Defclass is Defined
...
16
...
3 Determining if a Class Exists
...
16
...
4 Superclass Determination
...
16
...
5 Subclass Determination
...
16
...
6 Slot Existence
...
16
...
7 Testing whether a Slot is Writable
...
16
...
8 Testing whether a Slot is Initializable
...
16
...
9 Testing whether a Slot is Public
...
16
...
10 Testing whether a Slot can be Accessed Directly
...
16
...
11 Message-handler Existence
...
16
...
12 Determining if a Class can have Direct Instances
...
16
...
13 Determining if a Class can Satisfy Object Patterns
...
16
...
14 Getting the List of Superclasses for a Class
...
16
...
15 Getting the List of Subclasses for a Class
...
16
...
16 Getting the List of Slots for a Class
...
16
...
17 Getting the List of Message-Handlers for a Class
...
16
...
18 Getting the List of Facets for a Slot
...
16
...
19 Getting the List of Source Classes for a Slot
...
16
...
20 Getting the Primitive Types for a Slot
...
16
...
21 Getting the Cardinality for a Slot
...
16
...
22 Getting the Allowed Values for a Slot
...
16
...
23 Getting the Numeric Range for a Slot
...
16
...
24 Getting the Default Value for a Slot
...
16
...
25 Setting the Defaults Mode for Classes
...
16
...
26 Getting the Defaults Mode for Classes
...
16
...
27 Getting the Allowed Values for a Slot
...
16
...
236
12
...
2
...
236
12
...
2
...
237
12
...
2
...
237
12
...
3 Definstances Functions
...
16
...
1 Getting the List of Definstances
...
16
...
2 Determining the Module in which a Definstances is Defined
...
16
...
239
12
...
4
...
239
12
...
4
...
239
12
...
4
...
239
12
...
4
...
240
12
...
4
...
240
12
...
4
...
240
12
...
4
...
240
12
...
4
...
241
12
...
4
...
241
12
...
4
...
242
12
...
4
...
242
12
...
4
...
242
12
...
244
12
...
1 Getting the List of Defmodules
...
17
...
245
12
...
3 Getting the Current Module
...
18 Sequence Expansion
...
18
...
246
12
...
2 Multifield Expansion Function
...
18
...
247
12
...
4 Getting The Sequence Operator Recognition Behavior
...
18
...
248
Section 13 - Commands
...
1 Environment Commands
...
1
...
249
13
...
2 Loading Constructs From A File without Progress Information
...
1
...
249
13
...
4 Loading a Binary Image
...
1
...
250
13
...
6 Clearing CLIPS
...
1
...
251
13
...
8 Resetting CLIPS
...
1
...
252
13
...
10 Executing Commands From a File Without Replacing Standard Input
...
1
...
252
13
...
12 Calling the Operating System
...
1
...
253
13
...
14 Getting The Auto-Float Dividend Behavior
...
1
...
254
13
...
16 Getting the Dynamic Constraint Checking Behavior
...
1
...
254
13
...
18 Getting the Static Constraint Checking Behavior
...
1
...
254
13
...
255
13
...
1 Generating Trace Files
...
2
...
255
13
...
3 Enabling Watch Items
...
2
...
257
13
...
5 Viewing the Current State of Watch Items
...
3 Deftemplate Commands
...
3
...
258
13
...
2 Displaying the List of Deftemplates
...
3
...
259
13
...
259
13
...
1 Displaying the Fact-List
...
4
...
259
13
...
3 Saving The Fact-List To A File
...
4
...
260
13
...
5 Getting the Duplication Behavior of Facts
...
4
...
261
13
...
262
13
...
1 Displaying the Text of a Deffacts
...
5
...
262
13
...
3 Deleting a Deffacts
...
6 Defrule Commands
...
6
...
263
13
...
2 Displaying the List of Rules
...
6
...
263
13
...
4 Displaying Matches for a Rule
...
6
...
265
13
...
6 Removing a Breakpoint for a Rule
...
6
...
266
13
...
8 Refreshing a Rule
...
6
...
266
13
...
10 Getting the Incremental Reset Behavior
...
6
...
267
13
...
12 Determining the Logical Dependents of a Pattern Entity
...
7 Agenda Commands
...
7
...
268
13
...
2 Running CLIPS
...
7
...
268
13
...
4 Stopping Rule Execution
...
7
...
269
13
...
6 Getting The Current Conflict Resolution Strategy
...
7
...
269
13
...
8 Removing all Module Names from the Focus Stack
...
7
...
270
13
...
10 Getting the Salience Evaluation Behavior
...
7
...
270
13
...
271
13
...
1 Displaying the Text of a Defglobal
...
8
...
271
13
...
3 Deleting a Defglobal
...
8
...
271
13
...
5 Setting the Reset Behavior of Global Variables
...
8
...
272
13
...
272
13
...
1 Displaying the Text of a Deffunction
...
9
...
272
13
...
3 Deleting a Deffunction
...
10 Generic Function Commands
...
10
...
273
xii

Table of Contents

CLIPS Reference Manual

13
...
2 Displaying the Text of a Generic Function Method
...
10
...
273
13
...
4 Displaying the List of Methods for a Generic Function
...
10
...
274
13
...
6 Deleting a Generic Function Method
...
10
...
275
13
...
275
13
...
1 Class Commands
...
11
...
1 Displaying the Text of a Defclass
...
11
...
2 Displaying the List of Defclasses
...
11
...
3 Deleting a Defclass
...
11
...
4 Examining a Class
...
11
...
5 Examining the Class Hierarchy
...
11
...
279
13
...
2
...
279
13
...
2
...
279
13
...
2
...
280
13
...
2
...
280
13
...
3 Definstances Commands
...
11
...
1 Displaying the Text of a Definstances
...
11
...
2 Displaying the List of Definstances
...
11
...
3 Deleting a Definstances
...
11
...
282
13
...
4
...
282
13
...
4
...
283
13
...
4
...
283
13
...
4
...
284
13
...
4
...
284
13
...
4
...
284
13
...
4
...
284
13
...
285
13
...
1 Displaying the Text of a Defmodule
...
12
...
285
13
...
285
13
...
1 Determining the Amount of Memory Used by CLIPS
...
13
...
285
13
...
3 Releasing Memory Used by CLIPS
...
13
...
286
13
...
286
13
...
1 Using the CLIPS Help Facility
...
14
...
287
13
...
288
13
...
1 External Text File Format
...
15
...
290
13
...
2
...
290
13
...
2
...
290
13
...
2
...
292
13
...
2
...
292
13
...
292
13
...
1 Setting the Profiling Report Threshold
...
16
...
293
13
...
3 Resetting Profiling Information
...
16
...
293
13
...
5 Profiling Constructs and User Functions
...
297
A
...
297
A
...
297
A
...
297
Appendix B - Update Release Notes
...
1 Version 6
...
299
B
...
24
...
3 Version 6
...
302
B
...
22
...
5 Version 6
...
303
B
...
2
...
7 Version 6
...
306
B
...
05
...
9 Version 6
...
310
B
...
03
...
11 Version 6
...
312
B
...
01
...
315
Appendix D - Integrated Editor
...
1 Special characters
...
2 Control Commands
...
3 Extended (Control-X) Commands
...
4 Meta Commands (Activated by or )
...
327
E
...
327
E
...
328
E
...
329
E
...
329
xiv

Table of Contents

CLIPS Reference Manual

E
...
329
Appendix F - CLIPS Warning Messages
...
333
Appendix H - CLIPS BNF
...
379
Appendix J - Bibliography of CLIPS Publications
...
393

CLIPS Basic Programming Guide

xv

CLIPS Reference Manual

License Information
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the “Software”), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or
sell copies of the Software, and to permit persons to whom the Software is furnished to do so
...
IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE
...
However, if you derive commercial or monetary benefit from use of the software or just
want to show support, please consider making a voluntary payment based on the worth of the
software to you as compensation for the time and effort required to develop and maintain CLIPS
...
kagi
...


CLIPS Basic Programming Guide

i

CLIPS Reference Manual

Preface
The History of CLIPS
The origins of the C Language Integrated Production System (CLIPS) date back to 1984 at
NASA’s Johnson Space Center
...

However, despite extensive demonstrations of the potential of expert systems, few of these
applications were put into regular use
...
In particular, three problems
hindered the use of LISP based expert system tools within NASA: the low availability of LISP
on a wide variety of conventional computers, the high cost of state-of-the-art LISP tools and
hardware, and the poor integration of LISP with other languages (making embedded applications
difficult)
...
Although a number of tool
vendors started converting their tools to run in C, the cost of each tool was still very high, most
were restricted to a small variety of computers, and the projected availability times were
discouraging
...

The prototype version of CLIPS was developed in the spring of 1985 in a little over two months
...
Thus, the syntax of CLIPS was
made to very closely resemble the syntax of a subset of the ART expert system tool developed
by Inference Corporation
...

The original intent for CLIPS was to gain useful insight and knowledge about the construction of
expert system tools and to lay the groundwork for the construction of a replacement tool for the
commercial tools currently being used
...
0 demonstrated the feasibility of the project
concept
...
Another year of development and internal
use went into CLIPS improving its portability, performance, functionality, and supporting
documentation
...
0 of CLIPS was made available to groups outside of NASA in the
summer of 1986
...
Versions 4
...
1 of CLIPS, released
CLIPS Basic Programming Guide

iii

CLIPS Reference Manual

respectively in the summer and fall of 1987, featured greatly improved performance, external
language integration, and delivery capabilities
...
2 of CLIPS, released in the summer of
1988, was a complete rewrite of CLIPS for code modularity
...

Version 4
...

Originally, the primary representation methodology in CLIPS was a forward chaining rule language based on the Rete algorithm (hence the Production System part of the CLIPS acronym)
...
0 of CLIPS, released in the spring of 1991, introduced two new programming
paradigms: procedural programming (as found in languages such as C and Ada) and
object-oriented programming (as found in languages such as the Common Lisp Object System
and Smalltalk)
...
Version 5
...
Version 6
...
Version 6
...
Commands to profile the time spent in constructs and user-defined functions were
also added
...
2 of CLIPS, released in 2002, added support for multiple environments
into which programs can be loaded and improved Windows XP and MacOS development
interfaces
...
The development of
CLIPS has helped to improve the ability to deliver expert system technology throughout the
public and private sectors for a wide range of applications and diverse computing environments
...

CLIPS is now maintained as public domain software by the main program authors who no longer
work for NASA
...

CLIPS Version 6
...
3 of CLIPS contains two major enhancements
...

Second, support for integration with languages such as Java and C++ has been improved
...
x releases of CLIPS, refer to appendix B of the Basic
Programming Guide and appendix C of the Advanced Programming Guide
...



The CLIPS Reference Manual which is split into the following parts:




Volume II - The Advanced Programming Guide, which provides detailed discussions of
the more sophisticated features in CLIPS and is intended for people with extensive
programming experience who are using CLIPS for advanced applications
...


Volume III - The Interfaces Guide, which provides information on machine-specific
interfaces
...


CLIPS Basic Programming Guide

v

CLIPS Reference Manual

Acknowledgements
As with any large project, CLIPS is the result of the efforts of numerous people
...
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 User’s Guide
...
J
...


CLIPS Basic Programming Guide

vii

CLIPS Reference Manual

Section 1 - Introduction
This manual is the Basic Programming Guide for CLIPS
...
No previous expert system background is required, although a general
understanding of computer languages is assumed
...
Sections 3 through 11 provide additional details
regarding the CLIPS programming language on topics such as rules and the CLIPS Object
Oriented Programming Language (COOL)
...
Finally, commands typically used from the CLIPS interactive
interface are described in section 13
...
More advanced
capabilities, such as user-defined functions, embedded applications, etc
...
The Advanced Programming Guide is intended for
users who have a complete knowledge of the CLIPS syntax and a programming background
...
CLIPS can
be learned and simple expert systems can be built with the information provided in this manual
...

2
...
Embedded applications are discussed in the Advanced
Programming Guide
...

The generic CLIPS interface is a simple, interactive, text-oriented, command prompt interface
for high portability
...
The interface provides commands for viewing the
current state of the system, tracing execution, adding or removing information, and clearing
CLIPS
...
1, and X
Window environments
...
These interfaces are described in more detail in the Interfaces Guide
...
1
...
When the “CLIPS>” prompt is printed, a command
may be entered for evaluation
...
If a function call is entered (see section 2
...
2), that function is evaluated
and its return value is printed
...
Entering a construct definition (see section
2
...
3) at the CLIPS prompt creates a new construct of the appropriate type
...
4
...
Local variables
can be set at the command prompt using the bind function and retain their value until a reset or
clear command is issued
...
Entering a constant (see section 2
...
1) at the top level causes the
constant to be printed (which is not very useful)
...
3 10/25/07)
CLIPS> (+ 3 4)
7
CLIPS Basic Programming Guide

3

CLIPS Reference Manual
CLIPS> (defglobal ?*x* = 3)
CLIPS> ?*x*
3
CLIPS> red
red
CLIPS> (bind ?a 5)
5
CLIPS> (+ ?a 3)
8
CLIPS> (reset)
CLIPS> ?a
[EVALUATN1] Variable a is unbound
FALSE
CLIPS>

The previous example first called the addition function adding the numbers 3 and 4 to yield the
result 7
...
The variable ?*x* was
then entered at the prompt and its value of 3 was returned
...

2
...
2 Automated Command Entry and Loading
Some operating systems allow additional arguments to be specified to a program when it begins
execution
...
The command-line syntax for starting CLIPS and automatically reading
commands or loading constructs from a file is as follows:
Syntax
clips