Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: olcott Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: Can someone please verify the execution trace of this? Date: Sun, 19 May 2024 14:00:15 -0500 Organization: A noiseless patient Spider Lines: 59 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 19 May 2024 21:00:15 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8b2dd23db76027a1e88bd64b7a96c771"; logging-data="3701373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5hwXI0t406OAWSlB2dpum" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:lzk7t4RWOvBfIfBC6xmEuX+86zA= In-Reply-To: Content-Language: en-US Bytes: 2986 On 5/19/2024 1:08 PM, Bonita Montero wrote: > Am 18.05.2024 um 23:40 schrieb olcott: >> People are saying that they have no idea what this code does >> because they do not believe it conforms to c11 or c17. >> >> typedef int (*ptr)();  // ptr is pointer to int function >> 00 int H(ptr x, ptr y); >> 01 int D(ptr x) >> 02 { >> 03   int Halt_Status = H(x, x); >> 04   if (Halt_Status) >> 05     HERE: goto HERE; >> 06   return Halt_Status; >> 07 } >> 08 >> 09 int main() >> 10 { >> 11   H(D,D); >> 12   return 0; >> 13 } >> >> In the above case a simulator is an x86 emulator that correctly emulates >> at least one of the x86 instructions of D in the order specified by the >> x86 instructions of D. >> >> This may include correctly emulating the x86 instructions of H in the >> order specified by the x86 instructions of H thus calling H(D,D) in >> recursive simulation. >> >> *Execution Trace* >> Line 11: main() invokes H(D,D); >> >> *keeps repeating* (unless aborted) >> Line 01: >> Line 02: >> Line 03: simulated D(D) invokes simulated H(D,D) that simulates D(D) >> >> *Simulation invariant* >> D correctly simulated by H cannot possibly reach past its own line 03. >> >> The key thing to note is that no D correctly simulated by any H of every >> H/D pair specified by the above template ever reaches its own line 06 >> and halts. >> > > Other people think 30s about this, you think years about that. > It is the basis for my two decades long primary research into termination analysis. People on another forum have written hundreds of posts claiming that D correctly simulated by H reaches its own line 06 and halts. *I have only gotten truthful answers on this forum* -- Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius hits a target no one else can see." Arthur Schopenhauer