Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!ee.udel.edu From: new@ee.udel.edu (Darren New) Newsgroups: comp.lang.misc Subject: Re: Array references cannot be made optimal Message-ID: <36561@nigel.ee.udel.edu> Date: 16 Nov 90 15:43:12 GMT References: <27546@megaron.cs.arizona.edu> Sender: usenet@ee.udel.edu Organization: University of Delaware Lines: 28 Nntp-Posting-Host: estelle.ee.udel.edu In article <27546@megaron.cs.arizona.edu> gudeman@cs.arizona.edu (David Gudeman) writes: >In article <6045:Nov1519:34:2290@kramden.acf.nyu.edu> Dan Bernstein writes: >]Well, I can't remember ever debugging a non-terminating program that >]*didn't* have a rather simple infinite loop, and I remember debugging >]lots of programs where the loop was simple. Does your experience differ? > >The word "simple" here is ambiguous. If you mean that the loop was >fairly small, I guess most of them are. If you mean that the number >of states traversed in a cycle is small, then yes, my experience >differs. It seems to me that there is almost always at least some >monotonic action going on in a loop (which is the reason for having >the loop), and this action will create very long state cycles. > >]I'd be interested in seeing your example. > Here is a really simple example that has stung me a couple of times. Once, this ran for two days before I noticed it had never finished. $ cat xyz* >xyzzy This will eventually fill up the entire disk, never once entering the same state. -- Darren -- --- Darren New --- Grad Student --- CIS --- Univ. of Delaware --- ----- Network Protocols, Graphics, Programming Languages, Formal Description Techniques (esp. Estelle), Coffee, Amigas ----- =+=+=+ Let GROPE be an N-tuple where ... +=+=+=