The reason the question cannot be answered is the while (System.in.readline ()) {} program, which will stop? "that the input is not specified, so in this particular case the problem is the lack of information, not insolubility.
The problem with stopping is the impossibility of constructing a general algorithm, which, with both the program and the input, can always determine whether this program will end with this input or continue execution forever.
In the problem of stopping, both the program and the input can be arbitrarily large, but they are intended for the end.
In addition, there is no concrete instance of "program + input", which in itself is unsolvable: if a specific instance is specified, it (in principle) can always build an algorithm that analyzes this instance and / or class of instances, and calculates the correct answer.
However, if the problem is unsolvable, then no matter how many times the algorithm expands to correctly analyze additional instances or instance classes, the process will never end: it will always be possible to create new instances, the algorithm will not be able to respond if it is not expanded.
I would say that the large O of while (System.in.readline ()) {} "is equal to O (n), where n is the size of the input (a program can be thought of as a skeleton, for example, a line counting program).
Big O is determined in this case, because for each input of finite size the program stops.
So the question that needs to be asked may be: "Does the program stop at every possible final input that can be provided?"
If this request can be reduced to a stop problem or any other insoluble problem, then it cannot be solved.
It turns out that it can be reduced, as explained here: https://cs.stackexchange.com/questions/41243/halting-problem-reduction-to-halting-for-all-inputs
Undecidability is a property of problems and does not depend on programming languages ββthat are used to create programs running on the same machines. For example, you might think that any program written in a functional programming language can be compiled into machine code, but the same machine code can be created using an equivalent program written in an assembly, therefore, from the point of view of a Turing machine, the functional languages Programming is nothing more than assembly languages.
In addition, unsolvability would not prevent the algorithm from being able to calculate large O for countless (theoretically infinite) number of programs, so any efforts to build an algorithm for this purpose would not necessarily be meaningless.