[net.lang] Recursion detection

hen@bu-cs.UUCP (Bill Henneman) (09/20/85)

Judging from recent traffic, there seems to be an overwhelmingly popular
opinion that detection of recursion has to be done in the dumbest possible
fashion.  Yes, it is true that you can write a routine which would make
both errors of inclusion and errors of exclusion when trying to build a
call graph: it is equally true that you can build an editor with no command
to save the buffer, or a mail routine that will not send mail to the local
site.  

But you don't have to.

Compiled languages place restrictions on what the programmer can say.  LISP
may allow
			(go (read))
but this is disallowed in any compiled language I know: the set of possible
labels must be explicitly available.  Same with calls.

The point of the above observation is that, in every language I'm
familiar with, you can write a symbolic execution module to help build
your call tree without fear of running into a halting problem situation.
It takes a lot more investment in coding (you have to write a bunch of
simplification routines for assertions, etc.), but you can write a
recursion detector which is not quite as stupid as the netters assume.

					Bill Henneman
					Boston University