User loginNavigation |
Question: do you have to climb the tower of interpreters?You know what is interesting about meta-circular interpreters? The infinite recursion of eval-apply is always broken in the end by the application of some primitives. So in the end, no matter what your computational model is, you are still executing a stream of primitives in your "ground" language. And, usually, "lambda" is all you'll ever need as a primitive. But looking at so many toy interpreters you'd see that "lambda" is not quite so "primitive" and requires a lot of machinery to work. Imagine we have a really old CPU without a support for a call instruction, but it has a conditional jump, ALU instructions, loads/stores. It's a simple exercise to define how would a call instruction would look like (in pseudo-assembler): Are there any other ways, besides interpreting another language? Maybe there is a way to build such a reflexive virtual machine that can modify and extend itself? I haven't seen such yet. I've recently stumbled upon Ian Piumarta's "Open,extensible composition models" VPRI Technical Report TR-2011-002 which describes a meta-circular evaluator, where instead of your usual big cond-statement in eval you select your evaluator based on the type of expression you are evaluating (same for applicators) and this mapping is available for the programmer. I've found this a very interesting read, maybe someone could comment on this paper, as I've surely missed a lot. I have surely asked a lot of questions in a very unstructed form, but if anyone would maybe give some useful pointers (something to read on the topic, maybe) it would be greatly appreciated. By artemonster at 2017-07-26 08:56 | LtU Forum | previous forum topic | next forum topic | other blogs | 4500 reads
|
Browse archives
Active forum topics |
Recent comments
26 weeks 6 days ago
26 weeks 6 days ago
26 weeks 6 days ago
49 weeks 12 hours ago
1 year 1 week ago
1 year 2 weeks ago
1 year 2 weeks ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 10 weeks ago