I like to know whether it is possible to "write a program or algorithm" to find the time complexity of any given program taken as input.
Input : any program (P) [in any language or of a particular language]
Output : time complexity of that program (P).
Have there been any prior attempts to write such a program? Are there any algorithms available for this purpose?
If so please provide the necessary links, references or with any kind of guidance possible.