Re: Detecting endless recursion?

Uli Kusterer <witness@t-online.de>
31 Jan 2004 00:54:11 -0500

          From comp.compilers

Related articles
[9 earlier articles]
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)
Re: Detecting endless recursion? torbenm@diku.dk (2004-01-31)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-01-31)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-02-01)
Re: Detecting endless recursion? witness@t-online.de (Uli Kusterer) (2004-02-01)
Re: Detecting endless recursion? joachim.durchholz@web.de (Joachim Durchholz) (2004-02-01)
Re: Detecting endless recursion? joachim.durchholz@web.de (Joachim Durchholz) (2004-02-01)
Re: Detecting endless recursion? nmm1@cus.cam.ac.uk (2004-02-01)
Re: Detecting endless recursion? derkgwen@HotPOP.com (Derk Gwen) (2004-02-01)
[11 later articles]
| List of all articles for this month |

From: Uli Kusterer <witness@t-online.de>
Newsgroups: comp.compilers
Date: 31 Jan 2004 00:54:11 -0500
Organization: T-Online
References: 04-01-050 04-01-081
Keywords: debug
Posted-Date: 31 Jan 2004 00:54:11 EST

Derk Gwen <derkgwen@HotPOP.com> wrote:


> This is the Halting Problem (TM) is another guise. And it's provably
> nonsolvable for unrestricted programs. It's up to the person writing
> the program to cope with reality. The best you can do is make as many
> resources available as possible and gently as possible deal with
> resource exhaustion.


Hmmm... okay, so I guess it's a platform-specific thing to detect
resource exhaustion early enough.


> In this case, you can do a call graph. Recursion shows up as a
> strongly connected component. If the SCC is cyclic and has no outgoing
> edge to another SCC, then it's easy to see that if execution enters
> the SCC, it will never leave it. This is similar to usesless symbols
> in a context free grammar.


  I'm not familiar with "context free grammar"s and such stuff (I'm
mostly self-taught), but I guess a call graph sounds like a sensible
idea. I could probably even do that by analyzing the code before
execution (instead of doing it during compilation), which might provide
another security improvement.


Sounds like an interesting venue to pursue,
-- Uli
http://www.zathras.de <-- back up again!


Post a followup to this message

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