On 12/1/2020 9:22 AM, Andy Walker wrote:
> On 01/12/2020 01:40, Kaz Kylheku wrote:
>> Stepping through a program to decide its halting is completely
>> wrongheaded.
>
> It's not /completely/ wrong-headed. ...
>
>> We cannot decide halting that way. If we actually
>> execute a program P on input I, it either halts (whereupon halting
>> is decided) or does not, in which case halting remains undecided.
> [...]
>> Your only choices are:
>> 1) step yet anoher instruction cycle and hope that one of the
>> non-termination patterns (such as a specific instance of runaway
>> recursion) appears, so you can conclude "does not terminate".
>> 2) give up.
>
> ... The set of P and I of a given size [measured in some
> reasonable way, such as the number of bytes needed to define P and
> to list I] is finite, and "easily" enumerated. For a given P,I,
> define N_P,I to be 0 if P doesn't halt on I, and otherwise to be
> the number of steps taken by P before halting. Let S be the max
> over that set of P,I of N_P,I. Then an emulation of P on I for
> S steps shows either that P on I halts or that it will never
> halt. But, you object, we need to know whether P on I halts
> before we can calculate S. True, I riposte, but we don't need
> to know S exactly, any bound /whatsoever/ on S will suffice.
>
> Now the argument can go either of two ways. (a) Since
> the HP is "unsolvable", this shows that S is uncomputable, even
> though it's just any sufficiently large, and otherwise perfectly
> unexceptional, integer. Or (b), by an argument very similar to
> Busy Beaver theory, we can show directly that S is uncomputable
> and deduce that the HP is "unsolvable". [This proof is independent
> of the "Linz H_hat" argument that PO so dislikes, and also of the
> two-liner that Linz prefers, as given also by Mr Flibble.]
>
> IOW, emulation is doomed to failure, but not in such an
> obvious way that it's wrong-headed, which I would reserve for
> approaches to problems that anyone should be able to see in
> advance are not going to work.
>
> [I put "unsolvable" in quotes as shorthand for "there is
> no Turing machine or near equivalent that solves the general
> problem", as any fule kno.*]
>
> ____
> *
https://en.wikipedia.org/wiki/Nigel_Molesworth
>
Here is another choice from fully operational code.
The only way that you can maintain your false believe that I am
incorrect is to make sure to not pay attention to the following complete
execution trace of fully operational code.
void H_Hat(u32 P)
{
u32 Aborted = DebugTrace(P, P);
if (Aborted)
HALT
else
HERE: goto HERE;
}
int main()
{
DebugTrace((u32)H_Hat, (u32)H_Hat);
HALT;
}
_H_Hat()
[00000584](01) 55 push ebp
[00000585](02) 8bec mov ebp,esp
[00000587](01) 51 push ecx
[00000588](03) 8b4508 mov eax,[ebp+08]
[0000058b](01) 50 push eax
[0000058c](03) 8b4d08 mov ecx,[ebp+08]
[0000058f](01) 51 push ecx
[00000590](05) e8bffdffff call 00000354
[00000595](03) 83c408 add esp,+08
[00000598](03) 8945fc mov [ebp-04],eax
[0000059b](04) 837dfc00 cmp dword [ebp-04],+00
[0000059f](02) 7403 jz 000005a4
[000005a1](01) f4 hlt
[000005a2](02) eb02 jmp 000005a6
[000005a4](02) ebfe jmp 000005a4
[000005a6](02) 8be5 mov esp,ebp
[000005a8](01) 5d pop ebp
[000005a9](01) c3 ret
_main()
[000005b4](01) 55 push ebp
[000005b5](02) 8bec mov ebp,esp
[000005b7](05) 6884050000 push 00000584
[000005bc](05) 6884050000 push 00000584
[000005c1](05) e88efdffff call 00000354
[000005c6](03) 83c408 add esp,+08
[000005c9](01) f4 hlt
[000005ca](01) 5d pop ebp
[000005cb](01) c3 ret
Output_Debug_Trace() [00010bd3] size(80) capacity(65536)
[000005b4](01) 55 push ebp
[000005b5](02) 8bec mov ebp,esp
[000005b7](05) 6884050000 push 00000584
[000005bc](05) 6884050000 push 00000584
[000005c1](05) e88efdffff call 00000354 ----CALL [00000354]
[00000584](01) 55 push ebp
[00000585](02) 8bec mov ebp,esp
[00000587](01) 51 push ecx
[00000588](03) 8b4508 mov eax,[ebp+08]
[0000058b](01) 50 push eax
[0000058c](03) 8b4d08 mov ecx,[ebp+08]
[0000058f](01) 51 push ecx
[00000590](05) e8bffdffff call 00000354 ----CALL [00000354]
[00000584](01) 55 push ebp
[00000585](02) 8bec mov ebp,esp
[00000587](01) 51 push ecx
[00000588](03) 8b4508 mov eax,[ebp+08]
[0000058b](01) 50 push eax
[0000058c](03) 8b4d08 mov ecx,[ebp+08]
[0000058f](01) 51 push ecx
[00000590](05) e8bffdffff call 00000354 ----CALL [00000354]
The PRIOR Instruction Specifies Infinite Recursion: Simulation Stopped: