Peter Olcott said:
No that is simply not the case.
http://home.att.net/~olcott/halting/example.html
If you walk through an execution trace of the above int
WillHalt(LoopIfHalts, LoopIfHalts)
the result is that WillHalt() returns UNKNOWN, thus LoopIfHalt() halts. It returns
UNKNOWN specifically because bool WillHalt() knows that it can't say that LoopIfHalt()
halts, because this makes it not halt. Therefore you fall through to the other conditions.
If you walk through the same execution trace with void WillHalt() you get a
completely different result. You get this different result specifically because
void WillHalt() does not feed its result back to its caller, thus modifying
the behavior of its caller. Since the caller is also the program being analyzed,
then different behavior by the caller entails a different result from the
analysis.
Are we talking about the same two functions? Here they are again:
int WillHaltWithReturnValue(string SourceCode, string InputData) {
if (TheProgramWillHalt(SourceCode, InputData))
return TRUE;
else if (TheProgramWillNotHalt(SourceCode, InputData))
return FALSE;
else
return UNKNOWN;
}
void WillHalt(string SourceCode, string InputData)
{
if (TheProgramWillHalt(SourceCode, InputData))
SecureOutput("The Program Will Halt");
else if (TheProgramWillNotHalt(SourceCode, InputData))
SecureOutput("The Program Will Not Halt");
else
SecureOutput("Security Has Been Breached, Take Corrective Action");
}
I am arguing that if both SourceCode parameters are equal to each other and
both InputData parameters are equal to each other, then there is a
one-to-one mapping (in both directions) between TRUE, FALSE, UNKNOWN and
"The Program Will Halt", "The Program Will Not Halt", and "Security Has Been
Breached, Take Corrective Action", respectively. My previous post shows
that if you accept that this is true, then that means that WillHalt() is
using the same exact logic as WillHaltWithReturnValue(), so you must accept
that WillHalt() does not work because WillHaltWithReturnValue() has already
been shown to be wrong. In short, the logic of the functions are unaffected
by the presence of output statements, so, if one's logic is unacceptable,
the other's logic is unacceptable, period.
If you can prove that WillHaltWithReturnValue()'s return codes do not have a
one-to-one mapping (in both directions) to WillHalt()'s output statements,
then please do it. Do not tell me to walk through the execution trace
myself and discover what happens, because I have walked through all of the
possible execution traces and have determined that there is no difference in
the results. Using only the above source, start with a pair of strings as
input parameters, walk through both functions' execution traces using
whatever notation for branches that you wish you use, and prove that there
could be a case where the statement written to the screen does not match the
corresponding return value as I described. If you can do that, then you
have shown that WillHalt() could work where WillHaltWithReturnValue() did
not, and therefore you will have proven that there is a potential solution
to the halting problem. If you cannot do that, then the halting problem
remains as it was before you came up with this "solution."
I'm getting the impression that you don't understand what I'm trying to say,
so the above was an attempt to cut out all of the extraneous talk and focus
on the exact conundrum that must be dealt with. If you refuse to respond
with the example exactly as I requested and instead resort to asserting that
something is different between the two, I will assume that you are trying to
irritate me and I will not respond, except possibly with a short, caustic
(possibly insulting, depending on my mood) message explaining how you did
not satisfy my request. I'm sorry to seem rude, but I have explained
everything in the best way I can, and this discussion is trying my patience.
Looking back, I find it amazing that I have not cursed like a sailor in one
of my posts.