Every program in high level ("industrial") programming language can be expressed as some Turing machine. I guess, that there exists universal algorithm for doing that (e.g. one can take the Cartesian multiplication of the domains of all the variables and the resulting space can be the state space of the Turing machine, though the handling of computer-representable floats can be tricky - is there such general algorithm or system that does that? https://github.com/Meyermagic/Turing-Machine-Compiler is an example for the programming language for Turing machine and for the transpiler that translates C programs into the language of Turing machines or see https://web.stanford.edu/class/archive/cs/cs103/cs103.1132/lectures/19/Small19.pdf for some kind of Turing assembler language). But what about the other direction - can Turing machine be rewritten in concise program in high level programming language that uses functions, compositionality of functions and higher-order functions?
Of course, there can be infinite results to that conversion - starting from the naming of the variables and functions and ending with the data structures, content of functions, etc. But there are metrics for the quality of the software code and maximizing such metrics can result in more or less unique answer to this stated problem.
Such conversion is very actual in the current context of reward machines for the reinforcement learning (e.g. https://arxiv.org/pdf/1909.05912.pdf) - symbolic representation of the reward function (as opposite to tabular or deep neural representation). Such symbolic representation greatly facilitates skill transfer among different tasks and it introduces the inference during the learning process and in such way reward machines reduce the need for data and need for learning time.
One can say that the extraction of first order and higher-order functions is a quite hard task, but this task is being tackled by the higher order meta-interpretive learning, e.g. https://www.ijcai.org/Proceedings/13/Papers/231.pdf.
So - are there research trends, works, results, frameworks, ideas, algorithms about conversion of the Turing machine into program in high level programming language (and possibly back)? I am interested into any answer - be it about the functional, logic or imperative programming.