Software engineers competent in C and the x86 language will verify that
when H(P,P) correctly emulates its input with an x86 emulator that this
emulation would never stop running. This provides the basis for H(P,P)
to correctly reject its input as non-halting.
For any program H that might determine if programs halt, a
program P, called with some input, can pass its own source and its
H and then specifically do the opposite of what H predicts P will
do. No H
can exist that handles this case.
H determines the halt status of its input by watching the behavior of
this input when it is correctly simulated by H using an x86 emulator.
When H correctly matches an infinite behavior pattern it aborts the
emulation of this input and returns 0.
#define u32 uint32_t
void P(u32 x)
if (H(x, x))
HERE: goto HERE;
Output("Input_Halts = ", H((u32)P, (u32)P));
(01) 55 push ebp
(02) 8bec mov ebp,esp
(03) 8b4508 mov eax,[ebp+08]
(01) 50 push eax // push P
(03) 8b4d08 mov ecx,[ebp+08]
[0000135c](01) 51 push ecx // push P
[0000135d](05) e840feffff call 000011a2 // call H
(03) 83c408 add esp,+08
(02) 85c0 test eax,eax
(02) 7402 jz 0000136b
(02) ebfe jmp 00001369
[0000136b](01) 5d pop ebp
[0000136c](01) c3 ret
Size in bytes:(0027) [0000136c]
It is completely obvious that when H(P,P) correctly emulates its input
that it must emulate the first seven instructions of P. Because the
seventh instruction repeats this process we can know with complete
certainty that the emulated P never reaches its final “ret” instruction,
thus never halts.
Copyright 2022 Pete Olcott
"Talent hits a target no one else can hit;
Genius hits a target no one else can see."