Re: Who here understands that the last paragraph is Necessarily true?

Liste des GroupesRevenir à theory 
Sujet : Re: Who here understands that the last paragraph is Necessarily true?
De : mikko.levanto (at) *nospam* iki.fi (Mikko)
Groupes : comp.theory
Date : 14. Jul 2024, 10:09:35
Autres entêtes
Organisation : -
Message-ID : <v7013v$2ccv$1@dont-email.me>
References : 1
User-Agent : Unison/2.2
On 2024-07-13 20:15:56 +0000, olcott said:

typedef void (*ptr)();
int HHH(ptr P);
 void Infinite_Loop()
{
   HERE: goto HERE;
}
 void Infinite_Recursion()
{
   Infinite_Recursion();
}
 void DDD()
{
   HHH(DDD);
}
 int main()
{
   HHH(Infinite_Loop);
   HHH(Infinite_Recursion);
   HHH(DDD);
}
 Any input that must be aborted to prevent the non
termination of HHH necessarily specifies non-halting
behavior or it would never need to be aborted.
Everyone understands that DDD specifies a halting behaviour if HHH(DDD) does,
as can be verified by running
#include <stdio.h>
int main(void) {
  printf("calling HHH(DDD)\n");
  HHH(DDD);
  printf("HHH(DDD) halted\n");
  printf("calling DDD()\n");
  DDD();
  printf("DDD halted\n");
  return 0;
}
--
Mikko

Date Sujet#  Auteur
10 Nov 24 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal