Theory of translators, partial evaluators and drafters

So, I learned about stack machines, interpreters, compilers and some other things related to programming languages ​​and their general theory. Most of the material that I find in books and on the Internet is very specialized and talks about one specific topic, for example. translators without mentioning how they relate to other topics, for example. partial appraisers. Are there any good initial resources for exploring the relationships between translators, compilers, and partial evaluators? By good resources, I mean what explains the theory along with specific implementations. The more I learn about this, the more places I see in my daily work how all this can be applied, but the lack of friendly resources for beginners is a bit of a bummer.

+3
source share
1 answer

one project that uses both interpreters, a compiler, and partial evaluators is a trual with Graal. you implement the AST interpreter in the Java Truffle framework and the JIT compiler that compiles Graal. the peculiarity is that the implementation of the truffle language should specialize in a subset of the actual semantics corresponding to the current execution. The grail only generates machine code for this specialized subset and deoptimizes if previous assumptions about execution are invalid. the structure also includes all AST methods, which are then a form of partial assessment. You can find several articles on the Internet or directly see the code .

+8
source

All Articles