Re: Detecting endless recursion?

Uli Kusterer <witness@t-online.de>
16 Jan 2004 22:36:57 -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)
Re: Detecting endless recursion? vbdis@aol.com (2004-01-16)
Re: Detecting endless recursion? joachim.durchholz@web.de (Joachim Durchholz) (2004-01-18)
Re: Detecting endless recursion? nmm1@cus.cam.ac.uk (2004-01-22)
Re: Detecting endless recursion? lex@cc.gatech.edu (Lex Spoon) (2004-01-22)
[19 later articles]
| List of all articles for this month |
From: Uli Kusterer <witness@t-online.de>
Newsgroups: comp.compilers
Date: 16 Jan 2004 22:36:57 -0500
Organization: T-Online
References: 04-01-050
Keywords: debug
Posted-Date: 16 Jan 2004 22:36:57 EST

  John commented:
>> I've implemented my own programming language compiler and byte-code
>> interpreter. Since this language is intended for beginners, I'd like
>> it to be robust. When a user creates a function that calls itself
>> unconditionally, like:
>
> [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 should do the trick. -John]


I thought about that, yes. Trouble is, whatever limit I choose, there
will be people who need more but who aren't writing mistaken
code. Many modern GUI hierarchies, for example, use recursion to walk
down the hierarchy. 100 is definitely possible there. Also, since my
users will be beginners, I can't rely on them writing efficient code
(and actually, I don't want to). So, using "real code" as a stick to
measure by will probably lead to a lot of frustrated newbies.


So, for other cases, this would be a practical approach. But in this
particular instance, I'd rather avoid that.


But thanks, anyway. You phrased the problem in a way that sent me
thinking about other approaches...


Cheers,
-- M. Uli Kusterer
http://www.zathras.de <-- hopefully out of its downtime soon


Post a followup to this message

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