Deutsch   English   Français   Italiano  
<v2fo12$1hhg$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: olcott <polcott333@gmail.com>
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: Can someone please verify the execution trace of this?
Date: Mon, 20 May 2024 09:51:14 -0500
Organization: A noiseless patient Spider
Lines: 172
Message-ID: <v2fo12$1hhg$2@dont-email.me>
References: <v2b78t$2vima$1@dont-email.me>
 <v2df79$3ghfd$1@raubtier-asyl.eternal-september.org>
 <v2di7v$3gujt$1@dont-email.me>
 <v2eada$3p6sk$1@raubtier-asyl.eternal-september.org>
 <v2edbr$3pl2i$1@dont-email.me>
 <v2eluk$3r1qu$1@raubtier-asyl.eternal-september.org>
 <v2enl9$3r9t0$1@dont-email.me> <v2f0hq$3srhq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 20 May 2024 16:51:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="629f9cefad5d4023792ce8f8ed8d9594";
	logging-data="50736"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18hMLQInKaP0mgRuiet++41"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:AYv2+cUkP0x/wPs+4CxXo0D6t7w=
In-Reply-To: <v2f0hq$3srhq$1@dont-email.me>
Content-Language: en-US
Bytes: 6950

On 5/20/2024 3:10 AM, Fred. Zwarts wrote:
> Op 20.mei.2024 om 07:38 schreef olcott:
>> On 5/20/2024 12:09 AM, Bonita Montero wrote:
>>> Am 20.05.2024 um 04:43 schrieb olcott:
>>>> On 5/19/2024 8:52 PM, Bonita Montero wrote:
>>>>> Am 19.05.2024 um 21:00 schrieb olcott:
>>>>>> 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*
>>>>>>
>>>>>
>>>>> That's not research, that's nonsense.
>>>>>
>>>>
>>>> This is not the forum to show that it is not nonsense this is
>>>> a simple C question that I should not even have to ask except
>>>> for a few people in another forum that consistently lie about
>>>> the answer.
>>>>
>>>> I have been a professional C++ developer since Y2K. So I already
>>>> know the answer, I just need some competent people in this forum
>>>> to attest to this answer. I met Bjarne Stroustrup back when he
>>>> was going around the country promoting his new language.
>>>>
>>>
>>> You ask the same questions over and over again for years.
>>> It's like circling your thoughts before you fall asleep -
>>> you don't think about whether it really makes sense.
>>>
>>
>> It would take three people five minutes a piece.
>> Then I can go back to the other forum.
>>
>> They have been lying about how the above code works
>> consistently for two years. I know how it works. I
>> learned C back when K & R was the standard.
>>
>> Three people take five minutes a piece to confirm the
>> that the last sentence is correct.
>>
>> typedef int (*ptr)();  // ptr is pointer to int function
>> 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 }
>>
>> 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.
>>
>> H must be a pure function
>> https://en.wikipedia.org/wiki/Pure_function#
>>
>> *THIS ONE SENTENCE NEEDS TO BE CONFIRMED*
>> For every H/D pair of the above template D correctly simulated
>> by H cannot possibly reach its own final state at line 06 and halt.
> 
> Olcott cannot find a proof for his claim. Now he tries a proof by 
> authority. He is looking for persons with some authority to support him. 
> But such a proof does not depend on the number and the expertise of 
> witnesses, as is common for a juridical proof. In computation theory a 
> proof consists of logic steps.

Anyone having sufficient knowledge of the semantics
knows the answer. Likewise for these C functions:

void Infinite_Recursion(u32 N)
{
   Infinite_Recursion(N);
}

int factorial(int n)
{
   if (n >= 1)
     return n*factorial(n-1);
   else
     return 1;
}

void Infinite_Loop()
{
   HERE: goto HERE;
}


-- 
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer