Affiliation:
1. Ochanomizu University, Tokyo, Japan
Abstract
A reflective language enables us to access, inspect, and/or modify the language semantics from within the same language framework. Although the degree of semantics exposure differs from one language to another, the most powerful approach, referred to as the behavioral reflection, exposes the entire language semantics (or the language interpreter) that defines behavior of user programs for user inspection/modification. In this paper, we deal with the behavioral reflection in the context of a functional language Scheme. In particular, we show how to construct a reflective interpreter where user programs are interpreted by the tower of metacircular interpreters and have the ability to change any parts of the interpreters during execution. Its distinctive feature compared to the previous work is that the metalevel interpreters observed by users are written in direct style. Based on the past attempt of the present author, the current work solves the level-shifting anomaly by defunctionalizing and inspecting the top of the continuation frames. The resulting system enables us to freely go up and down the levels and access/modify the direct-style metalevel interpreter. This is in contrast to the previous system where metalevel interpreters were written in continuation-passing style (CPS) and only CPS functions could be exposed to users for modification.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference17 articles.
1. Duplication and partial evaluation
2. Tracing the meta-level
3. Abstracting control
4. Danvy O. and K. Malmkjæ r "Intensions and Extensions in a Reflective Tower " Conference Record of the 1988 ACM Symposium on Lisp and Functional Programming pp. 327--341 (July 1988). 10.1145/62678.62725 Danvy O. and K. Malmkjæ r "Intensions and Extensions in a Reflective Tower " Conference Record of the 1988 ACM Symposium on Lisp and Functional Programming pp. 327--341 (July 1988). 10.1145/62678.62725
Cited by
1 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Static meta-object protocols: towards efficient reflective object-oriented languages;Companion Proceedings of the 15th International Conference on Modularity;2016-03-14