Your algorithm has never been presented.
void Infinite_Recursion(int N)
{
Infinite_Recursion(N);
}
int main()
{
Output("Input_Halts = ", H(Infinite_Recursion, 0x777));
}
This is my algorithm and it does work correctly on infinite
recursion.
H: Begin Simulation Execution Trace Stored at:111b61
machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
[0000101e][00111b4d][00111b51] 55 push ebp
[0000101f][00111b4d][00111b51] 8bec mov ebp,esp
[00001021][00111b4d][00111b51] 8b4508 mov eax,[ebp+08]
[00001024][00111b49][00000777] 50 push eax
[00001025][00111b45][0000102a] e8f4ffffff call 0000101e
[0000101e][00111b41][00111b4d] 55 push ebp
[0000101f][00111b41][00111b4d] 8bec mov ebp,esp
[00001021][00111b41][00111b4d] 8b4508 mov eax,[ebp+08]
[00001024][00111b3d][00000777] 50 push eax
[00001025][00111b39][0000102a] e8f4ffffff call 0000101e
H: Infinite Recursion Detected Simulation Stopped
The state of the virtual machine that repeats is:
(a) EIP register value = 00000f9b
(b) The top two stack values = 00000f8f
(c) The call address target is 00000c9f
We also must make sure that there are no control flow
instructions between the invocation of P() and its call
to H(P,P) or P could be counting down a static variable
that could stop the repetition.