home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,297 of 243,242   
   olcott to All   
   That HHH(DD) rejects its input as non-ha   
   11 Oct 25 15:33:14   
   
   XPost: comp.theory, comp.lang.c++, comp.ai.philosophy   
   From: polcott333@gmail.com   
      
   That HHH(DD) correctly rejects its input on the   
   following basis is semantically entailed by the   
   following formal rubric list below this much more   
   human readable version.   
      
   Whether or not and to what degree it applies to   
   the halting problem is another different matter.   
      
   LLM systems are currently very good at semantic logical   
   entailment. When limited to this task they have no   
   opportunity for hallucination, thus seem to be quite   
   reliable as empirical testing has shown.   
      
   *This is the human readable form of the formal rubic*   
   *Clause AI, ChatGPT 4.0 and Grok fully understood this one*   
      
      
   Simulating Termination Analyzer HHH correctly simulates its input until:   
   (a) Detects a non-terminating behavior pattern:   
        abort simulation and return 0.   
   (b) Simulated input reaches its simulated "return" statement:   
        return 1.   
      
   typedef int (*ptr)();   
   int HHH(ptr P);   
      
   int DD()   
   {   
      int Halt_Status = HHH(DD);   
      if (Halt_Status)   
        HERE: goto HERE;   
      return Halt_Status;   
   }   
      
   int main()   
   {   
      HHH(DD);   
   }   
      
   What value should HHH(DD) correctly return?   
      
      
   *This is the beginning of the formal rubric*   
   *When one perfectly sticks to the rules then*   
   *there is only one possible result*   
      
      
      
   You are given:   
   1. A simulation rubric.   
   2. A C function (test program).   
      
   Your job:   
   - Apply the rubric exactly.   
   - Produce the required output in the given format.   
   - Do not skip steps or jump to conclusions.   
      
   ---   
      
      
   Rules of Simulation:   
   - (a) If a non-terminating behavior pattern is detected during   
   simulation, abort immediately and return 0.   
   - (b) If the simulated program reaches a return statement without   
   earlier detection, return 1.   
   - Priority: (a) always takes precedence over (b).   
      
   Procedure:   
   1. Restate rules before simulation.   
   2. Simulate step by step using a trace table with columns:   
       | Step | Code Location | State (variables, call stack) | Event /   
   Action | Rule Applied |   
   3. Stop immediately if recursion, infinite loop, or repeating state   
   occurs → apply (a).   
   4. If a return is reached first → apply (b).   
   5. Conclude with:   
       - Which rule fired first   
       - The correct return value   
   6. Optionally, provide:   
       - (i) Simulation result under rules   
       - (ii) Actual runtime behavior in C   
      
      
      
      
   typedef int (*ptr)();   
   int HHH(ptr P);   
      
   int DD()   
   {   
      int Halt_Status = HHH(DD);   
      if (Halt_Status)   
        HERE: goto HERE;   
      return Halt_Status;   
   }   
      
      
      
   1. Restatement of rules   
   2. Step-by-step execution trace in a table   
   3. Identification of first rule triggered   
   4. Final result: return value of HHH(program)   
   5. Optional: actual C runtime behavior if relevant   
      
      
      
      
   --   
   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)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca