XPost: comp.theory, comp.lang.c++, comp.lang.c   
   From: polcott333@gmail.com   
      
   On 8/25/2025 1:11 AM, Richard Heathfield wrote:   
   > On 25/08/2025 05:59, olcott wrote:   
   >> On 8/23/2025 11:44 PM, Richard Heathfield wrote:   
   >>> On 23/08/2025 21:40, olcott wrote:   
   >>>> When we eliminate the static data then the   
   >>>> fact that DD() never halts proves that HHH(DD)==0.   
   >>>   
   >>> ...and DD promptly halts. Odd, that.   
   >>>   
   >> No it actually never halts.   
   >   
   > This is where you like to say "tisn't", except that you spell it   
   > "counter-factual".   
   >   
   > But when /I/ say "tisn't", I back it up with verifiable acts.   
   >   
   > Here's my proof that DD halts.   
   >   
   > $ cat dd.c   
   > #include    
   >   
   > #define HHH(x) 0   
   >   
   > int DD()   
   > {   
   > int Halt_Status = HHH(DD);   
   > if (Halt_Status)   
   > HERE: goto HERE;   
   > return Halt_Status;   
   > }   
   >   
   >   
   > int main()   
   > {   
   > int hhh = HHH(DD);   
   > int dd = DD();   
   >   
   > printf("Because we got here, we know that both HHH and DD halted.\n");   
   >   
   > printf("But is that what they claim?\n\n");   
   > printf("HHH(DD) yields %d (%s).\n", hhh, hhh ? "halted" : "incorrect   
   > claim of non-halting");   
   > printf("DD yields %d (%s).\n", dd, dd ? "halted" : "incorrect claim   
   > of non-halting");   
   >   
   > return 0;   
   > }   
   > $ gcc -o dd dd.c   
   > $ ./dd   
   > Because we got here, we know that both HHH and DD halted.   
   > But is that what they claim?   
   >   
   > HHH(DD) yields 0 (incorrect claim of non-halting).   
   > DD yields 0 (incorrect claim of non-halting).   
   >   
   >   
      
   When the abort code is removed by a compile   
   time switch x86utm reaches its compile time   
   max instructions emulated: 20,000,000 and requires   
   9 reams of paper to print the full execution trace.   
      
   _DD()   
   [00002153] 55 push ebp   
   [00002154] 8bec mov ebp,esp   
   [00002156] 51 push ecx   
   [00002157] 6853210000 push 00002153   
   [0000215c] e822f4ffff call 00001583   
   [00002161] 83c404 add esp,+04   
   [00002164] 8945fc mov [ebp-04],eax   
   [00002167] 837dfc00 cmp dword [ebp-04],+00   
   [0000216b] 7402 jz 0000216f   
   [0000216d] ebfe jmp 0000216d   
   [0000216f] 8b45fc mov eax,[ebp-04]   
   [00002172] 8be5 mov esp,ebp   
   [00002174] 5d pop ebp   
   [00002175] c3 ret   
   Size in bytes:(0035) [00002175]   
      
   _main()   
   [00002183] 55 push ebp   
   [00002184] 8bec mov ebp,esp   
   [00002186] e8c8ffffff call 00002153   
   [0000218b] 33c0 xor eax,eax   
   [0000218d] 5d pop ebp   
   [0000218e] c3 ret   
   Size in bytes:(0012) [0000218e]   
      
    machine stack stack machine assembly   
    address address data code language   
    ======== ======== ======== ============== =============   
   [00002183][0010384e][00000000] 55 push ebp   
   [00002184][0010384e][00000000] 8bec mov ebp,esp   
   [00002186][0010384a][0000218b] e8c8ffffff call 00002153   
   [00002153][00103846][0010384e] 55 push ebp   
   [00002154][00103846][0010384e] 8bec mov ebp,esp   
   [00002156][00103842][00000000] 51 push ecx   
   [00002157][0010383e][00002153] 6853210000 push 00002153   
   [0000215c][0010383a][00002161] e822f4ffff call 00001583   
   New slave_stack at:1038f2   
      
   Begin Local Halt Decider Simulation Execution Trace Stored at:1138fa   
   [00002153][001138ea][001138ee] 55 push ebp   
   [00002154][001138ea][001138ee] 8bec mov ebp,esp   
   [00002156][001138e6][001038f2] 51 push ecx   
   [00002157][001138e2][00002153] 6853210000 push 00002153   
   [0000215c][001138de][00002161] e822f4ffff call 00001583   
   New slave_stack at:14e31a   
   [00002153][0015e312][0015e316] 55 push ebp   
   [00002154][0015e312][0015e316] 8bec mov ebp,esp   
   [00002156][0015e30e][0014e31a] 51 push ecx   
   [00002157][0015e30a][00002153] 6853210000 push 00002153   
   [0000215c][0015e306][00002161] e822f4ffff call 00001583   
   New slave_stack at:15e3ba   
   [00002153][0016e3b2][0016e3b6] 55 push ebp   
   [00002154][0016e3b2][0016e3b6] 8bec mov ebp,esp   
   [00002156][0016e3ae][0015e3ba] 51 push ecx   
   [00002157][0016e3aa][00002153] 6853210000 push 00002153   
   [0000215c][0016e3a6][00002161] e822f4ffff call 00001583   
   New slave_stack at:16e45a   
   [00002153][0017e452][0017e456] 55 push ebp   
   [00002154][0017e452][0017e456] 8bec mov ebp,esp   
   [00002156][0017e44e][0016e45a] 51 push ecx   
   [00002157][0017e44a][00002153] 6853210000 push 00002153   
   [0000215c][0017e446][00002161] e822f4ffff call 00001583   
   New slave_stack at:17e4fa   
   Number of Instructions Executed(20000000) == 298507 Pages   
      
   Therefore HHH(DD)==0 is proven to be correct.   
      
   --   
   Copyright 2025 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: you cannot sedate... all the things you hate (1:229/2)   
|