Software engineers of extremely high technical competence [ halting pro
From
olcott@21:1/5 to
All on Mon Jun 20 19:12:44 2022
XPost: comp.theory, sci.logic, sci.math
#include <stdint.h>
typedef void (*ptr)();
void P(ptr x)
{
if (H(x, x))
HERE: goto HERE;
return;
}
int main()
{
Output("Input_Halts = ", H(P, P));
}
_P()
[00001352](01) 55 push ebp
[00001353](02) 8bec mov ebp,esp
[00001355](03) 8b4508 mov eax,[ebp+08]
[00001358](01) 50 push eax // push P
[00001359](03) 8b4d08 mov ecx,[ebp+08]
[0000135c](01) 51 push ecx // push P
[0000135d](05) e840feffff call 000011a2 // call H
[00001362](03) 83c408 add esp,+08
[00001365](02) 85c0 test eax,eax
[00001367](02) 7402 jz 0000136b
[00001369](02) ebfe jmp 00001369
[0000136b](01) 5d pop ebp
[0000136c](01) c3 ret
Size in bytes:(0027) [0000136c]
Every sufficiently competent software engineer can easily verify that
the complete and correct x86 emulation of the input to H(P,P) by H would
never reach the "ret" instruction of P.
Software engineers with extremely high technical competence will be able
to verify that H correctly determines (in a finite number of steps) that
its complete and correct x86 emulation of its input would never reach
the "ret" instruction of P on this basis:
H knows its own machine address and on this basis:
(a) H recognizes that P is calling H with the same arguments that H was
called with at its machine address [0000135d].
(b) There are no instructions in P that could possibly escape this
otherwise infinitely recursive emulation.
(c) H aborts its emulation of P before its call to H is invoked.
H does do this in fully operational code that is executed in the fully operational x86utm operating system that is based on an very robust x86 emulator having decades of development effort.
--
Copyright 2022 Pete Olcott
"Talent hits a target no one else can hit;
Genius hits a target no one else can see."
Arthur Schopenhauer
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)