We cannot decide anything âinterestingâ about any Turing-complete program. âInterestingâ is defined as any property that is not either true for every program, or false for every program. âDecideâ means write a program that returns either true or false on all programs. The halting program is an instance of Riceâs Theorem.
Formally
All program analysis problems that are non-trivial are undecidable. There is no program analysis that achieves all of the following for all input problems:
- Is fully automatic (no user input/interaction other than the program)
- Always terminates (the analysis itself, not program being analysed)
- On termination: always says âyesâ when the answer should be âyesâ
- On termination: always says ânoâ when the answer should be ânoâ