Re: What is the Result from Invoking this Halt Function?

From: Michael N. Christoff (mchristoff_at_sympatico.caREMOVETHIS)
Date: 08/02/04


Date: Mon, 2 Aug 2004 15:38:30 -0400


"Peter Olcott" <olcott@worldnet.att.net> wrote in message
news:28zOc.355608$Gx4.321628@bgtnsc04-news.ops.worldnet.att.net...
> "Michael N. Christoff" <mchristoff@sympatico.caREMOVETHIS> wrote in
message news:dwxOc.10526$pc.519212@news20.bellglobal.com...
> >
> > "Peter Olcott" <olcott@worldnet.att.net> wrote in message
> > news:msjOc.153694$OB3.152422@bgtnsc05-news.ops.worldnet.att.net...
> > >
> > > //
> > > // All of the functions are assumed to be standard C++
> > > //
> > > void LoopIfHalts (string ProgramSourceFile, string InputData)
> > > {
> > > if WillHalt01(ProgramSourceFile, InputData)
> > > while (true)
> > > ;
> > > else // to make it easier for people who don't know C++
> > > return;
> > > }
> > >
> > > bool WillHalt02(LoopIfHalts, LoopIfHalts)
> > >
> > > If we assume that WillHalt01, and WillHalt02 are in separate memory
> > > space, such that LoopIfHalts only calls WillHalt01, what will be the
> > > result of invoking WillHalt02 ?
> > >
> > > ***NOTE*** WillHalt01, and Willhalt02 are identical in every
> > > way, except that they reside in separate memory space.
> > >
> >
> > So WillHalt02 checks if LoopIfHalts halts when given as input the source
to
> > LoopIfHalts? But LoopIfHalts takes two parameters so how are you
breaking
> > up LoopIfHalts into ProgramSourceFile and InputData?
>
> WillHalt02() tests to see if LoopIfHalts will halt when testing to see
> if itself will halt. This is only half as convoluted as the original.
>
> WillHalt01 will know that LoopIfHalts will halt, yet not be able
> to report this fact, otherwise it would not halt. In other words
> WillHalt01 will know to refrain from returning true, because it will
> know that if it returns true, that this will be used by LoopIfHalts
> to change its own behavior, thus making it false. In htis case
> the only other option is the else clause, which results in
> LoopIfHalts, halting.
>

This doesn't answer my question.

> > So WillHalt02 checks if LoopIfHalts halts when given as input the source
to
> > LoopIfHalts? But LoopIfHalts takes two parameters so how are you
breaking
> > up LoopIfHalts into ProgramSourceFile and InputData?

l8r, Mike N. Christoff



Relevant Pages