PreprintPDF Available

Rebutting the Sipser Halting Problem Proof --- D(D) correctly reports its own halt status

Authors:
  • Pixels2Words
Preprints and early-stage research may not have been peer reviewed yet.

Abstract

MIT Professor Michael Sipser has agreed that the following verbatim paragraph is correct (he has not agreed to anything else in this paper)------> "If simulating halt decider H correctly simulates its input D until H correctly determines that its simulated D would never stop running unless aborted then H can abort its simulation of D and correctly report that D specifies a non-halting sequence of configurations."
Rebutting the Sipser Halting Problem Proof
D(D) correctly reports its own halt status
MIT Professor Michael Sipser has agreed that the following verbatim paragraph is correct
(he has not agreed to anything else in this paper):
<MIT Professor Sipser agreed to ONLY these verbatim words 10/13/2022>
If simulating halt decider H correctly simulates its input D
until H correctly determines that its simulated D would never
stop running unless aborted then
H can abort its simulation of D and correctly report that D
specifies a non-halting sequence of configurations.
</MIT Professor Sipser agreed to ONLY these verbatim words 10/13/2022>
A simulating halt decider computes the mapping from its input finite strings to an accept or
reject state on the basis of the actual behavior specified by this input as measured by its
correct simulation of this input.
We start with Sipser's definitions of H and D:
On input (M, w), where M is a TM and w is a string, H halts and accepts
if M accepts w. Furthermore, H halts and rejects if M fails to accept w.
In other words, we assume that H is a TM, where
H(⟨M,w⟩ = { accept if M accepts w
{ reject if M does not accept w
Now we construct a new Turing machine D with H as a subroutine. This new
TM calls H to determine what M does when the input to M is its own description
M. Once D has determined this information, it does the opposite. That is, it
rejects if M accepts and accepts if M does not accept.
D(⟨M⟩) = { accept if M does not accept ⟨M⟩
{ reject if M accepts ⟨M⟩ (Sipser 1997:165)
We encode D and define the behavior of H as C functions.
//
// H returns 0 when its simulated input would never stop running
// unless aborted otherwise H returns 1
//
01 typedef int (*ptr)(); // pointer to int function
02 int H(ptr M, ptr w) // uses x86 emulator to emulate its input
03
04 int D(int (*M)())
05 {
06 if (H(M, M) )
07 return 0; // returns 0 when H returns 1
08 return 1;
09 }
10
11 int main()
12 {
13 Output("Input_Halts = ", D(D)); // Outputs "Input_Halts = 1"
14 return 0;
15 }
---1--- 09/15/24 09:17:57 AM
When H correctly simulates D it finds that D remains stuck in recursive simulation
Line 13: main() invokes D(D)
Line 06: Invoked D calls H that simulates D(D)
Line 06: Simulated D calls simulated H that simulates D(D) (repeats until aborted)
Simulation Invariant: D simulated by H never reaches Line 07 or Line 08.
D calls simulating halt decider H which computes the mapping from its input D to an accept or
reject state on the basis of the behavior of its correct simulation of D. Because D correctly
simulated by H cannot possibly terminate normally H aborts its simulation of D and correctly
returns 0 for non-halting. When the directly executed D reverses this decision it returns 1.
This is used to correctly fill in the “?” in the Sipser Figure 4.6 (see below) with “accept”.
⟨M1⟩ ⟨M2 ⟨M3⟩ ⟨M4 ... ⟨D⟩ ...
M1 accept reject accept reject accept
M2 accept accept accept accept accept
M3 reject reject reject reject reject
M4 accept accept reject reject accept
...
D reject reject accept accept ?
...
Figure 4.6 (Sipser 1997:167)
Sipser, Michael 1997. Introduction to the Theory of Computation. Boston: PWS Publishing
Company (165-167)
The x86utm operating system (includes several termination analyzers)
https://github.com/plolcott/x86utm D can be invoked from main() of Halt7.c
It compiles with the 2017 version of the Community Edition
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15
---2--- 09/15/24 09:17:57 AM
When H correctly simulates D it finds that D remains stuck in recursive simulation
D()
[0000218e] 55 push ebp ; begin D
[0000218f] 8bec mov ebp,esp
[00002191] 8b4508 mov eax,[ebp+08]
[00002194] 50 push eax ; push param
[00002195] 8b4d08 mov ecx,[ebp+08]
[00002198] 51 push ecx ; push param
[00002199] e8a0f2ffff call 0000143e ; call H
[0000219e] 83c408 add esp,+08
[000021a1] 85c0 test eax,eax ; test return value for 0
[000021a3] 7404 jz 000021a9 ; jump if zero
[000021a5] 33c0 xor eax,eax ; force return value 0
[000021a7] eb05 jmp 000021ae ; jump to ret
[000021a9] b801000000 mov eax,00000001 ; force return value 1
[000021ae] 5d pop ebp
[000021af] c3 ret ; end D
Size in bytes:(0034) [000021af]
machine stack stack machine assembly
address address data code language
======== ======== ======== ========== =============
New slave_stack at:103916
Begin Local Halt Decider Simulation Execution Trace Stored at:11391e
[0000218e][0011390a][0011390e] 55 push ebp ; begin H
[0000218f][0011390a][0011390e] 8bec mov ebp,esp
[00002191][0011390a][0011390e] 8b4508 mov eax,[ebp+08] ; move param eax
[00002194][00113906][0000218e] 50 push eax ; push D
[00002195][00113906][0000218e] 8b4d08 mov ecx,[ebp+08] ; move param ecx
[00002198][00113902][0000218e] 51 push ecx ; push D
[00002199][001138fe][0000219e] e8a0f2ffff call 0000143e ; call H
New slave_stack at:14e33e
[0000218e][0015e332][0015e336] 55 push ebp ; begin H
[0000218f][0015e332][0015e336] 8bec mov ebp,esp
[00002191][0015e332][0015e336] 8b4508 mov eax,[ebp+08] ; move param eax
[00002194][0015e32e][0000218e] 50 push eax ; push D
[00002195][0015e32e][0000218e] 8b4d08 mov ecx,[ebp+08] ; move param ecx
[00002198][0015e32a][0000218e] 51 push ecx ; push D
[00002199][0015e326][0000219e] e8a0f2ffff call 0000143e ; call H
Local Halt Decider: Infinite Recursion Detected Simulation Stopped
We can see that the first seven instructions of D emulated by H precisely match the first seven
instructions of the x86 source-code of D. This conclusively proves that these instructions were
emulated correctly.
After D calls H(D, D) we can see that H correctly emulates itself emulating D because again
we see that the first seven instructions of D emulated by the emulated H precisely match the
first seven instructions of the x86 source-code of D. This conclusively proves that these
instructions were emulated correctly.
H detects that D is calling H twice in sequence with the same aguments. H also sees that there
are no conditional branch instructions from the beginning of D to its call to H that can possibly
escape the repetition of this recursive simulation.
Anyone sufficiently technically competent in the x86 programming language will agree that the
above execution trace of D emulated by H shows that D will never stop running unless H
aborts its emulation of D.
---3--- 09/15/24 09:17:57 AM
Appendix
<MIT Professor Sipser agreed to ONLY these verbatim words 10/13/2022>
If simulating halt decider H correctly simulates its input D
until H correctly determines that its simulated D would never
stop running unless aborted then
H can abort its simulation of D and correctly report that D
specifies a non-halting sequence of configurations.
</MIT Professor Sipser agreed to ONLY these verbatim words 10/13/2022>
int D(int (*M)())
{
if (H(M, M) )
return 0; // returns 0 for recursive emulation that must be aborted
return 1;
}
int main()
{
Output("Input_Halts = ", D(D)); // Outputs "Input_Halts = 1"
return 0;
}
_D()
[0000218e] 55 push ebp ; begin D
[0000218f] 8bec mov ebp,esp
[00002191] 8b4508 mov eax,[ebp+08]
[00002194] 50 push eax ; push param
[00002195] 8b4d08 mov ecx,[ebp+08]
[00002198] 51 push ecx ; push param
[00002199] e8a0f2ffff call 0000143e ; call H
[0000219e] 83c408 add esp,+08
[000021a1] 85c0 test eax,eax ; test return value for 0
[000021a3] 7404 jz 000021a9 ; jump if zero
[000021a5] 33c0 xor eax,eax ; force return value 0
[000021a7] eb05 jmp 000021ae ; jump to ret
[000021a9] b801000000 mov eax,00000001 ; force return value 1
[000021ae] 5d pop ebp
[000021af] c3 ret ; end D
Size in bytes:(0034) [000021af]
_main()
[000021be] 55 push ebp
[000021bf] 8bec mov ebp,esp
[000021c1] 688e210000 push 0000218e ; push D
[000021c6] e8c3ffffff call 0000218e ; call D
[000021cb] 83c404 add esp,+04
[000021ce] 50 push eax
[000021cf] 685f070000 push 0000075f ; push
[000021d4] e8a5e5ffff call 0000077e ; call Output
[000021d9] 83c408 add esp,+08
[000021dc] 33c0 xor eax,eax
[000021de] 5d pop ebp
[000021df] c3 ret
Size in bytes:(0034) [000021df]
---4--- 09/15/24 09:17:57 AM
machine stack stack machine assembly
address address data code language
======== ======== ======== ============== =============
[000021be][00103872][00000000] 55 push ebp ; begin main
[000021bf][00103872][00000000] 8bec mov ebp,esp
[000021c1][0010386e][0000218e] 688e210000 push 0000218e ; push D
[000021c6][0010386a][000021cb] e8c3ffffff call 0000218e ; call D
[0000218e][00103866][00103872] 55 push ebp
[0000218f][00103866][00103872] 8bec mov ebp,esp
[00002191][00103866][00103872] 8b4508 mov eax,[ebp+08] ; mov param to eax
[00002194][00103862][0000218e] 50 push eax ; push D
[00002195][00103862][0000218e] 8b4d08 mov ecx,[ebp+08] ; mov param to ecx
[00002198][0010385e][0000218e] 51 push ecx ; push D
[00002199][0010385a][0000219e] e8a0f2ffff call 0000143e ; call H
New slave_stack at:103916
Begin Local Halt Decider Simulation Execution Trace Stored at:11391e
[0000218e][0011390a][0011390e] 55 push ebp ; begin H
[0000218f][0011390a][0011390e] 8bec mov ebp,esp
[00002191][0011390a][0011390e] 8b4508 mov eax,[ebp+08] ; move param eax
[00002194][00113906][0000218e] 50 push eax ; push D
[00002195][00113906][0000218e] 8b4d08 mov ecx,[ebp+08] ; move param ecx
[00002198][00113902][0000218e] 51 push ecx ; push D
[00002199][001138fe][0000219e] e8a0f2ffff call 0000143e ; call H
New slave_stack at:14e33e
[0000218e][0015e332][0015e336] 55 push ebp ; begin H
[0000218f][0015e332][0015e336] 8bec mov ebp,esp
[00002191][0015e332][0015e336] 8b4508 mov eax,[ebp+08] ; move param eax
[00002194][0015e32e][0000218e] 50 push eax ; push D
[00002195][0015e32e][0000218e] 8b4d08 mov ecx,[ebp+08] ; move param ecx
[00002198][0015e32a][0000218e] 51 push ecx ; push D
[00002199][0015e326][0000219e] e8a0f2ffff call 0000143e ; call H
Local Halt Decider: Infinite Recursion Detected Simulation Stopped
[0000219e][00103866][00103872] 83c408 add esp,+08 ; return to executed D
[000021a1][00103866][00103872] 85c0 test eax,eax ; test return value for 0
[000021a3][00103866][00103872] 7404 jz 000021a9 ; jump if zero
[000021a9][00103866][00103872] b801000000 mov eax,00000001 ; set return value
[000021ae][0010386a][000021cb] 5d pop ebp
[000021af][0010386e][0000218e] c3 ret ; return from executed D
[000021cb][00103872][00000000] 83c404 add esp,+04 ; back in main
[000021ce][0010386e][00000001] 50 push eax ; return value from D
[000021cf][0010386a][0000075f] 685f070000 push 0000075f ; "Input_Halts = "
[000021d4][0010386a][0000075f] e8a5e5ffff call 0000077e ; call Output
Input_Halts = 1
[000021d9][00103872][00000000] 83c408 add esp,+08
[000021dc][00103872][00000000] 33c0 xor eax,eax ; set return value to 0
[000021de][00103876][00000018] 5d pop ebp ;
[000021df][0010387a][00000000] c3 ret ; return 0 from main
Number of Instructions Executed(14084) == 210 Pages
---5--- 09/15/24 09:17:57 AM
ResearchGate has not been able to resolve any citations for this publication.
ResearchGate has not been able to resolve any references for this publication.