Tagging, Encoding, and Jones Optimality
Tagging, Encoding, and Jones Optimality
复制标题
标记、编码和琼斯最优性
DOI:
10.1007/3-540-36575-3_23
复制
发表时间:
2003
期刊:
影响因子:
--
通讯作者:
P. E. M. López
中科院分区:
文献类型:
--
作者:
O. Danvy;P. E. M. López
A partial evaluator is said to be Jones-optimal if the result of specializing a self-interpreter with respect to a source program is textually identical to the source program, modulo renaming. Jones optimality has already been obtained if the self-interpreter is untyped. If the selfinterpreter is typed, however, residual programs are cluttered with type tags. To obtain the original source program, these tags must be removed.A number of sophisticated solutions have already been proposed. We observe, however, that with a simple representation shift, ordinary partial evaluation is already Jones-optimal, modulo an encoding. The representation shift amounts to reading the type tags as constructors for higherorder abstract syntax. We substantiate our observation by considering a typed self-interpreter whose input syntax is higher-order. Specializing this interpreter with respect to a source program yields a residual program that is textually identical to the source program, modulo renaming.