On 7/14/2022 3:27 PM, wij wrote:
> I did not say anything, simple asking what the result of this main() is to establish
> basic fact of discussion.
>
> int main()
> {
> Output("Input_Halts = ", H(P, P));
> P(P);
> }
void P(ptr x)
{
int Halt_Status = H(x, x);
if (Halt_Status)
HERE: goto HERE;
return;
}
When simulating halt decider H(P,P) simulates its input we can see that:
(1) Function H() is called from P().
(2) With the same arguments to H().
(3) With no instructions in P preceding its invocation of H(P,P).
The above shows that the simulated P cannot possibly terminate normally.
Because H can see the same (1)(2)(3) that we see H aborts its simulation
of P and rejects P as non-halting.
P(P) is not the actual behavior of the actual inputs to H(P,P)
P(P) is not the actual behavior of the actual inputs to H(P,P)
P(P) is not the actual behavior of the actual inputs to H(P,P)
P(P) is not the actual behavior of the actual inputs to H(P,P)
If you have enough technical skill you can find the answer to your
question in the code below.
int main()
{
P(P);
}
_P()
[000013b4](01) 55 push ebp
[000013b5](02) 8bec mov ebp,esp
[000013b7](01) 51 push ecx
[000013b8](03) 8b4508 mov eax,[ebp+08]
[000013bb](01) 50 push eax
[000013bc](03) 8b4d08 mov ecx,[ebp+08]
[000013bf](01) 51 push ecx
[000013c0](05) e82ffdffff call 000010f4
[000013c5](03) 83c408 add esp,+08
[000013c8](03) 8945fc mov [ebp-04],eax
[000013cb](04) 837dfc00 cmp dword [ebp-04],+00
[000013cf](02) 7402 jz 000013d3
[000013d1](02) ebfe jmp 000013d1
[000013d3](02) 8be5 mov esp,ebp
[000013d5](01) 5d pop ebp
[000013d6](01) c3 ret
Size in bytes:(0035) [000013d6]
_main()
[000013e4](01) 55 push ebp
[000013e5](02) 8bec mov ebp,esp
[000013e7](05) 68b4130000 push 000013b4
[000013ec](05) e8c3ffffff call 000013b4
[000013f1](03) 83c404 add esp,+04
[000013f4](02) 33c0 xor eax,eax
[000013f6](01) 5d pop ebp
[000013f7](01) c3 ret
Size in bytes:(0020) [000013f7]
machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
[000013e4][0010230a][00000000] 55 push ebp
[000013e5][0010230a][00000000] 8bec mov ebp,esp
[000013e7][00102306][000013b4] 68b4130000 push 000013b4
[000013ec][00102302][000013f1] e8c3ffffff call 000013b4
[000013b4][001022fe][0010230a] 55 push ebp
[000013b5][001022fe][0010230a] 8bec mov ebp,esp
[000013b7][001022fa][00000000] 51 push ecx
[000013b8][001022fa][00000000] 8b4508 mov eax,[ebp+08]
[000013bb][001022f6][000013b4] 50 push eax
[000013bc][001022f6][000013b4] 8b4d08 mov ecx,[ebp+08]
[000013bf][001022f2][000013b4] 51 push ecx
[000013c0][001022ee][000013c5] e82ffdffff call 000010f4
H: Begin Simulation Execution Trace Stored at:1123b6
Address_of_H:10f4
[000013b4][001123a2][001123a6] 55 push ebp
[000013b5][001123a2][001123a6] 8bec mov ebp,esp
[000013b7][0011239e][00102372] 51 push ecx
[000013b8][0011239e][00102372] 8b4508 mov eax,[ebp+08]
[000013bb][0011239a][000013b4] 50 push eax
[000013bc][0011239a][000013b4] 8b4d08 mov ecx,[ebp+08]
[000013bf][00112396][000013b4] 51 push ecx
[000013c0][00112392][000013c5] e82ffdffff call 000010f4
H: Infinitely Recursive Simulation Detected Simulation Stopped
[000013c5][001022fa][00000000] 83c408 add esp,+08
[000013c8][001022fa][00000000] 8945fc mov [ebp-04],eax
[000013cb][001022fa][00000000] 837dfc00 cmp dword [ebp-04],+00
[000013cf][001022fa][00000000] 7402 jz 000013d3
[000013d3][001022fe][0010230a] 8be5 mov esp,ebp
[000013d5][00102302][000013f1] 5d pop ebp
[000013d6][00102306][000013b4] c3 ret
[000013f1][0010230a][00000000] 83c404 add esp,+04
[000013f4][0010230a][00000000] 33c0 xor eax,eax
[000013f6][0010230e][00000018] 5d pop ebp
[000013f7][00102312][00000000] c3 ret
Number of Instructions Executed(998) == 15 Pages