Skip to main content Accessibility help
×
Hostname: page-component-7bb8b95d7b-s9k8s Total loading time: 0 Render date: 2024-10-03T13:27:35.498Z Has data issue: false hasContentIssue false

6 - Implementation

Published online by Cambridge University Press:  04 August 2010

Get access

Summary

We have studied some of the theoretical aspects of using projections in binding-time analysis and how, again in theory, the dependent sum construction can be used to define the run-time arguments. In this chapter we will draw these threads together in the implementation of a projection-based partial evaluator. The current version is written in LML [Aug84] and not in PEL itself, so it is not yet self-applicable. Indeed there are still some problems about self-application of LML-like languages, which we discuss in the concluding chapter.

One slightly surprising feature is that the moderately complicated dependent sum construction turns out to be almost trivial to implement. In contrast, however, the binding-time analysis is fairly intricate because of the complexity involved in representing projections. Of necessity, parts of the following will interest only those intending to produce an implementation themselves. Anyone uninterested in the gory details should skim much of this chapter and turn to the final section where we develop the extended example.

General

A PEL program, as defined in Chapter 4, consists of type definitions followed by a series of function definitions. At the end of these is an expression to be evaluated. The value of this expression gives the value of the whole program. When we intend to partially evaluate a program we present it in exactly the same form except that the final expression is permitted to have free variables. These free variables indicate non-static data.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 1991

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Implementation
  • John Launchbury
  • Book: Project Factorisations in Partial Evaluation
  • Online publication: 04 August 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511569814.008
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Implementation
  • John Launchbury
  • Book: Project Factorisations in Partial Evaluation
  • Online publication: 04 August 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511569814.008
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Implementation
  • John Launchbury
  • Book: Project Factorisations in Partial Evaluation
  • Online publication: 04 August 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511569814.008
Available formats
×