Re: Detecting endless recursion?

nmm1@cus.cam.ac.uk (Nick Maclaren)
16 Jan 2004 22:25:45 -0500

          From comp.compilers

Related articles
Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-01-12)
Re: Detecting endless recursion? jmcenerney@austin.rr.com (John McEnerney) (2004-01-12)
Re: Detecting endless recursion? fjh@cs.mu.oz.au (Fergus Henderson) (2004-01-12)
Re: Detecting endless recursion? nmm1@cus.cam.ac.uk (2004-01-16)
Re: Detecting endless recursion? jgd@cix.co.uk (2004-01-16)
Re: Detecting endless recursion? derkgwen@HotPOP.com (Derk Gwen) (2004-01-16)
Re: Detecting endless recursion? torbenm@diku.dk (2004-01-16)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-01-16)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-01-16)
Re: Detecting endless recursion? Martin.Ward@durham.ac.uk (Martin Ward) (2004-01-16)
[23 later articles]
| List of all articles for this month |

From: nmm1@cus.cam.ac.uk (Nick Maclaren)
Newsgroups: comp.compilers
Date: 16 Jan 2004 22:25:45 -0500
Organization: University of Cambridge, England
References: 04-01-050 04-01-070
Keywords: debug, practice
Posted-Date: 16 Jan 2004 22:25:45 EST

Fergus Henderson <fjh@cs.mu.oz.au> wrote:
>
>>[The limit you one is one deeper than the deepest program that's not stuck
>>in a loop. My impression is that other than artifical examples like
>>Ackerman's function, real code doesn't nest very deeply so an arbitrary
>>limit like 100 deep shoulddo the trick. -John]
>
>It depends a lot on your programming style. 100 nesting levels is too
>small for some programs. If you do have a fixed limit, make sure that
>it can be increased without recompiling the program (e.g. allow the
>user to set the limit from an environment variable or command-line
>option).


And reduced. If you have a program that is recursing indefinitely,
adding diagnostics and chopping it before it has filled up your disk
is generally a good idea :-)


My experience is that only about half of the advantage of being able
to control such sizes is from handling large problems. Some of the
rest is from assisting with debugging, and some is due to being able
to protect delicate operating systems from more stress than they can
handle.




Regards,
Nick Maclaren.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.