Re: Incorrect requirements --- Computing the mapping from the input to HHH(DD)

Liste des GroupesRevenir à c theory 
Sujet : Re: Incorrect requirements --- Computing the mapping from the input to HHH(DD)
De : polcott333 (at) *nospam* gmail.com (olcott)
Groupes : comp.theory
Date : 09. May 2025, 23:18:44
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vvlv04$32kt3$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
User-Agent : Mozilla Thunderbird
On 5/9/2025 4:40 PM, Richard Heathfield wrote:
On 09/05/2025 21:15, olcott wrote:
On 5/9/2025 3:07 PM, Richard Heathfield wrote:
On 09/05/2025 20:46, olcott wrote:
We have not begun to get into any of those points.
We are only asking can DDD correctly simulated
by any HHH that can exist ever reach its own
"return" instruction.
>
DDD can't be correctly simulated by itself (which is effectively what you're trying to do when you fire up the simulation from inside DDD).
>
>
How the Hell did you twist my words to say that?
 I haven't touched your words. What I have done is to observe that DDD's /only/ action is to call a simulator. Since DDD isn't itself a simulator, there is nothing to simulate except a call to a simulator.
 It's recursion without a base case - a rookie error.
 HHH cannot successfully complete its task, because it never regains control after the first recursion. To return, it must abort the simulation, which means the simulation fails.
 
>
void DDD()
{
   HHH(DDD);
   return;
}
>
When 1 or more statements of DDD are correctly
simulated by HHH then this correctly simulated
DDD cannot possibly reach its own “return statement”.
 On what grounds can you persuade an extraordinarily sceptical readership that HHH 'correctly simulated' DDD?
 
Any competent C programmer can see that
the call from DDD to HHH(DDD) (its own simulator)
is equivalent to infinite recursion.
On 5/8/2025 8:30 PM, Keith Thompson wrote:
 > Assuming that HHH(DDD) "correctly simulates" DDD, and assuming it
 > does nothing else, your code would be equivalent to this:
 >
 >      void DDD(void) {
 >          DDD();
 >          return;
 >      }
 >
 > Then the return statement (which is unnecessary anyway) will never be
 > reached.  In practice, the program will likely crash due to a stack
 > overflow, unless the compiler implements tail-call optimization, in
 > which case the program might just run forever -- which also means the
 > unnecessary return statement will never be reached.
--
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer

Date Sujet#  Auteur
23 Nov 25 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal