Sujet : Re: D correctly simulated by pure function H remains stuck in recursive simulation s
De : mikko.levanto (at) *nospam* iki.fi (Mikko)
Groupes : comp.lang.cDate : 23. May 2024, 10:34:03
Autres entêtes
Organisation : -
Message-ID : <v2n2ib$1mhgc$1@dont-email.me>
References : 1 2 3
User-Agent : Unison/2.2
On 2024-05-22 19:57:44 +0000, olcott said:
On 5/22/2024 11:31 AM, Bonita Montero wrote:
Am 22.05.2024 um 15:57 schrieb olcott:
Because D correctly simulated by pure function H remains stuck in
recursive simulation simulating termination analyzer H is correct
to report that D does not halt.
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 }
It is trivial to see that for every H/D pair of the infinite
set of H/D pairs that match the above template that
D correctly simulated by H cannot possibly reach its own final
state at line 06 and halt because D correctly simulated by
H remains stuck in recursive simulation.
This provides the basis for simulating termination analyzer H to
correctly determine that the halting problem's counter-example
input D cannot possibly halt.
Ok, then every question is answered and we could proceed to
"sth. completely different" (Monty Python).
*No this question has never been answered in this forum*
No answer required as "this question" does not denote.
-- Mikko