XPost: comp.theory, comp.lang.c++   
   From: polcott333@gmail.com   
      
   On 11/13/2025 6:45 PM, Kaz Kylheku wrote:   
   > On 2025-11-14, olcott wrote:   
   >> int H(char* P);   
   >>   
   >> int D()   
   >> {   
   >> int Halt_Status = H(D);   
   >> if (Halt_Status)   
   >> HERE: goto HERE;   
   >> return Halt_Status;   
   >> }   
   >>   
   >> int main()   
   >> {   
   >> H(D);   
   >> }   
   >>   
   >> Answer only on the basis of performing the   
   >> actual simulation of D simulated by H.   
   >>   
   >> When N statements of D are simulated by H   
   >> according to the semantics of the C programming   
   >> language can the simulated D reach its own "return"   
   >> statement final halt state for any value of N?   
   >   
   > Positively not. Provided that H returns 0 after the N steps, D reaches   
   > its halt state in N + k steps for some k > 0. Definitely not in the N   
   > steps simulated by H.   
   >   
      
   void Infinite_Recursion(int N)   
   {   
    Infinite_Recursion(N);   
    printf("Execution never gets here!");   
   }   
      
   So you still don't understand that when H sees   
   that D calls the same function twice in sequence   
   with the same arguments and has no conditional   
   code inbetween its invocation and this function   
   call that this is isomorphic to infinite recursion?   
      
   > But anyway, D terminates in N + k steps, showing that the 0 return   
   > is incorrect. The fact that H only makes it to N, and then returns   
   > the wrong value, is H's problem, and has no bearing on whether D   
   > terminates---except to the extent that D's termination depends on   
   > H returning 0.   
   >   
      
      
   --   
   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)   
|