Termination Analyzer H is Not Fooled by Pathological Input D
When the halting problem is construed as requiring a correct yes/no answer to a contradictory question it cannot be solved. Any input D defined to do the opposite of whatever Boolean value that its termination analyzer H returns is a contradictory input relative to H.
In this case the best that any decider can possibly do is recognize that its input is contradictory (relative to itself) and reject it on that basis.
When H returns 1 for inputs that it determines do halt and returns 0 for inputs that either do not halt or do the opposite of whatever Boolean value that H returns then these pathological inputs are no longer contradictory and become decidable.
Can D correctly simulated by H terminate normally?
The x86utm operating system based on an open source x86 emulator. This system enables one C function to execute another C function in debug step mode. When H simulates D it creates a separate process context for D with its own memory, stack and virtual registers. H is able to simulate D simulating itself, thus the only limit to recursive simulations is RAM.
// The following is written in C
//
01 typedef int (*ptr)(); // pointer to int function
02 int H(ptr x, ptr y) // uses x86 emulator to simulate its input
03
04 int D(ptr x)
05 {
06 int Halt_Status = H(x, x);
07 if (Halt_Status)
08 HERE: goto HERE;
09 return Halt_Status;
10 }
11
12 void main()
13 {
14 H(D,D);
15 }
Execution Trace
Line 14: main() invokes H(D,D);
keeps repeating (unless aborted)
Line 06: simulated D(D) invokes simulated H(D,D) that simulates D(D)
Simulation invariant:
D correctly simulated by H cannot possibly reach past its own line 06.
H correctly determines that D correctly simulated by H cannot possibly terminate normally on the basis that H recognizes a dynamic behavior pattern equivalent to infinite recursion. H outputs: "H: Infinitely Recursive Simulation Detected Simulation Stopped" indicating that D has defined a pathological (see above) relationship to H.
The x86utm operating system (includes several termination analyzers)
https://github.com/plolcott/x86utm
It compiles with the 2017 version of the Community Edition
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15