Re: Detecting endless recursion?

Alex Colvin <alexc@std.com>
8 Feb 2004 21:58:45 -0500

          From comp.compilers

Related articles
[21 earlier articles]
Re: Detecting endless recursion? derkgwen@HotPOP.com (Derk Gwen) (2004-02-01)
Re: Detecting endless recursion? lex@cc.gatech.edu (Lex Spoon) (2004-02-01)
Re: Detecting endless recursion? bear@sonic.net (Ray Dillinger) (2004-02-04)
Re: Detecting endless recursion? nmm1@cus.cam.ac.uk (2004-02-04)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-02-04)
Re: Detecting endless recursion? joachim.durchholz@web.de (Joachim Durchholz) (2004-02-08)
Re: Detecting endless recursion? alexc@std.com (Alex Colvin) (2004-02-08)
Re: Detecting endless recursion? cymric73@hotmail.com (Maarten D. de Jong) (2004-02-08)
Re: Detecting endless recursion? kenrose@tfb.com (Ken Rose) (2004-02-12)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-02-13)
Re: Detecting endless recursion? joachim.durchholz@web.de (Joachim Durchholz) (2004-02-26)
Re: Detecting endless recursion? lex@cc.gatech.edu (Lex Spoon) (2004-02-26)
| List of all articles for this month |

From: Alex Colvin <alexc@std.com>
Newsgroups: comp.compilers
Date: 8 Feb 2004 21:58:45 -0500
Organization: The World : www.TheWorld.com : Since 1989
References: 04-01-050 04-01-086 04-01-119 04-01-123 04-01-149 04-02-034 04-02-040
Keywords: debug, optimize
Posted-Date: 08 Feb 2004 21:58:45 EST

>> It's not at all a troll. The tail-call optimization does make
>> debugging more difficult -- please review the post again. Further,
>> removing the optimization can cause programs that need it to fail, and


The only difficulty I can see is that the call stack doesn't show
tail-calls.


But optimized recursive tail-calls are equivalent to loops. I've never
seen a debugger that gave me a trace back through loop iterations
either.


In a language like scheme, this isn't just an otimization -- it's the
law. Knowing that, I write my loops as recursion. I wouldn't want to
see the call stack include tail-recursive calls -- there'd be too many
of them and they'd tell me too little.


I suppose I really want a reverse execution facility for debugging.


--
mac the naf


Post a followup to this message

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