An answer is not so simple... In fact ther's a subject that studies this question, it's theoretical computer science.
However the right answer is no, cause we never can solve the HALT problem.
HALT is (should be) a predicate that for every y (y is a number that identifies a program in an univocal way) can says if y stop or not on input x.
Well, HALT(x,y) is not a computable predicate.
Proof:
Suppose that HALT(x,y) were computable, then we could construnct the program
Code:
[A] IF HALT(X,X) GOTO A
Let y0 thne number of the program so constructed, then we have:
HALT(x,y0) <=> ~HALT(x,x)
but if we set x=y0
HALT(y0,y0) <=> ~HALT(y0,y0)
that is a contradiction.
This is only a small proof of this sucx... hem... beautiful and useful subject
