Peter said:
So if a program halts when it is executed, and the halt analyzer
determines this, then it is not correct?
There are three cases:
A). The program halts - the halt analyzer should determine "halt."
B). The program doesn't halt - the halt analyzer should determine "not
halt."
C). The program is in a contradictory or inconsistent state - the halt
analyzer would be incorrect to return either "halt" or "not halt."
You seem to think that "halt" is always correct and everything
else is incorrect, no doubt because you think that a program that
exits is "working" while a program that infinite loops is broken.
This is not the case. Your program would have to be able to
correctly identify all three of the above cases to truly work,
but you STILL wouldn't have disproved Turing's proof because
Turing just showed that a Turing machine that must answer either
"halt" or "not halt" cannot recognize programs in case C.
Your program, if it exists must handle the following three
cases correctly:
int CaseA(TuringMachine *tm, InputString *is)
{
return(TRUE);
}
Your program should return "halts."
int CaseB(TuringMachine *tm, InputString *is)
{
while(TRUE);
return(FALSE) // never gets here
}
Your program should return "doesn't halt."
int CaseC(TuringMachine *tm, InputString *is)
{
if(Halts(tm, is)) {
while(TRUE);
return(FALSE); // never gets here
} else
return(TRUE);
}
Your program should correctly decide that the program
neither halts nor doesn't halt. If you do this, your
program is correct, but you havn't disproved the Turing's
proof of the Halting Problem.
Even with the high degree of GroupThink here you won't get a lot of
agreement on that one.
Yes I will. Look at the program again. If it loops, it halts.
If it halts, it loops. It must return the same result on the
same input, but it can't (this is not your extra special program
that knows about when it's being called, this is just the plain
old normal version that Turing talked about). Why do you
think it should halt when it clearly says, "Loop on this
input if I would halt on this input?"
Either your program must return the right answer for this
program, or your program isn't correctly deciding whether
all program/input pairs will halt or not.
You will find very few people here that will say
yes, I agree with that statement 100%. I have found that when people
here are direct disagreement, that they express it as:
"You could have stated that more clearly",
not wanting to upset the apple cart of group cohesiveness.
Try reading Go:del, Escher, Bach: an Eternal Golden Braid
for a good, informal, easy to read introduction to
the issues here.
That you are wrong is very easy to see. A program either halts or it fails
to halt.
See the above. Does it halt or not? You mistakenly seem
to think it halts. You are wrong.
There is no in-between third state. When one program attempts
to determine if another program halts, then there are three states:
(1) It Halts
(2) It does not halt
(3) You got me, I don't know if it halts or not.
Which of these three classes would you say the program CaseC
falls into?