On 12/14/2020 9:32 AM, Malcolm McLean wrote:
> If Halts aborts itself, is it halted or aborted? That's the question.
>
Halts() simulates H_Hat() that invokes Halts() in infinite recursion.
Halts() stops simulating H_Hat() including its infinite recursive
invocation of Halts(), returning its non-halting decision to main()
where it is output.
> If we say "halted" then H_Hat inverts whatever result it returns,
It is not possible for an aborted function to invert any damn thing.
> and :Halts" is wrong. If we say "aborted" then "Halts" isn't a function,
> which is a slightly more subtle requirement of H_Hat.
Certainly an at least partial halt decider that bases its halting
decision by looking for patterns of behavior of its inputs can stop
simulating this input as soon as it detects any non-halting pattern.
It does not make any damn difference if it detects an infinite loop, or
infinite recursion. It also does not make any damn difference which
function is involved in infinite recursion. As long as Halts() detects
the non-halting behavior of its input then it can stop simulating this
input and report non-halting.
void H_Hat(u32 P)
{
u32 Input_Halts = Halts(P, P);
if (Input_Halts)
HERE: goto HERE;
else
HALT
}
int main()
{
u32 Input_Would_Halt = Halts((u32)H_Hat, (u32)H_Hat);
Output("[Input_Would_Halt] =", Input_Would_Halt);
HALT;
}
I finally renamed my internal DebugTrace() to Halts() now that it
finally does return its correct halting decision to main().