CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

The Treatment of Polymorphism and Modules in a Partial Evaluator

Rogardt Heldal (Institutionen för datavetenskap)
Göteborg : Chalmers University of Technology, 2001. ISBN: 91-7291-011-9.

In this thesis we study aspects of specialisation by partial evaluation and compiler generation. After significant research during the last two decades, there are now powerful specialisers for several programming languages, such as LISP, Scheme, ML, and C. But some features of programming languages are still not handled by specialisers. We consider two such features: polymorphic types and modules.

In our formalism of the binding-time analyser, we provide a solution to how to treat coercions in the context of polymorphism: coercions are used to make values more dynamic. Furthermore, since the semantics of the partial evaluator affect the binding-time analyser, we have formalised both the binding-time rules and the specialiser. We also discuss practical issues arising from our integration of a polymorphic binding-time analyser with a specialiser: the treatment of fix-points, program points, and bounded static variation.

Where modules are concerned, we consider specialising a program consisting of several modules into a specialised version that also consists of several modules. This work relies heavily on a polymorphic binding-time analyser and a compiler generator. The polymorphic binding-time analyser works independently on each module. For each annotated module, we use a compiler generator to create a generating extension. Then we build generating extensions for complete programs, in much the same way as the original modules were put together into complete programs. The result of running all generating extensions is a collection of residual modules, which have a structure derived from the original program.

But modules cause another problem. Previous specialisers produced a program consisting of one module, derived from a source program of one module. It is a weakness that the program being specialised imposes a limitation on the structure of the program generated, in this case, the number of modules. In this thesis we remove the restriction. Since we can obtain many modules by specialising one module, we remove an ``inherited limit'' on the total number of modules. In this work, we need new types of annotation to control the specialisation. We have formalised a binding-time analyser for finding such annotations. We have also given the semantics of the partial evaluator.

Nyckelord: partial evaluation, compiler generator, binding-time analyser, separate compilation, polymorphic types, modules, functional programming

Denna post skapades 2006-08-25. Senast ändrad 2013-09-25.
CPL Pubid: 705


Institutioner (Chalmers)

Institutionen för datavetenskap (1993-2001)


Information Technology

Chalmers infrastruktur

Ingår i serie

Doktorsavhandlingar vid Chalmers tekniska högskola. Ny serie 1695