Technical Report (TR95-10) Cover Page

Department of Information Science, Faculty of Science, University of Tokyo
Title:
Partial Evaluator as a Compiler for Reflective Languages
Authors:
Kenichi Asai, Hidehiko Masuhara, Satoshi Matsuoka, and Akinori Yonezawa
Key words and phrases:
partial evaluation, reflection, preaction, I/O-type side-effects
Abstract:
This paper presents an online partial evaluator with a mechanism to handle I/O-type side-effects using preactions, and reports our experiment of using the partial evaluator as a compiler for the reflective language Black we are designing. Black is a Scheme-based reflective language, which allows user programs to access and modify its metalevel interpreter (or the language semantics) from within the same language framework. Because the semantics may change during computation, it is impossible to compile using a conventional Scheme compiler. To cope with this flexibility, we implemented an online partial evaluator, and specialized a Scheme meta-circular interpreter with respect to a modified interpreter to obtain an efficient version of the modified interpreter. The resulting interpreter turns out to be quite efficient in that it is almost identical to the original Scheme interpreter, except that it correctly reflects the modification made by users. In fact, we got more: by supplying a specific user program, we obtained a compiled program under the modified language semantics.
Report date:
December 13, 1995
Written language:
English
Total number of pages:
14
Number of references:
18
Any other identifying information of this report:
Distribution statement:
First issue 35 copies.
Supplementary notes: