Re: Overcoming the proof of undecidability of the Halting Problem by a simple example in C

Liste des GroupesRevenir à theory 
Sujet : Re: Overcoming the proof of undecidability of the Halting Problem by a simple example in C
De : rjh (at) *nospam* cpax.org.uk (Richard Heathfield)
Groupes : comp.theory
Date : 18. May 2025, 12:05:58
Autres entêtes
Organisation : Fix this later
Message-ID : <100ceum$uvq0$1@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla Thunderbird
On 17/05/2025 10:42, Mikko wrote:
On 2025-05-16 15:10:18 +0000, olcott said:
 
<snip>

void DDD()
{
   HHH(DDD);
   return;
}
>
Anyone that knows C can tell that when HHH does simulate
DDD correctly that it keeps getting deeper in recursive
simulation until aborted or OOM error.
 No, there are peole who do know C but don't know that HHH is not
void HHH(void (*f)(void)) {}
If they know C they should know that it's
  u32 HHH(void (*P)()), according to Halt7.c.
It takes a pointer to a function that accepts no arguments and returns no value.
Anyone who knows C will know that HHH can call the function pointed to, pass it on to another function as a parameter, or store the value. If it does anything else with that value (which of course it *does*), C washes its hands of the consequences. Mr Olcott is mistaken to think that HHH()'s behaviour can be determined by the rules of C.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

Date Sujet#  Auteur
27 Apr 26 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal