Start development on 386BSD 0.0
[unix-history] / .ref-BSD-4_3_Net_2 / usr / src / usr.bin / lisp / pearl / ChangeLog
CommitLineData
7129096e
C
1 Changes to PEARL since the User's Manual.
2
36/26/83 -- Version 3.9: Misc. bug fixes -- distributed with 4.2.
4-- Fixed a(n embarassingly) large number of bugs in the functions
5relating to blocks and freezing and thawing variables. User visible
6changes are that freezeblock and thawblock are now fexprs expecting
7the name of the block to be frozen. Blocks without names cannot be
8frozen or thawed individually. A prominent bug was also found in
9freezebindings which did not work correctly when the structure being
10frozen had no non-frozen variables of its own.
11
126/21/83
13-- Changed the name of the "selectq" in ucisubset.l to "selectq*" to
14avoid the new Franz function "selectq" which requires the default case
15to be labeled with "t" or "otherwise". Changed all PEARL code to use
16the new Franz selectq.
17
185/14/83 -- Version 3.8: Unification added.
19-- Added unification pattern matching as an option, using code written
20by Dave Chin. To turn on unification, call the function "useunification".
21There is currently no way to turn it off since the code as written
22cannot handle old unification results if it doesn't think unification
23is taking place (controlled by special variable *unifyunbounds*).
24It is not as expensive as expected so this may be changed.
25-- Also fixed serious bugs in "setv".
26
275/12/83
28-- Fixed bug in create which caused the mechanism of changing the type
29of create being done in nested structures to fail.
30
315/6/83
32-- Fixed bug in printing of global adjunct variables.
33
345/1/83
35-- Fixed various major bugs in varreplace.
36
374/26/83 -- Version 3.7: Two part compilation and minor bug fixes
38 in scopy and hooks.
39-- Created a way to do a "make" which compiles in two pieces for small
40machines. Simply define "make pearl" as either "big" or "small"
41depending on memory size (Less than about 2.5 Mb of memory requires
42"small").
43-- Changed "scopy" and related functions so that the abbreviation on the
44copy is just gensym'ed from the old abbreviation, without adding ":copy".
45-- Fixed a bug in the hook functions which caused all slots after the ones
46with hooks to execute the result (*done*, etc) of the first one.
47
483/28/83 -- Version 3.6: Inherit all slot hooks and predicates and unbind
49 incorrectly bound global variables after failed match.
50--- Slot hooks are now always inherited and added to, rather than
51replaced. If the hooks and predicates of a slot are preceded by "instead"
52then inheriting doesn't happen and hooks and predicates are replaced.
53--- Fixed match so that if an unbound global variable is set during a match
54that later fails, the value is restored to *pearlunbound*. The names of
55variables that are set are saved in the special variable *globalsavestack*.
56
573/18/83 -- Version 3.5: New print functions.
58--- Rewrote all the print functions. Externally, the three old
59pairs of functions: "valprint"/"valform", "fullprint"/"fullform",
60and "abbrevprint"/"abbrevform" behave the same. However, there is now
61a function called "allform" which all of these use which adjusts its
62treatment of a structure based on several special atoms:
63 1. *abbrevprint* -- non-nil value causes abbreviations to be used
64whenever possible. "abbrevform" (and thus "abbrevprint") lambda-binds
65this to t and calls "allform". "fullform" binds this to nil.
66 2. *fullprint* -- non-nil value causes complete information
67including hooks and predicates to be given when present. "fullform"
68(and thus "fullprint") lambda-binds this to t and calls "allform".
69"abbrevform" binds this to nil.
70 3. *uniqueprint* -- described below.
71 4. *quiet* -- described below.
72"valform" lambda-binds both to nil which is their default values.
73Thus, the default action of "allform" used by itself will be like "valform".
74--- All the default print functions which used to use "valprint"
75automatically now use "allprint" so that they can all be changed by
76changes to the default values of *abbrevprint* and *fullprint*.
77--- The third atom which affects the behavior of all the print functions
78is *uniqueprint*. If it is given a non-nil value then if a structure
79is encountered more than once during the same top-level call to a
80print function, it will be translated into exactly the same cons-cells.
81This saves on cons-cells and also makes it possible for the "*form"
82functions to handle circular structures, although "sprint" and thus
83the "*print" functions can't handle the result. Since most people
84seldom have duplications within a structure, the default is OFF (nil).
85The assoc list is stored in the special atom *uniqueprintlist*.
86--- "form" and "print" functions were added to handle structures,
87streams and symbols specially. They are called
88"structureform", "structureprint" "symbolform", "symbolprint",
89"streamform" and "streamprint" and do not ensure that you give them
90the right type of value.
91--- The fourth atom which affects the behavior of all the print
92functions is *quiet* which, if non-nil, keeps them from running
93either sprint or the *form function. This is helpful for when you
94wish to turn off ALL printing in one fell swoop. A function called
95"quiet" was also added which behaves like progn, except that it
96lambda-binds *quiet* to t during the evaluation of its arguments,
97provided a local island of "quiet".
98
993/8/83 -- Version 3.4: Type tags added.
100--- Added a field to definitions, structures, symbols, and databases to
101indicate what they were to speed up type checking. All relevant
102functions related to structures and databases were changed.
103--- Fixed some bugs in releasedb.
104--- Many lowlevel functions in PEARL were changed, but none in ways that would
105affect most people (because they shouldn't be using the changed functions).
106
1073/4/83 -- Version 3.3: New faster hashing.
108--- Changed internal code to do the hashing so that it only gets the value
109out of a slot once instead of as many as 4 times as before. Resulted
110in about a 5% speedup for structures only hashed a couple of ways.
111Should be more for multiply hashed items. Should also make new
112hashing methods easier to add.
113
1142/25/83 -- Version 3.2: Slot encoding applied to speeded-up match.
115--- Rewrote match functions to use the new slot encoding. Provided
116about a 10% speedup.
117--- There are now two different kinds of match function: "standardmatch"
118and "basicmatch" will only match two structures of the same type.
119"standardexpandedmatch" and "basicexpandedmatch" will match two
120structures which are related hierarchically (one above the other)
121on the slots they have in common. "standardfetch" uses the regular
122versions and "expandedfetch" uses the expanded versions.
123
1242/21/83
125--- Changed all special variables in PEARL to be defined with defvar so
126that fasl'ing in pearl.o at compile time will automatically declare them
127special again.
128
1292/17/83 -- Version 3.1: Slot encoding for speed.
130--- Added major and minor version numbers to PEARL, stored in
131"pearlmajorversion" and "pearlminorversion" respectively.
132Started at 3.1 for this version.
133--- Added new method of storing in slots to speed up some things.
134--- Putpath, delsetpath, addsetpath and clearpath now will work on a
135slot with any kind of value or variable in it but result in a constant
136value. This may cause problems, and if it does it will be "fixed" to
137worry about what was there and decide what to do to it.
138--- Scopy no longer throws away bound adjunct variables.
139--- Many functions listed in the manual as being "proprietary" to PEARL
140(i.e., not safe to use) have gone away. There are too many to list here.
141
1421/23/83
143--- Fixed a bug which made slots inherit hashing when redescribed in an
144expanded structure unless new hashing was specifically included.
145--- Added a new "hashing mark" "+", for redescribed slots of expanded
146structures only, which says copy the old info and add the following
147new hashing too. It must come first to be effective.
148 Thus, the following should work:
149 (cb x (* a int))
150 (ce x y (a ^))
151 (ce x z (+ : a ^))
152 (ce x w (: + a ^)) ;; anomalous use of +
153resulting in:
154 * hashing in x,
155 no hashing in y,
156 both * and : hashing in z,
157 and only * hashing in w (because of misplacement of +).
158
1591/19/83
160--- Merged the file sprint.l into ucisubset.l.
161
1621/18/83
163--- Miscellaneous changes to functions length and others in ucisubset.l
164to improve efficiency.
165
1661/7/83
167--- Changed ,@ to ., in most cases (i.e., whenever equivalent) to
168avoid an unneeded append generated by the backquote macro.
169
17012/24/82
171--- Made change in the definitions of de, df, dm, drm and dsm so that
172if the special variable *savedefs* is nil then old definitions of functions
173are not saved. This is especially useful in compiling (and hence assembly
174and loading) since it will speed it up quite a bit. The saving of the file
175the definition was in is also disabled. The variable *savedefs* is
176normally t which causes these macros to act as before, saving the
177definition, etc. If *savedefs* is nil, then they simply expand into the
178appropriate defun or setsyntax. The following lines should be
179included in the file to have this effect only at compile time:
180 (eval-when (compile)
181 (declare (special *savedefs*))
182 (setq *savedefs* nil))
183If you want to permanently disable the saving in your lisp,
184simply put a
185 (setq *savedefs* nil)
186in your .lisprc file AFTER the loading of ucisubset.l.
187
18811/12/82
189--- Removed association of "remove" with Franz's "delete" so that
190Franz's remove could be used and fixed all references to "remove" and
191"dremove", changing many to "delq"s.
192--- Deleted "powercopy" and redefinition of "copy" now that Franz has
193correct meaning (doesn't attempt to copy hunks) for copy.
194
19510/30/82
196--- All the exprs whose names were of the form XXXX1 where XXXX was the
197name of a lexpr which was a principle function of PEARL were eliminated
198(i.e., absorbed by the other form).
199--- Many small changes to speed up PEARL, including:
200 1. Changed many progs to lets.
201 2. Inserted progn's around (or (non-error)
202 (not (msg t .....))
203 (pearlbreak))
204 thus eliminating the not and clarifying the meaning.
205 3. Changed many pops to (setq x (cdr x)) (where popped item not wanted).
206 4. Changed plus, difference, times and remainder to +&, -&, * and \\.
207 5. Changed greaterp and lessp to >& and <&.
208 6. Changed minusp to (<& .. 0)
209 7. Changed (neq 0 ..) to (not (=& 0 ..)).
210 8. Eliminated the intermediate exprs insertdb1, fetch1, etc.
211 by converting the basic functions insertdb, fetch to use the
212 &optional syntax.
213PRELIMINARY RESULTS:
214 25-33% speedup of various test programs.
215
21610/20/82
217--- Added abbreviation "pdb" for "printdb".
218--- Changed usage of nth, push and pop to use Franz Opus 38.32's new
219definitions of them, removing them from ucisubset.l.
220
2219/17/82
222--- Changed scopy, patternize and varreplace to exprs from macros
223so that they will compile without complaints of special variables.
224
2259/16/82
226--- Added new hashing mechanism using label && and called "hash
227focusing". If this is found when inserting into the database
228then the item is hashed as if it were the item in the slot so
229labelled. This is designed for people using a data base all of
230whose entries are of the same type (not required, just common
231for this application) and enables the contents of a slot to be
232more usefully used to discriminate them (e.g., planfors, inference
233rules, or almost any such extremely-common binary predicates.)
234At fetching time, && is considered less useful than *** or ** and more
235useful than * or nothing (subject to debate and change). (This
236necessitated the addition of an additional entry in the header of
237structure definitions, moving everything else down a slot in the hunk.)
238This differs from & (hash aliasing) in that && hash focussing affects
239how a structure itself is inserted and fetched, while & simply
240affects how structures containing this type of structure are
241treated. For example, suppose the unique numbers of A, B, and C
242respectively are 1, 2, and 3. C is a symbol. A has one slot X with
243* and && hashing. B has one slot Y of type symbol with * hashing.
244Then a structure like (A (X (B (Y C)))) will be indexed the
245following ways and fetcheverywhere will find it in the following
246order:
247 && which uses the 2 and 3 from B and its C, (ignoring the 1 of A),
248 and also simply 2 from B.
249 * on A uses type of B thus using 1 and 2.
250 also put under 1 of A without using 2 or 3.
251If B had an & in its slot then the
252 * on A is affected by & on B thus using 1 and 3 (ignoring the 2 of B).
253
254Thus, if you consider A, B, and C to be three levels of information
255in the structure, an item can be hashed under any combination of two
256of those levels. The normal * method uses levels 1 and 2, the
257aliasing & method ignores level 2 and uses levels 1 and 3, and the
258new focussing && method ignores level 1 and uses levels 2 and 3.
259In addition, the item can be put under 1, 2 or 3 individually by
260various combinations of marks (1 = none, 2 = :, 3 = :+&). The only
261unavailable combination of the 3 is all three.
262
263(Added internal-use-only functions are insertbyfocus, removebyfocus,
264puthashfocus, gethashfocus, recursetoinsidestandardfetch.
265
2669/15/82
267--- Added two functions "memmatch" and "memstrequal" which are like
268"memq" except that they use "match" and "strequal" respectively
269instead of "eq".
270--- Added fixes to "scopy" and "patternize" from Dave Chin which allow
271them to handle circularly linked structures AND to use the same copy
272of the same structure wherever it appears. This required the addition
273of a special variable *scopieditems*. This also included a bug fix
274which added code to store pointers to the new copies in the
275abbreviation atoms stored in them.
276--- Added a function called "varreplace" similar to "patternize" which
277replaces all bound variables in an item with their values, in effect
278permanently freezing them.
279--- Added a function called "(intscopy item outeritem)" where intscopy
280stands for "internal scopy" exactly the same as "(scopy item)" except
281it does the copying as if the item were internal to outeritem, thus
282sharing its local and block variables.
283--- Split create.l into create.l and scopy.l.
284
2859/14/82
286--- Moved much of the initialization stuff out of pearl-top-level-init
287to be done at load time instead. This cut the minimum startup cost
288for PEARL from 4 seconds to 0.8 seconds CPU.
289--- Changed setdbsize to remove all current databases before changing
290the size, warn if *warn* is set and recreate *maindb* with *db*
291pointing to it. Also fixed a bug when removing the last database.
292--- Changed the init-files processing to parallel the new Franz method,
293looking in the current directory, and then the home directory, and
294looking for .init.prl followed by .o, .l or nothing, and then init.prl
295followed by .o, .l or nothing. Similarly for start.prl.
296--- Fixed cleardb so that it doesn't make new cons-cells for the buckets
297and so that it uses connectdb if the database has a parent. Thus,
298cleardb is a local database clearer and its effects do not extend up
299the DB hierarchy.
300
3016/6/82
302Added new hashing method. If slots are labelled with *** and all
303slots so marked are filled with useful values, then the item is hashed
304under the type of structure plus the values of all these slots.
305New functions are gethashmulti and puthashmulti. *multiproducts* is a
306new special atom containing the numbers to multiply the various values
307with to produce the index (currently powers of 16).
308
3096/3/82
310Fixed a bug in fetcheverywhere which caused it to only find the
311bucket for the first *-ed slot, instead of all of them. (Added
312to npearl also).
313
3145/28/82
315Tried replacing the sequential search method of finding slot numbers
316for particular slot names with evaluating a concat'ed atom made out
317of <typename ":" slotname> but timings found it slower so it was
318removed.
319
3205/27/82
321Fixed a problem with storage of variables. Instead of two spots in
322the hunk, one for the alist (unfrozen variables) and one for the
323alistcp (frozen variables), there is a special cons cell with these
324in its car and cdr. This cons cell is pointed to by all substructures
325so that they can be used in fetches and matches and will be able to
326unbind or freeze or thaw their variables. Additional special variable
327is *toplevelalists* (or some such).
328
3295/6/82
330--- When an individual (including default instance) structure is created,
331an abbreviation atom is stored in it. This abbreviation is chosen as
332follows:
333 1. If the option of having a structure stored in an atom is used,
334 then that atom is the one used as an abbreviation. Thus
335 (create individual x Pete)
336 will have Pete as a abbreviation.
337 2. If that option isn't used, then default instances will be
338 given the abbreviation i:x (where x is the structure type name)
339 and individuals at the top level will be given a name newsym-ed
340 from the name of their type. Thus
341 (create base x) will make a default instance abbreviated i:x and
342 (create individual x) will be abbreviated x0 or x1 or whatever.
343--- New printing and "form-type" functions were added called "abbrevprint"
344and "abbrevform" which print the abbreviation (if there is one) for
345any structure below the top level.
346--- The base name of the type of a slot (i.e., the last word, after
347setof's are stripped off) is stored for each slot (a more general
348application of the "ppset" information always stored for integer slots
349with ordinal types before). This is in preparation for two things:
350 1. Enforcing such type descriptions.
351 2. Generating knowledge about the slots of a structure so that the
352 user need not know whether to use fetch or path.
353
3545/5/82
355The name of an old slot in a new expanded may be changed by following
356the new name by the old slotname preceded with an equal sign. Thus
357for example:
358pearl> (create base X
359 (A struct))
360(X (A (nilstruct)))
361pearl> (create expanded X Y
362 (B =A)
363 (C .....))
364(Y (B (nilstruct)) (C .....)))
365
366NOTE that there MAY NOT be a space between the equal sign and the A
367since = is the read macro which expands =A into (*slot* A) but leaves
368a single space-surrounded = alone.
369
3704/28/82
371--- Adapted PEARL to fit Franz Opus 38.13 so that the atoms
372showstack-printer and trace-printer are bound to the functions
373pearlshowstackprintfn and pearltraceprintfn. (Note the addition of
374"pearl" to the beginning of these). Also changed the name of
375breakprintfn to pearlbreakprintfn but it is not currently
376lambda-bindable.
377--- Adapted the reading of .init.prl and .start.prl files to disable
378the printing of "[load .init.prl]" by lambda-binding $ldprint to nil
379first (Franz Opus 38.14).
380
3812/22/82
382--- Fixed a bug in the hook disablers. The atoms for path hooks
383were misnamed in such a way that you couldn't use hidden and
384visible. Instead of *rungethooks*, and other *run...hooks*
385forms, they are now *rungetpathhooks* and other *run...pathhooks*.
386Note that they must be called as (XXXpath ...) and not (path XXX ...)
387when used with hidden and visible.
388
3892/21/82
390--- Added ability to evaluate an atom when expecting a value of a
391different type (besides integers which already worked this way).
392For symbols, this is done if the atom isn't a symbol name.
393For structures, it must evaluate to a structure.
394For Lisp slots, it may not evaluate to an atom.
395For setof slots, its value is checked for being of the appropriate
396type, including depth of nesting.
397--- Added the fetching function "fetcheverywhere" which gathers
398ALL the buckets the object could have been hashed into and builds
399a stream out of all of them (potentially five buckets). Will wait
400to build an "expandedfetcheverywhere" with its potential of
401returning 5 times the-depth-of-the-hierarchy buckets.
402
403vi: set lisp: