灯下 登录
计算机科学 / SICP / 5.5.7 Interfacing Compiled Code to the Evaluator

Exercise 5.50 · 习题

Exercise 5.50: Use the compiler to compile the

metacircular evaluator of 4.1 and run this program using the

register-machine simulator. (To compile more than one definition at a time,

you can package the definitions in a begin.) The resulting interpreter

will run very slowly because of the multiple levels of interpretation, but

getting all the details to work is an instructive exercise.

练习 5.50:使用编译器编译 4.1 节的元循环求值器,并在寄存器机器模拟器上运行这个程序。(若要一次编译多个定义,可将定义包裹在一个 begin 中。)所得解释器由于存在多层解释,运行速度会非常慢,但让所有细节都正确运转是一项很有价值的练习。