I've been learning about Theory of Computation lately, and i'm trying to link general programming with the Theory of Computation. I thought of considering any arbitrary program that halts, as an algorithm for solving some specific computational problem in the sense of Theory of Computation.
For some programs (like a calculator program, etc.), it is really easy to see them as an algorithm for solving some computational problems.
It seems to me, however, that some other programs are really not solving any computational problem.
Computational problems have instances, which can be see as the possible inputs to the algorithm that solves the problem (if the problem is computable), and for each instance there is an answer, which can be seen as the outputs to the algorithm.
But now, how could a Hello World program (prints the string "Hello World") be considered as the algorithm for solving some computational problem? What would be the computational problem, and its possible instances?
Other examples would be a program that solely does the job of establishing a connection to another computer over a network, and then proceeds to send messages to it, closing the connection in the end.
Is it really an algorithm to solve some computational problem?
So I'm thinking that programs (even considered the subset of those that halt) don't ALWAYS relate to Theory of Computation. In another words, there are some programs (mostly the ones that seems fixed procedures with no inputs) that don't represent the algorithm/solution for a problem, and hence can't be represented in a true Model of Computation like a Turing Machine.
Any opinions on the relation between programs that halt in general and Computation Theory?