Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "Fred. Zwarts" Newsgroups: comp.theory Subject: Re: DDD simulated by HHH cannot possibly halt (Halting Problem) Date: Thu, 10 Apr 2025 10:49:18 +0200 Organization: A noiseless patient Spider Lines: 67 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 10 Apr 2025 10:49:19 +0200 (CEST) Injection-Info: dont-email.me; posting-host="6b88f5c90d2054e63fc14f6dbfce082a"; logging-data="2757281"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KtPiUPPGxCfemiXJ0d6rr" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:eyaKmZcQGkSSnMNomuZOOxdqKws= In-Reply-To: Content-Language: nl, en-GB Op 09.apr.2025 om 21:20 schreef olcott: > On 4/9/2025 1:58 PM, Fred. Zwarts wrote: >> Op 09.apr.2025 om 19:29 schreef olcott: >>> >>> On 4/8/2025 10:31 AM, Fred. Zwarts wrote: >>>> Op 08.apr.2025 om 17:13 schreef olcott: >>>>> On 4/8/2025 2:45 AM, Fred. Zwarts wrote: >>>>>> Op 08.apr.2025 om 06:33 schreef olcott: >>>>>>> >>>>>>> typedef void (*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); >>>>>>> } >>>>>>> >>>>>>> *Simulating termination analyzer Principle* >>>>>>> It is always correct for any simulating termination >>>>>>> analyzer to stop simulating and reject any input that >>>>>>> would otherwise prevent its own termination. >>>>>> >>>>>> >>>>>> In this case there is nothing to prevent, because the finite >>>>>> string specifies a program that halts. >>>>> >>>>> int DD() >>>>> { >>>>>    int Halt_Status = HHH(DD); >>>>>    if (Halt_Status) >>>>>      HERE: goto HERE; >>>>>    return Halt_Status; >>>>> } >>>>> >>>>> This stuff is simply over-your-head. >>>>> HHH(DD) meets the above: *Simulating termination analyzer Principle* >>>>> Anyone with sufficient competence with the C programming language >>>>> will understand this. >>>>> >>>> Everyone with a little bit of C knowledge understands that if HHH >>>> returns with a value 0, then DDD halts. >>> >>> DDD CORRECTLY SIMULATED BY HHH >>> NOT ANY OTHER DAMN DDD IN THE UNIVERSE NITWIT. >>> >> If HHH would correctly simulate DD (and the functions called by DD) >> then the simulated HHH would return to DD and DD would halt. > > No way, José: > By "correctly simulate" I mean a simulation or an emulation > of DD by HHH that obeys the semantics of the C or the x86utm > programming languages respectfully. This expressly includes > that HHH simulates/emulates itself simulating/emulating DD. That would make HHH to never halt. But HHH aborts and halts. By this abort it is no longer an emulation of DD by HHH that obeys the semantics of the C or the x86utm programming languages respectfully. It halts and returns to DD. A correct simulation would see that abort and see the return to DD. But the programmer of HHH was dreaming of an infinite recursion, and mistakenly used his dreams instead of logic.