Maybe my question is a bad question, but if it is, I want to know eactly how it is a bad question.
Suppose we have some Turing machien $M$ that takes as input a natural number $n$ in the form of a binary string, writes $n^2$ in binary on its output tape, and then halts.
What is the type signature of this machine? Here is why I am confused:
We can treat $M$ as a function: $M(\cdot)$ denotes the function that maps $n\mapsto n^2$, which suggests that it has type $\{0,1\}^*\to\{0,1 \}^*$
But $M$, intuitively speaking, is not a function, but a "device". This means that we can extract more information from it. e.g. potentially we could define $M_{235}(\cdot)$ to be the function that takes an input and outputs: "what is the string on the output tape after 235 steps, given this input?".
In the formal definition, a turing machine is a tuple $M=\langle Q,\Gamma ,b,\Sigma ,\delta ,q_{0},F\rangle$ (with some properties on these elements). But I am confused about how this tuple relates to type theory. Is this the "type signature" of $M$? If so, what kind of type theory captures this kind of type?