"Peter Olcott" <ol****@worldne t.att.net> wrote in message
news:yn******** *************@b gtnsc04-news.ops.worldn et.att.net...
You already said that it does not work for a specific instance, so it
does
It works for all inputs. It does not work in all instances such as
destroying the machine that is is running on.
I think I get what you're saying now. That paragraph (which has now changed
to provide better wording) claiming that one can make a LoopIfHalts that
fails is not about creating new input source, it is about modifying (on the
page, it is referred to as "corrupting ") the example so it no longer works.
Originally, it sounded like the claim was that a modified version of the
source you provided is somehow invalid input and can be ignored.
For example, I thought you were saying that the following program "doesn't
count."
// Some source taken from
http://www.cgl.uwaterloo.ca/~csk/halt/
int WillHaltWithRet urnValue(string SourceCode, string InputData) {
if (TheProgramWill Halt(SourceCode , InputData))
return TRUE;
else if (TheProgramWill NotHalt(SourceC ode, InputData))
return FALSE;
else
return UNKNOWN;
}
bool stops_on_self( char * program ) {
return WillHaltWithRet urnValue( program, program ) == TRUE;
}
bool bobs_yer_uncle( char * program ) {
if( stops_on_self( program ) ) {
while( 1 ) {}
return false;
} else {
return false;
}
}
Now you can apply the same reasoning from the link I provided to show that
your program does not work for this case, because the new
WillHaltWithRet urnValue function does the same exact thing that your
WillHalt() does except it returns the conclusion. If
WillHaltWithRet urnValue() can be proven to not work (and it can, as shown in
the link I provided), then that means that WillHalt() does not work because
the modifications made do not affect the conclusion that the function
reaches. This code was partially inspired by tom_usenet's comment that
"*If* a solution to the halting problem exists, *then* it *must* be possible
to write WillHalt such that it returns to a caller whether the passed
program halts or not." Throughout the discussion, I thought you had already
considered the above source as an input, but for some reason you were
refusing to accept it as valid. Tom's comment triggered a thought that this
might not be the case, so I decided to explain his statement in more detail.
--
David Hilsee