Metaprogramming taken to an unnecessarily high level- how can a program write not just other programs, but a programming language? So basically, automated language-oriented programming. I've tried finding info on this concept, but have had some trouble, probably because my brain is having a bit of trouble grasping the subject while thinking about it. It could be better defined as metaprogramming going to a deeper level- rewriting the programming language it is written in as well as or instead of the program itself. 

Theoretically, through this a program would be able to operate on an infinite number of levels. I think this should be a key part of artificial intelligence, as we humans have written numerous programming languages all on top of each other and from scratch, so our programs should be able to as well.

How or why someone would ever do this is not the question. The better question is, "why not?"

If you are able to answer this question, don't worry because I have more to back it up. What programming languages would be best for this kind of thing, and what are some terms I can use in the future to better describe and grasp this concept?
Of course we could in principle auto-generate a full programming language. First we'd have to say what being a full programming language actually entails. Here is my attempt:


Syntax of programs.
A notion of value (programs that have no further reductions, but are not stuck).
A reduction relation giving the operational semantic.
A notion of program equality.


All of this can be specified syntactically and generated by a computer. There are tools for part of this purpose, e.g. Ott, but specifying the whole operational semantics of a realistic PL is extremely hard work. One could argue that for example the C used in programming the Linux kernel is only specified by the official GCC version used for compilation of the kernel.

As specifying all of this is such a pain, nobody has so far produced a full-spectrum meta-programming tool. At this point it is not clear how it would look like and how it would help.