David Hilsee said:
Yes, it will contradict its own logic. I don't even know what you mean by
"fail to return a result". If you're talking about returning that UNKNOWN
value/displaying "security problem", then forget it, because that is not an
acceptable answer from the analyzer because it means that the analyzer has
failed to process the input correctly. If you do not see how the analyzer
Yes you would be correct here. I have completely redesigned my method
and eliminated that path. What I am talking about here is that the Halting
analyzer can see when its result is being used to change the behavior of the
program being analyzed, thus changing the analysis. In those cases where
it detects this, it provides its own differing behavior to correspond to this.
It refrains from returning a result in those cases where this result is used
to change the behavior of the program being analyzed. Since is still does
return the correct value in every other case, it can still determine this correct
value for this program.
01) int WillHalt(string SourceCode, string DataInput)
02) {
03) if (TheProgramHalts(SourceCode, DataInput))
04) return 1; // also means true in C/C++
05) else
06) return 0; // also means false in C/C++
07) }
08) void LoopIfHalts(string SourceCode, string DataInput)
09) {
10) if (WillHalt(SourceCode, DataInput))
11) while(true)
12) ;
13) else
14) return;
15) }
16) cout << WillHalt(LoopIfHalts, LoopIfHalts);
Line 16 returns the correct result for LoopIfHalts, whereas line 10
returns no result at all.