3 ms·
An interesting question is: can one build a meta-AOT compiler framework that converts an interpreter into a reasonably good AOT compiler? If not, why not?
by mafribe 11y ago
An interesting question is: can one build a meta-AOT compiler framework that converts an interpreter into a reasonably good AOT compiler?
If not, why not?
- fijal 11y agoNot sure, don't have much experience with that. This is a "classic" futamura projection - you write an interpreter and the "magic" turns it into a compiler. I'm not aware of any consumer-grade compiler like that, but there is a huge swath of research on that. You can very easily create a dumb one - you just copy-paste interpreter loop essentially (which is what e.g. cython does if not presented with annotations), however the results just aren't very good
- mafribe 11y agoResearch on partial evaluation (PE) was fashionable in the 1990s, but largely fizzled out. I was told that was because they could never really get the results to run fast. I'm trying to understand why. Clearly meta-tracing and PE have a lot of overlap. Truffle is based on some variant of dynamic PE if I understand what they do correctly. Most of the 1990s work in PE was more about static PE I think. The paper [1] touches on some of these issues, but I have not studied it closely yet. [1] http://stefan-marr.de/downloads/oopsla15-marr-ducasse-meta-tracing-vs-partial-evaluation.pdf http://stefan-marr.de/downloads/oopsla15-marr-ducasse-meta-t...
- themgt 11y agoIn a truly dynamic/metaprogrammable language, wouldn't this be equivalent to solving the halting problem?
- mafribe 11y agoNo, why do you think it would?