I'm trying to understand the concept of meta-circular evaluator. According to Wikipedia
In computing, a meta-circular evaluator or meta-circular interpreter is an interpreter which defines each feature of the interpreted language using a similar facility of the interpreter's host language. For example, interpreting a lambda application may be implemented using function application.
In the context of Lisp, I think it means the interpreter implementation stores the program state in data structures familiar to those expressed by the syntax itself, i.e lists.
More generally, I would say the interpreter implementation uses the paradigm of the syntax to interpret the syntax. Also, it has nothing to do with the interpreter being implemented in the interpreted language (Lisp interpreter is typically written in C). Only the paradigm equivalency matters.
Let's consider Java Maxine Virtual Machine, the meta-circular JVM. Maxine JVM is written in Java. It's a JVM running inside a JVM. Again, the interpreter uses same paradigm as the interpreted language. Executable code expressed by Java objects is managed by executable code expressed by Java objects. Of course, the actual executable is byte code, but the abstract concept beyond it is what matters. Thus, I believe the Maxine may have been written in any language and still being considered as meta-circular, as long as the implementation matches OOP concepts and Java rules. Most obviously such language is Java itself. Yet here is one interesting conflict which I describe in the last paragraph, it really makes my head hurt!
This is how I understand what is meant by meta-circular evaluator in theory. But I don't really get the practical aspect. According to Wikipedia
In combination with an existing language implementation, meta-circular interpreters provide a baseline system from which to extend a language, either upwards by adding more features or downwards by compiling away features rather than interpreting them
What this actually means? How this comes or may be put into practice with Maxine Virtual Machine for example? How this is different from a function such as eval
?
And if we go more philosophical, having two premises for meta-circular interpreter
- The interpreter implementation language doesn't matter, paradigm equivalence does
- At the execution level the concept of paradigm ceases to exists, everything being just bytes
What are the definitive boundaries of the meta-circularity? Where does this characteristic actually realizes? I'm probably way overthinking this, but I find it an interesting subject.