DIKU ITU KVL

Copenhagen Programming Language Seminar

COPLAS Talk

A declarative approach to C program specialization

Anne-Francoise Le Meur
Compose Group, ENSEIRB/INRIA, France

Thursday, April 24th, 15:15-16:00
DIKU, Universitetsparken 1, room N037

Abstract:

Partial evaluation is a program transformation that aims at automatically specializing a program with respect to a given usage context. This specialization technique has been studied intensively for the past twenty years, and has now reached a mature state, both theoretically and practically. Many variations have been explored with respect to language paradigms and features. These studies have led to the design and implementation of specializers for real-sized languages such as C and Java.

Despite successful application in areas such as graphics, operating systems, and scientific computing, specializers have yet to be widely used. One obstacle to a wider use is the difficulty for a non-expert programmer to adequately describe specialization opportunities. Indeed, under-specialization or over-specialization often occurs, without any direct feedback to the programmer as to the cause of the problem.

We have developed a high-level, module-based declaration language allowing the programmer to guide the choice of both the code to specialize and the invariants to exploit during the specialization process. These declarations are provided, on the side, by the programmer, as the program is being developed. The syntax of this language is similar to the declaration syntax of the language in which the program is written. The declarations are checked prior to specialization to provide feedback to the programmer.

This approach allows the specialization process to be predictable with respect to the declarations, enabling the automatic and systematic specialization of software components. Our approach has been applied in the context of various examples such as the development of a specializable forward error correction encoder component.

We have designed and implemented a compiler for our declarative language, as well as a graphical environment both to assist a component programmer in the creation of a specializable component and to enable a component user to tailor a component to a given application.

Scientific host: Julia Lawall. Administrative host: Camilla Jensen. All are welcome.
The Copenhagen Programming Language Seminar (COPLAS) is a collaboration between DIKU, IT-C and KVL.
To receive information about COPLAS talks by email, send a message to prog-lang-request@mail.it-c.dk with the word 'subscribe' as subject or in the body.

For more information about COPLAS, see http://www.coplas.org