On 7/15/2022 12:08 PM, Mr Flibble wrote:
> On Fri, 15 Jul 2022 12:00:59 -0500
> olcott <No...@NoWhere.com> wrote:
>
void Pm(ptr x)
{
static int count = 0x777;
if (count++ > 0x777) goto exit;
int Halt_Status = H(x, x);
if (Halt_Status)
HERE: goto HERE;
exit:
return;
}
int main()
{
Output("Input_Halts = ", H(Pm,Pm));
}
_Pm()
[000013fa](01) 55 push ebp
[000013fb](02) 8bec mov ebp,esp
[000013fd](03) 83ec08 sub esp,+08
[00001400](05) a137050000 mov eax,[00000537]
[00001405](03) 8945fc mov [ebp-04],eax
[00001408](06) 8b0d37050000 mov ecx,[00000537]
[0000140e](03) 83c101 add ecx,+01
[00001411](06) 890d37050000 mov [00000537],ecx
[00001417](07) 817dfc77070000 cmp dword [ebp-04],00000777
[0000141e](02) 7e02 jng 00001422
[00001420](02) eb1b jmp 0000143d
[00001422](03) 8b5508 mov edx,[ebp+08]
[00001425](01) 52 push edx
[00001426](03) 8b4508 mov eax,[ebp+08]
[00001429](01) 50 push eax
[0000142a](05) e8dbfcffff call 0000110a
[0000142f](03) 83c408 add esp,+08
[00001432](03) 8945f8 mov [ebp-08],eax
[00001435](04) 837df800 cmp dword [ebp-08],+00
[00001439](02) 7402 jz 0000143d
[0000143b](02) ebfe jmp 0000143b
[0000143d](02) 8be5 mov esp,ebp
[0000143f](01) 5d pop ebp
[00001440](01) c3 ret
Size in bytes:(0071) [00001440]
_main()
[0000144a](01) 55 push ebp
[0000144b](02) 8bec mov ebp,esp
[0000144d](05) 68fa130000 push 000013fa
[00001452](05) 68fa130000 push 000013fa
[00001457](05) e8aefcffff call 0000110a
[0000145c](03) 83c408 add esp,+08
[0000145f](01) 50 push eax
[00001460](05) 683b050000 push 0000053b
[00001465](05) e820f1ffff call 0000058a
[0000146a](03) 83c408 add esp,+08
[0000146d](02) 33c0 xor eax,eax
[0000146f](01) 5d pop ebp
[00001470](01) c3 ret
Size in bytes:(0039) [00001470]
machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
[0000144a][00102412][00000000] 55 push ebp
[0000144b][00102412][00000000] 8bec mov ebp,esp
[0000144d][0010240e][000013fa] 68fa130000 push 000013fa
[00001452][0010240a][000013fa] 68fa130000 push 000013fa
[00001457][00102406][0000145c] e8aefcffff call 0000110a
H: Begin Simulation Execution Trace Stored at:1124be
Address_of_H:110a
[000013fa][001124aa][001124ae] 55 push ebp
[000013fb][001124aa][001124ae] 8bec mov ebp,esp
[000013fd][001124a2][90909090] 83ec08 sub esp,+08
[00001400][001124a2][90909090] a137050000 mov eax,[00000537]
[00001405][001124a2][90909090] 8945fc mov [ebp-04],eax
[00001408][001124a2][90909090] 8b0d37050000 mov ecx,[00000537]
[0000140e][001124a2][90909090] 83c101 add ecx,+01
[00001411][001124a2][90909090] 890d37050000 mov [00000537],ecx
[00001417][001124a2][90909090] 817dfc77070000 cmp dword [ebp-04],00000777
[0000141e][001124a2][90909090] 7e02 jng 00001422
[00001422][001124a2][90909090] 8b5508 mov edx,[ebp+08]
[00001425][0011249e][000013fa] 52 push edx
[00001426][0011249e][000013fa] 8b4508 mov eax,[ebp+08]
[00001429][0011249a][000013fa] 50 push eax
[0000142a][00112496][0000142f] e8dbfcffff call 0000110a
H: Begin Simulation Execution Trace Stored at:15cee6
Address_of_H:110a
[000013fa][0015ced2][0015ced6] 55 push ebp
[000013fb][0015ced2][0015ced6] 8bec mov ebp,esp
[000013fd][0015ceca][90909090] 83ec08 sub esp,+08
[00001400][0015ceca][90909090] a137050000 mov eax,[00000537]
[00001405][0015ceca][90909090] 8945fc mov [ebp-04],eax
[00001408][0015ceca][90909090] 8b0d37050000 mov ecx,[00000537]
[0000140e][0015ceca][90909090] 83c101 add ecx,+01
[00001411][0015ceca][90909090] 890d37050000 mov [00000537],ecx
[00001417][0015ceca][90909090] 817dfc77070000 cmp dword [ebp-04],00000777
[0000141e][0015ceca][90909090] 7e02 jng 00001422
[00001420][0015ceca][90909090] eb1b jmp 0000143d
[0000143d][0015ced2][0015ced6] 8be5 mov esp,ebp
[0000143f][0015ced6][000011f3] 5d pop ebp
[00001440][0015ceda][000013fa] c3 ret
H: End Simulation Input Terminated Normally
[0000142f][001124a2][90909090] 83c408 add esp,+08
[00001432][001124a2][00000001] 8945f8 mov [ebp-08],eax
[00001435][001124a2][00000001] 837df800 cmp dword [ebp-08],+00
[00001439][001124a2][00000001] 7402 jz 0000143d
[0000143b][001124a2][00000001] ebfe jmp 0000143b
[0000143b][001124a2][00000001] ebfe jmp 0000143b
H: Infinite Loop Detected Simulation Stopped
[0000145c][00102412][00000000] 83c408 add esp,+08
[0000145f][0010240e][00000000] 50 push eax
[00001460][0010240a][0000053b] 683b050000 push 0000053b
[00001465][0010240a][0000053b] e820f1ffff call 0000058a
Input_Halts = 0
[0000146a][00102412][00000000] 83c408 add esp,+08
[0000146d][00102412][00000000] 33c0 xor eax,eax
[0000146f][00102416][00000018] 5d pop ebp
[00001470][0010241a][00000000] c3 ret
Number of Instructions Executed(887380) == 13244 Pages
> Still seems wrong: post increment of the static variable should ensure
> that it does NOT goto exit but instead should call H which should
> presumably cause your "infinite recursion detected" bollocks to
> manifest.
>
> /Flibble
>
I rewrote it so that my latest version of H could process it.
I was surprised and pleased that the version of H that has been
transformed into a computable function can still correctly perform
recursive emulation.
I was also surprised and pleased that H(Pm,Pm) determined that its input
is non-halting. It did not occur to me that the outer nested simulation
would return 1 to the inner nested simulation causing its P to get into
an infinite loop.