Article View: comp.lang.misc
Article #2194Re: Array references cannot be made optimal
From: James Davies
Date: Tue, 20 Nov 1990 21:34
Date: Tue, 20 Nov 1990 21:34
21 lines
1096 bytes
1096 bytes
>> If a program, or rather a computer, is restricted to
>> a finite number of states (which all modern computers are) then it's nothing
>> more than a finite automaton and therefore the halting problem for these
>> machines is solvable *in theory*.
>
>Right. It's also solvable in practice.
main(argc,argv) {
int I_halt();
if (I_halt(argv[0])) {
while(1);
} else {
exit(0);
}
}
Please write I_halt. It should return 1 if its argument program
halts, 0 if it doesn't. Feel free to consult books or notes,
other programmers, Nobel prize winners, etc.
Technical Details
Message-ID:
<1990Nov20.213454.10879@craycos.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!pikes!aspen.craycos.com!jrbdReferences:
<1990Nov14.150535.25991@cs.umu.se> <13530:Nov1419:56:3790@kramden.acf.nyu.edu> <156@garth.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!pikes!aspen.craycos.com!jrbd From: jrbd@craycos.com (James Davies) Newsgroups: comp.lang.misc Subject: Re: Array references cannot be made optimal Message-ID: <1990Nov20.213454.10879@craycos.com> Date: 20 Nov 90 21:34:54 GMT References: <1990Nov14.150535.25991@cs.umu.se> <13530:Nov1419:56:3790@kramden.acf.nyu.edu> <156@garth.UUCP> Organization: Cray Computer Corporation Lines: 21