Deutsch English Français Italiano |
<v2c0t2$37l2h$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: olcott <polcott333@gmail.com> Newsgroups: comp.lang.c Subject: Re: Can someone please verify the execution trace of this? Date: Sat, 18 May 2024 23:58:10 -0500 Organization: A noiseless patient Spider Lines: 64 Message-ID: <v2c0t2$37l2h$1@dont-email.me> References: <v2b78t$2vima$1@dont-email.me> <bjvi4jhfgamlc82p93e10mdg5hvclqs187@4ax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 19 May 2024 06:58:11 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8b2dd23db76027a1e88bd64b7a96c771"; logging-data="3396689"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KSq5nu21HyjmS7LqNH9mL" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:M13apxiPieQLoZ9o5EsO68cg6Jo= Content-Language: en-US In-Reply-To: <bjvi4jhfgamlc82p93e10mdg5hvclqs187@4ax.com> Bytes: 3146 On 5/18/2024 11:25 PM, Rosario19 wrote: > On Sat, 18 May 2024 16:40:45 -0500, olcott wrote: > >> 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 } > > here you call H(D,D) D is just a pointer, but what is H? if it is a > ponter for me the program is not definited and has to stop here > im not one expert of C > I explain that below in the part that you skipped. Every element of an infinite set of H/D pairs matching a template where H correctly simulates 1 to ∞ steps of D thus including 0 to ∞ recursive simulations of H simulating itself simulating D. My claim is that D correctly simulated by H cannot possibly reach its own line 06 and halt. >> 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. > -- Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius hits a target no one else can see." Arthur Schopenhauer