Path: ...!3.eu.feeder.erje.net!feeder.erje.net!weretis.net!feeder8.news.weretis.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: Will Paypal $10 to the first person finding a valid counter-example Date: Thu, 23 May 2024 14:00:26 -0500 Organization: A noiseless patient Spider Lines: 59 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 23 May 2024 21:00:27 +0200 (CEST) Injection-Info: dont-email.me; posting-host="ba728845a682305e7e13b3854d529db3"; logging-data="1995964"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MIIZh2BTT9R6P/awbEOet" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:uz4Cr3QB6bBkIovqVtLKhxd2eyU= Content-Language: en-US Bytes: 3239 typedef int (*ptr)(); // ptr is pointer to int function in C 00 int H(ptr p, ptr i); 01 int D(ptr p) 02 { 03 int Halt_Status = H(p, p); 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 } The above template refers to an infinite set of H/D pairs where D is correctly simulated by pure function H. This was done because many reviewers used the shell game ploy to endlessly switch which H/D pair was being referred to. Every H returns the meaningless integer 56. *Pure Function Defined* (1) the function return values are identical for identical arguments (no variation with local static variables, non-local variables, mutable reference arguments or input streams, i.e., referential transparency), and (2) the function has no side effects (no mutation of local static variables, non-local variables, mutable reference arguments or input/output streams). https://en.wikipedia.org/wiki/Pure_function# *Correct Simulation Defined* This is provided because many reviewers had a different notion of correct simulation that diverges from this notion. 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); H(D,D) simulates lines 01, 02, and 03 of D. This invokes H(D,D) again to repeat the process in endless recursive simulation. Will Paypal $10 to the first person finding a valid counter-example where D correctly simulated by pure function H reaches is own line 06 and halts. This offer expires after 30 days. This offer only applies to the first valid counter-example. This offer may be extended. -- Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius hits a target no one else can see." Arthur Schopenhauer