Integrating Partial Evaluators into Interpreters
نویسنده
چکیده
This paper describes our rst step towards the integration of partial evaluation into standard interpretation. The two main issues in this integration are the treatment of heap objects and side-e ects. To enable specialization with respect to the heap objects that are allocated beforehand in standard evaluation, specialization is performed with respect to the heap state at specialization time rather than based on a program text input so far. To avoid duplication of heap objects, direct references to heap objects are allowed in the specialized programs, in addition to the use of the conventional let-insertion technique. Despite our modest approach on side-e ects that we allow partial evaluation of only side-e ect free portions of a program, the resulting system covers some typical cases, such as the use of partial evaluation during an interactive debugging session. It also enables us to specialize a (side-e ect free) program with respect to cyclic data structures, which was not easy before. We formalize this integration using store semantics and state its correctness. The system is implemented in Scheme and various examples are tested. Among them, we show specialization of a ray tracing program.
منابع مشابه
Trends in Specialization of Interpreters using Offline Narrowing-Driven Partial Evaluation
The search of compilation by specialization of interpreters is a source to source program transformation which has inspired the work of scientists in partial evaluation from many years ago. Narrowing-driven Partial Evaluation (NPE) is a powerful technique for the specialization of functional logic programs. Recent advances in research of offline NPE schemes allow us to develop partial evaluator...
متن کاملModel Transformation by Partial Evaluation of Model Interpreters
In model-driven development, the use of both model translators and model interpreters is widespread. It is also well-known that partial evaluation can turn an interpreter into a translator. In this paper we show that a simple online partial evaluator is effective at specializing a model interpreter with respect to a model to create a compiled model interpretation. Data models pose a particular ...
متن کاملUsing Overloading to Express Distinctions Between Evaluators
Evaluators, also called \interpreters", play a variety of roles in the study of programming languages. Given this, it's surprising that we don't have a better framework for developing evaluators and specifying their relationship to each other. This paper shows that type classes in HASKELL provide an excellent framework for exploring relationships between evaluators, using abstract interpretatio...
متن کاملUsing Overloading to Express Distinctions Between Evaluators 1
Evaluators, also called \interpreters", play a variety of roles in the study of programming languages. Given this, it's surprising that we don't have a better framework for developing evaluators and specifying their relationship to each other. This paper shows that type classes in HASKELL provide an excellent framework for exploring relationships between evaluators, using abstract interpretatio...
متن کاملStrategic Programming by Model Interpretation and Partial Evaluation
The dominant approach to model-driven development and domain-specific language engineering is to write a translator, or compiler, that defines a strategy for executing the high-level language. In this paper we introduce a new approach to strategic programming by writing interpreters of high-level modeling languages, rather than compilers. This technique is demonstrated by interpreting data mode...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001