Test suite changes



Richard Fateman <fateman@cs.berkeley.edu> writes:

> I haven't been following this carefully, but I suspect that what is
> needed is a command that says: "everything before this time is
> supposed to be in the SYSTEM, not in the USER environment" This
> command would clear off all lists of
> things-to-remove-when-the-user-says-kill-all, and thus subsequent
> kill(all) would not remove anything before that command, including
> trgsmp stuff etc.

Here's an example of how not to clear off lists.  Maxima finds most
things from translated & compiled files via $PROPS.  Now, in a fresh
Maxima,

(C1) get('sin,'complement_function);

(D1) 				      COS

/* Clear off $PROPS (which can be destructively modified by add2lnc) */
(C2) :lisp(setq $props (list '(mlist)))

((MLIST))
(C2) kill(all);

(D0) 				     DONE
(C1) get('sin,'complement_function);

(D1) 				      COS
/* Good. Still there. */

(C2) put('sin,'bar,'foo);

(D2) 				      bar
(C3) kill(all);

(D0) 				     DONE
(C1) get('sin,'complement_function);

(D1) 				     FALSE
/* Gone. */

(C2) props;

(D2) 				     [SIN]

Of course, one could use ?PUTPROP instead of PUT and ?GET instead of
GET (and also ?DEFMVAR instead of DEFINE_VARIABLE) and then
retranslate.  For trgsmp, there's probably not so much other code
which relies on such implementation details.  I don't really like this
idea but it works.

Wolfgang