1
$\begingroup$

When the halting problem is discussed, often the counterproof consists of some unsolved mathematical problem or a self-reference.

Is the halting problem decidable for pure programs on an ideal computer?

Is this of any relevance for most programms not even remotely dealing with complex math ? I often hear that performing static analysis on any program is useless, because "Halting-problem". I find this argument weak, to make a statement from a few theoretical counter examples to say that static analysis on any programm is useless.

And what about a modified version of the halting problem?

What about outputting those 3 possibilities:

Halts. Does not halt. Unknown.

Doesn't this simplify the halting problem enough to make a statement about any program in finite time ?

$\endgroup$

closed as unclear what you're asking by Raphael Sep 13 '16 at 12:43

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ You ask multiple questions here, which is no good for the platform. Which is the one you want us to answer? $\endgroup$ – Raphael Sep 13 '16 at 8:53
  • $\begingroup$ "Is this of any relevance for most programms not even remotely dealing with complex math ?" -- Many very simple functions are not computable. Many very simple programs (don't) have very simple properties that can not be decided. $\endgroup$ – Raphael Sep 13 '16 at 8:54
  • $\begingroup$ Your modified version is simple. "Unknown" for every problem. $\endgroup$ – gnasher729 Sep 13 '16 at 11:51
  • $\begingroup$ Well, but in practice you can mark every known solved problem as one of the other ones and then decide for your programm if it will halt in general or not. $\endgroup$ – HopefullyHelpful Sep 13 '16 at 11:52
  • 1
    $\begingroup$ There's a tool competition for static analysis of termination of programs, which includes categories for C and Java Bytecode termination. The short answer is that (like every other static analysis) such tools can perform well on relatively small programs which do not use complex heap manipulation. $\endgroup$ – cody Sep 14 '16 at 18:02
4
$\begingroup$

When you hear about "static analysis" in the context of programming languages, you will often have the three results "passes the test", "doesn't pass the test", "is rejected". In that context, the analysis is supposed to help the software developer. If the developer writes code that is too hard to analyse, that's the developer's problem because he isn't going to get the answer he wants.

As an example, the Java language insists that a variable must be assigned a value before it is accessed. Testing that in general would require solving the halting problem. However, the Java language defines a precise method how it would go about verifying this property, and if your program cannot be analysed by this method, then it is rejected. No attempt at solving the halting problem is made.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.