Re: Detecting endless recursion?

Derk Gwen <derkgwen@HotPOP.com>
1 Feb 2004 12:58:43 -0500

          From comp.compilers

Related articles
[15 earlier articles]
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)
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)
[5 later articles]
| List of all articles for this month |
From: Derk Gwen <derkgwen@HotPOP.com>
Newsgroups: comp.compilers
Date: 1 Feb 2004 12:58:43 -0500
Organization: Quick STOP Groceries
References: 04-01-156
Keywords: debug
Posted-Date: 01 Feb 2004 12:58:43 EST

# > 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.


Be aware that you can add an infinite number of ways to detect nonhalting
programs, and you'll still have a larger infinity number of nonhalting programs
which you cannot detect. Whether humans can transcend the halting problem is
unknown, but it is known that a program cannot. Which means at some point
your compiler has to stop being clever and dump it back on the programmer to
resolve.


--
Derk Gwen http://derkgwen.250free.com/html/index.html
OOOOOOOOOO! NAVY SEALS!


Post a followup to this message

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