[racket] I don't understand structural recursion.

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Sat Sep 17 20:14:07 EDT 2011

I understand.  It would help if you could tell me what would have been
useful to drop from the output -- this feedback helps us a great deal.

There is *some* configurability:

- no trace command = just run the program

- (trace-all)

- (trace-failed-checks) = just the tests that failed

- (trace-explicit) = failing checks and (trace ...) expressions

See:

http://planet.plt-scheme.org/package-source/tracer/tracer.plt/1/7/planet-docs/tracer/index.html

If what you want is to view only some calls (eg, num-distinct-trees
but NOT accumulate), however, that still doesn't help.  But because
the tracer gives you the top-down view of evaluation, you can at least
safely skip over calls you're not interested in (though they are still
taking up screen and brain acreage).

There is actually a way of obtaining the above effect.  The tracer
only traces functions in the current module.  So if you wanted
num-distinct-trees but not accumulate, you could move accumulate to
another module, export it from there, and import it here.  Of course,
that is a pretty clumsy thing to have to do in the middle of trying to
solve a different problem; but for a project where the tracer is
essential, at least it gives you *a* way to accomplish this.

Shriram


Posted on the users mailing list.