Question on Lisp documentation tools



--- Dan Stanger <dan.stanger@ieee.org> wrote:
> First, we should do a cross reference of the code.  There is a cross
> referencer in the cmu archive.

That looks ideal!  For the lazy, the link is:
http://www-2.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/xref/0.html

I took a shot at getting this to run, but ran into the following
problems:

a)  at line 655 you need to add (make-package "XREF") 

b)  on gcl it haults loading with Error: The function EXPORT is
undefined.

c)  I'm sure this is just my stupidity, but I can't figure out how to
tell it to look through all the lisp files in a directory.

The first files I tried it either didn't like or didn't say anything
interesting. algsys.lisp does report the following using cmucl:

user@Debian:~/xref$ lisp 
CMU Common Lisp 18d+, built 2002-09-13 on melbourne, running on Debian
Send questions to cmucl-help@cons.org. and bug reports to
cmucl-imp@cons.org.
Loaded subsystems:
    Python 1.0, target Intel x86
    CLOS based on PCL version:  September 16 92 PCL (f)
* (load "xref.lisp")

; Loading #p"/home/user/xref/xref.lisp".
Warning:  This file should be compiled before loading for best results.
[GC threshold exceeded with 19,000,152 bytes in use.  Commencing GC.]
[GC completed with 366,560 bytes retained and 18,633,592 bytes freed.]
[GC will next occur when at least 19,366,560 bytes are in use.]
T
* (xref:xref-file "/home/user/maxima/src/algsys.lisp")  

Cross-referencing file /home/user/maxima/src/algsys.lisp.
....................................................[GC threshold
exceeded with 19,367,712 bytes in use.  Commencing GC.]
[GC completed with 1,384,432 bytes retained and 17,983,280 bytes
freed.]
[GC will next occur when at least 20,384,432 bytes are in use.]
................
68 forms processed.
* (xref:display-database :readers)

$ALGDELTA is referenced by ROOTSP.
*TVARXLIST* is referenced by PFREEOFMAINVARSP PCONSTP ADDPARAM.
*VARDEGS* is referenced by KILLVARDEGSN.
REALONLYRATNUM is referenced by EXACTONLY RFLOT.
*IVAR* is referenced by PUNIVARP.
$REALONLY is referenced by CALLAPPRS BAKSUBST1.
FOR is referenced by BAKALEVEL.
Q is referenced by BAKALEVEL.
IN is referenced by BAKALEVEL.
BINDLIST is referenced by MERGESOLN.
LOCLIST is referenced by MERGESOLN.
VARLIST is referenced by CALLSOLVE.
GENVAR is referenced by CALLSOLVE.
ALGNOTEXACT is referenced by BIQUADRATICP.
$ALGEPSILON is referenced by CALLAPPRS.
NIL

but when I try to display some kind of tree I get

* (xref:print-caller-trees :root-nodes '(display-graph))

Rooted calling trees:
  DISPLAY-GRAPH
NIL

Does this mean it can't define a tree structure?  I suppose the results
will be more meaningful when it looks at all the source files together?

Looks like the last time this was edited was 1991, so we may discover
more things besides the make-package bit that need to be updated. 

> Second we include a document that describes the data structure format
> of maxima elements.

Good idea.  Hmm.  Are we going to need to reconstruct this from the
source code?  I'm not aware of any current documents that describe this
with the possible exception of Dr. Fateman's research papers.

> Third we sort the functions by use, and start documenting them
> starting from the most commonly used.

Makes sense.  I take it you mean the ones the cross referencer finds to
be most commonly called?

> Fourth we look for places where special variables are used to pass
> parameters and fix those.

Fix?  You mean change over to using regular variables? 

Thanks alot for the pointers Dan!  

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com