|
|
1.1 root 1: .TH OPS5 1
2: .SH NAME
3: ops5 \- a rule-based production-system environment
4: .SH SYNOPSIS
5: .B ops5
6: .SH DESCRIPTION
7: Ops5 is a rule-based language built on Lisp.
8: A program consists of a collection of
9: if\(enthen rules and a global `working memory'.
10: Each rule has a conditional expression, the
11: .SM `LHS'
12: and a
13: sequence of actions, the
14: .SM `RHS'.
15: A
16: .SM LHS
17: consists of one or more patterns and is
18: `satisfied' when every pattern
19: matches an element in working memory.
20: .PP
21: The rule interpreter executes a `recognize-act' cycle:
22: .IP 1.
23: Match: Evaluate the
24: .SM LHS\*Ss
25: of the rules to determine which are satisfied.
26: .IP 2.
27: Conflict Resolution: Select one rule from among the ones with satisfied
28: .SM LHS\*Ss.
29: If no
30: .SM LHS\*Ss
31: is satisfied halt execution.
32: .IP 3.
33: Act: Perform the operations specified in the
34: .SM RHS
35: of the selected rule.
36: .PP
37: The top level commands
38: in order of usefulness are:
39: .TP 12
40: .B watch
41: report on firings and working memory changes
42: .EX
43: (watch) ;Report current watch level
44: (watch 0) ;No report
45: (watch 1) ;Report rule names and working memory time tags
46: (watch 2) ;Report rule names, working memory time tags
47: ;and changes to working memory
48: .EE
49: .TP
50: .B load
51: load working memory and rule declarations
52: .EX
53: (load 'billing.l) ;Load file `billing.l'
54: .EE
55: .TP
56: .B run
57: start the rule interpreter
58: .EX
59: (run) ;Run until no rules are satisfied or halt executed
60: (run 1) ;Run one rule firing
61: .EE
62: .TP
63: .B exit
64: exit
65: .I ops5
66: .EX
67: (exit)
68: .EE
69: .B
70: .TP
71: .B back
72: back up the rule interpreter
73: .EX
74: (back 32) ;Back up 32 rule firings
75: .EE
76: .TP
77: .B wm
78: display working memory
79: .EX
80: (wm 32) ;Display working memory element 32
81: .EE
82: .TP
83: .B ppwm
84: display parts of working memory
85: .EX
86: (ppwm customer ^record bad) ;Display all customer working memory
87: ;elements with `bad' records
88: .EE
89: .TP
90: .B pm
91: display production or rule memory
92: .EX
93: (pm good-customer) ;Display rule `good-customer'
94: .EE
95: .TP
96: .B cs
97: print the conflict set
98: .EX
99: (cs)
100: .EE
101: .TP
102: .B matches
103: print matches for condition elements of a rule
104: .EX
105: (matches bad-customer) ;Display matches for rule `bad-customer'
106: .EE
107: .TP
108: .B pbreak
109: set a break point after a production firing
110: .EX
111: (pbreak bad-but-long-term-customer) ;Set break point after rule
112: ;`bad-but-long-term-customer'
113: .EE
114: .TP
115: .B make
116: make working memory elements
117: .EX
118: ;Make a customer working memory element
119: (make customer ^name Terry ^record bad ^years 22)
120: .EE
121: .TP
122: .B remove
123: remove working memory elements
124: .EX
125: (remove *) ;Remove all working memory elements
126: (remove 17) ;Remove working memory element 17
127: .EE
128: .TP
129: .B excise
130: remove rules
131: .EX
132: ;Remove `good-customer' and `bad-customer' rules
133: (excise good-customer bad-customer)
134: .EE
135: .TP
136: .B openfile
137: open a file
138: .EX
139: ;Open `ruletrace.ops' as output
140: ;and associate it with traceoutput port
141: (openfile traceoutput |ruletrace.ops| out)
142: ;Open `answers' as input and associate it with stdin port
143: (openfile stdin |answers| in)
144: .EE
145: .TP
146: .B closefile
147: close a file
148: .EX
149: (closefile traceoutput stdin) ;Close traceoutput and stdin ports
150: .EE
151: .TP
152: .B default
153: change default input and output files
154: .EX
155: (default nil trace) ;Change trace port back to default
156: (default traceoutput write) ;Change write port to traceoutput
157: (default stdin accept) ;Change accept port to stdin
158: .EE
159: .TP
160: .B strategy
161: select rule interpreter strategy.
162: .EX
163: (strategy) ;Report current strategy
164: (strategy mea) ;Selects mea strategy
165: (strategy lex) ;Selects lex strategy (default on startup)
166: .EE
167: .SH FILES
168: .TF /usr/lib/lisp
169: .TP
170: .F /usr/lib/lisp
171: lisp library
172: .SH "SEE ALSO"
173: Forgy, C. L.,
174: .IR "OPS5 User's Manual" ,
175: Department of Computer Science,
176: Carnegie-Mellon University,
177: July, 1981
178: .br
179: lisp (1)
180: .SH DIAGNOSTICS
181: When
182: .I ops5
183: stops executing for any reason, you are placed in the
184: .I lisp
185: top-level routine.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.