[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Info please ...



    Date: Fri, 26 Jun 87 10:32:57 -0100
    From: unido!gmdzi!yvw@seismo.css.gov (Yvo Van Wezemael)

    In the directory SYS:CLCP; I found some tools which seem interesting to me, 
    notably ANNOTATE.LISP & MAPFORMS.LISP.  Unfortunately there is no manual for
    this tools, which seem to be in the public domain.

There exists no documentation and no paper for these.

    Could anybody please give me some info please!  Does a paper exist which 
    describes those tools?  What's their purpose?  What's the history?

Gee, how do you know they are interesting if you don't know what they
do!  :-)

They are codewalking tools, which we use primarily in the Compiler to
expand macros and substs.  However, other things use them to do simple
Lisp code analysis.  For example, DBG:COLLECT-FREE-REFERENCES uses
MAPFORMS to find all free references in a form.  DBG:FORM-SIMPLE-MOTION-P
and DBG:MAP-DESCRIPTION-DOWN-TO are hairier examples which are too hard
to explain here.  Look at how MACROEXPAND-ALL uses COPYFORMS to expand
macros and substs.

I suggest this probe

(defun probe-mapforms (form)
  (lt:mapforms
    #'(lambda (form kind usage state)
	(format t "~2%Form ~S,~% kind ~S, usage ~S, state ~S"
	  form kind usage state))
    form))